4 "github.com/vapor/crypto/ed25519/chainkd"
5 "github.com/vapor/protocol/bc"
8 // AccountStore interface contains account storage functions.
9 type AccountStore interface {
10 InitBatch() AccountStore
12 DeleteAccount(*Account) error
13 DeleteStandardUTXO(bc.Hash)
14 GetAccountByAlias(string) (*Account, error)
15 GetAccountByID(string) (*Account, error)
16 GetAccountIndex([]chainkd.XPub) uint64
17 GetBip44ContractIndex(string, bool) uint64
18 GetCoinbaseArbitrary() []byte
19 GetContractIndex(string) uint64
20 GetControlProgram(bc.Hash) (*CtrlProgram, error)
21 GetMiningAddress() (*CtrlProgram, error)
22 GetUTXO(bc.Hash) (*UTXO, error)
23 ListAccounts(string) ([]*Account, error)
24 ListControlPrograms() ([]*CtrlProgram, error)
25 ListUTXOs() ([]*UTXO, error)
26 SetAccount(*Account) error
27 SetAccountIndex(*Account)
28 SetBip44ContractIndex(string, bool, uint64)
29 SetCoinbaseArbitrary([]byte)
30 SetContractIndex(string, uint64)
31 SetControlProgram(bc.Hash, *CtrlProgram) error
32 SetMiningAddress(*CtrlProgram) error
33 SetStandardUTXO(bc.Hash, *UTXO) error