Documentation ¶
Index ¶
- Constants
- Variables
- func ErrCIPALClaimUserRequestSigVerify(msg string) sdk.Error
- 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 GetCIPALObjectKey(addr string) []byte
- func MustMarshalCIPALObject(cdc *codec.Codec, obj CIPALObject) []byte
- func RegisterCodec(cdc *codec.Codec)
- type ADParam
- type CIPALObject
- type CIPALUserRequest
- type MsgCIPALClaim
- type QueryCIPALParams
- 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 CodeIPALClaimUserRequestSigVerify sdk.CodeType = 114 )
View Source
const ( ModuleName = "cipal" StoreKey = ModuleName RouterKey = ModuleName QuerierRoute = ModuleName )
View Source
const (
QueryIPAL = "query"
)
Variables ¶
View Source
var (
AttributeValueCategory = ModuleName
)
View Source
var (
CIPALObjectKey = []byte{0x11}
)
View Source
var ModuleCdc *codec.Codec
Functions ¶
func ErrCIPALClaimUserRequestSigVerify ¶ added in v1.0.7
func ErrEmptyInputs ¶
func ErrInvalidSignature ¶
func ErrStringTooLong ¶
func GetCIPALObjectKey ¶
func MustMarshalCIPALObject ¶
func MustMarshalCIPALObject(cdc *codec.Codec, obj CIPALObject) []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 CIPALObject ¶
type CIPALObject struct { UserAddress string `json:"user_address" yaml:"user_address"` ServiceInfos []ServiceInfo `json:"service_infos" yaml:"service_infos` }
func MustUnmarshalCIPALObject ¶
func MustUnmarshalCIPALObject(cdc *codec.Codec, value []byte) CIPALObject
func NewCIPALObject ¶
func NewCIPALObject(userAddress string, serviceAddress string, serviceType uint64) CIPALObject
func UnmarshalIPALObject ¶
func UnmarshalIPALObject(cdc *codec.Codec, value []byte) (obj CIPALObject, err error)
func (CIPALObject) MarshalYAML ¶
func (obj CIPALObject) MarshalYAML() (interface{}, error)
func (CIPALObject) String ¶
func (obj CIPALObject) String() string
type CIPALUserRequest ¶
type CIPALUserRequest struct { Params ADParam `json:"params" yaml:"params"` Sig auth.StdSignature `json:"signature" yaml:"signature` }
func NewCIPALUserRequest ¶
func NewCIPALUserRequest(userAddress string, serviceAddress string, serviceType uint64, expiration time.Time, sig auth.StdSignature) CIPALUserRequest
type MsgCIPALClaim ¶
type MsgCIPALClaim struct { From sdk.AccAddress `json:"from" yaml:"from` UserRequest CIPALUserRequest `json:"user_request" yaml:"user_request"` }
func NewMsgCIPALClaim ¶
func NewMsgCIPALClaim(from sdk.AccAddress, userAddress string, serviceAddress string, serviceType uint64, expiration time.Time, sig auth.StdSignature) MsgCIPALClaim
func (MsgCIPALClaim) GetSignBytes ¶
func (msg MsgCIPALClaim) GetSignBytes() []byte
func (MsgCIPALClaim) GetSigners ¶
func (msg MsgCIPALClaim) GetSigners() []sdk.AccAddress
func (MsgCIPALClaim) Route ¶
func (msg MsgCIPALClaim) Route() string
func (MsgCIPALClaim) Type ¶
func (msg MsgCIPALClaim) Type() string
func (MsgCIPALClaim) ValidateBasic ¶
func (msg MsgCIPALClaim) ValidateBasic() sdk.Error
type QueryCIPALParams ¶
type QueryCIPALParams struct {
AccAddr string
}
func NewQueryCIPALParams ¶
func NewQueryCIPALParams(AccAddr string) QueryCIPALParams
type ServiceInfo ¶
type ServiceInfo struct { Type uint64 `json:"type" yaml:"type"` Address string `json:"address" yaml:"address"` }
func (ServiceInfo) String ¶
func (i ServiceInfo) String() string
func (ServiceInfo) Validate ¶
func (i ServiceInfo) Validate() sdk.Error
Click to show internal directories.
Click to hide internal directories.