Documentation
¶
Index ¶
- Constants
- Variables
- func GetUniqueTxids(txids []string) []string
- func IsZeroBigInt(b *big.Int) bool
- func NewAPIError(s string, public bool) error
- type APIError
- type AccountDetails
- type Address
- type AddressFilter
- type AddressUtxoV1
- type AddressV1
- type Asset
- type AssetInfo
- type AssetSpecific
- type Assets
- type AssetsSpecific
- type BackendInfo
- type BalanceHistories
- type BalanceHistory
- type Block
- type BlockInfo
- type BlockV1
- type BlockbookInfo
- type Blocks
- type EthereumSpecific
- type FeeStats
- type MempoolTxid
- type MempoolTxids
- type Paging
- type ScriptPubKeyV1
- type ScriptSigV1
- type SystemInfo
- type TokenBalanceHistory
- type TokensToReturn
- type Tx
- type TxV1
- type Utxo
- type Utxos
- type Vin
- type VinV1
- type Vout
- type VoutV1
- type Worker
- func (w *Worker) AddressToV1(a *Address) *AddressV1
- func (w *Worker) AddressUtxoToV1(au Utxos) []AddressUtxoV1
- func (w *Worker) BlockToV1(b *Block) *BlockV1
- func (w *Worker) ComputeFeeStats(blockFrom, blockTo int, stopCompute chan os.Signal) error
- func (w *Worker) FindAssets(filter string, page int, txsOnPage int) *Assets
- func (w *Worker) FindAssetsFromFilter(filter string) []*AssetsSpecific
- func (w *Worker) GetAddress(address string, page int, txsOnPage int, option AccountDetails, ...) (*Address, error)
- func (w *Worker) GetAddressUtxo(address string, onlyConfirmed bool) (Utxos, error)
- func (w *Worker) GetAsset(asset string, page int, txsOnPage int, option AccountDetails, ...) (*Asset, error)
- func (w *Worker) GetBalanceHistory(address string, fromTimestamp, toTimestamp int64, currencies []string, ...) (BalanceHistories, error)
- func (w *Worker) GetBlock(bid string, page int, txsOnPage int) (*Block, error)
- func (w *Worker) GetBlocks(page int, blocksOnPage int) (*Blocks, error)
- func (w *Worker) GetChainTips() (string, error)
- func (w *Worker) GetCurrentFiatRates(currencies []string) (*db.ResultTickerAsString, error)
- func (w *Worker) GetFeeStats(bid string) (*FeeStats, error)
- func (w *Worker) GetFiatRatesForBlockID(bid string, currencies []string) (*db.ResultTickerAsString, error)
- func (w *Worker) GetFiatRatesForTimestamps(timestamps []int64, currencies []string) (*db.ResultTickersAsString, error)
- func (w *Worker) GetFiatRatesTickersList(timestamp int64) (*db.ResultTickerListAsString, error)
- func (w *Worker) GetMempool(page int, itemsOnPage int) (*MempoolTxids, error)
- func (w *Worker) GetSpendingTxid(txid string, n int) (string, error)
- func (w *Worker) GetSystemInfo(internal bool) (*SystemInfo, error)
- func (w *Worker) GetTransaction(txid string, spendingTxs bool, specificJSON bool) (*Tx, error)
- func (w *Worker) GetTransactionFromBchainTx(bchainTx *bchain.Tx, height int, spendingTxs bool, specificJSON bool) (*Tx, error)
- func (w *Worker) GetTransactionFromMempoolTx(mempoolTx *bchain.MempoolTx) (*Tx, error)
- func (w *Worker) GetXpubAddress(xpub string, page int, txsOnPage int, option AccountDetails, ...) (*Address, error)
- func (w *Worker) GetXpubBalanceHistory(xpub string, fromTimestamp, toTimestamp int64, currencies []string, gap int, ...) (BalanceHistories, error)
- func (w *Worker) GetXpubUtxo(xpub string, onlyConfirmed bool, gap int) (Utxos, error)
- func (w *Worker) TxToV1(tx *Tx) *TxV1
Constants ¶
const ( // AddressFilterVoutOff disables filtering of transactions by vout AddressFilterVoutOff = -1 // AddressFilterVoutInputs specifies that only txs where the address is as input are returned AddressFilterVoutInputs = -2 // AddressFilterVoutOutputs specifies that only txs where the address is as output are returned AddressFilterVoutOutputs = -3 // AddressFilterVoutQueryNotNecessary signals that query for transactions is not necessary as there are no transactions for specified contract filter AddressFilterVoutQueryNotNecessary = -4 // TokensToReturnNonzeroBalance - return only tokens with nonzero balance TokensToReturnNonzeroBalance TokensToReturn = 0 // TokensToReturnUsed - return tokens with some transfers (even if they have zero balance now) TokensToReturnUsed TokensToReturn = 1 // TokensToReturnDerived - return all derived tokens TokensToReturnDerived TokensToReturn = 2 )
Variables ¶
var ErrUnsupportedXpub = errors.New("XPUB not supported")
ErrUnsupportedXpub is returned when coin type does not support xpub address derivation or provided string is not an xpub
var Text struct { BlockbookAbout, TOSLink string }
Text contains static overridable texts used in explorer
Functions ¶
func GetUniqueTxids ¶ added in v0.2.0
GetUniqueTxids removes duplicate transactions
func IsZeroBigInt ¶ added in v0.2.1
IsZeroBigInt if big int has zero value
func NewAPIError ¶ added in v0.1.1
NewAPIError creates ApiError
Types ¶
type APIError ¶ added in v0.1.1
APIError extends error by information if the error details should be returned to the end user
type AccountDetails ¶ added in v0.2.1
type AccountDetails int
AccountDetails specifies what data returns GetAddress and GetXpub calls
const ( // AccountDetailsBasic - only that address is indexed and some basic info AccountDetailsBasic AccountDetails = iota // AccountDetailsTokens - basic info + tokens AccountDetailsTokens // AccountDetailsTokenBalances - basic info + token with balance AccountDetailsTokenBalances // AccountDetailsTxidHistory - basic + token balances + txids, subject to paging AccountDetailsTxidHistory // AccountDetailsTxHistoryLight - basic + tokens + easily obtained tx data (not requiring requests to backend), subject to paging AccountDetailsTxHistoryLight // AccountDetailsTxHistory - basic + tokens + full tx data, subject to paging AccountDetailsTxHistory )
type Address ¶
type Address struct { Paging AddrStr string `json:"address,omitempty"` BalanceSat *bchain.Amount `json:"balance"` TotalReceivedSat *bchain.Amount `json:"totalReceived,omitempty"` TotalSentSat *bchain.Amount `json:"totalSent,omitempty"` UnconfirmedBalanceSat *bchain.Amount `json:"unconfirmedBalance"` UnconfirmedTxs int `json:"unconfirmedTxs"` Txs int `json:"txs"` NonTokenTxs int `json:"nonTokenTxs,omitempty"` Transactions []*Tx `json:"transactions,omitempty"` Txids []string `json:"txids,omitempty"` Nonce string `json:"nonce,omitempty"` UsedTokens int `json:"usedTokens,omitempty"` UsedAssetTokens int `json:"usedAssetTokens,omitempty"` Tokens bchain.Tokens `json:"tokens,omitempty"` TokensAsset bchain.Tokens `json:"tokensAsset,omitempty"` Erc20Contract *bchain.Erc20Contract `json:"erc20Contract,omitempty"` // helpers for explorer Filter string `json:"-"` XPubAddresses map[string]struct{} `json:"-"` }
Address holds information about address and its transactions
type AddressFilter ¶ added in v0.2.0
type AddressFilter struct { Vout int Contract string FromHeight uint32 ToHeight uint32 TokensToReturn TokensToReturn // OnlyConfirmed set to true will ignore mempool transactions; mempool is also ignored if FromHeight/ToHeight filter is specified OnlyConfirmed bool AssetsMask bchain.AssetsMask }
AddressFilter is used to filter data returned from GetAddress api method
type AddressUtxoV1 ¶ added in v0.2.0
type AddressUtxoV1 struct { Txid string `json:"txid"` Vout uint32 `json:"vout"` Amount string `json:"amount"` AmountSat big.Int `json:"satoshis"` Height int `json:"height,omitempty"` Confirmations int `json:"confirmations"` }
AddressUtxoV1 is used for legacy api v1
type AddressV1 ¶ added in v0.2.0
type AddressV1 struct { Paging AddrStr string `json:"addrStr"` Balance string `json:"balance"` TotalReceived string `json:"totalReceived"` TotalSent string `json:"totalSent"` UnconfirmedBalance string `json:"unconfirmedBalance"` UnconfirmedTxApperances int `json:"unconfirmedTxApperances"` TxApperances int `json:"txApperances"` Transactions []*TxV1 `json:"txs,omitempty"` Txids []string `json:"transactions,omitempty"` }
AddressV1 is used for legacy api v1
type Asset ¶ added in v0.3.4
type Asset struct { Paging AssetDetails *AssetSpecific `json:"asset"` UnconfirmedTxs int `json:"unconfirmedTxs"` Txs int `json:"txs"` Transactions []*Tx `json:"transactions,omitempty"` Txids []string `json:"txids,omitempty"` // helpers for explorer Filter string `json:"-"` }
Asset holds information about asset and its transactions
type AssetSpecific ¶ added in v0.3.4
type AssetSpecific struct { AssetGuid uint32 `json:"assetGuid"` Contract string `json:"contract,omitempty"` Symbol string `json:"symbol"` PubData map[string]interface{} `json:"pubData"` NotaryKeyID []byte `json:"notaryKeyID,omitempty"` NotaryDetails *bchain.NotaryDetails `json:"notaryDetails,omitempty"` AuxFeeDetails *bchain.AuxFeeDetails `json:"auxFeeDetails,omitempty"` TotalSupply *bchain.Amount `json:"totalSupply"` MaxSupply *bchain.Amount `json:"maxSupply"` Decimals int `json:"decimals"` UpdateCapabilityFlags uint8 `json:"updateCapabilityFlags"` }
Contains SyscoinSpecific asset information hex decoded and pertinent to API display
type Assets ¶ added in v0.3.4
type Assets struct { Paging AssetDetails []*AssetsSpecific `json:"assets"` NumAssets int `json:"numAssets"` // helpers for explorer Filter string `json:"-"` }
Asset holds information about searching/filtering assets
type AssetsSpecific ¶ added in v0.3.4
type AssetsSpecific struct { AssetGuid uint32 `json:"assetGuid"` Contract string `json:"contract"` Symbol string `json:"symbol"` PubData map[string]interface{} `json:"pubData"` TotalSupply *bchain.Amount `json:"totalSupply"` Decimals int `json:"precision"` Txs int }
Contains SyscoinSpecific assets information when searching for assets
type BackendInfo ¶ added in v0.3.0
type BackendInfo struct { BackendError string `json:"error,omitempty"` Chain string `json:"chain,omitempty"` Blocks int `json:"blocks,omitempty"` Headers int `json:"headers,omitempty"` BestBlockHash string `json:"bestBlockHash,omitempty"` Difficulty string `json:"difficulty,omitempty"` SizeOnDisk int64 `json:"sizeOnDisk,omitempty"` Version string `json:"version,omitempty"` Subversion string `json:"subversion,omitempty"` ProtocolVersion string `json:"protocolVersion,omitempty"` Timeoffset float64 `json:"timeOffset,omitempty"` Warnings string `json:"warnings,omitempty"` }
BackendInfo is used to get information about blockchain
type BalanceHistories ¶ added in v0.3.4
type BalanceHistories []BalanceHistory
BalanceHistories is array of BalanceHistory
func (BalanceHistories) Len ¶ added in v0.3.4
func (a BalanceHistories) Len() int
func (BalanceHistories) Less ¶ added in v0.3.4
func (a BalanceHistories) Less(i, j int) bool
func (BalanceHistories) SortAndAggregate ¶ added in v0.3.4
func (a BalanceHistories) SortAndAggregate(groupByTime uint32) BalanceHistories
SortAndAggregate sums BalanceHistories to groups defined by parameter groupByTime
func (BalanceHistories) Swap ¶ added in v0.3.4
func (a BalanceHistories) Swap(i, j int)
type BalanceHistory ¶ added in v0.3.4
type BalanceHistory struct { Time uint32 `json:"time"` Txs uint32 `json:"txs"` ReceivedSat *bchain.Amount `json:"received"` SentSat *bchain.Amount `json:"sent"` SentToSelfSat *bchain.Amount `json:"sentToSelf"` FiatRates map[string]float64 `json:"rates,omitempty"` Txid string `json:"txid,omitempty"` Tokens map[uint32]*TokenBalanceHistory `json:"tokens,omitempty"` }
BalanceHistory contains info about one point in time of balance history
type Block ¶ added in v0.1.0
type Block struct { Paging BlockInfo TxCount int `json:"txCount"` Transactions []*Tx `json:"txs,omitempty"` }
Block contains information about block
type BlockInfo ¶ added in v0.2.2
type BlockInfo struct { Hash string `json:"hash"` Prev string `json:"previousBlockHash,omitempty"` Next string `json:"nextBlockHash,omitempty"` Height uint32 `json:"height"` Confirmations int `json:"confirmations"` Size int `json:"size"` Time int64 `json:"time,omitempty"` Version common.JSONNumber `json:"version"` MerkleRoot string `json:"merkleRoot"` Nonce string `json:"nonce"` Bits string `json:"bits"` Difficulty string `json:"difficulty"` Txids []string `json:"tx,omitempty"` }
BlockInfo contains extended block header data and a list of block txids
type BlockV1 ¶ added in v0.2.0
type BlockV1 struct { Paging BlockInfo TxCount int `json:"txCount"` Transactions []*TxV1 `json:"txs,omitempty"` }
BlockV1 contains information about block
type BlockbookInfo ¶ added in v0.1.0
type BlockbookInfo struct { Coin string `json:"coin"` Host string `json:"host"` Version string `json:"version"` GitCommit string `json:"gitCommit"` BuildTime string `json:"buildTime"` SyncMode bool `json:"syncMode"` InitialSync bool `json:"initialSync"` InSync bool `json:"inSync"` BestHeight uint32 `json:"bestHeight"` LastBlockTime time.Time `json:"lastBlockTime"` InSyncMempool bool `json:"inSyncMempool"` LastMempoolTime time.Time `json:"lastMempoolTime"` MempoolSize int `json:"mempoolSize"` Decimals int `json:"decimals"` DbSize int64 `json:"dbSize"` DbSizeFromColumns int64 `json:"dbSizeFromColumns,omitempty"` DbColumns []common.InternalStateColumn `json:"dbColumns,omitempty"` About string `json:"about"` }
BlockbookInfo contains information about the running blockbook instance
type Blocks ¶ added in v0.1.0
type Blocks struct { Paging Blocks []bchain.DbBlockInfo `json:"blocks"` }
Blocks is list of blocks with paging information
type EthereumSpecific ¶ added in v0.2.0
type EthereumSpecific struct { Status eth.TxStatus `json:"status"` // 1 OK, 0 Fail, -1 pending Nonce uint64 `json:"nonce"` GasLimit *big.Int `json:"gasLimit"` GasUsed *big.Int `json:"gasUsed"` GasPrice *bchain.Amount `json:"gasPrice"` Data string `json:"data,omitempty"` }
EthereumSpecific contains ethereum specific transaction data
type FeeStats ¶ added in v0.3.4
type FeeStats struct { TxCount int `json:"txCount"` TotalFeesSat *bchain.Amount `json:"totalFeesSat"` AverageFeePerKb int64 `json:"averageFeePerKb"` DecilesFeePerKb [11]int64 `json:"decilesFeePerKb"` }
FeeStats contains detailed block fee statistics
type MempoolTxid ¶ added in v0.2.2
MempoolTxid contains information about a transaction in mempool
type MempoolTxids ¶ added in v0.2.2
type MempoolTxids struct { Paging Mempool []MempoolTxid `json:"mempool"` MempoolSize int `json:"mempoolSize"` }
MempoolTxids contains a list of mempool txids with paging information
type Paging ¶ added in v0.1.0
type Paging struct { Page int `json:"page,omitempty"` TotalPages int `json:"totalPages,omitempty"` ItemsOnPage int `json:"itemsOnPage,omitempty"` }
Paging contains information about paging for address, blocks and block
type ScriptPubKeyV1 ¶ added in v0.2.0
type ScriptPubKeyV1 struct { Hex string `json:"hex,omitempty"` Asm string `json:"asm,omitempty"` AddrDesc bchain.AddressDescriptor `json:"-"` Addresses []string `json:"addresses"` IsAddress bool `json:"-"` Type string `json:"type,omitempty"` }
ScriptPubKeyV1 is used for legacy api v1
type ScriptSigV1 ¶ added in v0.2.0
ScriptSigV1 is used for legacy api v1
type SystemInfo ¶ added in v0.1.0
type SystemInfo struct { Blockbook *BlockbookInfo `json:"blockbook"` Backend *BackendInfo `json:"backend"` }
SystemInfo contains information about the running blockbook and backend instance
type TokenBalanceHistory ¶ added in v0.3.4
type TokenBalanceHistory struct { ReceivedSat *bchain.Amount `json:"received,omitempty"` SentSat *bchain.Amount `json:"sent,omitempty"` }
history of tokens mapped to uint32 asset guid's in BalanceHistory obj
type TokensToReturn ¶ added in v0.2.1
type TokensToReturn int
TokensToReturn specifies what tokens are returned by GetAddress and GetXpubAddress
type Tx ¶
type Tx struct { Txid string `json:"txid"` Version int32 `json:"version,omitempty"` Locktime uint32 `json:"lockTime,omitempty"` Vin []Vin `json:"vin"` Vout []Vout `json:"vout"` Blockhash string `json:"blockHash,omitempty"` Blockheight int `json:"blockHeight"` Confirmations uint32 `json:"confirmations"` Blocktime int64 `json:"blockTime"` Size int `json:"size,omitempty"` ValueOutSat *bchain.Amount `json:"value"` ValueInSat *bchain.Amount `json:"valueIn,omitempty"` FeesSat *bchain.Amount `json:"fees,omitempty"` Hex string `json:"hex,omitempty"` Rbf bool `json:"rbf,omitempty"` CoinSpecificData json.RawMessage `json:"coinSpecificData,omitempty"` TokenTransferSummary []*bchain.TokenTransferSummary `json:"tokenTransfers,omitempty"` TokenType *bchain.TokenType `json:"tokenType,omitempty"` EthereumSpecific *EthereumSpecific `json:"ethereumSpecific,omitempty"` }
Tx holds information about a transaction
type TxV1 ¶ added in v0.2.0
type TxV1 struct { Txid string `json:"txid"` Version int32 `json:"version,omitempty"` Locktime uint32 `json:"locktime,omitempty"` Vin []VinV1 `json:"vin"` Vout []VoutV1 `json:"vout"` Blockhash string `json:"blockhash,omitempty"` Blockheight int `json:"blockheight"` Confirmations uint32 `json:"confirmations"` Time int64 `json:"time,omitempty"` Blocktime int64 `json:"blocktime"` ValueOut string `json:"valueOut"` ValueOutSat big.Int `json:"-"` Size int `json:"size,omitempty"` ValueIn string `json:"valueIn"` ValueInSat big.Int `json:"-"` Fees string `json:"fees"` FeesSat big.Int `json:"-"` Hex string `json:"hex"` }
TxV1 is used for legacy api v1
type Utxo ¶ added in v0.2.1
type Utxo struct { Txid string `json:"txid"` Vout int32 `json:"vout"` AmountSat *bchain.Amount `json:"value"` Height int `json:"height,omitempty"` Confirmations int `json:"confirmations"` Address string `json:"address,omitempty"` Path string `json:"path,omitempty"` Locktime uint32 `json:"lockTime,omitempty"` Coinbase bool `json:"coinbase,omitempty"` AssetInfo *AssetInfo `json:"assetInfo,omitempty"` }
Utxo is one unspent transaction output
type Utxos ¶ added in v0.2.1
type Utxos struct { Utxos []Utxo `json:"utxos"` Assets []*AssetSpecific `json:"assets,omitempty"` }
Utxos result for API
type Vin ¶
type Vin struct { Txid string `json:"txid,omitempty"` Vout uint32 `json:"vout,omitempty"` Sequence int64 `json:"sequence,omitempty"` N int `json:"n"` AddrDesc bchain.AddressDescriptor `json:"-"` Addresses []string `json:"addresses,omitempty"` IsAddress bool `json:"isAddress"` ValueSat *bchain.Amount `json:"value,omitempty"` Hex string `json:"hex,omitempty"` Asm string `json:"asm,omitempty"` Coinbase string `json:"coinbase,omitempty"` AssetInfo *AssetInfo `json:"assetInfo,omitempty"` }
Vin contains information about single transaction input
type VinV1 ¶ added in v0.2.0
type VinV1 struct { Txid string `json:"txid"` Vout uint32 `json:"vout"` Sequence int64 `json:"sequence,omitempty"` N int `json:"n"` ScriptSig ScriptSigV1 `json:"scriptSig"` AddrDesc bchain.AddressDescriptor `json:"-"` Addresses []string `json:"addresses"` IsAddress bool `json:"-"` Value string `json:"value"` ValueSat big.Int `json:"-"` }
VinV1 is used for legacy api v1
type Vout ¶
type Vout struct { ValueSat *bchain.Amount `json:"value,omitempty"` N int `json:"n"` Spent bool `json:"spent,omitempty"` SpentTxID string `json:"spentTxId,omitempty"` SpentIndex int `json:"spentIndex,omitempty"` SpentHeight int `json:"spentHeight,omitempty"` Hex string `json:"hex,omitempty"` Asm string `json:"asm,omitempty"` AddrDesc bchain.AddressDescriptor `json:"-"` Addresses []string `json:"addresses"` IsAddress bool `json:"isAddress"` Type string `json:"type,omitempty"` AssetInfo *AssetInfo `json:"assetInfo,omitempty"` }
Vout contains information about single transaction output
type VoutV1 ¶ added in v0.2.0
type VoutV1 struct { Value string `json:"value"` ValueSat big.Int `json:"-"` N int `json:"n"` ScriptPubKey ScriptPubKeyV1 `json:"scriptPubKey"` Spent bool `json:"spent"` SpentTxID string `json:"spentTxId,omitempty"` SpentIndex int `json:"spentIndex,omitempty"` SpentHeight int `json:"spentHeight,omitempty"` }
VoutV1 is used for legacy api v1
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
Worker is handle to api worker
func NewWorker ¶
func NewWorker(db *db.RocksDB, chain bchain.BlockChain, mempool bchain.Mempool, txCache *db.TxCache, is *common.InternalState) (*Worker, error)
NewWorker creates new api worker
func (*Worker) AddressToV1 ¶ added in v0.2.0
AddressToV1 converts Address to AddressV1
func (*Worker) AddressUtxoToV1 ¶ added in v0.2.0
func (w *Worker) AddressUtxoToV1(au Utxos) []AddressUtxoV1
AddressUtxoToV1 converts []AddressUtxo to []AddressUtxoV1
func (*Worker) ComputeFeeStats ¶ added in v0.3.0
ComputeFeeStats computes fee distribution in defined blocks and logs them to log
func (*Worker) FindAssets ¶ added in v0.3.4
func (*Worker) FindAssetsFromFilter ¶ added in v0.3.5
func (w *Worker) FindAssetsFromFilter(filter string) []*AssetsSpecific
find assets from cache that contain filter
func (*Worker) GetAddress ¶
func (w *Worker) GetAddress(address string, page int, txsOnPage int, option AccountDetails, filter *AddressFilter) (*Address, error)
GetAddress computes address value and gets transactions for given address
func (*Worker) GetAddressUtxo ¶ added in v0.1.1
GetAddressUtxo returns unspent outputs for given address
func (*Worker) GetAsset ¶ added in v0.3.4
func (w *Worker) GetAsset(asset string, page int, txsOnPage int, option AccountDetails, filter *AddressFilter) (*Asset, error)
GetAsset gets transactions for given asset
func (*Worker) GetBalanceHistory ¶ added in v0.3.4
func (w *Worker) GetBalanceHistory(address string, fromTimestamp, toTimestamp int64, currencies []string, groupBy uint32) (BalanceHistories, error)
GetBalanceHistory returns history of balance for given address
func (*Worker) GetChainTips ¶ added in v0.3.4
func (*Worker) GetCurrentFiatRates ¶ added in v0.3.4
func (w *Worker) GetCurrentFiatRates(currencies []string) (*db.ResultTickerAsString, error)
GetCurrentFiatRates returns last available fiat rates
func (*Worker) GetFeeStats ¶ added in v0.3.4
GetFeeStats returns statistics about block fees
func (*Worker) GetFiatRatesForBlockID ¶ added in v0.3.4
func (w *Worker) GetFiatRatesForBlockID(bid string, currencies []string) (*db.ResultTickerAsString, error)
GetFiatRatesForBlockID returns fiat rates for block height or block hash
func (*Worker) GetFiatRatesForTimestamps ¶ added in v0.3.4
func (w *Worker) GetFiatRatesForTimestamps(timestamps []int64, currencies []string) (*db.ResultTickersAsString, error)
GetFiatRatesForTimestamps returns fiat rates for each of the provided dates
func (*Worker) GetFiatRatesTickersList ¶ added in v0.3.4
func (w *Worker) GetFiatRatesTickersList(timestamp int64) (*db.ResultTickerListAsString, error)
GetFiatRatesTickersList returns the list of available fiatRates tickers
func (*Worker) GetMempool ¶ added in v0.2.2
func (w *Worker) GetMempool(page int, itemsOnPage int) (*MempoolTxids, error)
GetMempool returns a page of mempool txids
func (*Worker) GetSpendingTxid ¶ added in v0.1.0
GetSpendingTxid returns transaction id of transaction that spent given output
func (*Worker) GetSystemInfo ¶ added in v0.1.0
func (w *Worker) GetSystemInfo(internal bool) (*SystemInfo, error)
GetSystemInfo returns information about system
func (*Worker) GetTransaction ¶
GetTransaction reads transaction data from txid
func (*Worker) GetTransactionFromBchainTx ¶ added in v0.2.0
func (w *Worker) GetTransactionFromBchainTx(bchainTx *bchain.Tx, height int, spendingTxs bool, specificJSON bool) (*Tx, error)
GetTransactionFromBchainTx reads transaction data from txid
func (*Worker) GetTransactionFromMempoolTx ¶ added in v0.3.5
GetTransactionFromMempoolTx converts bchain.MempoolTx to Tx, with limited amount of data it is not doing any request to backend or to db
func (*Worker) GetXpubAddress ¶ added in v0.2.1
func (w *Worker) GetXpubAddress(xpub string, page int, txsOnPage int, option AccountDetails, filter *AddressFilter, gap int) (*Address, error)
GetXpubAddress computes address value and gets transactions for given address
func (*Worker) GetXpubBalanceHistory ¶ added in v0.3.4
func (w *Worker) GetXpubBalanceHistory(xpub string, fromTimestamp, toTimestamp int64, currencies []string, gap int, groupBy uint32) (BalanceHistories, error)
GetXpubBalanceHistory returns history of balance for given xpub
func (*Worker) GetXpubUtxo ¶ added in v0.2.1
GetXpubUtxo returns unspent outputs for given xpub