OSDN Git Service

writer close
[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/protocol/bc"
8 )
9
10 // WalletStore interface contains wallet storage functions.
11 type WalletStore interface {
12         InitBatch() WalletStore
13         CommitBatch() error
14         DeleteContractUTXO(bc.Hash)
15         DeleteRecoveryStatus()
16         DeleteTransactions(uint64)
17         DeleteUnconfirmedTransaction(string)
18         DeleteWalletTransactions()
19         DeleteWalletUTXOs()
20         GetAsset(*bc.AssetID) (*asset.Asset, error)
21         GetGlobalTransactionIndex(string) []byte
22         GetStandardUTXO(bc.Hash) (*acc.UTXO, error)
23         GetTransaction(string) (*query.AnnotatedTx, error)
24         GetUnconfirmedTransaction(string) (*query.AnnotatedTx, error)
25         GetRecoveryStatus() (*RecoveryState, error)
26         GetWalletInfo() (*StatusInfo, error)
27         ListAccountUTXOs(string, bool) ([]*acc.UTXO, error)
28         ListTransactions(string, string, uint, bool) ([]*query.AnnotatedTx, error)
29         ListUnconfirmedTransactions() ([]*query.AnnotatedTx, error)
30         SetAssetDefinition(*bc.AssetID, []byte)
31         SetContractUTXO(bc.Hash, *acc.UTXO) error
32         SetGlobalTransactionIndex(string, *bc.Hash, uint64)
33         SetRecoveryStatus(*RecoveryState) error
34         SetTransaction(uint64, *query.AnnotatedTx) error
35         SetUnconfirmedTransaction(string, *query.AnnotatedTx) error
36         SetWalletInfo(*StatusInfo) error
37 }