OSDN Git Service

move interface
[bytom/vapor.git] / account / store.go
1 package account
2
3 import (
4         "github.com/vapor/common"
5         "github.com/vapor/crypto/ed25519/chainkd"
6         "github.com/vapor/protocol/bc"
7 )
8
9 // AccountStorer interface contains account storage functions.
10 type AccountStorer interface {
11         InitBatch()
12         CommitBatch()
13         SetAccount(string, string, []byte)
14         SetAccountIndex([]chainkd.XPub, uint64)
15         GetAccountByAccountAlias(string) []byte
16         GetAccountByAccountID(string) []byte
17         GetAccountIndex([]chainkd.XPub) []byte
18         DeleteAccountByAccountAlias(string)
19         DeleteAccountByAccountID(string)
20         DeleteRawProgram(common.Hash)
21         DeleteBip44ContractIndex(string)
22         DeleteContractIndex(string)
23         GetContractIndex(string) []byte
24         GetAccountUTXOs(string) [][]byte
25         DeleteStandardUTXO(bc.Hash)
26         GetCoinbaseArbitrary() []byte
27         SetCoinbaseArbitrary([]byte)
28         GetMiningAddress() []byte
29         GetFirstAccount() ([]byte, error)
30         SetMiningAddress([]byte)
31         GetBip44ContractIndex(string, bool) []byte
32         GetRawProgram(common.Hash) []byte
33         GetAccounts(string) [][]byte
34         GetControlPrograms() ([][]byte, error)
35         SetRawProgram(common.Hash, []byte)
36         SetContractIndex(string, uint64)
37         SetBip44ContractIndex(string, bool, uint64)
38         GetUTXOs() [][]byte
39         GetStandardUTXO(bc.Hash) []byte
40         GetContractUTXO(bc.Hash) []byte
41         SetStandardUTXO(bc.Hash, []byte)
42 }