Versions in this module Expand all Collapse all v0 v0.0.0 Sep 23, 2018 Changes in this version + const CurrentVersion + const Faccount + const Facentry + const Fbestblock + const Fckey + const Fcscript + const Fdefaultkey + const FeatureBase + const FeatureCompressedPubKey + const FeatureLatest + const FeatureWalletCrypt + const Fkey + const Fkeymeta + const Flast + const Fminversion + const Fmkey + const Fname + const Forderposnext + const Fpool + const Ftx + const Fversion + const Fwkey + var AccountingEntryNumber = 0 + var AllLockedBuffers []*memguard.LockedBuffer + var AllocatedBufferCount int + var AllocatedBufferTotalSize int + var ErrPaddingSize = errors.New("padding size error") + var Filename string + var K = KeyNames + var KeyNames = []string + var PKCS5 = &pkcs5 + var PKCS7 = &pkcs5 + func DeleteBuffer(b *memguard.LockedBuffer) + func DeleteBuffers(b ...*memguard.LockedBuffer) + func NewBuffer(size int) (B *memguard.LockedBuffer, err error) + func NewBufferFromBytes(b []byte) (B *memguard.LockedBuffer, err error) + func ToJSON(p interface{}) (j string) + type Account struct + Account []byte + Pub []byte + Version int32 + func NewAccount(s *Serializable) (a *Account) + type AccountingEntry struct + Account string + Comment string + CreditDebit int64 + EntryNo uint64 + OrderPos int64 + OtherAccount string + Time int64 + ValueMap ValueMap + type AddressBook struct + Label []byte + Pub []byte + func NewAddressBook(s *Serializable) (a *AddressBook) + func (a *AddressBook) Decrypt() (A AddressBook) + func (a *AddressBook) Encrypt() (A AddressBook) + type BCKey struct + Priv []byte + Pub []byte + type BDefaultKey struct + Key []byte + type BKey struct + Priv []byte + Pub []byte + type BMetadata struct + CreateTime time.Time + Pub []byte + Version uint32 + type BName struct + Addr []byte + Name []byte + type BWKey struct + Comment string + Priv []byte + Pub []byte + TimeCreated time.Time + TimeExpires time.Time + type DB struct + Data EncryptedStore + Net string + UnlockedUntil int64 + func NewDB(path string) (db *DB, err error) + func (db *DB) Backup(*Wallet, string) (err error) + func (db *DB) Close() (err error) + func (db *DB) Dump() (dump string) + func (db *DB) Encrypt() (err error) + func (db *DB) EraseDefaultKey() (err error) + func (db *DB) EraseMasterKey(id int64) (err error) + func (db *DB) EraseName(addr string) (err error) + func (db *DB) ErasePool(int64) (err error) + func (db *DB) EraseTx(u *Uint.U256) (err error) + func (db *DB) Find(t int, k string) (r *jvzc.Range, err error) + func (db *DB) Flush() + func (db *DB) GetAccountCreditDebit(string) (err error) + func (db *DB) GetBalance() float64 + func (db *DB) GetKeyPoolSize() int + func (db *DB) GetOldestKeyPoolTime() int64 + func (db *DB) GetUpdateCount() uint64 + func (db *DB) ImportWalletDat(string) (err error) + func (db *DB) ListAccountCreditDebit(string, []*AccountingEntry) (err error) + func (db *DB) LoadWallet(*Wallet) (err error) + func (db *DB) ReadAccount(accname string, acc *Account) (err error) + func (db *DB) ReadBestBlock(*block.Locator) (err error) + func (db *DB) ReadPool(int64, KeyPool) (err error) + func (db *DB) Recover(string) (err error) + func (db *DB) RecoverOnlyKeys(string) (err error) + func (db *DB) ReorderTransactions(*Wallet) (err error) + func (db *DB) Unlock() (err error) + func (db *DB) Verify() (err error) + func (db *DB) Version() int + func (db *DB) WriteAccount(string, *Account) (err error) + func (db *DB) WriteAccountingEntry(*AccountingEntry) (err error) + func (db *DB) WriteBestBlock(*block.Locator) (err error) + func (db *DB) WriteCryptedKey(pub *key.Pub, priv []byte, meta *KeyMetadata) (err error) + func (db *DB) WriteDefaultKey(p *key.Pub) (err error) + func (db *DB) WriteKey(key *Key, meta *KeyMetadata) (err error) + func (db *DB) WriteMasterKey(mkey *MasterKey) (err error) + func (db *DB) WriteMinVersion(int) (err error) + func (db *DB) WriteName(n *AddressBook) (err error) + func (db *DB) WriteOrderPosNext(p int64) (err error) + func (db *DB) WritePool(int64, KeyPool) (err error) + func (db *DB) WriteScript(hashID *Uint.U160, script *key.Script) (err error) + func (db *DB) WriteTx(u *Uint.U256, t []byte) (err error) + type EncryptedStore struct + Account []*Account + AddressBook []*AddressBook + BestBlock []byte + DefaultKey []byte + Key []*Key + LastLocked time.Time + MasterKey []*MasterKey + Metadata []*Metadata + MinVersion uint32 + OrderPosNext int64 + Pool []*Pool + Script []*Script + Setting []*Setting + Tx []*Tx + Version uint32 + Wdata []*Wdata + var ES *EncryptedStore + func Import(pass *memguard.LockedBuffer, filename ...string) (es *EncryptedStore, err error) + func NewEncryptedStore() (e *EncryptedStore) + type Imports struct + CKeys []BCKey + DefaultKey BDefaultKey + Keys []BKey + Metadata []BMetadata + Names []BName + WKeys []BWKey + type Key struct + Priv []byte + Pub []byte + func NewKey(s *Serializable) (k *Key) + func (k *Key) Decrypt() (K Key) + type KeyMetadata struct + CreateTime int64 + Pub *key.Pub + Version uint32 + func NewKeyMetadata(createTime int64) (M *KeyMetadata) + type KeyPool struct + PubKey key.Pub + Time int64 + type MasterKey struct + EncryptedKey []byte + Iterations uint32 + MKeyID int64 + Method uint32 + Other []byte + Salt []byte + func NewMasterKey() (e MasterKey) + func (m *MasterKey) Decrypt(ckey *memguard.LockedBuffer, iv []byte, b ...[]byte) (r []*memguard.LockedBuffer, err error) + func (m *MasterKey) Encrypt(ckey *memguard.LockedBuffer, iv []byte, b ...*memguard.LockedBuffer) (r []*memguard.LockedBuffer, err error) + type MasterKeyMap map[uint]*KeyMetadata + type Metadata struct + CreateTime []byte + Pub []byte + Version uint32 + func NewMetadata(s *Serializable) (m *Metadata) + func (m *Metadata) Decrypt() (M *Metadata) + type Orders struct + Key string + Value string + type Pool struct + Index uint64 + Pub []byte + Time []byte + Version uint32 + func NewPool(s *Serializable) (p *Pool) + type ReserveKey struct + Index int64 + PubKey key.Pub + type ScanState struct + AnyUnordered bool + CKeys uint + FileVersion int + IsEncrypted bool + KeyMeta uint + Keys uint + WalletUpgrade []*Uint.U256 + type Script struct + Data []byte + ID []byte + func NewScript(s *Serializable) (S *Script) + type Serializable struct + func (s *Serializable) DeriveCipher(pass *memguard.LockedBuffer) (mk *MasterKey, k *memguard.LockedBuffer, iv []byte, err error) + func (s *Serializable) FromJSON(j string) (J string, err error) + func (s *Serializable) Lock() + type Setting struct + Name string + Value []byte + func NewSetting(s *Serializable) (S *Setting) + type Transaction struct + CachedFlags struct{ ... } + CachedValues struct{ ... } + FromAccount string + FromMe byte + OrderForm []Orders + OrderPos int64 + Prev []block.MerkleTx + Spent []byte + TimeReceived uint + TimeReceivedIsTxTime uint + TimeSmart uint + type Tx struct + TxData []byte + TxHash []byte + func NewTx(s *Serializable) (t *Tx) + type TxItems map[int64]TxPair + type TxOutput struct + Depth int + I int + Tx Tx + type TxPair map[*Tx]*AccountingEntry + type ValueMap map[string]string + type Wallet struct + AddressBookMap map[*key.TxDestination]string + DB *DB + DefaultKey *key.Pub + File string + FileBacked bool + KeyMetadataMap map[*key.ID]*KeyMetadata + KeyPoolSet []int64 + LockedCoinsSet []*tx.OutPoint + MasterKeyMaxID uint + MasterKeysMap MasterKeyMap + OrderPosNext int64 + RequestCountMap map[*Uint.U256]int + TimeFirstKey int64 + WalletMap map[*Uint.U256]*Tx + func New() *Wallet + func NewFromFile(filename string) *Wallet + func (w *Wallet) AddCryptedKey(*key.Pub, *KeyMetadata) (success bool) + func (w *Wallet) AddKeyPair(*key.Priv, *key.Pub) (success bool) + func (w *Wallet) AddReserveKey(*KeyPool) int64 + func (w *Wallet) AddScript(*key.Script) (success bool) + func (w *Wallet) AddToWallet(Tx) (success bool) + func (w *Wallet) AddToWalletIfInvolvingMe(*Uint.U256, *tx.Transaction, *block.Block, bool, bool) (success bool) + func (w *Wallet) AvailableCoins([]TxOutput, bool) + func (w *Wallet) CanSupportFeature(int) (success bool) + func (w *Wallet) ChangeWalletPassphrase(string, string) (success bool) + func (w *Wallet) CommitTransaction(*Tx, *ReserveKey) (success bool) + func (w *Wallet) CreateTransaction(*key.Script, int64, *Tx, *ReserveKey, int64, string) (success bool) + func (w *Wallet) CreateTransactions([]map[*key.Script]int64, *Tx, *ReserveKey, int64, string) (success bool) + func (w *Wallet) DelAddressBookName(*key.TxDestination) (success bool) + func (w *Wallet) EncryptWallet(string) + func (w *Wallet) EraseFromWallet(*Uint.U256) (success bool) + func (w *Wallet) GenerateNewKey() *key.Pub + func (w *Wallet) GetAddressBalances() map[*key.TxDestination]int64 + func (w *Wallet) GetAddressGroupings() []key.TxDestination + func (w *Wallet) GetAllReserveKeys() []key.ID + func (w *Wallet) GetBalance() int64 + func (w *Wallet) GetChange(*tx.Out) int64 + func (w *Wallet) GetCredit(*tx.Out) int64 + func (w *Wallet) GetDebit(*tx.In) int64 + func (w *Wallet) GetImmatureBalance() int64 + func (w *Wallet) GetKeyBirthTimes(map[*key.ID]int64) + func (w *Wallet) GetKeyFromPool(*key.Pub, bool) (success bool) + func (w *Wallet) GetKeyPoolSize() int + func (w *Wallet) GetOldestKeyPoolTime() int64 + func (w *Wallet) GetTransaction(*Uint.U256, *Tx) (success bool) + func (w *Wallet) GetTxChange(*tx.Transaction) int64 + func (w *Wallet) GetTxCredit(*tx.Transaction) int64 + func (w *Wallet) GetTxDebit(*tx.Transaction) int64 + func (w *Wallet) GetUnconfirmedBalance() int64 + func (w *Wallet) GetVersion() int + func (w *Wallet) IncOrderPosNext(*DB) int64 + func (w *Wallet) Inventory(*Uint.U256) + func (w *Wallet) IsChange(*tx.Out) (success bool) + func (w *Wallet) IsFromMe(*tx.Transaction) (success bool) + func (w *Wallet) IsLockedCoin(*Uint.U256, uint) (success bool) + func (w *Wallet) IsMyTX(*tx.Transaction) (success bool) + func (w *Wallet) IsMyTxIn(*tx.In) (success bool) + func (w *Wallet) IsMyTxOut(*tx.Out) (success bool) + func (w *Wallet) KeepKey(int64) + func (w *Wallet) ListLockedCoins([]tx.OutPoint) + func (w *Wallet) LoadCryptedKey(*key.Pub, []byte) (success bool) + func (w *Wallet) LoadKey(*key.Priv, *key.Pub) (success bool) + func (w *Wallet) LoadKeyMetadata(*key.Pub, *KeyMetadata) (success bool) + func (w *Wallet) LoadMinVersion(int) (success bool) + func (w *Wallet) LoadScript(*key.Script) (success bool) + func (w *Wallet) LoadWallet(bool) error + func (w *Wallet) LockCoin(*tx.OutPoint) + func (w *Wallet) MarkDirty() + func (w *Wallet) NewKeyPool() (success bool) + func (w *Wallet) NotifyAddressBookChanged(*Wallet, *key.TxDestination, string, bool, int) + func (w *Wallet) NotifyTransactionChanged(*Wallet, *Uint.U256, int) + func (w *Wallet) OrderedTxItems([]AccountingEntry, string) *TxItems + func (w *Wallet) PrintWallet(*block.Block) + func (w *Wallet) ReacceptWalletTransactions() + func (w *Wallet) ResendWalletTransactions() + func (w *Wallet) ReserveKeyFromKeyPool(int64, *KeyPool) + func (w *Wallet) ReturnKey(int64) + func (w *Wallet) ScanForWalletTransactions(*block.Index, bool) int + func (w *Wallet) SelectCoinsMinConf(int64, int, int, []TxOutput) (err error) + func (w *Wallet) SendMoney(*key.Script, int64, *Tx, bool) string + func (w *Wallet) SendMoneyToDestination(*key.TxDestination) string + func (w *Wallet) SetAddressBookName(*key.TxDestination, string) (success bool) + func (w *Wallet) SetBestChain(*block.Locator) + func (w *Wallet) SetDefaultKey(*key.Pub) (success bool) + func (w *Wallet) SetMaxVersion(int) (success bool) + func (w *Wallet) SetMinVersion(int, *DB, bool) (success bool) + func (w *Wallet) TopUpKeyPool() (success bool) + func (w *Wallet) Unlock(string) (success bool) + func (w *Wallet) UnlockAllCoins() + func (w *Wallet) UnlockCoin(*tx.OutPoint) + func (w *Wallet) UpdatedTransaction(*Uint.U256) + func (w *Wallet) WalletUpdateSpent(*tx.Transaction) + type Wdata struct + Comment []byte + Created []byte + Expires []byte + Pub []byte + func NewWdata(s *Serializable) (w *Wdata)