Versions in this module Expand all Collapse all v0 v0.3.0 May 15, 2023 v0.2.0 May 15, 2023 Changes in this version + func TransactionFromBytes(b []byte) (*transaction, int) + func TransactionFromHex(h string) (*transaction, int) + type Address struct + Address string + IsMine bool + IsScript bool + IsValid bool + IsWatchOnly bool + ScriptPubKey string + type BatchResults struct + Evicted []string + Invalid []*TxResponse + Known []string + Unconfirmed []*TxResponse + type BatchedTransaction struct + AllowHighFees bool + Config map[string]interface{} + DontCheckFee bool + Hex string + ListUnconfirmedAncestors bool + type BitIndex struct + BaseURL string + func NewBitIndexClient(url string) (*BitIndex, error) + func (b *BitIndex) GetUtxos(addr string) (*UtxoResponse, error) + type Bitcoind struct + IPAddress string + Storage *cache.Cache + func New(host string, port int, user, passwd string, useSSL bool) (*Bitcoind, error) + func NewFromURL(url *url.URL, useSSL bool) (*Bitcoind, error) + func (b *Bitcoind) DecodeRawTransaction(txHex string) (string, error) + func (b *Bitcoind) Generate(amount float64) ([]string, error) + func (b *Bitcoind) GenerateToAddress(amount float64, address string) ([]string, error) + func (b *Bitcoind) GetBestBlockHash() (hash string, err error) + func (b *Bitcoind) GetBlock(blockHash string) (block *Block, err error) + func (b *Bitcoind) GetBlockByHeight(blockHeight int) (block *Block, err error) + func (b *Bitcoind) GetBlockHash(blockHeight int) (blockHash string, err error) + func (b *Bitcoind) GetBlockHeader(blockHash string) (blockHeader *BlockHeader, err error) + func (b *Bitcoind) GetBlockHeaderAndCoinbase(blockHash string) (blockHeaderAndCoinbase *BlockHeaderAndCoinbase, err error) + func (b *Bitcoind) GetBlockHeaderHex(blockHash string) (blockHeader *string, err error) + func (b *Bitcoind) GetBlockHex(blockHash string) (raw *string, err error) + func (b *Bitcoind) GetBlockOverview(blockHash string) (block *BlockOverview, err error) + func (b *Bitcoind) GetBlockStats(blockHash string) (block *BlockStats, err error) + func (b *Bitcoind) GetBlockStatsByHeight(blockHeight int) (block *BlockStats, err error) + func (b *Bitcoind) GetBlockTemplate(includeSegwit bool) (template *BlockTemplate, err error) + func (b *Bitcoind) GetBlockchainInfo() (info BlockchainInfo, err error) + func (b *Bitcoind) GetChainTips() (tips ChainTips, err error) + func (b *Bitcoind) GetChainTxStats(blockcount int) (stats ChainTXStats, err error) + func (b *Bitcoind) GetConnectionCount() (count uint64, err error) + func (b *Bitcoind) GetDifficulty() (difficulty float64, err error) + func (b *Bitcoind) GetHelp() (j []byte, err error) + func (b *Bitcoind) GetInfo() (info GetInfo, err error) + func (b *Bitcoind) GetMempoolAncestors(txid string, details bool) (raw []byte, err error) + func (b *Bitcoind) GetMempoolDescendants(txid string, details bool) (raw []byte, err error) + func (b *Bitcoind) GetMempoolEntry(txid string) (entry MempoolEntry, err error) + func (b *Bitcoind) GetMempoolInfo() (info MempoolInfo, err error) + func (b *Bitcoind) GetMiningCandidate() (template *MiningCandidate, err error) + func (b *Bitcoind) GetMiningInfo() (info MiningInfo, err error) + func (b *Bitcoind) GetNetTotals() (totals NetTotals, err error) + func (b *Bitcoind) GetNetworkInfo() (info NetworkInfo, err error) + func (b *Bitcoind) GetPeerInfo() (info PeerInfo, err error) + func (b *Bitcoind) GetRawBlock(blockHash string) ([]byte, error) + func (b *Bitcoind) GetRawBlockReader(blockHash string) (io.ReadCloser, error) + func (b *Bitcoind) GetRawBlockRest(blockHash string) (io.ReadCloser, error) + func (b *Bitcoind) GetRawMempool(details bool) (raw []byte, err error) + func (b *Bitcoind) GetRawNonFinalMempool() ([]string, error) + func (b *Bitcoind) GetRawTransaction(txID string) (rawTx *RawTransaction, err error) + func (b *Bitcoind) GetRawTransactionHex(txID string) (rawTx *string, err error) + func (b *Bitcoind) GetRawTransactionRest(txid string) (io.ReadCloser, error) + func (b *Bitcoind) GetSettings() (settings Settings, err error) + func (b *Bitcoind) GetTxOut(txHex string, vout int, includeMempool bool) (res *TXOut, err error) + func (b *Bitcoind) ListUnspent(addresses []string) (res []*UnspentTransaction, err error) + func (b *Bitcoind) SendRawTransaction(hex string) (txid string, err error) + func (b *Bitcoind) SendRawTransactionWithoutFeeCheck(hex string) (txid string, err error) + func (b *Bitcoind) SendRawTransactionWithoutFeeCheckOrScriptCheck(raw string) (string, error) + func (b *Bitcoind) SendRawTransactions(batchedTransactions []*BatchedTransaction, config map[string]interface{}) (*BatchResults, error) + func (b *Bitcoind) SendToAddress(address string, amount float64) (string, error) + func (b *Bitcoind) SignRawTransaction(hex string) (sr *SignRawTransactionResponse, err error) + func (b *Bitcoind) SubmitBlock(hexData string) (result string, err error) + func (b *Bitcoind) SubmitMiningSolution(miningCandidateID string, nonce uint32, coinbase string, time uint32, ...) (result string, err error) + func (b *Bitcoind) Uptime() (uptime uint64, err error) + func (b *Bitcoind) ValidateAddress(address string) (addr Address, err error) + type Block struct + Bits string + Chainwork string + CoinbaseTx *RawTransaction + Confirmations int64 + Difficulty float64 + Hash string + Height uint64 + MedianTime uint64 + MerkleRoot string + Miner string + NTx uint64 + NextBlockHash string + Nonce uint64 + NumTx uint64 + Pagination *BlockPage + PreviousBlockHash string + Size uint64 + Time uint64 + TotalFees float64 + Tx []string + TxCount uint64 + Version int64 + VersionHex string + type Block2 struct + Bits string + BlockReward uint64 + BlockSubsidy uint64 + Chainwork string + Difficulty float64 + Hash string + Height int + MedianTime uint32 + MerkleRoot string + Miner string + NTx uint64 + NextBlockHash string + Nonce uint32 + NumTx uint64 + PreviousBlockHash string + Size int + Time uint32 + Tx []string + TxCount uint64 + USDPrice float64 + Version uint32 + VersionHex string + type BlockHeader struct + Bits string + Chainwork string + Confirmations int64 + Difficulty float64 + Hash string + Height uint64 + MedianTime uint64 + MerkleRoot string + NTx uint64 + NextBlockHash string + Nonce uint64 + PreviousBlockHash string + Time uint64 + TxCount uint64 + Version uint64 + VersionHex string + type BlockHeaderAndCoinbase struct + Bits string + Chainwork string + Confirmations int64 + Difficulty float64 + Fee float32 + Hash string + Height uint64 + MedianTime uint64 + MerkleRoot string + NTx uint64 + NextBlockHash string + Nonce uint64 + PreviousBlockHash string + Time uint64 + Tx []RawTransaction + Version uint64 + VersionHex string + type BlockOverview struct + Bits string + Chainwork string + Confirmations int64 + Difficulty float64 + Hash string + Height uint64 + MedianTime uint64 + MerkleRoot string + NextBlockHash string + Nonce uint64 + PreviousBlockHash string + Size uint64 + Time uint64 + Version int64 + VersionHex string + type BlockPage struct + Size uint64 + URI []string + type BlockStats struct + AvgFee float64 + AvgFeeRate float64 + AvgTxSize int + BlockHash string + Height int + Ins int + MaxFee float64 + MaxFeeRate float64 + MaxTxSize int + MedianFee float64 + MedianFeeRate float64 + MedianTime int + MedianTxSize int + MinFee float64 + MinFeeRate float64 + MinTxSize int + Outs int + Subsidy float64 + Time int + TotalFee float64 + TotalOut float64 + TotalSize int + Txs int + UtxoIncrease int + UtxoSizeInc int + type BlockTemplate struct + Bits string + CoinbaseValue uint64 + CurTime uint64 + DefaultWitnessCommitment string + Height uint32 + IsMiningCandidate bool + MerkleBranches []string + MinTime uint64 + MiningCandidate *MiningCandidate + MiningCandidateID string + NonceRange string + PreviousBlockHash string + SigOpLimit int64 + SizeLimit uint64 + Target string + Transactions []Transaction + VBRequired int64 + Version uint32 + WeightLimit uint64 + type BlockTxid struct + BlockHash string + Count uint64 + EndIndex uint64 + StartIndex uint64 + Tx []string + type BlockchainInfo struct + BestBlockHash string + Blocks int32 + Chain string + ChainWork string + Difficulty float64 + Headers int32 + MedianTime int64 + PruneHeight int32 + Pruned bool + VerificationProgress float64 + type BytesData struct + Addr int + BlockTXN int + CmpctBlock int + FeeFilter int + GetAddr int + GetData int + GetHeaders int + Headers int + Inv int + NotFound int + Ping int + Pong int + Reject int + SendCmpct int + SendHeaders int + TX int + VerAck int + Version int + type ChainTXStats struct + TXCount int + TXRate float64 + Time int + WindowBlockCount int + WindowInterval int + WindowTXCount int + type ChainTips []Tip + type DefaultLogger struct + func (l *DefaultLogger) Debugf(format string, args ...interface{}) + func (l *DefaultLogger) Errorf(format string, args ...interface{}) + func (l *DefaultLogger) Fatalf(format string, args ...interface{}) + func (l *DefaultLogger) Infof(format string, args ...interface{}) + func (l *DefaultLogger) Warnf(format string, args ...interface{}) + type Error struct + Code float64 + Message string + type GetInfo struct + Balance float64 + Blocks int32 + Connections int32 + Difficulty float64 + Errors string + KeyPoolOldest int64 + KeyPoolSize int32 + MaxBlockSize int64 + MaxMinedBlockSize int64 + MaxStackMemoryUsageConsensus uint64 + MaxStackMemoryUsagePolicy uint64 + PayTXFee float64 + ProtocolVersion int32 + Proxy string + RelayFee float64 + STN bool + TestNet bool + TimeOffset int64 + Version int32 + WalletVersion int32 + type LocalAddress struct + Address string + Port int + Score int + type Logger interface + Debugf func(format string, args ...interface{}) + Errorf func(format string, args ...interface{}) + Fatalf func(format string, args ...interface{}) + Infof func(format string, args ...interface{}) + Warnf func(format string, args ...interface{}) + type MempoolEntry struct + Depends []string + Fee float64 + Height int + ModifiedFee float64 + Size int + Time int + type MempoolInfo struct + Bytes int + MaxMemPool int + MemPoolMinFree float64 + Size int + Usage int + type MiningCandidate struct + Bits string + CoinbaseValue uint64 + CurTime uint64 + Height uint32 + ID string + MerkleProof []string + NumTx uint32 + PreviousHash string + SizeWithoutCoinbase uint64 + Version uint32 + type MiningInfo struct + Blocks int + BlocksPriorityPercent int + Chain string + CurrentBlockSize int + CurrentBlockTX int + Difficulty float64 + Errors string + NetworkHashPS float64 + PooledTX int + type NetTotals struct + TimeMillis int + TotalBytesRecv int + TotalBytesSent int + UploadTarget struct{ ... } + type Network struct + Limited bool + Name string + Proxy string + ProxyRandmomizeCredentials bool + Reachable bool + type NetworkInfo struct + AcceptNonStdConsolidationInput bool + AddressCount int + Connections int + ExcessUTXOCharge float64 + LocalAddresses []LocalAddress + LocalRelay bool + LocalServices string + MaxConsolidationInputScriptSize int + MinConsolidationFactor int + MinConsolidationInputMaturity int + NetworkActive bool + Networks []Network + ProtocolVersion int + RelayFee float64 + SubVersion string + TXPropagationFreq int + TXPropagationLen int + TimeOffset int + Version int + Warnings string + type OpReturn struct + Action string + Parts []string + Text string + Type string + type Peer struct + AddNode bool + Addr string + AddrLocal string + Banscore int + BytesRecv int + BytesRecvPerMsg BytesData + BytesSendPerMsg BytesData + BytesSent int + ConnTime int + ID int + Inbound bool + LastRecv int + LastSend int + MinPing float64 + PingTime float64 + RelayTXes bool + Services string + StartingHeight int + Subver string + SyncedBlocks int + SyncedHeaders int + TXNInvSize int + TimeOffset int + Version int + WhiteListed bool + type PeerInfo []Peer + type Prevout struct + Generated bool + Height uint64 + ScriptPubKey ScriptPubKey + Value float32 + type RawMemPool []string + type RawTransaction struct + BlockHash string + BlockHeight uint64 + Blocktime int64 + Confirmations uint32 + Fee float32 + Hash string + Hex string + LockTime uint32 + Size uint32 + Time int64 + TxID string + Version int32 + Vin []*Vin + Vout []*Vout + type ScriptPubKey struct + ASM string + Addresses []string + Hex string + IsTruncated bool + OpReturn *OpReturn + ReqSigs int64 + Tag *Tag + Type string + type ScriptSig struct + ASM string + Hex string + type Settings struct + AcceptNonStdConsolidationInput bool + AcceptNonStdOutputs bool + BlockMaxSize int + DataCarrier bool + DataCarrierSize int64 + ExcessiveBlockSize int + LimitAncestorCount int + LimitCPFPGroupMembersCount int + MaxConsolidationInputScriptSize int + MaxMempool int + MaxMempoolSizedisk int + MaxNonStdTxValidationDuration int + MaxOpsPerScriptPolicy int64 + MaxOrphanTxSize int + MaxPubKeysPerMultisigPolicy int64 + MaxScriptNumLengthPolicy int + MaxScriptSizePolicy int + MaxStackMemoryUsageConsensus int + MaxStackMemoryUsagePolicy int + MaxStdTxValidationDuration int + MaxTxChainValidationBudget int + MaxTxSigopsCountsPolicy int64 + MaxTxSizePolicy int + MempoolMaxPercentCPFP int + MinConfConsolidationInput int + MinConsolidationFactor int + MinConsolidationInputMaturity int + MinMiningTxFee float64 + ValidationClockCpu bool + type SignRawTransactionResponse struct + Complete bool + Hex string + type TXOut struct + BestBlock string + Coinbase bool + Confirmations int + ScriptPubKey ScriptPubKey + Value float64 + type Tag struct + Action string + Type string + type Tip struct + BranchLen uint32 + Hash string + Height uint64 + Status string + type Transaction struct + Data string + Hash string + TXID string + type TxResponse struct + RejectReason string + TxID string + type UnspentTransaction struct + Address string + Amount float64 + Confirmations uint32 + Satoshis uint64 + ScriptPubKey string + TXID string + Vout uint32 + type Utxo struct + Height uint32 + TxID string + Value uint64 + Vout uint32 + type UtxoResponse struct + Address string + Balance uint64 + Utxos []Utxo + type Vin struct + Coinbase string + Prevout uint64 + ScriptSig ScriptSig + Sequence uint32 + Txid string + Vout uint64 + type Vout struct + N int + ScriptPubKey ScriptPubKey + Value float64 + type ZMQ struct + func NewZMQ(host string, port int, optionalLogger ...Logger) *ZMQ + func NewZMQWithContext(ctx context.Context, host string, port int, optionalLogger ...Logger) *ZMQ + func (zmq *ZMQ) Subscribe(topic string, ch chan []string) error + func (zmq *ZMQ) Unsubscribe(topic string, ch chan []string) error