types

package
v1.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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 ErrCIPALClaimUserRequestSigVerify(msg string) sdk.Error

func ErrEmptyInputs

func ErrEmptyInputs(msg string) sdk.Error

func ErrIPALClaimUserRequestExpired

func ErrIPALClaimUserRequestExpired(msg string) sdk.Error

func ErrInvalidSignature

func ErrInvalidSignature(msg string) sdk.Error

func ErrStringTooLong

func ErrStringTooLong(msg string) sdk.Error

func GetCIPALObjectKey

func GetCIPALObjectKey(addr string) []byte

func MustMarshalCIPALObject

func MustMarshalCIPALObject(cdc *codec.Codec, obj CIPALObject) []byte

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

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 NewADParam(userAddress string, serviceAddress string, serviceType uint64, expiration time.Time) ADParam

func (ADParam) GetSignBytes

func (p ADParam) GetSignBytes() []byte

func (ADParam) Validate

func (p ADParam) Validate() sdk.Error

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL