db

package
v0.0.0-...-db7839e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2017 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeysDB

type KeysDB struct {
	// contains filtered or unexported fields
}

func (*KeysDB) GetAll

func (k *KeysDB) GetAll() ([]spvwallet.KeyPath, error)

func (*KeysDB) GetKeyForScript

func (k *KeysDB) GetKeyForScript(scriptPubKey []byte) (*btcec.PrivateKey, error)

func (*KeysDB) GetLastKeyIndex

func (k *KeysDB) GetLastKeyIndex(purpose spvwallet.KeyPurpose) (int, bool, error)

func (*KeysDB) GetLookaheadWindows

func (k *KeysDB) GetLookaheadWindows() map[spvwallet.KeyPurpose]int

func (*KeysDB) GetPathForScript

func (k *KeysDB) GetPathForScript(scriptPubKey []byte) (spvwallet.KeyPath, error)

func (*KeysDB) GetUnused

func (k *KeysDB) GetUnused(purpose spvwallet.KeyPurpose) (int, error)

func (*KeysDB) ImportKey

func (k *KeysDB) ImportKey(scriptPubKey []byte, key *btcec.PrivateKey) error

func (*KeysDB) MarkKeyAsUsed

func (k *KeysDB) MarkKeyAsUsed(scriptPubKey []byte) error

func (*KeysDB) Put

func (k *KeysDB) Put(scriptPubKey []byte, keyPath spvwallet.KeyPath) error

type SQLiteDatastore

type SQLiteDatastore struct {
	// contains filtered or unexported fields
}

This database is mostly just an example implementation used for testing. End users are free to user their own database.

func Create

func Create(repoPath string) (*SQLiteDatastore, error)

func (*SQLiteDatastore) Keys

func (db *SQLiteDatastore) Keys() spvwallet.Keys

func (*SQLiteDatastore) Stxos

func (db *SQLiteDatastore) Stxos() spvwallet.Stxos

func (*SQLiteDatastore) Txns

func (db *SQLiteDatastore) Txns() spvwallet.Txns

func (*SQLiteDatastore) Utxos

func (db *SQLiteDatastore) Utxos() spvwallet.Utxos

func (*SQLiteDatastore) WatchedScripts

func (db *SQLiteDatastore) WatchedScripts() spvwallet.WatchedScripts

type StxoDB

type StxoDB struct {
	// contains filtered or unexported fields
}

func (*StxoDB) Delete

func (s *StxoDB) Delete(stxo spvwallet.Stxo) error

func (*StxoDB) GetAll

func (s *StxoDB) GetAll() ([]spvwallet.Stxo, error)

func (*StxoDB) Put

func (s *StxoDB) Put(stxo spvwallet.Stxo) error

type TxnsDB

type TxnsDB struct {
	// contains filtered or unexported fields
}

func (*TxnsDB) Delete

func (t *TxnsDB) Delete(txid *chainhash.Hash) error

func (*TxnsDB) Get

func (t *TxnsDB) Get(txid chainhash.Hash) (*wire.MsgTx, int32, time.Time, error)

func (*TxnsDB) GetAll

func (t *TxnsDB) GetAll() ([]spvwallet.Txn, error)

func (*TxnsDB) MarkAsDead

func (t *TxnsDB) MarkAsDead(txid chainhash.Hash) error

func (*TxnsDB) Put

func (t *TxnsDB) Put(txn *wire.MsgTx, value, height int, timestamp time.Time) error

type UtxoDB

type UtxoDB struct {
	// contains filtered or unexported fields
}

func (*UtxoDB) Delete

func (u *UtxoDB) Delete(utxo spvwallet.Utxo) error

func (*UtxoDB) Freeze

func (u *UtxoDB) Freeze(utxo spvwallet.Utxo) error

func (*UtxoDB) GetAll

func (u *UtxoDB) GetAll() ([]spvwallet.Utxo, error)

func (*UtxoDB) Put

func (u *UtxoDB) Put(utxo spvwallet.Utxo) error

type WatchedScriptsDB

type WatchedScriptsDB struct {
	// contains filtered or unexported fields
}

func (*WatchedScriptsDB) Delete

func (w *WatchedScriptsDB) Delete(scriptPubKey []byte) error

func (*WatchedScriptsDB) GetAll

func (w *WatchedScriptsDB) GetAll() ([][]byte, error)

func (*WatchedScriptsDB) Put

func (w *WatchedScriptsDB) Put(scriptPubKey []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL