explorer

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2017 License: ISC Imports: 22 Imported by: 0

Documentation

Overview

Package explorer handles the explorer subsystem for displaying the explorer pages Copyright (c) 2017, The dcrdata developers See LICENSE for details.

Copyright (c) 2017, The dcrdata developers See LICENSE for details.

Index

Constants

View Source
const (
	AddressRows = 500
)

Variables

This section is empty.

Functions

func DisableLog

func DisableLog()

DisableLog disables all library log output. Logging output is disabled by default until UseLogger is called.

func New

func New(dataSource explorerDataSource, userRealIP bool) *explorerUI

New returns an initialized instance of explorerUI

func UseLogger

func UseLogger(logger btclog.Logger)

UseLogger uses a specified Logger to output package logging info.

Types

type AddressInfo

type AddressInfo struct {
	Address          string
	Transactions     []*AddressTx
	NumTransactions  int
	TotalUnconfirmed int
	Received         dcrutil.Amount
	AddressRow       int
	TotalSent        dcrutil.Amount
	UnSpent          dcrutil.Amount
}

AddressInfo models data for display on the address page

type AddressTx

type AddressTx struct {
	TxID          string
	FormattedSize string
	Total         float64
	Confirmations uint64
	Time          int64
	FormattedTime string
	RecievedTotal float64
	SentTotal     float64
}

AddressTx models data for transactions on the address page

type BlockBasic

type BlockBasic struct {
	Height         int64
	Size           int32
	Voters         uint16
	Transactions   int
	FreshStake     uint8
	Revocations    uint32
	BlockTime      int64
	FormattedTime  string
	FormattedBytes string
}

BlockBasic models data for the explorer's explorer page

type BlockInfo

type BlockInfo struct {
	*BlockBasic
	Hash          string
	Version       int32
	Confirmations int64
	StakeRoot     string
	MerkleRoot    string
	Tx            []*TxBasic
	Tickets       []*TxBasic
	Revs          []*TxBasic
	Votes         []*TxBasic
	Nonce         uint32
	VoteBits      uint16
	FinalState    string
	PoolSize      uint32
	Bits          string
	SBits         float64
	Difficulty    float64
	ExtraData     string
	StakeVersion  uint32
	PreviousHash  string
	NextHash      string
	TotalSent     float64
	MiningFee     dcrutil.Amount
}

BlockInfo models data for display on the block page

type BlockValidation

type BlockValidation struct {
	Hash     string `json:"hash"`
	Height   int64  `json:"height"`
	Validity bool   `json:"validity"`
}

BlockValidation models data about a vote's decision on a block

type TxBasic

type TxBasic struct {
	TxID          string
	FormattedSize string
	Total         float64
	Fee           dcrutil.Amount
	FeeRate       dcrutil.Amount
	VoteInfo      *VoteInfo
}

TxBasic models data for transactions on the block page

type TxInfo

type TxInfo struct {
	*TxBasic
	Type            string
	Vin             []Vin
	Vout            []Vout
	BlockHeight     int64
	BlockIndex      uint32
	Confirmations   int64
	Time            int64
	FormattedTime   string
	Mature          string
	VoteFundsLocked string
	TicketMaturity  int64
}

TxInfo models data needed for display on the tx page

type Vin

type Vin struct {
	*dcrjson.Vin
	Addresses       []string
	FormattedAmount string
}

Vin models basic data about a tx input for display

type VoteInfo

type VoteInfo struct {
	Validation BlockValidation         `json:"block_validation"`
	Version    uint32                  `json:"vote_version"`
	Bits       uint16                  `json:"vote_bits"`
	Choices    []*txhelpers.VoteChoice `json:"vote_choices"`
}

VoteInfo models data about a SSGen transaction (vote)

type Vout

type Vout struct {
	Addresses       []string
	Amount          float64
	FormattedAmount string
	Type            string
	Spent           bool
	OP_RETURN       string
}

Vout models basic data about a tx output for display

Jump to

Keyboard shortcuts

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