Versions in this module Expand all Collapse all v2 v2.2.1 Oct 30, 2019 Changes in this version type Block + Winners []string v2.1.4 Aug 19, 2019 v2.1.3 Aug 19, 2019 v2.1.2 Aug 1, 2019 Changes in this version + const AddressesTableSync + const AvgBlockSize + const BlockChainSize + const ChainWork + const CoinSupply + const DurationBTW + const FeePerBlock + const HashRate + const InitialDBLoad + const NumIntervals + const POWDifficulty + const TicketByWindows + const TicketPoolSize + const TicketPoolValue + const TicketPrice + const TicketSpendT + const TicketsByBlocks + const TxPerBlock + const TxPerDay + var AddrTxnViewTypes = map[AddrTxnViewType]string + var CtxDeadlineExceeded = context.DeadlineExceeded.Error() + var PGCancelError = "pq: canceling statement due to user request" + var PgCharts = [...]string + var SqliteCharts = [...]string + var TimeBasedGroupings = map[TimeBasedGrouping]string + var TimeIntervals = [NumIntervals]TimeBasedGrouping + var TimeoutPrefix = "TIMEOUT of PostgreSQL query" + func CalculateHashRate(difficulty, targetTimePerBlock float64) float64 + func CalculateWindowIndex(height, stakeDiffWindowSize int64) int64 + func CountCreditDebitRows(rows []*AddressRow) (numCredit, numDebit int) + func CountMergedRows(rows []*AddressRow, txnView AddrTxnViewType) (numMerged int, err error) + func CountMergedRowsCompact(rows []*AddressRowCompact, txnView AddrTxnViewType) (numMerged int, err error) + func DevSubsidyAddress(params *chaincfg.Params) (string, error) + func ExtractBlockTransactions(msgBlock *wire.MsgBlock, txTree int8, chainParams *chaincfg.Params, ...) ([]*Tx, [][]*Vout, []VinTxPropertyARRAY) + func IsTimeout(msg string) bool + func IsTimeoutErr(err error) bool + func TimeBasedGroupingToInterval(grouping TimeBasedGrouping) (float64, error) + type AddrTxnViewType int + const AddrMergedTxn + const AddrMergedTxnCredit + const AddrMergedTxnDebit + const AddrTxnAll + const AddrTxnCredit + const AddrTxnDebit + const AddrTxnUnknown + func AddrTxnViewTypeFromStr(txnType string) AddrTxnViewType + func (a AddrTxnViewType) IsMerged() (bool, error) + func (a AddrTxnViewType) String() string + type AddressBalance struct + Address string + FromStake float64 + NumSpent int64 + NumUnspent int64 + ToStake float64 + TotalSpent int64 + TotalUnspent int64 + func (balance *AddressBalance) HasStakeInputs() bool + func (balance *AddressBalance) HasStakeOutputs() bool + type AddressInfo struct + Address string + AmountReceived dcrutil.Amount + AmountSent dcrutil.Amount + AmountUnspent dcrutil.Amount + Balance *AddressBalance + IsDummyAddress bool + IsMerged bool + KnownFundingTxns int64 + KnownSpendingTxns int64 + KnownTransactions int64 + Limit int64 + MaxTxLimit int64 + Net string + NumFundingTxns int64 + NumSpendingTxns int64 + NumTransactions int64 + NumUnconfirmed int64 + Offset int64 + Path string + Transactions []*AddressTx + TxnCount int64 + TxnType string + TxnsFunding []*AddressTx + TxnsSpending []*AddressTx + UnconfirmedTxns *AddressTransactions + func ReduceAddressHistory(addrHist []*AddressRow) (*AddressInfo, float64, float64) + func (a *AddressInfo) PostProcess(tipHeight uint32) + type AddressMetrics struct + DayTxsCount int64 + MonthTxsCount int64 + OldestBlockTime TimeDef + WeekTxsCount int64 + YearTxsCount int64 + type AddressRow struct + Address string + AtomsCredit uint64 + AtomsDebit uint64 + IsFunding bool + MatchingTxHash string + MergedCount uint64 + TxBlockTime TimeDef + TxHash string + TxType int16 + TxVinVoutIndex uint32 + ValidMainChain bool + Value uint64 + VinVoutDbID uint64 + func SliceAddressCreditRows(rows []*AddressRow, N, offset int) []*AddressRow + func SliceAddressDebitRows(rows []*AddressRow, N, offset int) []*AddressRow + func SliceAddressRows(rows []*AddressRow, N, offset int, txnView AddrTxnViewType) ([]*AddressRow, error) + func SliceAddressRowsAll(rows []*AddressRow, N, offset int) []*AddressRow + func UncompactMergedRows(merged []*AddressRowMerged) []*AddressRow + func UncompactRows(compact []*AddressRowCompact) []*AddressRow + func (ar *AddressRow) IsMerged() bool + type AddressRowCompact struct + Address string + IsFunding bool + MatchingTxHash chainhash.Hash + TxBlockTime int64 + TxHash chainhash.Hash + TxType int16 + TxVinVoutIndex uint32 + ValidMainChain bool + Value uint64 + func CompactRows(rows []*AddressRow) []*AddressRowCompact + type AddressRowMerged struct + Address string + AtomsCredit uint64 + AtomsDebit uint64 + MergedCount int32 + TxBlockTime int64 + TxHash chainhash.Hash + TxType int16 + ValidMainChain bool + func MergeRows(rows []*AddressRow) ([]*AddressRowMerged, error) + func MergeRowsCompact(rows []*AddressRowCompact) []*AddressRowMerged + func MergeRowsCompactRange(rows []*AddressRowCompact, N, offset int, txnView AddrTxnViewType) []*AddressRowMerged + func MergeRowsRange(rows []*AddressRow, N, offset int, txnView AddrTxnViewType) ([]*AddressRowMerged, error) + func (arm *AddressRowMerged) IsFunding() bool + func (arm *AddressRowMerged) Value() uint64 + type AddressTransactions struct + Transactions []*AddressTx + TxnsFunding []*AddressTx + TxnsSpending []*AddressTx + type AddressTx struct + BlockHeight uint32 + Confirmations uint64 + FormattedSize string + InOutID uint32 + IsFunding bool + MatchedTx string + MatchedTxIndex uint32 + MergedTxnCount uint64 + ReceivedTotal float64 + SentTotal float64 + Size uint32 + Time TimeDef + Total float64 + TxID string + TxType string + func (a *AddressTx) IOID(txType ...string) string + func (a *AddressTx) Link() string + type AddressTxnOutput struct + Address string + Atoms int64 + BlockTime int64 + Height int32 + PkScript string + TxHash chainhash.Hash + Vout uint32 + type AgendaStatusType int8 + const ActivatedAgendaStatus + const FailedAgendaStatus + const InitialAgendaStatus + const LockedInAgendaStatus + const StartedAgendaStatus + const UnknownStatus + func AgendaStatusFromStr(status string) AgendaStatusType + func (a *AgendaStatusType) UnmarshalJSON(b []byte) error + func (a AgendaStatusType) MarshalJSON() ([]byte, error) + func (a AgendaStatusType) String() string + type AgendaSummary struct + Abstain uint32 + LockedIn int64 + No uint32 + VotingStarted int64 + Yes uint32 + type AgendaVoteChoices struct + Abstain []uint64 + Height []uint64 + No []uint64 + Time []TimeDef + Total []uint64 + Yes []uint64 + type Block struct + Bits uint32 + ChainWork string + Difficulty float64 + FreshStake uint8 + Hash string + Height uint32 + Nonce uint64 + NumRegTx uint32 + NumStakeTx uint32 + NumTx uint32 + PoolSize uint32 + PreviousHash string + Revocations uint8 + SBits uint64 + STx []string + STxDbIDs []uint64 + Size uint32 + StakeVersion uint32 + Time TimeDef + Tx []string + TxDbIDs []uint64 + Version uint32 + VoteBits uint16 + Voters uint16 + func MsgBlockToDBBlock(msgBlock *wire.MsgBlock, chainParams *chaincfg.Params, chainWork string) *Block + type BlockChainData struct + AgendaMileStones map[string]MileStone + BestBlockHash string + BestHeight int64 + Chain string + ChainWork string + Difficulty uint32 + IsInitialBlockDownload bool + MaxBlockSize int64 + SyncHeight int64 + VerificationProgress float64 + type BlockDataBasic struct + Difficulty float64 + Hash string + Height uint32 + NumTx uint32 + Size uint32 + StakeDiff float64 + Time TimeDef + type BlockStatus struct + Hash string + Height uint32 + IsMainchain bool + IsValid bool + NextHash string + PrevHash string + type BlocksGroupedInfo struct + BlocksCount int64 + Difficulty float64 + EndBlock int64 + EndTime TimeDef + FormattedEndTime string + FormattedSize string + FormattedStartTime string + FreshStake uint64 + IndexVal int64 + Revocations uint64 + Size int64 + StartTime TimeDef + TicketPrice int64 + Transactions uint64 + TxCount uint64 + Voters uint64 + type ChartsData struct + Amount []float64 + ChainSize []uint64 + ChainWork []uint64 + Count []uint64 + Difficulty []float64 + Height []uint64 + Net []float64 + NetHash []uint64 + Pooled []uint64 + Received []float64 + ReceivedRtx []uint64 + RevokeTx []uint64 + Revoked []uint64 + Sent []float64 + SentRtx []uint64 + Size []uint64 + SizeF []float64 + Solo []uint64 + Tickets []uint64 + Time []TimeDef + Unspent []uint64 + ValueF []float64 + Votes []uint64 + type DeletionSummary struct + Addresses int64 + Blocks int64 + Misses int64 + Tickets int64 + Timings *DeletionSummary + Transactions int64 + Vins int64 + Votes int64 + Vouts int64 + func (s DeletionSummary) String() string + type DeletionSummarySlice []DeletionSummary + func (ds DeletionSummarySlice) Reduce() DeletionSummary + type HistoryChart int8 + const AmountFlow + const ChartUnknown + const TxsType + type JSONB map[string]interface + type MileStone struct + Activated int64 + ExpireTime time.Time + HardForked int64 + ID int64 + StartTime time.Time + Status AgendaStatusType + VotingDone int64 + VotingStarted int64 + type PoolTicketsData struct + Count []uint64 + Immature []uint64 + Live []uint64 + Mempool []uint64 + Outputs []uint64 + Price []float64 + Time []TimeDef + type ProgressBarLoad struct + BarID string + From int64 + Msg string + Subtitle string + Timestamp int64 + To int64 + type ProposalChartsData struct + No []uint64 + Time []TimeDef + Yes []uint64 + type ScriptPubKeyData struct + Addresses []string + ReqSigs uint32 + Type string + type ScriptSig struct + Asm string + Hex string + type SideChain struct + Hashes []string + Heights []int64 + type SyncResult struct + Error error + Height int64 + type TicketPoolStatus int16 + const PoolStatusExpired + const PoolStatusLive + const PoolStatusMissed + const PoolStatusVoted + func (p TicketPoolStatus) String() string + type TicketSpendType int16 + const TicketRevoked + const TicketUnspent + const TicketVoted + func (p TicketSpendType) String() string + type TimeBasedGrouping int8 + const AllGrouping + const DayGrouping + const MonthGrouping + const UnknownGrouping + const WeekGrouping + const YearGrouping + func TimeGroupingFromStr(groupings string) TimeBasedGrouping + func (g TimeBasedGrouping) String() string + type TimeDef struct + T time.Time + func NewTimeDef(t time.Time) TimeDef + func NewTimeDefFromUNIX(t int64) TimeDef + func (t *TimeDef) MarshalJSON() ([]byte, error) + func (t *TimeDef) Scan(src interface{}) error + func (t TimeDef) Format(layout string) string + func (t TimeDef) RFC3339() string + func (t TimeDef) String() string + func (t TimeDef) UNIX() int64 + func (t TimeDef) Value() (driver.Value, error) + type TimeDefLocal TimeDef + func (t TimeDefLocal) Value() (driver.Value, error) + type Tx struct + BlockHash string + BlockHeight int64 + BlockIndex uint32 + BlockTime TimeDef + Expiry uint32 + Fees int64 + IsMainchainBlock bool + IsValidBlock bool + Locktime uint32 + NumVin uint32 + NumVout uint32 + Sent int64 + Size uint32 + Spent int64 + Time TimeDef + Tree int8 + TxID string + TxType int16 + Version uint16 + VinDbIds []uint64 + VoutDbIds []uint64 + Vouts []*Vout + type UInt64Array []uint64 + func (a *UInt64Array) Scan(src interface{}) error + func (a UInt64Array) Value() (driver.Value, error) + type UTXO struct + TxHash string + TxIndex uint32 + type UTXOData struct + Addresses []string + Value int64 + type Vin struct + AmountIn float64 + BlockHeight uint32 + BlockIndex uint32 + Coinbase string + ScriptHex string + Sequence uint32 + Tree int8 + TxHash string + VoutIdx uint32 + type VinTxProperty struct + BlockHeight uint32 + BlockIndex uint32 + IsMainchain bool + IsValid bool + PrevOut string + PrevTxHash string + PrevTxIndex uint32 + PrevTxTree uint16 + ScriptHex []byte + Sequence uint32 + Time TimeDef + TxID string + TxIndex uint32 + TxTree uint16 + TxType int16 + ValueIn int64 + type VinTxPropertyARRAY []VinTxProperty + func (p *VinTxPropertyARRAY) Scan(src interface{}) error + func (p VinTxPropertyARRAY) Value() (driver.Value, error) + type VoteChoice uint8 + const Abstain + const No + const VoteChoiceUnknown + const Yes + func ChoiceIndexFromStr(choice string) (VoteChoice, error) + func (v VoteChoice) String() string + type Vout struct + ScriptPubKey []byte + ScriptPubKeyData ScriptPubKeyData + TxHash string + TxIndex uint32 + TxTree int8 + TxType int16 + Value uint64 + Version uint16 Other modules containing this package github.com/decred/dcrdata github.com/decred/dcrdata/db/dbtypes github.com/decred/dcrdata/v3 github.com/decred/dcrdata/v4 github.com/decred/dcrdata/v6 github.com/decred/dcrdata/v7