Documentation
¶
Index ¶
- Constants
- func ErrAddedByEmpty() error
- func ErrAddressEmpty() error
- func ErrDeleteGenesisProfiler(profiler sdk.AccAddress) error
- func ErrDeletedByEmpty() error
- func ErrInvalidDescription() error
- func ErrInvalidOperator(operator sdk.AccAddress) error
- func ErrProfilerExists(profiler sdk.AccAddress) error
- func ErrProfilerNotExists(profiler sdk.AccAddress) error
- func GetProfilerKey(addr sdk.AccAddress) []byte
- func GetProfilersSubspaceKey() []byte
- func RegisterCodec(cdc *codec.Codec)
- type AccountType
- type AddGuardian
- type DeleteGuardian
- type Guardian
- type MsgAddProfiler
- type MsgDeleteProfiler
- type Profilers
- type Trustees
Constants ¶
View Source
const ( CodeInvalidOperator = 100 CodeProfilerExists = 101 CodeProfilerNotExists = 102 CodeInvalidDescription = 105 CodeDeleteGenesisProfiler = 106 CodeInvalidGuardian = 108 CodeAddressEmpty = 120 CodeAddedByEmpty = 121 CodeDeletedByEmpty = 122 )
View Source
const ( ModuleName = protocol.GuardianModuleName StoreKey = ModuleName RouterKey = ModuleName QuerierRoute = ModuleName )
View Source
const MaxDescLenght = 70
View Source
const (
QueryProfilers = "profilers"
)
Variables ¶
This section is empty.
Functions ¶
func ErrAddedByEmpty ¶
func ErrAddedByEmpty() error
func ErrAddressEmpty ¶
func ErrAddressEmpty() error
func ErrDeleteGenesisProfiler ¶
func ErrDeleteGenesisProfiler(profiler sdk.AccAddress) error
func ErrDeletedByEmpty ¶
func ErrDeletedByEmpty() error
func ErrInvalidDescription ¶
func ErrInvalidDescription() error
func ErrInvalidOperator ¶
func ErrInvalidOperator(operator sdk.AccAddress) error
func ErrProfilerExists ¶
func ErrProfilerExists(profiler sdk.AccAddress) error
func ErrProfilerNotExists ¶
func ErrProfilerNotExists(profiler sdk.AccAddress) error
func GetProfilerKey ¶
func GetProfilerKey(addr sdk.AccAddress) []byte
func GetProfilersSubspaceKey ¶
func GetProfilersSubspaceKey() []byte
func RegisterCodec ¶
Types ¶
type AccountType ¶
type AccountType byte
const ( Genesis AccountType = 0x01 Ordinary AccountType = 0x02 )
func AccountTypeFromString ¶
func AccountTypeFromString(str string) (AccountType, error)
String to AccountType byte, Returns ff if invalid.
func (AccountType) Format ¶
func (bt AccountType) Format(s fmt.State, verb rune)
For Printf / Sprintf, returns bech32 when using %s
func (AccountType) MarshalJSON ¶
func (bt AccountType) MarshalJSON() ([]byte, error)
func (*AccountType) UnmarshalJSON ¶
func (bt *AccountType) UnmarshalJSON(data []byte) error
type AddGuardian ¶
type AddGuardian struct { Description string `json:"description"` Address sdk.AccAddress `json:"address"` AddedBy sdk.AccAddress `json:"added_by"` }
func (AddGuardian) EnsureLength ¶
func (g AddGuardian) EnsureLength() error
func (AddGuardian) ValidateBasic ¶
func (g AddGuardian) ValidateBasic() error
type DeleteGuardian ¶
type DeleteGuardian struct { Address sdk.AccAddress `json:"address"` DeletedBy sdk.AccAddress `json:"deleted_by"` }
func (DeleteGuardian) ValidateBasic ¶
func (g DeleteGuardian) ValidateBasic() error
type Guardian ¶
type Guardian struct { Description string `json:"description"` AccountType AccountType `json:"type"` Address sdk.AccAddress `json:"address"` // this guardian's address AddedBy sdk.AccAddress `json:"added_by"` // address that initiated the AddGuardian tx }
func NewGuardian ¶
func NewGuardian(description string, accountType AccountType, address, addedBy sdk.AccAddress) Guardian
type MsgAddProfiler ¶
type MsgAddProfiler struct {
AddGuardian
}
func NewMsgAddProfiler ¶
func NewMsgAddProfiler(description string, address, addedBy sdk.AccAddress) MsgAddProfiler
func (MsgAddProfiler) GetSignBytes ¶
func (m MsgAddProfiler) GetSignBytes() []byte
func (MsgAddProfiler) GetSigners ¶
func (m MsgAddProfiler) GetSigners() []sdk.AccAddress
func (MsgAddProfiler) Route ¶
func (m MsgAddProfiler) Route() string
func (MsgAddProfiler) Type ¶
func (m MsgAddProfiler) Type() string
func (MsgAddProfiler) ValidateBasic ¶
func (m MsgAddProfiler) ValidateBasic() error
type MsgDeleteProfiler ¶
type MsgDeleteProfiler struct {
DeleteGuardian
}
func NewMsgDeleteProfiler ¶
func NewMsgDeleteProfiler(address, deletedBy sdk.AccAddress) MsgDeleteProfiler
func (MsgDeleteProfiler) GetSignBytes ¶
func (m MsgDeleteProfiler) GetSignBytes() []byte
func (MsgDeleteProfiler) GetSigners ¶
func (m MsgDeleteProfiler) GetSigners() []sdk.AccAddress
func (MsgDeleteProfiler) Route ¶
func (m MsgDeleteProfiler) Route() string
func (MsgDeleteProfiler) Type ¶
func (m MsgDeleteProfiler) Type() string
func (MsgDeleteProfiler) ValidateBasic ¶
func (m MsgDeleteProfiler) ValidateBasic() error
Click to show internal directories.
Click to hide internal directories.