Versions in this module Expand all Collapse all v8 v8.0.2 Jun 27, 2022 v8.0.1 Jun 27, 2022 Changes in this version + const SecondsPerDay + const SecondsPerHour + const SecondsPerMinute + const SecondsPerWeek + func IsNullDataScript(name string) bool + func IsValidScriptClass(name string) (isValid bool) + func LessByAccessCount(bi, bj *CachedBlock) bool + func LessByAccessCountThenHeight(bi, bj *CachedBlock) bool + func LessByAccessTime(bi, bj *CachedBlock) bool + func LessByHeight(bi, bj *CachedBlock) bool + func MakeLessByAccessTimeThenCount(millisecondsBinned int64) func(bi, bj *CachedBlock) bool + func WatchPriorityQueue(bpq *BlockPriorityQueue) + type APICache struct + MainchainBlocks map[int64]chainhash.Hash + func NewAPICache(capacity uint32) *APICache + func (apic *APICache) Capacity() uint32 + func (apic *APICache) Disable() + func (apic *APICache) Enable() + func (apic *APICache) GetBlockHash(height int64) string + func (apic *APICache) GetBlockSize(height int64) int32 + func (apic *APICache) GetBlockSummary(height int64) *BlockDataBasic + func (apic *APICache) GetBlockSummaryByHash(hash string) *BlockDataBasic + func (apic *APICache) GetCachedBlockByHash(hash chainhash.Hash) *CachedBlock + func (apic *APICache) GetCachedBlockByHashStr(hashStr string) *CachedBlock + func (apic *APICache) GetCachedBlockByHeight(height int64) *CachedBlock + func (apic *APICache) GetStakeInfo(height int64) *StakeInfoExtended + func (apic *APICache) GetStakeInfoByHash(hash string) *StakeInfoExtended + func (apic *APICache) Hits() uint64 + func (apic *APICache) IsEnabled() bool + func (apic *APICache) Misses() uint64 + func (apic *APICache) RemoveCachedBlock(cachedBlock *CachedBlock) + func (apic *APICache) RemoveCachedBlockByHeight(height int64) + func (apic *APICache) SetLessFn(lessFn func(bi, bj *CachedBlock) bool) + func (apic *APICache) StoreBlockSummary(blockSummary *BlockDataBasic) error + func (apic *APICache) StoreStakeInfo(stakeInfo *StakeInfoExtended) error + func (apic *APICache) Utilization() float64 + func (apic *APICache) UtilizationBlocks() int64 + type APIStatus struct + APIVersion int + DBHeight uint32 + DBLastBlockTime int64 + DcrdataVersion string + Height uint32 + NetworkName string + NodeConnections int64 + Ready bool + type Address struct + Address string + Transactions []*AddressTxShort + type AddressTotals struct + Address string + BlockHash string + BlockHeight uint64 + CoinsSpent float64 + CoinsUnspent float64 + NumSpent int64 + NumUnspent int64 + type AddressTxRaw struct + BlockHash string + Blocktime TimeAPI + Confirmations int64 + Locktime uint32 + Size int32 + Time TimeAPI + TxID string + Version int32 + Vin []chainjson.VinPrevOut + Vout []Vout + type AddressTxShort struct + Confirmations int64 + Size int32 + Time TimeAPI + TxID string + Value float64 + type AddressTxnOutput struct + Address string + Amount float64 + Atoms int64 + BlockHash string + BlockTime int64 + Confirmations int64 + Height int64 + Satoshis int64 + ScriptPubKey string + TxnID string + Vout uint32 + func TxOutFromDB(dbTxOut *dbtypes.AddressTxnOutput, currentHeight int32) *AddressTxnOutput + type AgendaAPIResponse struct + ByHeight *dbtypes.AgendaVoteChoices + ByTime *dbtypes.AgendaVoteChoices + type AgendasInfo struct + Description string + Mask uint16 + Name string + VoteVersion uint32 + type BlockDataBasic struct + Difficulty float64 + Hash string + Height uint32 + MiningFee *int64 + NumTx uint32 + PoolInfo *TicketPoolInfo + Size uint32 + StakeDiff float64 + Time TimeAPI + TotalSent *int64 + func NewBlockDataBasic() *BlockDataBasic + type BlockDataWithTxType struct + Revs []chainjson.TxRawResult + Tickets []chainjson.TxRawResult + Votes []TxRawWithVoteInfo + type BlockExplorerBasic struct + FreshStake uint8 + Height uint32 + Revocations uint8 + Size uint32 + StakeDiff float64 + Time dbtypes.TimeDef + Voters uint16 + type BlockExplorerExtraInfo struct + CoinSupply int64 + NextBlockSubsidy *chainjson.GetBlockSubsidyResult + TxLen int + type BlockID struct + BlockHash string + BlockHeight int64 + BlockIndex uint32 + BlockTime int64 + Time int64 + type BlockPriorityQueue struct + func NewBlockPriorityQueue(capacity uint32) *BlockPriorityQueue + func (pq *BlockPriorityQueue) Insert(summary *BlockDataBasic, stakeInfo *StakeInfoExtended) (bool, *chainhash.Hash, int64) + func (pq *BlockPriorityQueue) Len() int + func (pq *BlockPriorityQueue) Less(i, j int) bool + func (pq *BlockPriorityQueue) Pop() interface{} + func (pq *BlockPriorityQueue) Push(blockData interface{}) + func (pq *BlockPriorityQueue) Reheap() + func (pq *BlockPriorityQueue) RemoveBlock(b *CachedBlock) + func (pq *BlockPriorityQueue) RemoveIndex(idx int) + func (pq *BlockPriorityQueue) RescanMinMax() + func (pq *BlockPriorityQueue) RescanMinMaxForAdd(height uint32) + func (pq *BlockPriorityQueue) RescanMinMaxForRemove(height uint32) + func (pq *BlockPriorityQueue) RescanMinMaxForUpdate(heightAdd, heightRemove uint32) + func (pq *BlockPriorityQueue) ResetHeap(bh []*CachedBlock) + func (pq *BlockPriorityQueue) SetLessFn(lessFn func(bi, bj *CachedBlock) bool) + func (pq *BlockPriorityQueue) Swap(i, j int) + func (pq *BlockPriorityQueue) UpdateBlock(b *CachedBlock, summary *BlockDataBasic, stakeInfo *StakeInfoExtended) + type BlockRaw struct + Hash string + Height uint32 + Hex string + type BlockSubsidies struct + BlockHash string + BlockNum int64 + NumVotes int16 + Stake int64 + Tax int64 + Total int64 + TotalStake int64 + Work int64 + type BlockSummarySaver interface + StoreBlockSummary func(*BlockDataBasic) error + type BlockTransactionCounts struct + STx int + Tx int + type BlockTransactions struct + STx []string + Tx []string + type BlockValidation struct + Hash string + Height int64 + Validity bool + type CachedBlock struct + func (b *CachedBlock) Access() *BlockDataBasic + func (b CachedBlock) String() string + type CoinSupply struct + Hash string + Height int64 + Mined int64 + Ultimate int64 + type Happy struct + APIReady bool + Happy bool + NodeConnections int64 + TipAge int64 + type InsightAddr struct + Addrs string + type InsightAddress struct + Address string + From int + To int + Transactions []InsightTx + type InsightAddressInfo struct + Address string + Balance float64 + BalanceSat int64 + TotalReceived float64 + TotalReceivedSat int64 + TotalSent float64 + TotalSentSat int64 + TransactionsID []string + TxAppearances int64 + UnconfirmedBalance float64 + UnconfirmedBalanceSat int64 + UnconfirmedTxAppearances int64 + type InsightBlockAddrTxSummary struct + PagesTotal int64 + Txs []InsightTx + type InsightBlockResult struct + Bits string + Confirmations int64 + Difficulty float64 + Hash string + Height int64 + IsMainChain bool + MerkleRoot string + NextHash string + Nonce uint32 + PreviousHash string + Reward float64 + Size int32 + Time int64 + Tx []string + Version int32 + type InsightBlocksSummaryResult struct + Blocks []dbtypes.BlockDataBasic + Length int + Pagination struct{ ... } + type InsightMultiAddrsTx struct + Addresses string + From json.Number + NoAsm json.Number + NoScriptSig json.Number + NoSpent json.Number + To json.Number + type InsightMultiAddrsTxOutput struct + From int + Items []InsightTx + To int + TotalItems int64 + type InsightPagination struct + IsToday string + Next string + Prev string + type InsightRawTx struct + Rawtx string + type InsightScriptPubKey struct + Addresses []string + Asm string + Hex string + Type string + type InsightScriptSig struct + Asm string + Hex string + type InsightTx struct + Blockhash string + Blockheight int64 + Blocktime int64 + Confirmations int64 + Fees float64 + IsCoinBase bool + Locktime uint32 + Size uint32 + Time int64 + Txid string + ValueIn float64 + ValueOut float64 + Version int32 + Vins []*InsightVin + Vouts []*InsightVout + type InsightVin struct + Addr string + CoinBase string + N int + ScriptSig *InsightScriptSig + Sequence *uint32 + Txid string + Value float64 + ValueSat int64 + Vout *uint32 + type InsightVout struct + N uint32 + ScriptPubKey InsightScriptPubKey + SpentHeight interface{} + SpentIndex interface{} + SpentTxID interface{} + Value float64 + type MempoolTicketDetails struct + Height uint32 + Length uint32 + Tickets TicketsDetails + Time int64 + Total uint32 + type MempoolTicketFeeInfo struct + Height uint32 + LowestMineable float64 + Time int64 + type MempoolTicketFees struct + FeeRates []float64 + Height uint32 + Length uint32 + Time int64 + Total uint32 + type OutPoint struct + Hash string + Index uint32 + Tree int8 + type PowerlessTicket struct + Height uint32 + Price float64 + type PowerlessTickets struct + Revoked []PowerlessTicket + Unspent []PowerlessTicket + type PrevOut struct + Addresses []string + Value float64 + type PriceCountTime struct + Count int + Price float64 + Time dbtypes.TimeDef + type ScriptClass uint8 + const ScriptClassInvalid + const ScriptClassMultiSig + const ScriptClassNonStandard + const ScriptClassNullData + const ScriptClassPubKey + const ScriptClassPubKeyHash + const ScriptClassPubkeyAlt + const ScriptClassPubkeyHashAlt + const ScriptClassScriptHash + const ScriptClassStakeGen + const ScriptClassStakeRevocation + const ScriptClassStakeSubChange + const ScriptClassStakeSubmission + func ScriptClassFromName(name string) ScriptClass + func (sc ScriptClass) String() string + type ScriptPubKey struct + Addresses []string + Asm string + CommitAmt *float64 + Hex string + ReqSigs int32 + Type string + type ScriptSig struct + Asm string + Hex string + type SpendByFundingHash struct + BlockHeight interface{} + FundingTxVoutIndex uint32 + SpendingTxHash interface{} + SpendingTxVinIndex interface{} + type StakeDiff struct + Estimates chainjson.EstimateStakeDiffResult + IdxBlockInWindow int + PriceWindowNum int + type StakeInfoExtended struct + Feeinfo chainjson.FeeInfoBlock + Hash string + IdxBlockInWindow int + PoolInfo *TicketPoolInfo + PriceWindowNum int + StakeDiff float64 + func NewStakeInfoExtended() *StakeInfoExtended + type StakeInfoExtendedEstimates struct + Feeinfo chainjson.FeeInfoBlock + Hash string + IdxBlockInWindow int + PoolInfo *TicketPoolInfo + PriceWindowNum int + StakeDiff StakeDiff + type StakeInfoSaver interface + StoreStakeInfo func(*StakeInfoExtended) error + type Status struct + func NewStatus(nodeHeight uint32, conns int64, apiVersion int, dcrdataVersion, netName string) *Status + func (s *Status) API() APIStatus + func (s *Status) DBHeight() uint32 + func (s *Status) DBUpdate(height uint32, blockTime int64) + func (s *Status) Happy() Happy + func (s *Status) Height() uint32 + func (s *Status) NodeConnections() int64 + func (s *Status) Ready() bool + func (s *Status) SetConnections(conns int64) + func (s *Status) SetHeight(height uint32) + func (s *Status) SetReady(ready bool) + type SyncResponse struct + BlockChainHeight int64 + Error *string + Height int64 + Status string + SyncPercentage int64 + Type string + type TicketDetails struct + Fee float64 + FeeRate float64 + Hash string + Height int64 + Size int32 + type TicketInfo struct + ExpirationHeight uint32 + LotteryBlock *TinyBlock + MaturityHeight uint32 + PurchaseBlock *TinyBlock + Revocation *string + Status string + Vote *string + type TicketPoolChartsData struct + ChartHeight uint64 + Mempool *PriceCountTime + OutputsChart *dbtypes.PoolTicketsData + PriceChart *dbtypes.PoolTicketsData + TimeChart *dbtypes.PoolTicketsData + type TicketPoolInfo struct + Height uint32 + Size uint32 + ValAvg float64 + Value float64 + Winners []string + type TicketPoolValsAndSizes struct + EndHeight uint32 + Size []uint32 + StartHeight uint32 + Value []float64 + type TicketsDetails []*TicketDetails + type TimeAPI struct + S dbtypes.TimeDef + func NewTimeAPI(t time.Time) TimeAPI + func NewTimeAPIFromUNIX(t int64) TimeAPI + func (t *TimeAPI) MarshalJSON() ([]byte, error) + func (t *TimeAPI) UnmarshalJSON(data []byte) error + func (t TimeAPI) String() string + func (t TimeAPI) UNIX() int64 + type TinyBlock struct + Hash string + Height uint32 + type TrimmedTx struct + Expiry uint32 + Locktime uint32 + TxID string + Version int32 + Vin []chainjson.Vin + Vout []Vout + type Tx struct + Block *BlockID + Confirmations int64 + type TxIn struct + BlockHeight uint32 + BlockIndex uint32 + PreviousOutPoint OutPoint + Sequence uint32 + SignatureScript string + ValueIn float64 + type TxInputID struct + Hash string + Index uint32 + type TxOut struct + ScriptPubKeyDecoded ScriptPubKey + Value float64 + Version uint16 + type TxRawWithTxType struct + TxType string + type TxRawWithVoteInfo struct + VoteInfo VoteInfo + type TxShort struct + Expiry uint32 + Locktime uint32 + Size int32 + TxID string + Version int32 + Vin []chainjson.Vin + Vout []Vout + type Txns struct + Transactions []string + type VinPrevOut struct + AmountIn *float64 + BlockHeight *uint32 + BlockIndex *uint32 + Coinbase string + PrevOut *PrevOut + ScriptSig *ScriptSig + Sequence uint32 + Stakebase string + Tree int8 + Txid string + Vout uint32 + type VoteInfo struct + Bits uint16 + Choices []*txhelpers.VoteChoice + Validation BlockValidation + Version uint32 + type Vout struct + N uint32 + ScriptPubKeyDecoded ScriptPubKey + Spend *TxInputID + Value float64 + Version uint16 + type VoutMined struct + BestBlock string + Coinbase bool + Confirmations int64 Other modules containing this package github.com/Decred-Next/dcrndata github.com/Decred-Next/dcrndata/api/types/v8