Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func PostKey(vendorID uint32, postID curatingtypes.PostID) []byte
- func RegisterInterfaces(registry codectypes.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)
- func StakeKey(vendorID uint32, postID curatingtypes.PostID, delegator sdk.AccAddress) []byte
- type CurationKeeper
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetStakes() Stakes
- 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 MsgServer
- type MsgStake
- func (*MsgStake) Descriptor() ([]byte, []int)
- func (this *MsgStake) Equal(that interface{}) bool
- func (m *MsgStake) GetDelegator() string
- func (m *MsgStake) GetPostID() string
- func (msg MsgStake) GetSignBytes() []byte
- func (msg MsgStake) GetSigners() []sdk.AccAddress
- func (m *MsgStake) GetValidator() string
- func (m *MsgStake) GetVendorID() uint32
- func (m *MsgStake) Marshal() (dAtA []byte, err error)
- func (m *MsgStake) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgStake) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgStake) ProtoMessage()
- func (m *MsgStake) Reset()
- func (msg MsgStake) Route() string
- func (m *MsgStake) Size() (n int)
- func (m *MsgStake) String() string
- func (msg MsgStake) Type() string
- func (m *MsgStake) Unmarshal(dAtA []byte) error
- func (msg MsgStake) ValidateBasic() error
- func (m *MsgStake) XXX_DiscardUnknown()
- func (m *MsgStake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgStake) XXX_Merge(src proto.Message)
- func (m *MsgStake) XXX_Size() int
- func (m *MsgStake) XXX_Unmarshal(b []byte) error
- type MsgStakeResponse
- func (*MsgStakeResponse) Descriptor() ([]byte, []int)
- func (m *MsgStakeResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgStakeResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgStakeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgStakeResponse) ProtoMessage()
- func (m *MsgStakeResponse) Reset()
- func (m *MsgStakeResponse) Size() (n int)
- func (m *MsgStakeResponse) String() string
- func (m *MsgStakeResponse) Unmarshal(dAtA []byte) error
- func (m *MsgStakeResponse) XXX_DiscardUnknown()
- func (m *MsgStakeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgStakeResponse) XXX_Merge(src proto.Message)
- func (m *MsgStakeResponse) XXX_Size() int
- func (m *MsgStakeResponse) XXX_Unmarshal(b []byte) error
- type MsgUnstake
- func (*MsgUnstake) Descriptor() ([]byte, []int)
- func (this *MsgUnstake) Equal(that interface{}) bool
- func (m *MsgUnstake) GetDelegator() string
- func (m *MsgUnstake) GetPostID() string
- func (msg MsgUnstake) GetSignBytes() []byte
- func (msg MsgUnstake) GetSigners() []sdk.AccAddress
- func (m *MsgUnstake) GetVendorID() uint32
- func (m *MsgUnstake) Marshal() (dAtA []byte, err error)
- func (m *MsgUnstake) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUnstake) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUnstake) ProtoMessage()
- func (m *MsgUnstake) Reset()
- func (msg MsgUnstake) Route() string
- func (m *MsgUnstake) Size() (n int)
- func (m *MsgUnstake) String() string
- func (msg MsgUnstake) Type() string
- func (m *MsgUnstake) Unmarshal(dAtA []byte) error
- func (msg MsgUnstake) ValidateBasic() error
- func (m *MsgUnstake) XXX_DiscardUnknown()
- func (m *MsgUnstake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUnstake) XXX_Merge(src proto.Message)
- func (m *MsgUnstake) XXX_Size() int
- func (m *MsgUnstake) XXX_Unmarshal(b []byte) error
- type MsgUnstakeResponse
- func (*MsgUnstakeResponse) Descriptor() ([]byte, []int)
- func (m *MsgUnstakeResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgUnstakeResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUnstakeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUnstakeResponse) ProtoMessage()
- func (m *MsgUnstakeResponse) Reset()
- func (m *MsgUnstakeResponse) Size() (n int)
- func (m *MsgUnstakeResponse) String() string
- func (m *MsgUnstakeResponse) Unmarshal(dAtA []byte) error
- func (m *MsgUnstakeResponse) XXX_DiscardUnknown()
- func (m *MsgUnstakeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUnstakeResponse) XXX_Merge(src proto.Message)
- func (m *MsgUnstakeResponse) XXX_Size() int
- func (m *MsgUnstakeResponse) XXX_Unmarshal(b []byte) error
- 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 (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (m *Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) 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 QueryClient
- type QueryServer
- type QueryStakeRequest
- func (*QueryStakeRequest) Descriptor() ([]byte, []int)
- func (m *QueryStakeRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryStakeRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryStakeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryStakeRequest) ProtoMessage()
- func (m *QueryStakeRequest) Reset()
- func (m *QueryStakeRequest) Size() (n int)
- func (m *QueryStakeRequest) String() string
- func (m *QueryStakeRequest) Unmarshal(dAtA []byte) error
- func (m *QueryStakeRequest) XXX_DiscardUnknown()
- func (m *QueryStakeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryStakeRequest) XXX_Merge(src proto.Message)
- func (m *QueryStakeRequest) XXX_Size() int
- func (m *QueryStakeRequest) XXX_Unmarshal(b []byte) error
- type QueryStakeResponse
- func (*QueryStakeResponse) Descriptor() ([]byte, []int)
- func (m *QueryStakeResponse) GetStake() *Stake
- func (m *QueryStakeResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryStakeResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryStakeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryStakeResponse) ProtoMessage()
- func (m *QueryStakeResponse) Reset()
- func (m *QueryStakeResponse) Size() (n int)
- func (m *QueryStakeResponse) String() string
- func (m *QueryStakeResponse) Unmarshal(dAtA []byte) error
- func (m *QueryStakeResponse) XXX_DiscardUnknown()
- func (m *QueryStakeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryStakeResponse) XXX_Merge(src proto.Message)
- func (m *QueryStakeResponse) XXX_Size() int
- func (m *QueryStakeResponse) XXX_Unmarshal(b []byte) error
- type QueryStakesRequest
- func (*QueryStakesRequest) Descriptor() ([]byte, []int)
- func (m *QueryStakesRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryStakesRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryStakesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryStakesRequest) ProtoMessage()
- func (m *QueryStakesRequest) Reset()
- func (m *QueryStakesRequest) Size() (n int)
- func (m *QueryStakesRequest) String() string
- func (m *QueryStakesRequest) Unmarshal(dAtA []byte) error
- func (m *QueryStakesRequest) XXX_DiscardUnknown()
- func (m *QueryStakesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryStakesRequest) XXX_Merge(src proto.Message)
- func (m *QueryStakesRequest) XXX_Size() int
- func (m *QueryStakesRequest) XXX_Unmarshal(b []byte) error
- type QueryStakesResponse
- func (*QueryStakesResponse) Descriptor() ([]byte, []int)
- func (m *QueryStakesResponse) GetStakes() []Stake
- func (m *QueryStakesResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryStakesResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryStakesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryStakesResponse) ProtoMessage()
- func (m *QueryStakesResponse) Reset()
- func (m *QueryStakesResponse) Size() (n int)
- func (m *QueryStakesResponse) String() string
- func (m *QueryStakesResponse) Unmarshal(dAtA []byte) error
- func (m *QueryStakesResponse) XXX_DiscardUnknown()
- func (m *QueryStakesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryStakesResponse) XXX_Merge(src proto.Message)
- func (m *QueryStakesResponse) XXX_Size() int
- func (m *QueryStakesResponse) XXX_Unmarshal(b []byte) error
- type Stake
- func (*Stake) Descriptor() ([]byte, []int)
- func (m *Stake) GetDelegator() string
- func (m *Stake) GetValidator() string
- func (m *Stake) GetVendorID() uint32
- func (m *Stake) Marshal() (dAtA []byte, err error)
- func (m *Stake) MarshalTo(dAtA []byte) (int, error)
- func (m *Stake) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Stake) ProtoMessage()
- func (m *Stake) Reset()
- func (m *Stake) Size() (n int)
- func (m *Stake) String() string
- func (m *Stake) Unmarshal(dAtA []byte) error
- func (m *Stake) XXX_DiscardUnknown()
- func (m *Stake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Stake) XXX_Merge(src proto.Message)
- func (m *Stake) XXX_Size() int
- func (m *Stake) XXX_Unmarshal(b []byte) error
- type Stakes
- type StakingKeeper
- type UnimplementedMsgServer
- type UnimplementedQueryServer
Constants ¶
const ( EventTypeStake = "stake" EventTypeUnstake = "unstake" AttributeKeyVendorID = "vendor_id" AttributeKeyPostID = "post_id" AttributeKeyDelegator = "delegator" AttributeKeyValidator = "validator" AttributeKeyAmount = "amount" AttributeValueCategory = ModuleName )
curating module event types
const ( // ModuleName is the name of the module ModuleName = "stake" // StoreKey to be used when creating the KVStore StoreKey = ModuleName // RouterKey to be used for routing msgs RouterKey = ModuleName // QuerierKey to be used for querierer msgs QuerierKey = ModuleName )
const ( TypeMsgStake = "stake_stake" TypeMsgUnstake = "stake_unstake" )
msg types
Variables ¶
var ( ErrStaketNotFound = sdkerrors.Register(ModuleName, 1, "stake not found") ErrAmountTooLarge = sdkerrors.Register(ModuleName, 2, "unstake amount too large") ErrCurationNotExpired = sdkerrors.Register(ModuleName, 3, "post is still being curated") )
x/curating 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 ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthStake = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowStake = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupStake = 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 ( // KeyPrefixStake 0x00 | vendor_id | post_id | delegator -> Stake KeyPrefixStake = []byte{0x00} )
var ( // ModuleCdc references the global x/curating module codec. Note, the codec // should ONLY be used in certain instances of tests and for JSON encoding. ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry()) )
Functions ¶
func PostKey ¶
func PostKey(vendorID uint32, postID curatingtypes.PostID) []byte
PostKey is the key used to store stakes for a post
func RegisterInterfaces ¶
func RegisterInterfaces(registry codectypes.InterfaceRegistry)
RegisterInterfaces register the curating module interfaces to protobuf Any.
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 (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
func StakeKey ¶
func StakeKey(vendorID uint32, postID curatingtypes.PostID, delegator sdk.AccAddress) []byte
StakeKey is the key used to store a stake
Types ¶
type CurationKeeper ¶
type CurationKeeper interface { GetPost(ctx sdk.Context, vendorID uint32, postID curatingtypes.PostID) (post curatingtypes.Post, found bool, err error) IteratePosts(ctx sdk.Context, vendorID uint32, cb func(post curatingtypes.Post) (stop bool)) }
CurationKeeper defines the expected interface for the curation module
type GenesisState ¶
type GenesisState struct {
Stakes Stakes `protobuf:"bytes,1,rep,name=stakes,proto3,castrepeated=Stakes" json:"stakes"`
}
func DefaultGenesisState ¶
func DefaultGenesisState() *GenesisState
DefaultGenesisState - default GenesisState
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetStakes ¶
func (m *GenesisState) GetStakes() Stakes
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 validates the x/curating genesis parameters
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 { Stake(ctx context.Context, in *MsgStake, opts ...grpc.CallOption) (*MsgStakeResponse, error) Unstake(ctx context.Context, in *MsgUnstake, opts ...grpc.CallOption) (*MsgUnstakeResponse, 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 MsgServer ¶
type MsgServer interface { Stake(context.Context, *MsgStake) (*MsgStakeResponse, error) Unstake(context.Context, *MsgUnstake) (*MsgUnstakeResponse, error) }
MsgServer is the server API for Msg service.
type MsgStake ¶
type MsgStake struct { VendorID uint32 `protobuf:"varint,1,opt,name=vendor_id,json=vendorId,proto3" json:"vendor_id" yaml:"vendor_id"` PostID string `protobuf:"bytes,2,opt,name=post_id,json=postId,proto3" json:"post_id" yaml:"post_id"` Delegator string `protobuf:"bytes,3,opt,name=delegator,proto3" json:"delegator,omitempty" yaml:"delegator"` Validator string `protobuf:"bytes,4,opt,name=validator,proto3" json:"validator,omitempty" yaml:"validator"` Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` }
func NewMsgStake ¶
func NewMsgStake( vendorID uint32, postID string, delegator sdk.AccAddress, validator sdk.ValAddress, amount sdk.Int, ) *MsgStake
NewMsgStake creates a new MsgStake instance
func (*MsgStake) Descriptor ¶
func (*MsgStake) GetDelegator ¶
func (MsgStake) GetSignBytes ¶
GetSignBytes gets the bytes for the message signer to sign on
func (MsgStake) GetSigners ¶
func (msg MsgStake) GetSigners() []sdk.AccAddress
GetSigners implements sdk.Msg
func (*MsgStake) GetValidator ¶
func (*MsgStake) GetVendorID ¶
func (*MsgStake) MarshalToSizedBuffer ¶
func (*MsgStake) ProtoMessage ¶
func (*MsgStake) ProtoMessage()
func (MsgStake) ValidateBasic ¶
ValidateBasic validity check for the AnteHandler
func (*MsgStake) XXX_DiscardUnknown ¶
func (m *MsgStake) XXX_DiscardUnknown()
func (*MsgStake) XXX_Marshal ¶
func (*MsgStake) XXX_Unmarshal ¶
type MsgStakeResponse ¶
type MsgStakeResponse struct { }
func (*MsgStakeResponse) Descriptor ¶
func (*MsgStakeResponse) Descriptor() ([]byte, []int)
func (*MsgStakeResponse) Marshal ¶
func (m *MsgStakeResponse) Marshal() (dAtA []byte, err error)
func (*MsgStakeResponse) MarshalToSizedBuffer ¶
func (m *MsgStakeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgStakeResponse) ProtoMessage ¶
func (*MsgStakeResponse) ProtoMessage()
func (*MsgStakeResponse) Reset ¶
func (m *MsgStakeResponse) Reset()
func (*MsgStakeResponse) Size ¶
func (m *MsgStakeResponse) Size() (n int)
func (*MsgStakeResponse) String ¶
func (m *MsgStakeResponse) String() string
func (*MsgStakeResponse) Unmarshal ¶
func (m *MsgStakeResponse) Unmarshal(dAtA []byte) error
func (*MsgStakeResponse) XXX_DiscardUnknown ¶
func (m *MsgStakeResponse) XXX_DiscardUnknown()
func (*MsgStakeResponse) XXX_Marshal ¶
func (m *MsgStakeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgStakeResponse) XXX_Merge ¶
func (m *MsgStakeResponse) XXX_Merge(src proto.Message)
func (*MsgStakeResponse) XXX_Size ¶
func (m *MsgStakeResponse) XXX_Size() int
func (*MsgStakeResponse) XXX_Unmarshal ¶
func (m *MsgStakeResponse) XXX_Unmarshal(b []byte) error
type MsgUnstake ¶
type MsgUnstake struct { VendorID uint32 `protobuf:"varint,1,opt,name=vendor_id,json=vendorId,proto3" json:"vendor_id" yaml:"vendor_id"` PostID string `protobuf:"bytes,2,opt,name=post_id,json=postId,proto3" json:"post_id" yaml:"post_id"` Delegator string `protobuf:"bytes,3,opt,name=delegator,proto3" json:"delegator,omitempty" yaml:"delegator"` Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` }
func NewMsgUnstake ¶
func NewMsgUnstake( vendorID uint32, postID string, delegator sdk.AccAddress, amount sdk.Int, ) *MsgUnstake
NewMsgUnstake creates a new MsgUnstake instance
func (*MsgUnstake) Descriptor ¶
func (*MsgUnstake) Descriptor() ([]byte, []int)
func (*MsgUnstake) Equal ¶
func (this *MsgUnstake) Equal(that interface{}) bool
func (*MsgUnstake) GetDelegator ¶
func (m *MsgUnstake) GetDelegator() string
func (*MsgUnstake) GetPostID ¶
func (m *MsgUnstake) GetPostID() string
func (MsgUnstake) GetSignBytes ¶
func (msg MsgUnstake) GetSignBytes() []byte
GetSignBytes gets the bytes for the message signer to sign on
func (MsgUnstake) GetSigners ¶
func (msg MsgUnstake) GetSigners() []sdk.AccAddress
GetSigners implements sdk.Msg
func (*MsgUnstake) GetVendorID ¶
func (m *MsgUnstake) GetVendorID() uint32
func (*MsgUnstake) Marshal ¶
func (m *MsgUnstake) Marshal() (dAtA []byte, err error)
func (*MsgUnstake) MarshalToSizedBuffer ¶
func (m *MsgUnstake) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUnstake) ProtoMessage ¶
func (*MsgUnstake) ProtoMessage()
func (*MsgUnstake) Reset ¶
func (m *MsgUnstake) Reset()
func (*MsgUnstake) Size ¶
func (m *MsgUnstake) Size() (n int)
func (*MsgUnstake) String ¶
func (m *MsgUnstake) String() string
func (*MsgUnstake) Unmarshal ¶
func (m *MsgUnstake) Unmarshal(dAtA []byte) error
func (MsgUnstake) ValidateBasic ¶
func (msg MsgUnstake) ValidateBasic() error
ValidateBasic validity check for the AnteHandler
func (*MsgUnstake) XXX_DiscardUnknown ¶
func (m *MsgUnstake) XXX_DiscardUnknown()
func (*MsgUnstake) XXX_Marshal ¶
func (m *MsgUnstake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUnstake) XXX_Merge ¶
func (m *MsgUnstake) XXX_Merge(src proto.Message)
func (*MsgUnstake) XXX_Size ¶
func (m *MsgUnstake) XXX_Size() int
func (*MsgUnstake) XXX_Unmarshal ¶
func (m *MsgUnstake) XXX_Unmarshal(b []byte) error
type MsgUnstakeResponse ¶
type MsgUnstakeResponse struct { }
func (*MsgUnstakeResponse) Descriptor ¶
func (*MsgUnstakeResponse) Descriptor() ([]byte, []int)
func (*MsgUnstakeResponse) Marshal ¶
func (m *MsgUnstakeResponse) Marshal() (dAtA []byte, err error)
func (*MsgUnstakeResponse) MarshalTo ¶
func (m *MsgUnstakeResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgUnstakeResponse) MarshalToSizedBuffer ¶
func (m *MsgUnstakeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUnstakeResponse) ProtoMessage ¶
func (*MsgUnstakeResponse) ProtoMessage()
func (*MsgUnstakeResponse) Reset ¶
func (m *MsgUnstakeResponse) Reset()
func (*MsgUnstakeResponse) Size ¶
func (m *MsgUnstakeResponse) Size() (n int)
func (*MsgUnstakeResponse) String ¶
func (m *MsgUnstakeResponse) String() string
func (*MsgUnstakeResponse) Unmarshal ¶
func (m *MsgUnstakeResponse) Unmarshal(dAtA []byte) error
func (*MsgUnstakeResponse) XXX_DiscardUnknown ¶
func (m *MsgUnstakeResponse) XXX_DiscardUnknown()
func (*MsgUnstakeResponse) XXX_Marshal ¶
func (m *MsgUnstakeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUnstakeResponse) XXX_Merge ¶
func (m *MsgUnstakeResponse) XXX_Merge(src proto.Message)
func (*MsgUnstakeResponse) XXX_Size ¶
func (m *MsgUnstakeResponse) XXX_Size() int
func (*MsgUnstakeResponse) XXX_Unmarshal ¶
func (m *MsgUnstakeResponse) XXX_Unmarshal(b []byte) error
type Params ¶
type Params struct { }
func (*Params) Descriptor ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type QueryClient ¶
type QueryClient interface { Stakes(ctx context.Context, in *QueryStakesRequest, opts ...grpc.CallOption) (*QueryStakesResponse, error) Stake(ctx context.Context, in *QueryStakeRequest, opts ...grpc.CallOption) (*QueryStakeResponse, 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 QueryServer ¶
type QueryServer interface { Stakes(context.Context, *QueryStakesRequest) (*QueryStakesResponse, error) Stake(context.Context, *QueryStakeRequest) (*QueryStakeResponse, error) }
QueryServer is the server API for Query service.
type QueryStakeRequest ¶
type QueryStakeRequest struct { VendorId uint32 `protobuf:"varint,1,opt,name=vendor_id,json=vendorId,proto3" json:"vendor_id,omitempty"` PostId string `protobuf:"bytes,2,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"` Delegator string `protobuf:"bytes,3,opt,name=delegator,proto3" json:"delegator,omitempty"` }
func (*QueryStakeRequest) Descriptor ¶
func (*QueryStakeRequest) Descriptor() ([]byte, []int)
func (*QueryStakeRequest) Marshal ¶
func (m *QueryStakeRequest) Marshal() (dAtA []byte, err error)
func (*QueryStakeRequest) MarshalTo ¶
func (m *QueryStakeRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryStakeRequest) MarshalToSizedBuffer ¶
func (m *QueryStakeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryStakeRequest) ProtoMessage ¶
func (*QueryStakeRequest) ProtoMessage()
func (*QueryStakeRequest) Reset ¶
func (m *QueryStakeRequest) Reset()
func (*QueryStakeRequest) Size ¶
func (m *QueryStakeRequest) Size() (n int)
func (*QueryStakeRequest) String ¶
func (m *QueryStakeRequest) String() string
func (*QueryStakeRequest) Unmarshal ¶
func (m *QueryStakeRequest) Unmarshal(dAtA []byte) error
func (*QueryStakeRequest) XXX_DiscardUnknown ¶
func (m *QueryStakeRequest) XXX_DiscardUnknown()
func (*QueryStakeRequest) XXX_Marshal ¶
func (m *QueryStakeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryStakeRequest) XXX_Merge ¶
func (m *QueryStakeRequest) XXX_Merge(src proto.Message)
func (*QueryStakeRequest) XXX_Size ¶
func (m *QueryStakeRequest) XXX_Size() int
func (*QueryStakeRequest) XXX_Unmarshal ¶
func (m *QueryStakeRequest) XXX_Unmarshal(b []byte) error
type QueryStakeResponse ¶
type QueryStakeResponse struct {
Stake *Stake `protobuf:"bytes,1,opt,name=stake,proto3" json:"stake,omitempty"`
}
func (*QueryStakeResponse) Descriptor ¶
func (*QueryStakeResponse) Descriptor() ([]byte, []int)
func (*QueryStakeResponse) GetStake ¶
func (m *QueryStakeResponse) GetStake() *Stake
func (*QueryStakeResponse) Marshal ¶
func (m *QueryStakeResponse) Marshal() (dAtA []byte, err error)
func (*QueryStakeResponse) MarshalTo ¶
func (m *QueryStakeResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryStakeResponse) MarshalToSizedBuffer ¶
func (m *QueryStakeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryStakeResponse) ProtoMessage ¶
func (*QueryStakeResponse) ProtoMessage()
func (*QueryStakeResponse) Reset ¶
func (m *QueryStakeResponse) Reset()
func (*QueryStakeResponse) Size ¶
func (m *QueryStakeResponse) Size() (n int)
func (*QueryStakeResponse) String ¶
func (m *QueryStakeResponse) String() string
func (*QueryStakeResponse) Unmarshal ¶
func (m *QueryStakeResponse) Unmarshal(dAtA []byte) error
func (*QueryStakeResponse) XXX_DiscardUnknown ¶
func (m *QueryStakeResponse) XXX_DiscardUnknown()
func (*QueryStakeResponse) XXX_Marshal ¶
func (m *QueryStakeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryStakeResponse) XXX_Merge ¶
func (m *QueryStakeResponse) XXX_Merge(src proto.Message)
func (*QueryStakeResponse) XXX_Size ¶
func (m *QueryStakeResponse) XXX_Size() int
func (*QueryStakeResponse) XXX_Unmarshal ¶
func (m *QueryStakeResponse) XXX_Unmarshal(b []byte) error
type QueryStakesRequest ¶
type QueryStakesRequest struct { VendorId uint32 `protobuf:"varint,1,opt,name=vendor_id,json=vendorId,proto3" json:"vendor_id,omitempty"` PostId string `protobuf:"bytes,2,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"` }
func (*QueryStakesRequest) Descriptor ¶
func (*QueryStakesRequest) Descriptor() ([]byte, []int)
func (*QueryStakesRequest) Marshal ¶
func (m *QueryStakesRequest) Marshal() (dAtA []byte, err error)
func (*QueryStakesRequest) MarshalTo ¶
func (m *QueryStakesRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryStakesRequest) MarshalToSizedBuffer ¶
func (m *QueryStakesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryStakesRequest) ProtoMessage ¶
func (*QueryStakesRequest) ProtoMessage()
func (*QueryStakesRequest) Reset ¶
func (m *QueryStakesRequest) Reset()
func (*QueryStakesRequest) Size ¶
func (m *QueryStakesRequest) Size() (n int)
func (*QueryStakesRequest) String ¶
func (m *QueryStakesRequest) String() string
func (*QueryStakesRequest) Unmarshal ¶
func (m *QueryStakesRequest) Unmarshal(dAtA []byte) error
func (*QueryStakesRequest) XXX_DiscardUnknown ¶
func (m *QueryStakesRequest) XXX_DiscardUnknown()
func (*QueryStakesRequest) XXX_Marshal ¶
func (m *QueryStakesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryStakesRequest) XXX_Merge ¶
func (m *QueryStakesRequest) XXX_Merge(src proto.Message)
func (*QueryStakesRequest) XXX_Size ¶
func (m *QueryStakesRequest) XXX_Size() int
func (*QueryStakesRequest) XXX_Unmarshal ¶
func (m *QueryStakesRequest) XXX_Unmarshal(b []byte) error
type QueryStakesResponse ¶
type QueryStakesResponse struct {
Stakes []Stake `protobuf:"bytes,1,rep,name=stakes,proto3" json:"stakes"`
}
func (*QueryStakesResponse) Descriptor ¶
func (*QueryStakesResponse) Descriptor() ([]byte, []int)
func (*QueryStakesResponse) GetStakes ¶
func (m *QueryStakesResponse) GetStakes() []Stake
func (*QueryStakesResponse) Marshal ¶
func (m *QueryStakesResponse) Marshal() (dAtA []byte, err error)
func (*QueryStakesResponse) MarshalTo ¶
func (m *QueryStakesResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryStakesResponse) MarshalToSizedBuffer ¶
func (m *QueryStakesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryStakesResponse) ProtoMessage ¶
func (*QueryStakesResponse) ProtoMessage()
func (*QueryStakesResponse) Reset ¶
func (m *QueryStakesResponse) Reset()
func (*QueryStakesResponse) Size ¶
func (m *QueryStakesResponse) Size() (n int)
func (*QueryStakesResponse) String ¶
func (m *QueryStakesResponse) String() string
func (*QueryStakesResponse) Unmarshal ¶
func (m *QueryStakesResponse) Unmarshal(dAtA []byte) error
func (*QueryStakesResponse) XXX_DiscardUnknown ¶
func (m *QueryStakesResponse) XXX_DiscardUnknown()
func (*QueryStakesResponse) XXX_Marshal ¶
func (m *QueryStakesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryStakesResponse) XXX_Merge ¶
func (m *QueryStakesResponse) XXX_Merge(src proto.Message)
func (*QueryStakesResponse) XXX_Size ¶
func (m *QueryStakesResponse) XXX_Size() int
func (*QueryStakesResponse) XXX_Unmarshal ¶
func (m *QueryStakesResponse) XXX_Unmarshal(b []byte) error
type Stake ¶
type Stake struct { VendorID uint32 `protobuf:"varint,1,opt,name=vendor_id,json=vendorId,proto3" json:"vendor_id" yaml:"vendor_id"` PostID github_com_public_awesome_stargaze_x_curating_types.PostID `` /* 154-byte string literal not displayed */ Delegator string `protobuf:"bytes,3,opt,name=delegator,proto3" json:"delegator,omitempty" yaml:"delegator"` Validator string `protobuf:"bytes,4,opt,name=validator,proto3" json:"validator,omitempty" yaml:"validator"` Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` }
func NewStake ¶
func NewStake( vendorID uint32, postID curatingtypes.PostID, delegator sdk.AccAddress, validator sdk.ValAddress, amount sdk.Int) Stake
NewStake allocates and returns a new `Stake` struct
func (*Stake) Descriptor ¶
func (*Stake) GetDelegator ¶
func (*Stake) GetValidator ¶
func (*Stake) GetVendorID ¶
func (*Stake) ProtoMessage ¶
func (*Stake) ProtoMessage()
func (*Stake) XXX_DiscardUnknown ¶
func (m *Stake) XXX_DiscardUnknown()
func (*Stake) XXX_Marshal ¶
func (*Stake) XXX_Unmarshal ¶
type StakingKeeper ¶
type StakingKeeper interface { GetValidator(ctx sdk.Context, addr sdk.ValAddress) (validator stakingtypes.Validator, found bool) Delegate(ctx sdk.Context, delAddr sdk.AccAddress, bondAmt sdk.Int, tokenSrc stakingtypes.BondStatus, validator stakingtypes.Validator, subtractAccount bool) (newShares sdk.Dec, err error) Undelegate(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, sharesAmount sdk.Dec) (time.Time, error) }
StakingKeeper expected staking keeper
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) Stake ¶
func (*UnimplementedMsgServer) Stake(ctx context.Context, req *MsgStake) (*MsgStakeResponse, error)
func (*UnimplementedMsgServer) Unstake ¶
func (*UnimplementedMsgServer) Unstake(ctx context.Context, req *MsgUnstake) (*MsgUnstakeResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Stake ¶
func (*UnimplementedQueryServer) Stake(ctx context.Context, req *QueryStakeRequest) (*QueryStakeResponse, error)
func (*UnimplementedQueryServer) Stakes ¶
func (*UnimplementedQueryServer) Stakes(ctx context.Context, req *QueryStakesRequest) (*QueryStakesResponse, error)