OSDN Git Service

update GetControlProgram
[bytom/vapor.git] / wallet / store.go
1 package wallet
2
3 import (
4         acc "github.com/vapor/account"
5         "github.com/vapor/asset"
6         "github.com/vapor/blockchain/query"
7         "github.com/vapor/common"
8         "github.com/vapor/protocol/bc"
9 )
10
11 // WalletStorer interface contains wallet storage functions.
12 type WalletStorer interface {
13         InitBatch()
14         CommitBatch()
15         GetAssetDefinition(*bc.AssetID) (*asset.Asset, error)
16         SetAssetDefinition(*bc.AssetID, []byte)
17         GetControlProgram(hash common.Hash) (*acc.CtrlProgram, error)
18         GetAccountByAccountID(string) []byte
19         DeleteTransactions(uint64)
20         SetTransaction(uint64, uint32, string, []byte)
21         DeleteUnconfirmedTransaction(string)
22         SetGlobalTransactionIndex(string, *bc.Hash, uint64)
23         GetStandardUTXO(bc.Hash) []byte
24         GetTransaction(string) ([]byte, error)
25         GetGlobalTransaction(string) []byte
26         GetTransactions() ([]*query.AnnotatedTx, error)
27         GetUnconfirmedTransactions() ([]*query.AnnotatedTx, error)
28         GetUnconfirmedTransaction(string) []byte
29         SetUnconfirmedTransaction(string, []byte)
30         DeleteStardardUTXO(bc.Hash)
31         DeleteContractUTXO(bc.Hash)
32         SetStandardUTXO(bc.Hash, []byte)
33         SetContractUTXO(bc.Hash, []byte)
34         GetWalletInfo() []byte
35         SetWalletInfo([]byte)
36         DeleteWalletTransactions()
37         DeleteWalletUTXOs()
38         GetAccountUTXOs(key string) [][]byte
39         SetRecoveryStatus([]byte, []byte)
40         DeleteRecoveryStatus([]byte)
41         GetRecoveryStatus([]byte) []byte
42 }