Documentation
¶
Index ¶
- Constants
- Variables
- func PrivKeyToWif() error
- type BoltDatastore
- func (db *BoltDatastore) Cfg() wallet.Cfg
- func (s *BoltDatastore) Close()
- func (db *BoltDatastore) Enc() wallet.Enc
- func (db *BoltDatastore) Keys() wallet.Keys
- func (db *BoltDatastore) Stxos() wallet.Stxos
- func (db *BoltDatastore) Subscriptions() wallet.Subscriptions
- func (db *BoltDatastore) Txns() wallet.Txns
- func (db *BoltDatastore) Utxos() wallet.Utxos
- type CfgDB
- type EncDB
- type KeysDB
- func (k *KeysDB) GetAll() ([]wallet.KeyPath, error)
- func (k *KeysDB) GetDbg() string
- func (k *KeysDB) GetLastKeyIndex(purpose wallet.KeyPurpose) (int, bool, error)
- func (k *KeysDB) GetLookaheadWindows() map[wallet.KeyPurpose]int
- func (k *KeysDB) GetPathForKey(scriptAddress []byte) (wallet.KeyPath, error)
- func (k *KeysDB) GetUnused(purpose wallet.KeyPurpose) ([]int, error)
- func (k *KeysDB) MarkKeyAsUsed(scriptAddress []byte) error
- func (k *KeysDB) Put(scriptAddress []byte, keyPath wallet.KeyPath) error
- type StxoDB
- type SubscriptionsDB
- func (s *SubscriptionsDB) Delete(scriptPubKey string) error
- func (s *SubscriptionsDB) Get(scriptPubKey string) (*wallet.Subscription, error)
- func (s *SubscriptionsDB) GetAll() ([]*wallet.Subscription, error)
- func (s *SubscriptionsDB) GetElectrumScripthash(electrumScripthash string) (*wallet.Subscription, error)
- func (s *SubscriptionsDB) Put(subscription *wallet.Subscription) error
- type TxnsDB
- func (t *TxnsDB) Delete(txid string) error
- func (t *TxnsDB) Get(txid string) (wallet.Txn, error)
- func (t *TxnsDB) GetAll(includeWatchOnly bool) ([]wallet.Txn, error)
- func (t *TxnsDB) Put(txn []byte, txid string, value int64, height int64, timestamp time.Time, ...) error
- func (t *TxnsDB) UpdateHeight(txid string, height int, timestamp time.Time) error
- type UtxoDB
- func (u *UtxoDB) Delete(utxo wallet.Utxo) error
- func (u *UtxoDB) Freeze(utxo wallet.Utxo) error
- func (u *UtxoDB) Get(op *wire.OutPoint) (wallet.Utxo, error)
- func (u *UtxoDB) GetAll() ([]wallet.Utxo, error)
- func (u *UtxoDB) Put(utxo wallet.Utxo) error
- func (u *UtxoDB) SetWatchOnly(utxo wallet.Utxo) error
- func (u *UtxoDB) UnFreeze(utxo wallet.Utxo) error
Constants ¶
View Source
const STORAGE = "storage"
Variables ¶
View Source
var ( ErrBadPw = errors.New("bad password") // Argon2 params SALT = []byte("2977958431d29f2d") // TODO: a good random for dev TIME = uint32(1) MEM = uint32(64 * 1024) THREADS = uint8(runtime.NumCPU()) THRDMAX = uint8(255) KEYLEN = uint32(32) )
View Source
var ErrBucketNotFound = errors.New("cannot find bucket")
Functions ¶
func PrivKeyToWif ¶
func PrivKeyToWif() error
Types ¶
type BoltDatastore ¶
type BoltDatastore struct {
// contains filtered or unexported fields
}
func (*BoltDatastore) Cfg ¶
func (db *BoltDatastore) Cfg() wallet.Cfg
func (*BoltDatastore) Close ¶
func (s *BoltDatastore) Close()
func (*BoltDatastore) Enc ¶
func (db *BoltDatastore) Enc() wallet.Enc
func (*BoltDatastore) Keys ¶
func (db *BoltDatastore) Keys() wallet.Keys
func (*BoltDatastore) Stxos ¶
func (db *BoltDatastore) Stxos() wallet.Stxos
func (*BoltDatastore) Subscriptions ¶
func (db *BoltDatastore) Subscriptions() wallet.Subscriptions
func (*BoltDatastore) Txns ¶
func (db *BoltDatastore) Txns() wallet.Txns
func (*BoltDatastore) Utxos ¶
func (db *BoltDatastore) Utxos() wallet.Utxos
type KeysDB ¶
type KeysDB struct {
// contains filtered or unexported fields
}
func (*KeysDB) GetLastKeyIndex ¶
GetLastKeyIndex gets the last (highest) key index stored and whether it has been used. If error or no records it will return -1 and error.
func (*KeysDB) GetLookaheadWindows ¶
func (k *KeysDB) GetLookaheadWindows() map[wallet.KeyPurpose]int
func (*KeysDB) GetPathForKey ¶
func (*KeysDB) MarkKeyAsUsed ¶
type SubscriptionsDB ¶
type SubscriptionsDB struct {
// contains filtered or unexported fields
}
func (*SubscriptionsDB) Delete ¶
func (s *SubscriptionsDB) Delete(scriptPubKey string) error
func (*SubscriptionsDB) Get ¶
func (s *SubscriptionsDB) Get(scriptPubKey string) (*wallet.Subscription, error)
func (*SubscriptionsDB) GetAll ¶
func (s *SubscriptionsDB) GetAll() ([]*wallet.Subscription, error)
func (*SubscriptionsDB) GetElectrumScripthash ¶
func (s *SubscriptionsDB) GetElectrumScripthash(electrumScripthash string) (*wallet.Subscription, error)
func (*SubscriptionsDB) Put ¶
func (s *SubscriptionsDB) Put(subscription *wallet.Subscription) error
type UtxoDB ¶
type UtxoDB struct {
// contains filtered or unexported fields
}
func (*UtxoDB) Put ¶
Put adds a utxo to the database. If the utxo already exists Put updates the utxo record.
func (*UtxoDB) SetWatchOnly ¶
SetWatchOnly sets this utxo as watch only. It cannot be unset.
Click to show internal directories.
Click to hide internal directories.