OSDN Git Service

8a6537f190d384a7c0c9f659426c169d01985d8d
[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         SetMiningAddress([]byte)
30         GetBip44ContractIndex(string, bool) []byte
31         GetRawProgram(common.Hash) []byte
32         GetAccounts(string) [][]byte
33         GetControlPrograms() ([][]byte, error)
34         SetRawProgram(common.Hash, []byte)
35         SetContractIndex(string, uint64)
36         SetBip44ContractIndex(string, bool, uint64)
37         GetUTXOs() [][]byte
38         GetStandardUTXO(bc.Hash) []byte
39         GetContractUTXO(bc.Hash) []byte
40         SetStandardUTXO(bc.Hash, []byte)
41 }