Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func ParamKeyTable() paramtypes.KeyTable
- func RegisterCodec(cdc *codec.LegacyAmino)
- func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- type AccountKeeper
- type BankKeeper
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetParams() Params
- func (m *GenesisState) GetPublicKeys() *PublicKeys
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (gs GenesisState) Validate() error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgMutation
- func (*MsgMutation) Descriptor() ([]byte, []int)
- func (m *MsgMutation) GetCreator() string
- func (msg *MsgMutation) GetSignBytes() []byte
- func (msg *MsgMutation) GetSigners() []sdk.AccAddress
- func (m *MsgMutation) GetTxs() string
- func (m *MsgMutation) Marshal() (dAtA []byte, err error)
- func (m *MsgMutation) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgMutation) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgMutation) ProtoMessage()
- func (m *MsgMutation) Reset()
- func (msg *MsgMutation) Route() string
- func (m *MsgMutation) Size() (n int)
- func (m *MsgMutation) String() string
- func (msg *MsgMutation) Type() string
- func (m *MsgMutation) Unmarshal(dAtA []byte) error
- func (msg *MsgMutation) ValidateBasic() error
- func (m *MsgMutation) XXX_DiscardUnknown()
- func (m *MsgMutation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgMutation) XXX_Merge(src proto.Message)
- func (m *MsgMutation) XXX_Size() int
- func (m *MsgMutation) XXX_Unmarshal(b []byte) error
- type MsgMutationResponse
- func (*MsgMutationResponse) Descriptor() ([]byte, []int)
- func (m *MsgMutationResponse) GetSuccess() bool
- func (m *MsgMutationResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgMutationResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgMutationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgMutationResponse) ProtoMessage()
- func (m *MsgMutationResponse) Reset()
- func (m *MsgMutationResponse) Size() (n int)
- func (m *MsgMutationResponse) String() string
- func (m *MsgMutationResponse) Unmarshal(dAtA []byte) error
- func (m *MsgMutationResponse) XXX_DiscardUnknown()
- func (m *MsgMutationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgMutationResponse) XXX_Merge(src proto.Message)
- func (m *MsgMutationResponse) XXX_Size() int
- func (m *MsgMutationResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (p Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (p Params) Validate() error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type PublicKeys
- func (*PublicKeys) Descriptor() ([]byte, []int)
- func (m *PublicKeys) GetList() []string
- func (m *PublicKeys) Marshal() (dAtA []byte, err error)
- func (m *PublicKeys) MarshalTo(dAtA []byte) (int, error)
- func (m *PublicKeys) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PublicKeys) ProtoMessage()
- func (m *PublicKeys) Reset()
- func (m *PublicKeys) Size() (n int)
- func (m *PublicKeys) String() string
- func (m *PublicKeys) Unmarshal(dAtA []byte) error
- func (m *PublicKeys) XXX_DiscardUnknown()
- func (m *PublicKeys) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PublicKeys) XXX_Merge(src proto.Message)
- func (m *PublicKeys) XXX_Size() int
- func (m *PublicKeys) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryParamsRequest
- func (*QueryParamsRequest) Descriptor() ([]byte, []int)
- func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsRequest) ProtoMessage()
- func (m *QueryParamsRequest) Reset()
- func (m *QueryParamsRequest) Size() (n int)
- func (m *QueryParamsRequest) String() string
- func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryParamsRequest) XXX_DiscardUnknown()
- func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
- func (m *QueryParamsRequest) XXX_Size() int
- func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
- type QueryParamsResponse
- func (*QueryParamsResponse) Descriptor() ([]byte, []int)
- func (m *QueryParamsResponse) GetParams() Params
- func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsResponse) ProtoMessage()
- func (m *QueryParamsResponse) Reset()
- func (m *QueryParamsResponse) Size() (n int)
- func (m *QueryParamsResponse) String() string
- func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryParamsResponse) XXX_DiscardUnknown()
- func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
- func (m *QueryParamsResponse) XXX_Size() int
- func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
- type QueryPubKeysRequest
- func (*QueryPubKeysRequest) Descriptor() ([]byte, []int)
- func (m *QueryPubKeysRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryPubKeysRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPubKeysRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPubKeysRequest) ProtoMessage()
- func (m *QueryPubKeysRequest) Reset()
- func (m *QueryPubKeysRequest) Size() (n int)
- func (m *QueryPubKeysRequest) String() string
- func (m *QueryPubKeysRequest) Unmarshal(dAtA []byte) error
- func (m *QueryPubKeysRequest) XXX_DiscardUnknown()
- func (m *QueryPubKeysRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPubKeysRequest) XXX_Merge(src proto.Message)
- func (m *QueryPubKeysRequest) XXX_Size() int
- func (m *QueryPubKeysRequest) XXX_Unmarshal(b []byte) error
- type QueryPubKeysResponse
- func (*QueryPubKeysResponse) Descriptor() ([]byte, []int)
- func (m *QueryPubKeysResponse) GetList() []string
- func (m *QueryPubKeysResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryPubKeysResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPubKeysResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPubKeysResponse) ProtoMessage()
- func (m *QueryPubKeysResponse) Reset()
- func (m *QueryPubKeysResponse) Size() (n int)
- func (m *QueryPubKeysResponse) String() string
- func (m *QueryPubKeysResponse) Unmarshal(dAtA []byte) error
- func (m *QueryPubKeysResponse) XXX_DiscardUnknown()
- func (m *QueryPubKeysResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPubKeysResponse) XXX_Merge(src proto.Message)
- func (m *QueryPubKeysResponse) XXX_Size() int
- func (m *QueryPubKeysResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type Ticket
- type UnimplementedMsgServer
- type UnimplementedQueryServer
Constants ¶
const ( // JWTHeaderIndex is the index of the header in the JWT ticket JWTHeaderIndex = 0 // JWTPayloadIndex is the index of the payload in the JWT ticket JWTPayloadIndex = 1 // JWTSeparator is the separator character between JWT ticket parts JWTSeparator = "." // DefaultTimeWeight is the default weight of the time for JWT ticket expiration DefaultTimeWeight = 1 )
JWT constants
const ( // ModuleName defines the module name ModuleName = "dvm" // StoreKey defines the primary module store key StoreKey = ModuleName // RouterKey is the message route for slashing RouterKey = ModuleName // QuerierRoute defines the module's query routing key QuerierRoute = ModuleName // MemStoreKey defines the in-memory store key MemStoreKey = "mem_dvm" )
module constants
const DefaultIndex uint64 = 1
DefaultIndex is the default global index
const (
// ErrTextInvalidRequest is the error message for an invalid request
ErrTextInvalidRequest = "invalid signature"
)
Variables ¶
var ( // Amino is the legacy aminto codec Amino = codec.NewLegacyAmino() // ModuleCdc is the codec of the module ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) )
var ( // ErrInvalidSignature in the case of signature do not match with any of the trusted public keys. ErrInvalidSignature = sdkerrors.Register(ModuleName, 1101, "invalid signature") // ErrInsufficientSignatures in the case of not enough signature. 2/3 of trusted public keys must sign the ticket. ErrInsufficientSignatures = sdkerrors.Register(ModuleName, 1102, "insufficient signatures for consensus") // ErrInvalidTicketFormat if the format of ticket is not correct. like XXX.YYY.ZZZ ErrInvalidTicketFormat = sdkerrors.Register(ModuleName, 1103, "invalid ticket format") // ErrExpirationRequired if the expiration field is not included in the signed ticket. ErrExpirationRequired = sdkerrors.Register(ModuleName, 1104, "ticket expiry must not be empty") // ErrTicketExpired if the ticket is expired. ErrTicketExpired = sdkerrors.Register(ModuleName, 1105, "ticket already expired") // ErrMismatchKeyType if the type of key which is going to be added is not a valid public key. ErrMismatchKeyType = sdkerrors.Register(ModuleName, 1106, "invalid public key") // ErrShortKeyLength if the length of public key is not long enough. ErrShortKeyLength = sdkerrors.Register(ModuleName, 1107, "insufficient key length") // ErrNoPublicKeysFound if public key is not found ErrNoPublicKeysFound = sdkerrors.Register(ModuleName, 1108, "key not found") )
x/dvm module sentinel errors
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthPubkeys = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowPubkeys = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupPubkeys = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") )
var ( // PubKeysListKey is the key of the list of public keys in KV-Store which points to []string PubKeysListKey = []byte{0x00} )
store prefixes and keys
Functions ¶
func ParamKeyTable ¶
func ParamKeyTable() paramtypes.KeyTable
ParamKeyTable the param key table for launch module
func RegisterCodec ¶
func RegisterCodec(cdc *codec.LegacyAmino)
RegisterCodec registers module codec to the app codec
func RegisterInterfaces ¶
func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
RegisterInterfaces registers the module interface types
func RegisterMsgServer ¶
func RegisterQueryHandler ¶
RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterQueryHandlerClient ¶
func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.
func RegisterQueryHandlerFromEndpoint ¶
func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterQueryHandlerServer ¶
func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
Types ¶
type AccountKeeper ¶
AccountKeeper defines the expected account keeper used for simulations (noalias)
type BankKeeper ¶
BankKeeper defines the expected interface needed to retrieve account balances.
type GenesisState ¶
type GenesisState struct { Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` //publicKeys trusted keys from genesis file PublicKeys *PublicKeys `protobuf:"bytes,2,opt,name=publicKeys,proto3" json:"publicKeys,omitempty"` }
GenesisState defines the dvm module's genesis state.
func DefaultGenesis ¶
func DefaultGenesis() *GenesisState
DefaultGenesis returns the default genesis state
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetParams ¶
func (m *GenesisState) GetParams() Params
func (*GenesisState) GetPublicKeys ¶
func (m *GenesisState) GetPublicKeys() *PublicKeys
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalToSizedBuffer ¶
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (GenesisState) Validate ¶
func (gs GenesisState) Validate() error
Validate performs basic genesis state validation returning an error upon any failure.
func (*GenesisState) XXX_DiscardUnknown ¶
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶
func (m *GenesisState) XXX_Unmarshal(b []byte) error
type MsgClient ¶
type MsgClient interface {
Mutation(ctx context.Context, in *MsgMutation, opts ...grpc.CallOption) (*MsgMutationResponse, error)
}
MsgClient is the client API for Msg service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMsgClient ¶
func NewMsgClient(cc grpc1.ClientConn) MsgClient
type MsgMutation ¶
type MsgMutation struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` Txs string `protobuf:"bytes,2,opt,name=txs,proto3" json:"txs,omitempty"` }
func NewMsgMutation ¶
func NewMsgMutation(creator string, txs string) *MsgMutation
NewMsgMutation returns a MsgMutation using given data
func (*MsgMutation) Descriptor ¶
func (*MsgMutation) Descriptor() ([]byte, []int)
func (*MsgMutation) GetCreator ¶
func (m *MsgMutation) GetCreator() string
func (*MsgMutation) GetSignBytes ¶
func (msg *MsgMutation) GetSignBytes() []byte
GetSignBytes returns sortJson form of its message
func (*MsgMutation) GetSigners ¶
func (msg *MsgMutation) GetSigners() []sdk.AccAddress
GetSigners returns the signers of its message
func (*MsgMutation) GetTxs ¶
func (m *MsgMutation) GetTxs() string
func (*MsgMutation) Marshal ¶
func (m *MsgMutation) Marshal() (dAtA []byte, err error)
func (*MsgMutation) MarshalToSizedBuffer ¶
func (m *MsgMutation) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgMutation) ProtoMessage ¶
func (*MsgMutation) ProtoMessage()
func (*MsgMutation) Reset ¶
func (m *MsgMutation) Reset()
func (*MsgMutation) Route ¶
func (msg *MsgMutation) Route() string
Route returns the module's message router key.
func (*MsgMutation) Size ¶
func (m *MsgMutation) Size() (n int)
func (*MsgMutation) String ¶
func (m *MsgMutation) String() string
func (*MsgMutation) Unmarshal ¶
func (m *MsgMutation) Unmarshal(dAtA []byte) error
func (*MsgMutation) ValidateBasic ¶
func (msg *MsgMutation) ValidateBasic() error
ValidateBasic performs basic validations on its message
func (*MsgMutation) XXX_DiscardUnknown ¶
func (m *MsgMutation) XXX_DiscardUnknown()
func (*MsgMutation) XXX_Marshal ¶
func (m *MsgMutation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgMutation) XXX_Merge ¶
func (m *MsgMutation) XXX_Merge(src proto.Message)
func (*MsgMutation) XXX_Size ¶
func (m *MsgMutation) XXX_Size() int
func (*MsgMutation) XXX_Unmarshal ¶
func (m *MsgMutation) XXX_Unmarshal(b []byte) error
type MsgMutationResponse ¶
type MsgMutationResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
}
func (*MsgMutationResponse) Descriptor ¶
func (*MsgMutationResponse) Descriptor() ([]byte, []int)
func (*MsgMutationResponse) GetSuccess ¶
func (m *MsgMutationResponse) GetSuccess() bool
func (*MsgMutationResponse) Marshal ¶
func (m *MsgMutationResponse) Marshal() (dAtA []byte, err error)
func (*MsgMutationResponse) MarshalTo ¶
func (m *MsgMutationResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgMutationResponse) MarshalToSizedBuffer ¶
func (m *MsgMutationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgMutationResponse) ProtoMessage ¶
func (*MsgMutationResponse) ProtoMessage()
func (*MsgMutationResponse) Reset ¶
func (m *MsgMutationResponse) Reset()
func (*MsgMutationResponse) Size ¶
func (m *MsgMutationResponse) Size() (n int)
func (*MsgMutationResponse) String ¶
func (m *MsgMutationResponse) String() string
func (*MsgMutationResponse) Unmarshal ¶
func (m *MsgMutationResponse) Unmarshal(dAtA []byte) error
func (*MsgMutationResponse) XXX_DiscardUnknown ¶
func (m *MsgMutationResponse) XXX_DiscardUnknown()
func (*MsgMutationResponse) XXX_Marshal ¶
func (m *MsgMutationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgMutationResponse) XXX_Merge ¶
func (m *MsgMutationResponse) XXX_Merge(src proto.Message)
func (*MsgMutationResponse) XXX_Size ¶
func (m *MsgMutationResponse) XXX_Size() int
func (*MsgMutationResponse) XXX_Unmarshal ¶
func (m *MsgMutationResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface {
Mutation(context.Context, *MsgMutation) (*MsgMutationResponse, error)
}
MsgServer is the server API for Msg service.
type Params ¶
type Params struct { }
Params defines the parameters for the module.
func (*Params) Descriptor ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
ParamSetPairs get the params.ParamSet
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type PublicKeys ¶
type PublicKeys struct {
List []string `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
}
func (*PublicKeys) Descriptor ¶
func (*PublicKeys) Descriptor() ([]byte, []int)
func (*PublicKeys) GetList ¶
func (m *PublicKeys) GetList() []string
func (*PublicKeys) Marshal ¶
func (m *PublicKeys) Marshal() (dAtA []byte, err error)
func (*PublicKeys) MarshalToSizedBuffer ¶
func (m *PublicKeys) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PublicKeys) ProtoMessage ¶
func (*PublicKeys) ProtoMessage()
func (*PublicKeys) Reset ¶
func (m *PublicKeys) Reset()
func (*PublicKeys) Size ¶
func (m *PublicKeys) Size() (n int)
func (*PublicKeys) String ¶
func (m *PublicKeys) String() string
func (*PublicKeys) Unmarshal ¶
func (m *PublicKeys) Unmarshal(dAtA []byte) error
func (*PublicKeys) XXX_DiscardUnknown ¶
func (m *PublicKeys) XXX_DiscardUnknown()
func (*PublicKeys) XXX_Marshal ¶
func (m *PublicKeys) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PublicKeys) XXX_Merge ¶
func (m *PublicKeys) XXX_Merge(src proto.Message)
func (*PublicKeys) XXX_Size ¶
func (m *PublicKeys) XXX_Size() int
func (*PublicKeys) XXX_Unmarshal ¶
func (m *PublicKeys) XXX_Unmarshal(b []byte) error
type QueryClient ¶
type QueryClient interface { // Params queries the parameters of the module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // Queries a list of PubKeys items. PubKeys(ctx context.Context, in *QueryPubKeysRequest, opts ...grpc.CallOption) (*QueryPubKeysResponse, error) }
QueryClient is the client API for Query service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewQueryClient ¶
func NewQueryClient(cc grpc1.ClientConn) QueryClient
type QueryParamsRequest ¶
type QueryParamsRequest struct { }
QueryParamsRequest is request type for the Query/Params RPC method.
func (*QueryParamsRequest) Descriptor ¶
func (*QueryParamsRequest) Descriptor() ([]byte, []int)
func (*QueryParamsRequest) Marshal ¶
func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
func (*QueryParamsRequest) MarshalTo ¶
func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsRequest) MarshalToSizedBuffer ¶
func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsRequest) ProtoMessage ¶
func (*QueryParamsRequest) ProtoMessage()
func (*QueryParamsRequest) Reset ¶
func (m *QueryParamsRequest) Reset()
func (*QueryParamsRequest) Size ¶
func (m *QueryParamsRequest) Size() (n int)
func (*QueryParamsRequest) String ¶
func (m *QueryParamsRequest) String() string
func (*QueryParamsRequest) Unmarshal ¶
func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
func (*QueryParamsRequest) XXX_DiscardUnknown ¶
func (m *QueryParamsRequest) XXX_DiscardUnknown()
func (*QueryParamsRequest) XXX_Marshal ¶
func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsRequest) XXX_Merge ¶
func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
func (*QueryParamsRequest) XXX_Size ¶
func (m *QueryParamsRequest) XXX_Size() int
func (*QueryParamsRequest) XXX_Unmarshal ¶
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
type QueryParamsResponse ¶
type QueryParamsResponse struct { // params holds all the parameters of this module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` }
QueryParamsResponse is response type for the Query/Params RPC method.
func (*QueryParamsResponse) Descriptor ¶
func (*QueryParamsResponse) Descriptor() ([]byte, []int)
func (*QueryParamsResponse) GetParams ¶
func (m *QueryParamsResponse) GetParams() Params
func (*QueryParamsResponse) Marshal ¶
func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
func (*QueryParamsResponse) MarshalTo ¶
func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsResponse) MarshalToSizedBuffer ¶
func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsResponse) ProtoMessage ¶
func (*QueryParamsResponse) ProtoMessage()
func (*QueryParamsResponse) Reset ¶
func (m *QueryParamsResponse) Reset()
func (*QueryParamsResponse) Size ¶
func (m *QueryParamsResponse) Size() (n int)
func (*QueryParamsResponse) String ¶
func (m *QueryParamsResponse) String() string
func (*QueryParamsResponse) Unmarshal ¶
func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
func (*QueryParamsResponse) XXX_DiscardUnknown ¶
func (m *QueryParamsResponse) XXX_DiscardUnknown()
func (*QueryParamsResponse) XXX_Marshal ¶
func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsResponse) XXX_Merge ¶
func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
func (*QueryParamsResponse) XXX_Size ¶
func (m *QueryParamsResponse) XXX_Size() int
func (*QueryParamsResponse) XXX_Unmarshal ¶
func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
type QueryPubKeysRequest ¶
type QueryPubKeysRequest struct { }
func (*QueryPubKeysRequest) Descriptor ¶
func (*QueryPubKeysRequest) Descriptor() ([]byte, []int)
func (*QueryPubKeysRequest) Marshal ¶
func (m *QueryPubKeysRequest) Marshal() (dAtA []byte, err error)
func (*QueryPubKeysRequest) MarshalTo ¶
func (m *QueryPubKeysRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryPubKeysRequest) MarshalToSizedBuffer ¶
func (m *QueryPubKeysRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPubKeysRequest) ProtoMessage ¶
func (*QueryPubKeysRequest) ProtoMessage()
func (*QueryPubKeysRequest) Reset ¶
func (m *QueryPubKeysRequest) Reset()
func (*QueryPubKeysRequest) Size ¶
func (m *QueryPubKeysRequest) Size() (n int)
func (*QueryPubKeysRequest) String ¶
func (m *QueryPubKeysRequest) String() string
func (*QueryPubKeysRequest) Unmarshal ¶
func (m *QueryPubKeysRequest) Unmarshal(dAtA []byte) error
func (*QueryPubKeysRequest) XXX_DiscardUnknown ¶
func (m *QueryPubKeysRequest) XXX_DiscardUnknown()
func (*QueryPubKeysRequest) XXX_Marshal ¶
func (m *QueryPubKeysRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPubKeysRequest) XXX_Merge ¶
func (m *QueryPubKeysRequest) XXX_Merge(src proto.Message)
func (*QueryPubKeysRequest) XXX_Size ¶
func (m *QueryPubKeysRequest) XXX_Size() int
func (*QueryPubKeysRequest) XXX_Unmarshal ¶
func (m *QueryPubKeysRequest) XXX_Unmarshal(b []byte) error
type QueryPubKeysResponse ¶
type QueryPubKeysResponse struct {
List []string `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
}
func (*QueryPubKeysResponse) Descriptor ¶
func (*QueryPubKeysResponse) Descriptor() ([]byte, []int)
func (*QueryPubKeysResponse) GetList ¶
func (m *QueryPubKeysResponse) GetList() []string
func (*QueryPubKeysResponse) Marshal ¶
func (m *QueryPubKeysResponse) Marshal() (dAtA []byte, err error)
func (*QueryPubKeysResponse) MarshalTo ¶
func (m *QueryPubKeysResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryPubKeysResponse) MarshalToSizedBuffer ¶
func (m *QueryPubKeysResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPubKeysResponse) ProtoMessage ¶
func (*QueryPubKeysResponse) ProtoMessage()
func (*QueryPubKeysResponse) Reset ¶
func (m *QueryPubKeysResponse) Reset()
func (*QueryPubKeysResponse) Size ¶
func (m *QueryPubKeysResponse) Size() (n int)
func (*QueryPubKeysResponse) String ¶
func (m *QueryPubKeysResponse) String() string
func (*QueryPubKeysResponse) Unmarshal ¶
func (m *QueryPubKeysResponse) Unmarshal(dAtA []byte) error
func (*QueryPubKeysResponse) XXX_DiscardUnknown ¶
func (m *QueryPubKeysResponse) XXX_DiscardUnknown()
func (*QueryPubKeysResponse) XXX_Marshal ¶
func (m *QueryPubKeysResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPubKeysResponse) XXX_Merge ¶
func (m *QueryPubKeysResponse) XXX_Merge(src proto.Message)
func (*QueryPubKeysResponse) XXX_Size ¶
func (m *QueryPubKeysResponse) XXX_Size() int
func (*QueryPubKeysResponse) XXX_Unmarshal ¶
func (m *QueryPubKeysResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { // Params queries the parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // Queries a list of PubKeys items. PubKeys(context.Context, *QueryPubKeysRequest) (*QueryPubKeysResponse, error) }
QueryServer is the server API for Query service.
type Ticket ¶
type Ticket interface { // Unmarshal unmarshals the information of the ticket to the v. v must be a pointer. Unmarshal(v interface{}) error // Verify verifies the ticket signature with the given public keys. If the ticket is verified by any // of the keys, then return nil else return invalid signature error Verify(pubKeys ...string) error // Consensus verifies that 2/3 of given public keys have verified the ticket Consensus(pubKeys ...string) error // IsValid verifies that the ticket is not expired yet. IsValid(ctx sdk.Context) error }
Ticket is the Interface of ticket.
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) Mutation ¶
func (*UnimplementedMsgServer) Mutation(ctx context.Context, req *MsgMutation) (*MsgMutationResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
func (*UnimplementedQueryServer) PubKeys ¶
func (*UnimplementedQueryServer) PubKeys(ctx context.Context, req *QueryPubKeysRequest) (*QueryPubKeysResponse, error)