Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Header ¶
type Header struct {
BlockHeight int `json:"block_height"`
}
Header is returned by HeadersSubscribe().
type Interface ¶
type Interface interface { ScriptHashGetHistory(ScriptHashHex, func(TxHistory) error, func(error)) TransactionGet(chainhash.Hash, func(*wire.MsgTx) error, func(error)) ScriptHashSubscribe(func() func(error), ScriptHashHex, func(string) error) HeadersSubscribe(func() func(error), func(*Header) error) TransactionBroadcast(*wire.MsgTx) error RelayFee(func(btcutil.Amount) error, func(error)) EstimateFee(int, func(*btcutil.Amount) error, func(error)) Headers(int, int, func([]*wire.BlockHeader, int) error, func(error)) GetMerkle(chainhash.Hash, int, func(merkle []TXHash, pos int) error, func(error)) Close() ConnectionStatus() Status RegisterOnConnectionStatusChangedEvent(func(Status)) }
Interface is the interface to a blockchain index backend. Currently geared to Electrum, though other backends can implement the same interface.
type ScriptHashHex ¶
type ScriptHashHex string
ScriptHashHex is the hash of a pkScript in reverse hex format.
type TXHash ¶
TXHash wraps chainhash.Hash for json deserialization.
func (*TXHash) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (*TXHash) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
type TxHistory ¶
type TxHistory []*TxInfo
TxHistory is returned by ScriptHashGetHistory.
func (TxHistory) Status ¶
Status encodes the status of the address history as a hash, according to the Electrum specification. https://github.com/kyuupichan/electrumx/blob/b01139bb93a7b0cfbd45b64e170223f4871a4a87/docs/PROTOCOL.rst#blockchainaddresssubscribe