datastore

package
v0.0.0-...-250b327 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyStoreEntry

type KeyStoreEntry struct {
	ScriptAddress []byte
	Path          wallet.KeyPath
	Used          bool
	Key           *btcec.PrivateKey
}

type MockDatastore

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

func (*MockDatastore) Keys

func (m *MockDatastore) Keys() wallet.Keys

func (*MockDatastore) Stxos

func (m *MockDatastore) Stxos() wallet.Stxos

func (*MockDatastore) Txns

func (m *MockDatastore) Txns() wallet.Txns

func (*MockDatastore) Utxos

func (m *MockDatastore) Utxos() wallet.Utxos

func (*MockDatastore) WatchedScripts

func (m *MockDatastore) WatchedScripts() wallet.WatchedScripts

type MockKeyStore

type MockKeyStore struct {
	Keys map[string]*KeyStoreEntry
	sync.Mutex
}

func (*MockKeyStore) GetAll

func (m *MockKeyStore) GetAll() ([]wallet.KeyPath, error)

func (*MockKeyStore) GetImported

func (m *MockKeyStore) GetImported() ([]*btcec.PrivateKey, error)

func (*MockKeyStore) GetKey

func (m *MockKeyStore) GetKey(scriptAddress []byte) (*btcec.PrivateKey, error)

func (*MockKeyStore) GetLastKeyIndex

func (m *MockKeyStore) GetLastKeyIndex(purpose wallet.KeyPurpose) (int, bool, error)

func (*MockKeyStore) GetLookaheadWindows

func (m *MockKeyStore) GetLookaheadWindows() map[wallet.KeyPurpose]int

func (*MockKeyStore) GetPathForKey

func (m *MockKeyStore) GetPathForKey(scriptAddress []byte) (wallet.KeyPath, error)

func (*MockKeyStore) GetUnused

func (m *MockKeyStore) GetUnused(purpose wallet.KeyPurpose) ([]int, error)

func (*MockKeyStore) ImportKey

func (m *MockKeyStore) ImportKey(scriptAddress []byte, key *btcec.PrivateKey) error

func (*MockKeyStore) MarkKeyAsUsed

func (m *MockKeyStore) MarkKeyAsUsed(scriptAddress []byte) error

func (*MockKeyStore) Put

func (m *MockKeyStore) Put(scriptAddress []byte, keyPath wallet.KeyPath) error

type MockMultiwalletDatastore

type MockMultiwalletDatastore struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewMockMultiwalletDatastore

func NewMockMultiwalletDatastore() *MockMultiwalletDatastore

func (*MockMultiwalletDatastore) GetDatastoreForWallet

func (m *MockMultiwalletDatastore) GetDatastoreForWallet(coinType wallet.CoinType) (wallet.Datastore, error)

type MockStxoStore

type MockStxoStore struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*MockStxoStore) Delete

func (m *MockStxoStore) Delete(stxo wallet.Stxo) error

func (*MockStxoStore) GetAll

func (m *MockStxoStore) GetAll() ([]wallet.Stxo, error)

func (*MockStxoStore) Put

func (m *MockStxoStore) Put(stxo wallet.Stxo) error

type MockTxnStore

type MockTxnStore struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*MockTxnStore) Delete

func (m *MockTxnStore) Delete(txid *chainhash.Hash) error

func (*MockTxnStore) Get

func (m *MockTxnStore) Get(txid chainhash.Hash) (wallet.Txn, error)

func (*MockTxnStore) GetAll

func (m *MockTxnStore) GetAll(includeWatchOnly bool) ([]wallet.Txn, error)

func (*MockTxnStore) Put

func (m *MockTxnStore) Put(tx []byte, txid, value string, height int, timestamp time.Time, watchOnly bool) error

func (*MockTxnStore) UpdateHeight

func (m *MockTxnStore) UpdateHeight(txid chainhash.Hash, height int, timestamp time.Time) error

type MockUtxoStore

type MockUtxoStore struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*MockUtxoStore) Delete

func (m *MockUtxoStore) Delete(utxo wallet.Utxo) error

func (*MockUtxoStore) GetAll

func (m *MockUtxoStore) GetAll() ([]wallet.Utxo, error)

func (*MockUtxoStore) Put

func (m *MockUtxoStore) Put(utxo wallet.Utxo) error

func (*MockUtxoStore) SetWatchOnly

func (m *MockUtxoStore) SetWatchOnly(utxo wallet.Utxo) error

type MockWatchedScriptsStore

type MockWatchedScriptsStore struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*MockWatchedScriptsStore) Delete

func (m *MockWatchedScriptsStore) Delete(scriptPubKey []byte) error

func (*MockWatchedScriptsStore) GetAll

func (m *MockWatchedScriptsStore) GetAll() ([][]byte, error)

func (*MockWatchedScriptsStore) Put

func (m *MockWatchedScriptsStore) Put(scriptPubKey []byte) error

func (*MockWatchedScriptsStore) PutAll

func (m *MockWatchedScriptsStore) PutAll(scriptPubKeys [][]byte) error

Jump to

Keyboard shortcuts

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