Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Addresses ¶
type Addresses struct {
Truncated bool `json:"truncated"`
Transactions []Transaction `json:"txs"`
}
type Block ¶
type Block struct {
Hash string `json:"hash"` // 0x prefixed
Height int64 `json:"height"` // integer
Time string `json:"time"` // RFC3339 format
Transactions *[]string `json:"txs,omitempty"` // optional list of 0x prefixed transaction IDs
}
Block models data corresponding to a block, but with limited information. It is used to represent minimal information of the block containing the given transaction.
type BlockWithTransactions ¶
BlockWithTransactions is a struct that embeds Block, but also contains transaction hashes.
type Input ¶
type Input struct {
Coinbase string `json:"coinbase,omitempty"` // [coinbase] The coinbase encoded as hex
OutputHash string `json:"output_hash,omitempty"` // [non-coinbase] Same as transaction ID of vin
OutputIndex *uint32 `json:"output_index,omitempty"` // [non-coinbase] Index of the corresponding UTXO
Value *btcutil.Amount `json:"value,omitempty"` // [non-coinbase] Value of the corresponding UTXO in satoshis
Address string `json:"address,omitempty"` // [non-coinbase] Address of the corresponding UTXO; can be empty
ScriptSig *string `json:"script_signature,omitempty"` // [non-coinbase] Hex-encoded signature script
Witness *[]string `json:"txinwitness,omitempty"` // [non-coinbase] Array of hex-encoded witness data
InputIndex *int `json:"input_index,omitempty"` // [all] Non-standard data required by Ledger Blockchain Explorer
Sequence uint32 `json:"sequence"` // [all] Input sequence number, used to track unconfirmed txns
}
Input models data corresponding to transaction inputs.
type Output ¶
type Output struct {
OutputIndex *uint32 `json:"output_index,omitempty"` // Used to uniquely identify an output in a transaction
Value *btcutil.Amount `json:"value,omitempty"` // Value of output in satoshis
ScriptHex string `json:"script_hex"` // Hex-encoded script
Address string `json:"address,omitempty"` // Address of the UTXO; can be empty
}
Output models data corresponding to transaction outputs.
type OutputIdentifier ¶
type Transaction ¶
type Transaction struct {
ID string `json:"id"` // only in v3 explorer
Hash string `json:"hash"`
ReceivedAt string `json:"received_at"`
LockTime uint32 `json:"lock_time"`
Fees *btcutil.Amount `json:"fees"`
Amount *btcutil.Amount `json:"amount,omitempty"` // legacy field for v2 explorer
Confirmations uint64 `json:"confirmations"`
Inputs []Input `json:"inputs"`
Outputs []Output `json:"outputs"`
Block *Block `json:"block"`
}
Transaction represents the principal type to model the response of the GetTransaction handler.
type UTXOs ¶
type UTXOs map[OutputIdentifier]UTXOData
UTXO models the data corresponding to unspent transaction outputs. Convenience type; for limited use only.
Click to show internal directories.
Click to hide internal directories.