Documentation
¶
Index ¶
- Constants
- Variables
- func ErrEmptyInputs(msg string) sdk.Error
- func ErrIPALClaimUserRequestExpired(msg string) sdk.Error
- func ErrInvalidSignature(msg string) sdk.Error
- func ErrStringTooLong(msg string) sdk.Error
- func GetIPALObjectKey(addr string) []byte
- func MustMarshalIPALObject(cdc *codec.Codec, obj IPALObject) []byte
- func RegisterCodec(cdc *codec.Codec)
- type ADParam
- type IPALObject
- type IPALUserRequest
- type MsgIPALClaim
- type QueryIPALParams
- type ServiceInfo
Constants ¶
View Source
const ( DefaultCodespace sdk.CodespaceType = ModuleName CodeEmptyInputs sdk.CodeType = 110 CodeStringTooLong sdk.CodeType = 111 CodeInvalidIPALClaimUserRequestSig sdk.CodeType = 112 CodeIPALClaimUserRequestExpired sdk.CodeType = 113 )
View Source
const ( ModuleName = "ipal" StoreKey = ModuleName RouterKey = ModuleName QuerierRoute = ModuleName )
View Source
const (
QueryIPAL = "ipal"
)
Variables ¶
View Source
var (
AttributeValueCategory = ModuleName
)
View Source
var (
IPALObjectKey = []byte{0x11}
)
View Source
var ModuleCdc *codec.Codec
Functions ¶
func ErrEmptyInputs ¶
func ErrInvalidSignature ¶
func ErrStringTooLong ¶
func GetIPALObjectKey ¶
func MustMarshalIPALObject ¶
func MustMarshalIPALObject(cdc *codec.Codec, obj IPALObject) []byte
func RegisterCodec ¶
Types ¶
type ADParam ¶
type ADParam struct {
UserAddress string `json:"user_address" yaml:"user_address"`
ServiceInfo ServiceInfo `json:"service_info" yaml:"service_info"`
Expiration time.Time `json:"expiration"`
}
func NewADParam ¶
func (ADParam) GetSignBytes ¶
type IPALObject ¶
type IPALObject struct {
UserAddress string `json:"user_address" yaml:"user_address"`
ServiceInfos []ServiceInfo `json:"service_infos" yaml:"service_infos`
}
func MustUnmarshalIPALObject ¶
func MustUnmarshalIPALObject(cdc *codec.Codec, value []byte) IPALObject
func NewIPALObject ¶
func NewIPALObject(userAddress string, serviceAddress string, serviceType uint64) IPALObject
func UnmarshalIPALObject ¶
func UnmarshalIPALObject(cdc *codec.Codec, value []byte) (obj IPALObject, err error)
func (IPALObject) MarshalYAML ¶
func (obj IPALObject) MarshalYAML() (interface{}, error)
func (IPALObject) String ¶
func (obj IPALObject) String() string
type IPALUserRequest ¶
type IPALUserRequest struct {
Params ADParam `json:"params" yaml:"params"`
Sig auth.StdSignature `json:"signature" yaml:"signature`
}
func NewIPALUserRequest ¶
func NewIPALUserRequest(userAddress string, serviceAddress string, serviceType uint64, expiration time.Time, sig auth.StdSignature) IPALUserRequest
type MsgIPALClaim ¶
type MsgIPALClaim struct {
From sdk.AccAddress `json:"from" yaml:"from`
UserRequest IPALUserRequest `json:"user_request" yaml:"user_request"`
}
func NewMsgIPALClaim ¶
func NewMsgIPALClaim(from sdk.AccAddress, userAddress string, serviceAddress string, serviceType uint64, expiration time.Time, sig auth.StdSignature) MsgIPALClaim
func (MsgIPALClaim) GetSignBytes ¶
func (msg MsgIPALClaim) GetSignBytes() []byte
func (MsgIPALClaim) GetSigners ¶
func (msg MsgIPALClaim) GetSigners() []sdk.AccAddress
func (MsgIPALClaim) Route ¶
func (msg MsgIPALClaim) Route() string
func (MsgIPALClaim) Type ¶
func (msg MsgIPALClaim) Type() string
func (MsgIPALClaim) ValidateBasic ¶
func (msg MsgIPALClaim) ValidateBasic() sdk.Error
type QueryIPALParams ¶ added in v1.0.2
type QueryIPALParams struct {
AccAddr string
}
func NewQueryIPALParams ¶ added in v1.0.2
func NewQueryIPALParams(AccAddr string) QueryIPALParams
type ServiceInfo ¶ added in v1.0.4
type ServiceInfo struct {
Type uint64 `json:"type" yaml:"type"`
Address string `json:"address" yaml:"address"`
}
func (ServiceInfo) String ¶ added in v1.0.4
func (i ServiceInfo) String() string
func (ServiceInfo) Validate ¶ added in v1.0.4
func (i ServiceInfo) Validate() sdk.Error
Click to show internal directories.
Click to hide internal directories.