-
Notifications
You must be signed in to change notification settings - Fork 0
/
exported.go
48 lines (36 loc) · 1016 Bytes
/
exported.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package exported
import (
"github.com/ci123chain/ci123chain/pkg/abci/types"
"github.com/tendermint/tendermint/crypto"
"time"
)
type Account interface {
GetAddress() types.AccAddress
SetAddress(types.AccAddress) error // errors if already set.
GetPubKey() crypto.PubKey // can return nil.
SetPubKey(crypto.PubKey) error
GetAccountNumber() uint64
SetAccountNumber(uint64) error
GetSequence() uint64
SetSequence(uint64) error
GetCoins() types.Coins
SetCoins(types.Coins) error
SetCodeHash(bz []byte)
GetCodeHash() []byte
SetContractType(contractType string) error
GetContractType() string
// Calculates the amount of coins that can be sent to other accounts given
// the current time.
SpendableCoins(blockTime time.Time) types.Coins
// Ensure that account implements stringer
String() string
SetIsModule(flag bool) error
GetIsModule() bool
}
type ModuleAccountI interface {
Account
GetName() string
GetPermissions() []string
HasPermission(string) bool
SetPermissions([]string)
}