db

package
v0.0.0-...-a64e35e Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2016 License: MIT Imports: 12 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) 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) 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) State

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

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

type StateDB

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

func (*StateDB) Get

func (s *StateDB) Get(key string) (string, error)

func (*StateDB) Put

func (s *StateDB) Put(key, value string) error

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 *wire.ShaHash) error

func (*TxnsDB) Get

func (t *TxnsDB) Get(txid wire.ShaHash) (*wire.MsgTx, error)

func (*TxnsDB) GetAll

func (t *TxnsDB) GetAll() ([]*wire.MsgTx, error)

func (*TxnsDB) Put

func (t *TxnsDB) Put(txn *wire.MsgTx) error

type UtxoDB

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

func (*UtxoDB) Delete

func (u *UtxoDB) Delete(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

Jump to

Keyboard shortcuts

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