Documentation ¶
Index ¶
- func EncodeVINs(txins []*wire.TxIn) interface{}
- type BlockHeader
- type Coinbase
- type Command
- type ListUnspentQueryOptions
- type ListUnspentQueryOptionsReq
- type ScriptPubKey
- type ScriptSignature
- type Storage
- type Transaction
- type Unspent
- type VerboseBlock
- type VerboseBlockHeader
- type VerboseIn
- type VerboseOut
- type VerboseTransaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeVINs ¶
Types ¶
type BlockHeader ¶
type BlockHeader struct { Header *wire.BlockHeader Height int32 NumTxs int64 }
type Command ¶
type Command interface { Name() string Query(str Storage, params []interface{}) (interface{}, error) }
func GetBestBlockHash ¶
func GetBestBlockHash() Command
func GetBlockCount ¶
func GetBlockCount() Command
func GetBlockHash ¶
func GetBlockHash() Command
func GetBlockHeader ¶
func GetBlockHeader() Command
func GetRawTransaction ¶
func GetRawTransaction() Command
func ListUnspent ¶
func ListUnspent() Command
type ListUnspentQueryOptions ¶
type ListUnspentQueryOptionsReq ¶
type ListUnspentQueryOptionsReq struct { MinimumAmount interface{} `json:"minimumAmount"` MaximumAmount interface{} `json:"maximumAmount"` MaximumCount interface{} `json:"maximumCount"` MinimumSumAmount interface{} `json:"minimumSumAmount"` }
listunspent
type ScriptPubKey ¶
type ScriptSignature ¶
type Storage ¶
type Storage interface { GetBlockHash(height int32) (string, error) GetLatestBlockHash() (string, error) GetLatestBlockHeight() (int32, error) GetTransaction(hash string) (Transaction, error) GetBlockFromHash(hash string) (*btcutil.Block, error) GetHeaderFromHeight(height int32) (BlockHeader, error) GetHeaderFromHash(hash string) (BlockHeader, error) ListUnspent(startBlock, endBlock int, addresses []string, includeUnsafe bool, queryOptions ListUnspentQueryOptions) ([]model.OutPoint, error) }
type Transaction ¶
type Unspent ¶
type Unspent struct { TxID string `json:"txid"` Vout uint32 `json:"vout"` Address string `json:"address"` Label string `json:"label"` Amount float64 `json:"amount"` ScriptPubKey string `json:"scriptPubKey"` WitnessScript string `json:"witnessScript"` Spendable bool `json:"spendable"` Solvable bool `json:"solvable"` Reused bool `json:"reused"` Description string `json:"desc"` Confirmations uint32 `json:"confirmations"` Safe bool `json:"safe"` }
type VerboseBlock ¶
type VerboseBlock struct { Hash string `json:"hash"` Confirmations uint32 `json:"confirmations"` Height int32 `json:"height"` Version int32 `json:"version"` VersionHex string `json:"versionHex"` MerkleRoot string `json:"merkleroot"` Time int64 `json:"time"` MedianTime int64 `json:"mediantime"` Nonce uint32 `json:"nonce"` Bits string `json:"bits"` Difficulty float64 `json:"difficulty"` NumberOfTransactions int `json:"nTx"` PreviousBlockHash string `json:"previousblockhash"` NextBlockHash string `json:"nextblokchash,omitempty"` StrippedSize int `json:"strippedsize"` Size int `json:"size"` Weight int `json:"weight"` Transactions interface{} `json:"tx"` }
getblock
func EncodeBlock ¶
type VerboseBlockHeader ¶
type VerboseBlockHeader struct { Hash string `json:"hash"` Confirmations uint32 `json:"confirmations"` Height int32 `json:"height"` Version int32 `json:"version"` VersionHex string `json:"versionHex"` MerkleRoot string `json:"merkleroot"` Time int64 `json:"time"` MedianTime int64 `json:"mediantime"` Nonce uint32 `json:"nonce"` Bits string `json:"bits"` Difficulty float64 `json:"difficulty"` NumberOfTransactions int64 `json:"nTx"` PreviousBlockHash string `json:"previousblockhash"` NextBlockHash string `json:"nextblokchash,omitempty"` }
getblockheader
func EncodeBlockHeader ¶
func EncodeBlockHeader(block *wire.BlockHeader, numTxs int64, height int32, confirmations uint32, medianTime int64, nextBlockHash string) (VerboseBlockHeader, error)
type VerboseIn ¶
type VerboseIn struct { TxID string `json:"txid"` Vout uint32 `json:"vout"` ScriptSig ScriptSignature `json:"scriptSig"` Sequence uint32 `json:"sequence"` TxInWitness []string `json:"txinwitness"` }
type VerboseOut ¶
type VerboseOut struct { Value float64 `json:"value"` Index uint32 `json:"n"` ScriptPubKey ScriptPubKey `json:"scriptPubKey"` }
func EncodeVOUTs ¶
func EncodeVOUTs(txouts []*wire.TxOut) []VerboseOut
type VerboseTransaction ¶
type VerboseTransaction struct { Hex string `json:"hex"` TxID string `json:"txid"` Hash string `json:"hash"` Size int `json:"size"` VSize int `json:"vsize"` Weight int `json:"weight"` Version int32 `json:"version"` LockTime uint32 `json:"locktime"` VINs interface{} `json:"vin"` VOUTs []VerboseOut `json:"vout"` BlockHash string `json:"blockhash"` Confirmations uint32 `json:"confirmations"` BlockTime int64 `json:"blocktime"` Time int64 `json:"time"` }
getrawtransaction
func EncodeTransaction ¶
Click to show internal directories.
Click to hide internal directories.