{"modulePath":"github.com/parallelcointeam/exploder","version":"v2.0.4+incompatible","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package dcrdataapi\n\n## Constants\n\n```go\nconst (\n\tSecondsPerMinute int64 = 60\n\tSecondsPerHour   int64 = 60 * 60\n\tSecondsPerDay    int64 = 24 * SecondsPerHour\n\tSecondsPerWeek   int64 = 7 * SecondsPerDay\n)\n```\nconstants from time\n\n## Functions\n\n```go\nfunc LessByAccessCount(bi, bj *CachedBlock) bool\n```\nLessByAccessCount defines higher priority CachedBlock as having been accessed more often.\n\n```go\nfunc LessByAccessCountThenHeight(bi, bj *CachedBlock) bool\n```\nLessByAccessCountThenHeight compares access count with LessByAccessCount if the blocks have different accessTime values, otherwise it compares height with LessByHeight.\n\n```go\nfunc LessByAccessTime(bi, bj *CachedBlock) bool\n```\nLessByAccessTime defines higher priority CachedBlock as having a more recent access time. More recent accesses have a larger accessTime value (Unix time).\n\n```go\nfunc LessByHeight(bi, bj *CachedBlock) bool\n```\nLessByHeight defines a higher priority CachedBlock as having a higher height. That is, more recent blocks have higher priority than older blocks.\n\n```go\nfunc MakeLessByAccessTimeThenCount(millisecondsBinned int64) func(bi, bj *CachedBlock) bool\n```\nMakeLessByAccessTimeThenCount will create a CachedBlock comparison function given the specified time resolution in milliseconds.  Two access times less than the given time apart are considered the same time, and access count is used to break the tie.\n\n```go\nfunc WatchPriorityQueue(bpq *BlockPriorityQueue)\n```\nWatchPriorityQueue is a hack since the priority of a CachedBlock is modified (if access or access time is in the LessFn) without triggering a reheap.\n\n## Types\n\n```go\ntype APICache struct {\n\tsync.RWMutex\n\n\tMainchainBlocks []chainhash.Hash // needs to be handled in reorg\n\t// contains filtered or unexported fields\n}\n```\nAPICache maintains a fixed-capacity cache of CachedBlocks. Use NewAPICache to create the cache with the desired capacity.\n\n```go\nfunc NewAPICache(capacity uint32) *APICache\n```\nNewAPICache creates an APICache with the specified capacity.\n\nNOTE: The consumer of APICache should fill out MainChainBlocks before using it.  For example, given a struct DB at height dbHeight with an APICache:\n\n\t DB.APICache = NewAPICache(10000)\n\t\tDB.APICache.MainchainBlocks = make([]chainhash.Hash, 0, dbHeight+NExtra)\n\t\tfor i := int64(0); i \u003c= dbHeight; i++ {\n\t\t\thash := DB.SomeFunctionToGetBlockHash(i)\n\t\t\tDB.APICache.MainchainBlocks = append(DB.APICache.MainchainBlocks, *hash)\n\t\t}\n\n```go\nfunc (apic *APICache) Capacity() uint32\n```\nCapacity returns the capacity of the APICache\n\n```go\nfunc (apic *APICache) Disable()\n```\nDisable sets the isEnabled flag of the APICache. The does little presently.\n\n```go\nfunc (apic *APICache) Enable()\n```\nEnable sets the isEnabled flag of the APICache. The does little presently.\n\n```go\nfunc (apic *APICache) GetBlockSummary(height int64) *BlockDataBasic\n```\nGetBlockSummary attempts to retrieve the block summary for the input height. The return is nil if no block with that height is cached.\n\n```go\nfunc (apic *APICache) GetCachedBlockByHash(hash chainhash.Hash) *CachedBlock\n```\nGetCachedBlockByHash attempts to fetch a CachedBlock with the given hash. The return is nil if no block with that hash is cached.\n\n```go\nfunc (apic *APICache) GetCachedBlockByHashStr(hashStr string) *CachedBlock\n```\nGetCachedBlockByHashStr attempts to fetch a CachedBlock with the given hash. The return is nil if no block with that hash is cached.\n\n```go\nfunc (apic *APICache) GetCachedBlockByHeight(height int64) *CachedBlock\n```\nGetCachedBlockByHeight attempts to fetch a CachedBlock with the given height. The return is nil if no block with that height is cached.\n\n```go\nfunc (apic *APICache) Hits() uint64\n```\nHits returns the hit count of the APICache\n\n```go\nfunc (apic *APICache) Misses() uint64\n```\nMisses returns the miss count of the APICache\n\n```go\nfunc (apic *APICache) RemoveCachedBlock(cachedBlock *CachedBlock)\n```\nRemoveCachedBlock removes the input CachedBlock the cache. If the block is not in cache, this is essentially a silent no-op.\n\n```go\nfunc (apic *APICache) SetLessFn(lessFn func(bi, bj *CachedBlock) bool)\n```\nSetLessFn sets the comparator used by the priority queue. For information on the input function, see the docs for (pq \\*BlockPriorityQueue).SetLessFn.\n\n```go\nfunc (apic *APICache) StoreBlockSummary(blockSummary *BlockDataBasic) error\n```\nStoreBlockSummary caches the input BlockDataBasic, if the priority queue indicates that the block should be added.\n\n```go\nfunc (apic *APICache) Utilization() float64\n```\nUtilization returns the percent utilization of the cache\n\n```go\nfunc (apic *APICache) UtilizationBlocks() int64\n```\nUtilizationBlocks returns the number of blocks stored in the cache\n\n```go\ntype Address struct {\n\tAddress      string            `json:\"address\"`\n\tTransactions []*AddressTxShort `json:\"address_transactions\"`\n}\n```\nAddress models the address string with the transactions as AddressTxShort\n\n```go\ntype AddressTxRaw struct {\n\tSize          int32                `json:\"size\"`\n\tTxID          string               `json:\"txid\"`\n\tVersion       int32                `json:\"version\"`\n\tLocktime      uint32               `json:\"locktime\"`\n\tVin           []dcrjson.VinPrevOut `json:\"vin\"`\n\tVout          []Vout               `json:\"vout\"`\n\tConfirmations int64                `json:\"confirmations\"`\n\tBlockHash     string               `json:\"blockhash\"`\n\tTime          int64                `json:\"time,omitempty\"`\n\tBlocktime     int64                `json:\"blocktime,omitempty\"`\n}\n```\nAddressTxRaw is modeled from SearchRawTransactionsResult but with size in place of hex\n\n```go\ntype AddressTxShort struct {\n\tTxID          string  `json:\"txid\"`\n\tSize          int32   `json:\"size\"`\n\tTime          int64   `json:\"time\"`\n\tValue         float64 `json:\"value\"`\n\tConfirmations int64   `json:\"confirmations\"`\n}\n```\nAddressTxShort is a subset of AddressTxRaw with just the basic tx details pertaining the particular address\n\n```go\ntype BlockDataBasic struct {\n\tHeight     uint32  `json:\"height\"`\n\tSize       uint32  `json:\"size\"`\n\tHash       string  `json:\"hash\"`\n\tDifficulty float64 `json:\"diff\"`\n\tStakeDiff  float64 `json:\"sdiff\"`\n\tTime       int64   `json:\"time\"`\n\t//TicketPoolInfo\n\tPoolInfo TicketPoolInfo `json:\"ticket_pool\"`\n}\n```\nBlockDataBasic models primary information about block at height Height\n\n```go\ntype BlockDataWithTxType struct {\n\t*dcrjson.GetBlockVerboseResult\n\tVotes   []TxRawWithVoteInfo\n\tTickets []dcrjson.TxRawResult\n\tRevs    []dcrjson.TxRawResult\n}\n```\nBlockDataWithTxType adds an array of TxRawWithTxType to dcrjson.GetBlockVerboseResult to include the stake transaction type\n\n```go\ntype BlockExplorerBasic struct {\n\tHeight      uint32  `json:\"height\"`\n\tSize        uint32  `json:\"size\"`\n\tVoters      uint16  `json:\"votes\"`\n\tFreshStake  uint8   `json:\"tickets\"`\n\tRevocations uint8   `json:\"revocations\"`\n\tStakeDiff   float64 `json:\"sdiff\"`\n\tTime        int64   `json:\"time\"`\n\tBlockExplorerExtraInfo\n}\n```\nBlockExplorerBasic models primary information about block at height Height for the block explorer.\n\n```go\ntype BlockExplorerExtraInfo struct {\n\tTxLen            int                            `json:\"tx\"`\n\tFormattedTime    string                         `json:\"formatted_time\"`\n\tCoinSupply       int64                          `json:\"coin_supply\"`\n\tNextBlockSubsidy *dcrjson.GetBlockSubsidyResult `json:\"next_block_subsidy\"`\n}\n```\nBlockExplorerExtraInfo contains supplemental block metadata used by the explorer.\n\n```go\ntype BlockID struct {\n\tBlockHash   string `json:\"blockhash\"`\n\tBlockHeight int64  `json:\"blockheight\"`\n\tBlockIndex  uint32 `json:\"blockindex\"`\n\tTime        int64  `json:\"time\"`\n\tBlockTime   int64  `json:\"blocktime\"`\n}\n```\nBlockID models very basic info about a block\n\n```go\ntype BlockPriorityQueue struct {\n\t*sync.RWMutex\n\t// contains filtered or unexported fields\n}\n```\nBlockPriorityQueue implements heap.Interface and holds CachedBlocks\n\n```go\nfunc NewBlockPriorityQueue(capacity uint32) *BlockPriorityQueue\n```\nNewBlockPriorityQueue is the constructor for BlockPriorityQueue that initializes an empty heap with the given capacity, and sets the default LessFn as a comparison by access time with 1 day resolution (blocks accessed within the  24 hours are considered to have the same access time), followed by access count. Use BlockPriorityQueue.SetLessFn to redefine the comparator.\n\n```go\nfunc (pq *BlockPriorityQueue) Insert(summary *BlockDataBasic) (bool, *chainhash.Hash)\n```\nInsert will add an element, while respecting the queue's capacity if at capacity\n\n  - compare with top and replace or return\n  - if replaced top, heapdown (Fix(pq,0))\n\nelse (not at capacity)\n\n  - heap.Push, which is pq.Push (append at bottom) then heapup\n\n```go\nfunc (pq BlockPriorityQueue) Len() int\n```\nLen is require for heap.Interface\n\n```go\nfunc (pq BlockPriorityQueue) Less(i, j int) bool\n```\nLess performs the comparison priority(i) \\\u003c priority(j). Use BlockPriorityQueue.SetLessFn to define the desired behavior for the CachedBlocks heap\\[i] and heap\\[j].\n\n```go\nfunc (pq *BlockPriorityQueue) Pop() interface{}\n```\nPop will return an interface{} that may be cast to \\*CachedBlock.  Use heap.Pop, not this.\n\n```go\nfunc (pq *BlockPriorityQueue) Push(blockSummary interface{})\n```\nPush a \\*BlockDataBasic. Use heap.Push, not this directly.\n\n```go\nfunc (pq *BlockPriorityQueue) Reheap()\n```\nReheap is a shortcut for heap.Init(pq)\n\n```go\nfunc (pq *BlockPriorityQueue) RemoveBlock(b *CachedBlock)\n```\nRemoveBlock removes the specified CachedBlock from the queue. Remember to remove it from the actual block cache!\n\n```go\nfunc (pq *BlockPriorityQueue) RemoveIndex(idx int)\n```\nRemoveIndex removes the CachedBlock at the specified position in the heap. This function is NOT thread-safe.\n\n```go\nfunc (pq *BlockPriorityQueue) RescanMinMax()\n```\nRescanMinMax rescans the enitire heap to get the current min/max heights. This function is NOT thread-safe.\n\n```go\nfunc (pq *BlockPriorityQueue) RescanMinMaxForAdd(height uint32)\n```\nRescanMinMaxForAdd conditionally updates the heap min/max height given the height of the block to add (push). No scan, just update min/max. This function is NOT thread-safe.\n\n```go\nfunc (pq *BlockPriorityQueue) RescanMinMaxForRemove(height uint32)\n```\nRescanMinMaxForRemove conditionally rescans the heap min/max height given the height of the block to remove (pop). Make sure to remove the block BEFORE running this, as any rescan of the heap will see the block. This function is NOT thread-safe.\n\n```go\nfunc (pq *BlockPriorityQueue) RescanMinMaxForUpdate(heightAdd, heightRemove uint32)\n```\nRescanMinMaxForUpdate conditionally rescans the heap min/max height given old and new heights of the CachedBlock being updated. This function is NOT thread-safe.\n\n```go\nfunc (pq *BlockPriorityQueue) ResetHeap(bh []*CachedBlock)\n```\nResetHeap creates a fresh queue given the input \\[]\\*CachedBlock. For every CachedBlock in the queue, ResetHeap resets the access count and time, and heap index. The min/max heights are reset, the heap is heapifies. NOTE: the input slice is modifed, but not reordered. A fresh slice is created for PQ internal use.\n\n```go\nfunc (pq *BlockPriorityQueue) SetLessFn(lessFn func(bi, bj *CachedBlock) bool)\n```\nSetLessFn sets the function called by Less. The input lessFn must accept two \\*CachedBlock and return a bool, unlike Less, which accepts heap indexes i, j. This allows to define a comparator without requiring a heap.\n\n```go\nfunc (pq BlockPriorityQueue) Swap(i, j int)\n```\nSwap swaps the cachedBlocks at i and j. This is used container/heap.\n\n```go\nfunc (pq *BlockPriorityQueue) UpdateBlock(b *CachedBlock, summary *BlockDataBasic)\n```\nUpdateBlock will update the specified CachedBlock, which must be in the queue. This function is NOT thread-safe.\n\n```go\ntype BlockSummarySaver interface {\n\tStoreBlockSummary(blockSummary *BlockDataBasic) error\n}\n```\nBlockSummarySaver is likely to be required to be implemented by the type utilizing APICache.\n\n```go\ntype BlockTransactionCounts struct {\n\tTx  int `json:\"tx\"`\n\tSTx int `json:\"stx\"`\n}\n```\nBlockTransactionCounts contains the regular and stake transaction counts for a block.\n\n```go\ntype BlockTransactions struct {\n\tTx  []string `json:\"tx\"`\n\tSTx []string `json:\"stx\"`\n}\n```\nBlockTransactions models an array of stake and regular transactions for a block\n\n```go\ntype BlockValidation struct {\n\tHash     string `json:\"hash\"`\n\tHeight   int64  `json:\"height\"`\n\tValidity bool   `json:\"validity\"`\n}\n```\nBlockValidation models data about a vote's decision on a block\n\n```go\ntype CachedBlock struct {\n\t// contains filtered or unexported fields\n}\n```\nCachedBlock represents a block that is managed by the cache.\n\n```go\nfunc (b *CachedBlock) Access() *BlockDataBasic\n```\nAccess increments the access count and sets the accessTime to now. The BlockDataBasic stored in the CachedBlock is returned.\n\n```go\nfunc (b CachedBlock) String() string\n```\nString satisfies the Stringer interface.\n\n```go\ntype CoinSupply struct {\n\tHeight   int64  `json:\"block_height\"`\n\tHash     string `json:\"block_hash\"`\n\tMined    int64  `json:\"supply_mined\"`\n\tUltimate int64  `json:\"supply_ultimate\"`\n}\n```\nCoinSupply models the coin supply at a certain best block.\n\n```go\ntype MempoolTicketDetails struct {\n\tHeight  uint32         `json:\"height\"`\n\tTime    int64          `json:\"time\"`\n\tLength  uint32         `json:\"length\"`\n\tTotal   uint32         `json:\"total\"`\n\tTickets TicketsDetails `json:\"tickets\"`\n}\n```\nMempoolTicketDetails models basic mempool info with ticket details Tickets\n\n```go\ntype MempoolTicketFeeInfo struct {\n\tHeight uint32 `json:\"height\"`\n\tTime   int64  `json:\"time\"`\n\tdcrjson.FeeInfoMempool\n\tLowestMineable float64 `json:\"lowest_mineable\"`\n}\n```\nMempoolTicketFeeInfo models statistical ticket fee info at block height Height\n\n```go\ntype MempoolTicketFees struct {\n\tHeight   uint32    `json:\"height\"`\n\tTime     int64     `json:\"time\"`\n\tLength   uint32    `json:\"length\"`\n\tTotal    uint32    `json:\"total\"`\n\tFeeRates []float64 `json:\"top_fees\"`\n}\n```\nMempoolTicketFees models info about ticket fees at block height Height\n\n```go\ntype OutPoint struct {\n\tHash  string `json:\"hash\"`\n\tIndex uint32 `json:\"index\"`\n\tTree  int8   `json:\"tree\"`\n}\n```\nOutPoint is used to track previous transaction outputs.\n\n```go\ntype PrevOut struct {\n\tAddresses []string `json:\"addresses,omitempty\"`\n\tValue     float64  `json:\"value\"`\n}\n```\nPrevOut represents previous output for an input Vin.\n\n```go\ntype ScriptPubKey struct {\n\tAsm       string   `json:\"asm\"`\n\tReqSigs   int32    `json:\"reqSigs,omitempty\"`\n\tType      string   `json:\"type\"`\n\tAddresses []string `json:\"addresses,omitempty\"`\n\tCommitAmt *float64 `json:\"commitamt,omitempty\"`\n}\n```\nScriptPubKey is the result of decodescript(ScriptPubKeyHex)\n\n```go\ntype ScriptSig struct {\n\tAsm string `json:\"asm\"`\n\tHex string `json:\"hex\"`\n}\n```\nScriptSig models the signature script used to redeem the origin transaction as a JSON object (non-coinbase txns only)\n\n```go\ntype StakeDiff struct {\n\tdcrjson.GetStakeDifficultyResult\n\tEstimates        dcrjson.EstimateStakeDiffResult `json:\"estimates\"`\n\tIdxBlockInWindow int                             `json:\"window_block_index\"`\n\tPriceWindowNum   int                             `json:\"window_number\"`\n}\n```\nStakeDiff represents data about the evaluated stake difficulty and estimates\n\n```go\ntype StakeInfoExtended struct {\n\tFeeinfo          dcrjson.FeeInfoBlock `json:\"feeinfo\"`\n\tStakeDiff        float64              `json:\"stakediff\"`\n\tPriceWindowNum   int                  `json:\"window_number\"`\n\tIdxBlockInWindow int                  `json:\"window_block_index\"`\n\tPoolInfo         TicketPoolInfo       `json:\"ticket_pool\"`\n}\n```\nStakeInfoExtended models data about the fee, pool and stake difficulty\n\n```go\ntype StakeInfoExtendedEstimates struct {\n\tFeeinfo          dcrjson.FeeInfoBlock `json:\"feeinfo\"`\n\tStakeDiff        StakeDiff            `json:\"stakediff\"`\n\tPriceWindowNum   int                  `json:\"window_number\"`\n\tIdxBlockInWindow int                  `json:\"window_block_index\"`\n\tPoolInfo         TicketPoolInfo       `json:\"ticket_pool\"`\n}\n```\nStakeInfoExtendedEstimates is similar to StakeInfoExtended but includes stake difficulty estimates with the stake difficulty\n\n```go\ntype Status struct {\n\tReady           bool   `json:\"ready\"`\n\tDBHeight        uint32 `json:\"db_height\"`\n\tHeight          uint32 `json:\"node_height\"`\n\tNodeConnections int64  `json:\"node_connections\"`\n\tAPIVersion      int    `json:\"api_version\"`\n\tDcrdataVersion  string `json:\"dcrdata_version\"`\n}\n```\nStatus indicates the state of the server, including the API version and the software version.\n\n```go\ntype TicketDetails struct {\n\tHash    string  `json:\"hash\"`\n\tFee     float64 `json:\"abs_fee\"`\n\tFeeRate float64 `json:\"fee\"`\n\tSize    int32   `json:\"size\"`\n\tHeight  int64   `json:\"height_received\"`\n}\n```\nTicketDetails models details about ticket Hash received at height Height\n\n```go\ntype TicketPoolInfo struct {\n\tHeight  uint32   `json:\"height\"`\n\tSize    uint32   `json:\"size\"`\n\tValue   float64  `json:\"value\"`\n\tValAvg  float64  `json:\"valavg\"`\n\tWinners []string `json:\"winners\"`\n}\n```\nTicketPoolInfo models data about ticket pool\n\n```go\ntype TicketPoolValsAndSizes struct {\n\tStartHeight uint32    `json:\"start_height\"`\n\tEndHeight   uint32    `json:\"end_height\"`\n\tValue       []float64 `json:\"value\"`\n\tSize        []float64 `json:\"size\"`\n}\n```\nTicketPoolValsAndSizes models two arrays, one each for ticket values and sizes for blocks StartHeight to EndHeight\n\n```go\ntype TicketsDetails []*TicketDetails\n```\nTicketsDetails is an array of pointers of TicketDetails used in MempoolTicketDetails\n\n```go\ntype TrimmedTx struct {\n\tTxID     string        `json:\"txid\"`\n\tVersion  int32         `json:\"version\"`\n\tLocktime uint32        `json:\"locktime\"`\n\tExpiry   uint32        `json:\"expiry\"`\n\tVin      []dcrjson.Vin `json:\"vin\"`\n\tVout     []Vout        `json:\"vout\"`\n}\n```\nTrimmedTx models data to resemble to result of the decoderawtransaction call\n\n```go\ntype Tx struct {\n\tTxShort\n\tConfirmations int64    `json:\"confirmations\"`\n\tBlock         *BlockID `json:\"block,omitempty\"`\n}\n```\nTx models TxShort with the number of confirmations and block info Block\n\n```go\ntype TxIn struct {\n\t// Non-witness\n\tPreviousOutPoint OutPoint `json:\"prevout\"`\n\tSequence         uint32   `json:\"sequence\"`\n\n\t// Witness\n\tValueIn         float64 `json:\"value\"`\n\tBlockHeight     uint32  `json:\"blockheight\"`\n\tBlockIndex      uint32  `json:\"blockindex\"`\n\tSignatureScript string  `json:\"sigscript\"`\n}\n```\nTxIn defines a decred transaction input.\n\n```go\ntype TxOut struct {\n\tValue     float64  `json:\"value\"`\n\tVersion   uint16   `json:\"version\"`\n\tPkScript  string   `json:\"pkscript\"`\n\tAddresses []string `json:\"addresses,omitempty\"`\n}\n```\nTxOut defines a decred transaction output.\n\n```go\ntype TxRawWithTxType struct {\n\tdcrjson.TxRawResult\n\tTxType string\n}\n```\nTxRawWithTxType adds the stake transaction type to dcrjson.TxRawResult\n\n```go\ntype TxRawWithVoteInfo struct {\n\tdcrjson.TxRawResult\n\tVoteInfo VoteInfo\n}\n```\nTxRawWithVoteInfo adds the vote info to dcrjson.TxRawResult\n\n```go\ntype TxShort struct {\n\tTxID     string        `json:\"txid\"`\n\tSize     int32         `json:\"size\"`\n\tVersion  int32         `json:\"version\"`\n\tLocktime uint32        `json:\"locktime\"`\n\tExpiry   uint32        `json:\"expiry\"`\n\tVin      []dcrjson.Vin `json:\"vin\"`\n\tVout     []Vout        `json:\"vout\"`\n}\n```\nTxShort models info about transaction TxID\n\n```go\ntype Txns struct {\n\tTransactions []string `json:\"transactions\"`\n}\n```\nTxns models the multi transaction post data structure\n\n```go\ntype VinPrevOut struct {\n\tCoinbase    string     `json:\"coinbase\"`\n\tStakebase   string     `json:\"stakebase\"`\n\tTxid        string     `json:\"txid\"`\n\tVout        uint32     `json:\"vout\"`\n\tTree        int8       `json:\"tree\"`\n\tAmountIn    *float64   `json:\"amountin,omitempty\"`\n\tBlockHeight *uint32    `json:\"blockheight,omitempty\"`\n\tBlockIndex  *uint32    `json:\"blockindex,omitempty\"`\n\tScriptSig   *ScriptSig `json:\"scriptSig\"`\n\tPrevOut     *PrevOut   `json:\"prevOut\"`\n\tSequence    uint32     `json:\"sequence\"`\n}\n```\nVinPrevOut is like Vin except it includes PrevOut.  It is used by searchrawtransaction\n\n```go\ntype VoteInfo struct {\n\tValidation BlockValidation         `json:\"block_validation\"`\n\tVersion    uint32                  `json:\"vote_version\"`\n\tBits       uint16                  `json:\"vote_bits\"`\n\tChoices    []*txhelpers.VoteChoice `json:\"vote_choices\"`\n}\n```\nVoteInfo models data about a SSGen transaction (vote)\n\n```go\ntype Vout struct {\n\tValue               float64      `json:\"value\"`\n\tN                   uint32       `json:\"n\"`\n\tVersion             uint16       `json:\"version\"`\n\tScriptPubKeyDecoded ScriptPubKey `json:\"scriptPubKey\"`\n}\n```\nVout defines a transaction output\n\n```go\ntype VoutHexScript struct {\n\tValue           float64 `json:\"value\"`\n\tN               uint32  `json:\"n\"`\n\tVersion         uint16  `json:\"version\"`\n\tScriptPubKeyHex string  `json:\"scriptPubKey\"`\n}\n```\nVoutHexScript models the hex script for a transaction output\n\n```go\ntype VoutMined struct {\n\tVout\n\tBestBlock     string `json:\"bestblock\"`\n\tConfirmations int64  `json:\"confirmations\"`\n\tCoinbase      bool   `json:\"coinbase\"`\n}\n```\nVoutMined appends a best block hash, number of confimations and if a transaction is a coinbase to a transaction output\n\n","path":"github.com/parallelcointeam/exploder/dcrdataapi","name":"dcrdataapi","synopsis":"","isRedistributable":true}
