-
Notifications
You must be signed in to change notification settings - Fork 13
/
module.go
33 lines (27 loc) · 960 Bytes
/
module.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
package types
import (
"github.com/tendermint/tendermint/crypto"
cdctypes "github.com/irisnet/irishub-sdk-go/codec/types"
)
//The purpose of this interface is to convert the irishub system type to the user receiving type
// and standardize the user interface
type Response interface {
Convert() interface{}
}
type SplitAble interface {
Len() int
Sub(begin, end int) SplitAble
}
type Module interface {
Name() string
RegisterInterfaceTypes(registry cdctypes.InterfaceRegistry)
}
type KeyManager interface {
Sign(name, password string, data []byte) ([]byte, crypto.PubKey, error)
Insert(name, password string) (string, string, error)
Recover(name, password, mnemonic, hdPath string) (string, error)
Import(name, password string, privKeyArmor string) (address string, err error)
Export(name, password string) (privKeyArmor string, err error)
Delete(name, password string) error
Find(name, password string) (crypto.PubKey, AccAddress, error)
}