Versions in this module Expand all Collapse all v0 v0.0.2 Oct 3, 2016 Changes in this version + const VERSION + var BKTState = []byte("MiscState") + var BKTStxos = []byte("SpentTxs") + var BKTTxns = []byte("Txns") + var BKTUtxos = []byte("DuffelBag") + var KEYNumKeys = []byte("NumKeys") + var KEYTipHeight = []byte("TipHeight") + var WitMagicBytes = []byte + func BlockOK(blk wire.MsgBlock) bool + func CheckDoubleSpends(argTx *wire.MsgTx, txs []*wire.MsgTx) ([]*wire.ShaHash, error) + func CheckHeader(r io.ReadSeeker, height int32, p *chaincfg.Params) bool + func CheckRange(r io.ReadSeeker, first, last int32, p *chaincfg.Params) bool + func EstFee(otx *wire.MsgTx, spB int64) int64 + func LoadKeyFromFileArg(filename string, pass []byte) (*[32]byte, error) + func LoadKeyFromFileInteractive(filename string) (*[32]byte, error) + func MakeMerkleParent(left *wire.ShaHash, right *wire.ShaHash) *wire.ShaHash + func OutPointsEqual(a, b wire.OutPoint) bool + func ReadKeyFileToECPriv(filename string, p *chaincfg.Params) (*hdkeychain.ExtendedKey, error) + func SaveKeyToFileArg(filename string, priv32 *[32]byte, pass []byte) error + func SaveKeyToFileInteractive(filename string, priv32 *[32]byte) error + func TxToString(tx *wire.MsgTx) string + type HashAndHeight struct + func NewRootAndHeight(b wire.ShaHash, h int32) (hah HashAndHeight) + type MyAdr struct + KeyIdx uint32 + PkhAdr btcutil.Address + type SPVCon struct + HardMode bool + Ironman bool + RBytes uint64 + TS *TxStore + WBytes uint64 + func OpenSPV(remoteNode string, hfn, dbfn string, inTs *TxStore, hard bool, iron bool, ...) (SPVCon, error) + func (s *SPVCon) AskForBlocks() error + func (s *SPVCon) AskForHeaders() error + func (s *SPVCon) AskForOneBlock(h int32) error + func (s *SPVCon) AskForTx(txid wire.ShaHash) + func (s *SPVCon) GetDataHandler(m *wire.MsgGetData) + func (s *SPVCon) HeaderHandler(m *wire.MsgHeaders) + func (s *SPVCon) IngestBlock(m *wire.MsgBlock) + func (s *SPVCon) IngestHeaders(m *wire.MsgHeaders) (bool, error) + func (s *SPVCon) IngestMerkleBlock(m *wire.MsgMerkleBlock) + func (s *SPVCon) InvHandler(m *wire.MsgInv) + func (s *SPVCon) NewOutgoingTx(tx *wire.MsgTx) error + func (s *SPVCon) PongBack(nonce uint64) + func (s *SPVCon) Rebroadcast() + func (s *SPVCon) RemoveHeaders(r int32) error + func (s *SPVCon) SendCoins(adrs []btcutil.Address, sendAmts []int64) error + func (s *SPVCon) SendFilter(f *bloom.Filter) + func (s *SPVCon) SendOne(u Utxo, adr btcutil.Address) error + func (s *SPVCon) TxHandler(m *wire.MsgTx) + type SortableUtxoSlice []Utxo + func (s SortableUtxoSlice) Len() int + func (s SortableUtxoSlice) Less(i, j int) bool + func (s SortableUtxoSlice) Swap(i, j int) + type Stxo struct + SpendHeight int32 + SpendTxid wire.ShaHash + func StxoFromBytes(b []byte) (Stxo, error) + func (s *Stxo) ToBytes() ([]byte, error) + type TxStore struct + Adrs []MyAdr + OKMutex sync.Mutex + OKTxids map[wire.ShaHash]int32 + Param *chaincfg.Params + StateDB *bolt.DB + func NewTxStore(rootkey *hdkeychain.ExtendedKey, p *chaincfg.Params) TxStore + func (t *TxStore) AddTxid(txid *wire.ShaHash, height int32) error + func (t *TxStore) GimmeFilter() (*bloom.Filter, error) + func (t *TxStore) SignThis(tx *wire.MsgTx) error + func (ts *TxStore) GetAllStxos() ([]*Stxo, error) + func (ts *TxStore) GetAllTxs() ([]*wire.MsgTx, error) + func (ts *TxStore) GetAllUtxos() ([]*Utxo, error) + func (ts *TxStore) GetDBSyncHeight() (int32, error) + func (ts *TxStore) GetPendingInv() (*wire.MsgInv, error) + func (ts *TxStore) GetTx(txid *wire.ShaHash) (*wire.MsgTx, error) + func (ts *TxStore) Ingest(tx *wire.MsgTx, height int32) (uint32, error) + func (ts *TxStore) NewAdr() (btcutil.Address, error) + func (ts *TxStore) OpenDB(filename string) error + func (ts *TxStore) PopulateAdrs(lastKey uint32) error + func (ts *TxStore) Refilter() error + func (ts *TxStore) SetDBSyncHeight(n int32) error + type Utxo struct + AtHeight int32 + IsWit bool + KeyIdx uint32 + Op wire.OutPoint + Value int64 + func UtxoFromBytes(b []byte) (Utxo, error) + func (u *Utxo) ToBytes() ([]byte, error)