-
Notifications
You must be signed in to change notification settings - Fork 6
/
module.go
34 lines (28 loc) · 1.02 KB
/
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
34
package types
import (
"github.com/tendermint/tendermint/crypto"
codectypes "github.com/irisnet/core-sdk-go/common/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 codectypes.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)
Add(name, password string) (address string, mnemonic string, err Error)
}