types

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeClaim = "claim"

	AttributeKeyAirdropId             = "airdrop_id"
	AttributeKeyRecipient             = "recipient"
	AttributeKeyInitialClaimableCoins = "initial_claimable_coins"
	AttributeKeyClaimableCoins        = "claimable_coins"
	AttributeKeyConditionType         = "condition_type"
	AttributeKeyClaimed               = "claimed"
)

Event types for the claim module.

View Source
const (
	// ModuleName defines the module name
	ModuleName = "claim"

	// 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
)
View Source
const (
	TypeMsgClaim = "claim"
)

Message types for the claim module.

Variables

View Source
var (
	ErrInvalidLengthClaim        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowClaim          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupClaim = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrAlreadyClaimed    = sdkerrors.Register(ModuleName, 2, "already claimed condition")
	ErrTerminatedAirdrop = sdkerrors.Register(ModuleName, 3, "terminated airdrop event")
	ErrConditionRequired = sdkerrors.Register(ModuleName, 4, "condition must be executed first")
)

x/claim module sentinel errors

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	AirdropKeyPrefix     = []byte{0xd5}
	ClaimRecordKeyPrefix = []byte{0xd6}
)

Keys for store prefixes

View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var ConditionType_name = map[int32]string{
	0: "CONDITION_TYPE_UNSPECIFIED",
	1: "CONDITION_TYPE_DEPOSIT",
	2: "CONDITION_TYPE_SWAP",
	3: "CONDITION_TYPE_LIQUIDSTAKE",
	4: "CONDITION_TYPE_VOTE",
}
View Source
var ConditionType_value = map[string]int32{
	"CONDITION_TYPE_UNSPECIFIED": 0,
	"CONDITION_TYPE_DEPOSIT":     1,
	"CONDITION_TYPE_SWAP":        2,
	"CONDITION_TYPE_LIQUIDSTAKE": 3,
	"CONDITION_TYPE_VOTE":        4,
}
View Source
var (
	ModuleCdc = codec.NewAminoCodec(amino)
)

Functions

func GetAirdropKey

func GetAirdropKey(airdropId uint64) []byte

GetAirdropKey returns the store key to retrieve the airdrop object from the airdrop id.

func GetClaimRecordKey

func GetClaimRecordKey(airdropId uint64, recipient sdk.AccAddress) []byte

GetClaimRecordKey returns the tore key to retrieve the claim record by the airdrop id and the recipient address.

func GetClaimRecordsByAirdropKeyPrefix

func GetClaimRecordsByAirdropKeyPrefix(airdropId uint64) []byte

GetClaimRecordsByAirdropKeyPrefix returns the store key to retrieve the claim record by the airdrop id.

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

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)

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
}

AccountKeeper is the expected x/auth module keeper.

type Airdrop

type Airdrop struct {
	// id specifies index of the airdrop
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// source_address defines the bech32-encoded source address
	// where the source of coins from
	SourceAddress string `protobuf:"bytes,2,opt,name=source_address,json=sourceAddress,proto3" json:"source_address,omitempty"`
	// conditions specifies a list of conditions
	Conditions []ConditionType `protobuf:"varint,3,rep,packed,name=conditions,proto3,enum=crescent.claim.v1beta1.ConditionType" json:"conditions,omitempty"`
	// start_time specifies the start time of the airdrop
	StartTime time.Time `protobuf:"bytes,4,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time"`
	// end_time specifies the start time of the airdrop
	EndTime time.Time `protobuf:"bytes,5,opt,name=end_time,json=endTime,proto3,stdtime" json:"end_time"`
}

Airdrop defines airdrop information.

func (*Airdrop) Descriptor

func (*Airdrop) Descriptor() ([]byte, []int)

func (Airdrop) GetSourceAddress

func (a Airdrop) GetSourceAddress() sdk.AccAddress

func (*Airdrop) Marshal

func (m *Airdrop) Marshal() (dAtA []byte, err error)

func (*Airdrop) MarshalTo

func (m *Airdrop) MarshalTo(dAtA []byte) (int, error)

func (*Airdrop) MarshalToSizedBuffer

func (m *Airdrop) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Airdrop) ProtoMessage

func (*Airdrop) ProtoMessage()

func (*Airdrop) Reset

func (m *Airdrop) Reset()

func (*Airdrop) Size

func (m *Airdrop) Size() (n int)

func (*Airdrop) String

func (m *Airdrop) String() string

func (*Airdrop) Unmarshal

func (m *Airdrop) Unmarshal(dAtA []byte) error

func (Airdrop) Validate

func (a Airdrop) Validate() error

Validate validates an airdrop object.

func (*Airdrop) XXX_DiscardUnknown

func (m *Airdrop) XXX_DiscardUnknown()

func (*Airdrop) XXX_Marshal

func (m *Airdrop) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Airdrop) XXX_Merge

func (m *Airdrop) XXX_Merge(src proto.Message)

func (*Airdrop) XXX_Size

func (m *Airdrop) XXX_Size() int

func (*Airdrop) XXX_Unmarshal

func (m *Airdrop) XXX_Unmarshal(b []byte) error

type BankKeeper

type BankKeeper interface {
	SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
	// MintCoins is used only for simulation test codes
	MintCoins(ctx sdk.Context, name string, amt sdk.Coins) error
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
}

BankKeeper defines the expected interface needed to retrieve account balances.

type ClaimRecord

type ClaimRecord struct {
	// airdrop_id specifies airdrop id
	AirdropId uint64 `protobuf:"varint,1,opt,name=airdrop_id,json=airdropId,proto3" json:"airdrop_id,omitempty"`
	// recipient specifies the bech32-encoded address that is eligible to claim airdrop
	Recipient string `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"`
	// initial_claimable_coins specifies the initial claimable coins
	InitialClaimableCoins github_com_cosmos_cosmos_sdk_types.Coins `` /* 170-byte string literal not displayed */
	// claimable_coins specifies the unclaimed claimable coins
	ClaimableCoins github_com_cosmos_cosmos_sdk_types.Coins `` /* 147-byte string literal not displayed */
	// claimed_conditions specifies a list of condition types
	// initial values are empty and each condition type gets appended when claim is successfully executed
	ClaimedConditions []ConditionType `` /* 162-byte string literal not displayed */
}

ClaimRecord defines claim record that corresponds to the airdrop.

func (*ClaimRecord) Descriptor

func (*ClaimRecord) Descriptor() ([]byte, []int)

func (ClaimRecord) GetClaimableCoinsForCondition

func (r ClaimRecord) GetClaimableCoinsForCondition(airdropConditions []ConditionType) sdk.Coins

GetClaimableCoinsForCondition uses unclaimed # of conditions as divisor to calculate a proportionate claimable amount of coins for the condition.

func (ClaimRecord) GetRecipient

func (r ClaimRecord) GetRecipient() sdk.AccAddress

func (*ClaimRecord) Marshal

func (m *ClaimRecord) Marshal() (dAtA []byte, err error)

func (*ClaimRecord) MarshalTo

func (m *ClaimRecord) MarshalTo(dAtA []byte) (int, error)

func (*ClaimRecord) MarshalToSizedBuffer

func (m *ClaimRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ClaimRecord) ProtoMessage

func (*ClaimRecord) ProtoMessage()

func (*ClaimRecord) Reset

func (m *ClaimRecord) Reset()

func (*ClaimRecord) Size

func (m *ClaimRecord) Size() (n int)

func (*ClaimRecord) String

func (m *ClaimRecord) String() string

func (*ClaimRecord) Unmarshal

func (m *ClaimRecord) Unmarshal(dAtA []byte) error

func (ClaimRecord) Validate

func (r ClaimRecord) Validate() error

Validate validates claim record object.

func (*ClaimRecord) XXX_DiscardUnknown

func (m *ClaimRecord) XXX_DiscardUnknown()

func (*ClaimRecord) XXX_Marshal

func (m *ClaimRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClaimRecord) XXX_Merge

func (m *ClaimRecord) XXX_Merge(src proto.Message)

func (*ClaimRecord) XXX_Size

func (m *ClaimRecord) XXX_Size() int

func (*ClaimRecord) XXX_Unmarshal

func (m *ClaimRecord) XXX_Unmarshal(b []byte) error

type ConditionType

type ConditionType int32

ConditionType defines the type of condition that a recipient must execute in order to receive a claimable amount.

const (
	// CONDITION_TYPE_UNSPECIFIED specifies an unknown condition type
	ConditionTypeUnspecified ConditionType = 0
	// CONDITION_TYPE_DEPOSIT specifies deposit condition type
	ConditionTypeDeposit ConditionType = 1
	// CONDITION_TYPE_SWAP specifies swap condition type
	ConditionTypeSwap ConditionType = 2
	// CONDITION_TYPE_LIQUIDSTAKE specifies liquid stake condition type
	ConditionTypeLiquidStake ConditionType = 3
	// CONDITION_TYPE_VOTE specifies governance vote condition type
	ConditionTypeVote ConditionType = 4
)

func (ConditionType) EnumDescriptor

func (ConditionType) EnumDescriptor() ([]byte, []int)

func (ConditionType) String

func (x ConditionType) String() string

type DistrKeeper

type DistrKeeper interface {
	FundCommunityPool(ctx sdk.Context, amount sdk.Coins, sender sdk.AccAddress) error
}

DistrKeeper is the keeper of the distribution store

type GenesisState

type GenesisState struct {
	// airdrops specifies a list of airdrops
	Airdrops []Airdrop `protobuf:"bytes,1,rep,name=airdrops,proto3" json:"airdrops"`
	// claim_records specifies a list of claim records
	ClaimRecords []ClaimRecord `protobuf:"bytes,2,rep,name=claim_records,json=claimRecords,proto3" json:"claim_records"`
}

GenesisState defines the claim 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) GetAirdrops

func (m *GenesisState) GetAirdrops() []Airdrop

func (*GenesisState) GetClaimRecords

func (m *GenesisState) GetClaimRecords() []ClaimRecord

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, 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 GovKeeper

type GovKeeper interface {
	IterateProposals(ctx sdk.Context, cb func(proposal govtypes.Proposal) (stop bool))
	GetVote(ctx sdk.Context, proposalID uint64, voterAddr sdk.AccAddress) (vote govtypes.Vote, found bool)
	// Note that this function is only used before the UpgradeHeight defined in app/upgrades/v1.1.0
	IterateAllVotes(ctx sdk.Context, cb func(vote govtypes.Vote) (stop bool))
}

type LiquidStakingKeeper

type LiquidStakingKeeper interface {
	GetParams(ctx sdk.Context) (params liquidstakingtypes.Params)
}

type LiquidityKeeper

type LiquidityKeeper interface {
	GetDepositRequestsByDepositor(ctx sdk.Context, depositor sdk.AccAddress) (reqs []liquiditytypes.DepositRequest)
	GetOrdersByOrderer(ctx sdk.Context, orderer sdk.AccAddress) (orders []liquiditytypes.Order)
}

LiquidityKeeper defines the expected interface needed to check the condition.

type MsgClaim

type MsgClaim struct {
	// airdrop_id specifies index of the airdrop
	AirdropId uint64 `protobuf:"varint,1,opt,name=airdrop_id,json=airdropId,proto3" json:"airdrop_id,omitempty"`
	// recipient specifies the bech32-encoded address that is eligible to claim airdrop
	Recipient string `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"`
	// condition_type specifies the condition type
	ConditionType ConditionType `` /* 143-byte string literal not displayed */
}

MsgClaim defines a SDK message for claiming claimable amount.

func NewMsgClaim

func NewMsgClaim(airdropId uint64, recipient sdk.AccAddress, ConditionType ConditionType) *MsgClaim

NewMsgClaim creates a new MsgClaim.

func (*MsgClaim) Descriptor

func (*MsgClaim) Descriptor() ([]byte, []int)

func (MsgClaim) GetRecipient

func (msg MsgClaim) GetRecipient() sdk.AccAddress

func (MsgClaim) GetSignBytes

func (msg MsgClaim) GetSignBytes() []byte

func (MsgClaim) GetSigners

func (msg MsgClaim) GetSigners() []sdk.AccAddress

func (*MsgClaim) Marshal

func (m *MsgClaim) Marshal() (dAtA []byte, err error)

func (*MsgClaim) MarshalTo

func (m *MsgClaim) MarshalTo(dAtA []byte) (int, error)

func (*MsgClaim) MarshalToSizedBuffer

func (m *MsgClaim) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgClaim) ProtoMessage

func (*MsgClaim) ProtoMessage()

func (*MsgClaim) Reset

func (m *MsgClaim) Reset()

func (MsgClaim) Route

func (msg MsgClaim) Route() string

func (*MsgClaim) Size

func (m *MsgClaim) Size() (n int)

func (*MsgClaim) String

func (m *MsgClaim) String() string

func (MsgClaim) Type

func (msg MsgClaim) Type() string

func (*MsgClaim) Unmarshal

func (m *MsgClaim) Unmarshal(dAtA []byte) error

func (MsgClaim) ValidateBasic

func (msg MsgClaim) ValidateBasic() error

func (*MsgClaim) XXX_DiscardUnknown

func (m *MsgClaim) XXX_DiscardUnknown()

func (*MsgClaim) XXX_Marshal

func (m *MsgClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgClaim) XXX_Merge

func (m *MsgClaim) XXX_Merge(src proto.Message)

func (*MsgClaim) XXX_Size

func (m *MsgClaim) XXX_Size() int

func (*MsgClaim) XXX_Unmarshal

func (m *MsgClaim) XXX_Unmarshal(b []byte) error

type MsgClaimResponse

type MsgClaimResponse struct {
}

func (*MsgClaimResponse) Descriptor

func (*MsgClaimResponse) Descriptor() ([]byte, []int)

func (*MsgClaimResponse) Marshal

func (m *MsgClaimResponse) Marshal() (dAtA []byte, err error)

func (*MsgClaimResponse) MarshalTo

func (m *MsgClaimResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgClaimResponse) MarshalToSizedBuffer

func (m *MsgClaimResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgClaimResponse) ProtoMessage

func (*MsgClaimResponse) ProtoMessage()

func (*MsgClaimResponse) Reset

func (m *MsgClaimResponse) Reset()

func (*MsgClaimResponse) Size

func (m *MsgClaimResponse) Size() (n int)

func (*MsgClaimResponse) String

func (m *MsgClaimResponse) String() string

func (*MsgClaimResponse) Unmarshal

func (m *MsgClaimResponse) Unmarshal(dAtA []byte) error

func (*MsgClaimResponse) XXX_DiscardUnknown

func (m *MsgClaimResponse) XXX_DiscardUnknown()

func (*MsgClaimResponse) XXX_Marshal

func (m *MsgClaimResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgClaimResponse) XXX_Merge

func (m *MsgClaimResponse) XXX_Merge(src proto.Message)

func (*MsgClaimResponse) XXX_Size

func (m *MsgClaimResponse) XXX_Size() int

func (*MsgClaimResponse) XXX_Unmarshal

func (m *MsgClaimResponse) XXX_Unmarshal(b []byte) error

type MsgClient

type MsgClient interface {
	Claim(ctx context.Context, in *MsgClaim, opts ...grpc.CallOption) (*MsgClaimResponse, 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 {
	Claim(context.Context, *MsgClaim) (*MsgClaimResponse, error)
}

MsgServer is the server API for Msg service.

type QueryAirdropRequest

type QueryAirdropRequest struct {
	AirdropId uint64 `protobuf:"varint,1,opt,name=airdrop_id,json=airdropId,proto3" json:"airdrop_id,omitempty"`
}

QueryAirdropRequest is request type for the Query/Airdrop RPC method.

func (*QueryAirdropRequest) Descriptor

func (*QueryAirdropRequest) Descriptor() ([]byte, []int)

func (*QueryAirdropRequest) GetAirdropId

func (m *QueryAirdropRequest) GetAirdropId() uint64

func (*QueryAirdropRequest) Marshal

func (m *QueryAirdropRequest) Marshal() (dAtA []byte, err error)

func (*QueryAirdropRequest) MarshalTo

func (m *QueryAirdropRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryAirdropRequest) MarshalToSizedBuffer

func (m *QueryAirdropRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryAirdropRequest) ProtoMessage

func (*QueryAirdropRequest) ProtoMessage()

func (*QueryAirdropRequest) Reset

func (m *QueryAirdropRequest) Reset()

func (*QueryAirdropRequest) Size

func (m *QueryAirdropRequest) Size() (n int)

func (*QueryAirdropRequest) String

func (m *QueryAirdropRequest) String() string

func (*QueryAirdropRequest) Unmarshal

func (m *QueryAirdropRequest) Unmarshal(dAtA []byte) error

func (*QueryAirdropRequest) XXX_DiscardUnknown

func (m *QueryAirdropRequest) XXX_DiscardUnknown()

func (*QueryAirdropRequest) XXX_Marshal

func (m *QueryAirdropRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryAirdropRequest) XXX_Merge

func (m *QueryAirdropRequest) XXX_Merge(src proto.Message)

func (*QueryAirdropRequest) XXX_Size

func (m *QueryAirdropRequest) XXX_Size() int

func (*QueryAirdropRequest) XXX_Unmarshal

func (m *QueryAirdropRequest) XXX_Unmarshal(b []byte) error

type QueryAirdropResponse

type QueryAirdropResponse struct {
	Airdrop Airdrop `protobuf:"bytes,1,opt,name=airdrop,proto3" json:"airdrop"`
}

QueryAirdropResponse is response type for the Query/Airdrop RPC method.

func (*QueryAirdropResponse) Descriptor

func (*QueryAirdropResponse) Descriptor() ([]byte, []int)

func (*QueryAirdropResponse) GetAirdrop

func (m *QueryAirdropResponse) GetAirdrop() Airdrop

func (*QueryAirdropResponse) Marshal

func (m *QueryAirdropResponse) Marshal() (dAtA []byte, err error)

func (*QueryAirdropResponse) MarshalTo

func (m *QueryAirdropResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryAirdropResponse) MarshalToSizedBuffer

func (m *QueryAirdropResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryAirdropResponse) ProtoMessage

func (*QueryAirdropResponse) ProtoMessage()

func (*QueryAirdropResponse) Reset

func (m *QueryAirdropResponse) Reset()

func (*QueryAirdropResponse) Size

func (m *QueryAirdropResponse) Size() (n int)

func (*QueryAirdropResponse) String

func (m *QueryAirdropResponse) String() string

func (*QueryAirdropResponse) Unmarshal

func (m *QueryAirdropResponse) Unmarshal(dAtA []byte) error

func (*QueryAirdropResponse) XXX_DiscardUnknown

func (m *QueryAirdropResponse) XXX_DiscardUnknown()

func (*QueryAirdropResponse) XXX_Marshal

func (m *QueryAirdropResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryAirdropResponse) XXX_Merge

func (m *QueryAirdropResponse) XXX_Merge(src proto.Message)

func (*QueryAirdropResponse) XXX_Size

func (m *QueryAirdropResponse) XXX_Size() int

func (*QueryAirdropResponse) XXX_Unmarshal

func (m *QueryAirdropResponse) XXX_Unmarshal(b []byte) error

type QueryAirdropsRequest

type QueryAirdropsRequest struct {
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryAirdropsRequest is request type for the Query/Airdrops RPC method.

func (*QueryAirdropsRequest) Descriptor

func (*QueryAirdropsRequest) Descriptor() ([]byte, []int)

func (*QueryAirdropsRequest) GetPagination

func (m *QueryAirdropsRequest) GetPagination() *query.PageRequest

func (*QueryAirdropsRequest) Marshal

func (m *QueryAirdropsRequest) Marshal() (dAtA []byte, err error)

func (*QueryAirdropsRequest) MarshalTo

func (m *QueryAirdropsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryAirdropsRequest) MarshalToSizedBuffer

func (m *QueryAirdropsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryAirdropsRequest) ProtoMessage

func (*QueryAirdropsRequest) ProtoMessage()

func (*QueryAirdropsRequest) Reset

func (m *QueryAirdropsRequest) Reset()

func (*QueryAirdropsRequest) Size

func (m *QueryAirdropsRequest) Size() (n int)

func (*QueryAirdropsRequest) String

func (m *QueryAirdropsRequest) String() string

func (*QueryAirdropsRequest) Unmarshal

func (m *QueryAirdropsRequest) Unmarshal(dAtA []byte) error

func (*QueryAirdropsRequest) XXX_DiscardUnknown

func (m *QueryAirdropsRequest) XXX_DiscardUnknown()

func (*QueryAirdropsRequest) XXX_Marshal

func (m *QueryAirdropsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryAirdropsRequest) XXX_Merge

func (m *QueryAirdropsRequest) XXX_Merge(src proto.Message)

func (*QueryAirdropsRequest) XXX_Size

func (m *QueryAirdropsRequest) XXX_Size() int

func (*QueryAirdropsRequest) XXX_Unmarshal

func (m *QueryAirdropsRequest) XXX_Unmarshal(b []byte) error

type QueryAirdropsResponse

type QueryAirdropsResponse struct {
	Airdrops   []Airdrop           `protobuf:"bytes,1,rep,name=airdrops,proto3" json:"airdrops"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryAirdropsResponse is response type for the Query/Airdrops RPC method.

func (*QueryAirdropsResponse) Descriptor

func (*QueryAirdropsResponse) Descriptor() ([]byte, []int)

func (*QueryAirdropsResponse) GetAirdrops

func (m *QueryAirdropsResponse) GetAirdrops() []Airdrop

func (*QueryAirdropsResponse) GetPagination

func (m *QueryAirdropsResponse) GetPagination() *query.PageResponse

func (*QueryAirdropsResponse) Marshal

func (m *QueryAirdropsResponse) Marshal() (dAtA []byte, err error)

func (*QueryAirdropsResponse) MarshalTo

func (m *QueryAirdropsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryAirdropsResponse) MarshalToSizedBuffer

func (m *QueryAirdropsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryAirdropsResponse) ProtoMessage

func (*QueryAirdropsResponse) ProtoMessage()

func (*QueryAirdropsResponse) Reset

func (m *QueryAirdropsResponse) Reset()

func (*QueryAirdropsResponse) Size

func (m *QueryAirdropsResponse) Size() (n int)

func (*QueryAirdropsResponse) String

func (m *QueryAirdropsResponse) String() string

func (*QueryAirdropsResponse) Unmarshal

func (m *QueryAirdropsResponse) Unmarshal(dAtA []byte) error

func (*QueryAirdropsResponse) XXX_DiscardUnknown

func (m *QueryAirdropsResponse) XXX_DiscardUnknown()

func (*QueryAirdropsResponse) XXX_Marshal

func (m *QueryAirdropsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryAirdropsResponse) XXX_Merge

func (m *QueryAirdropsResponse) XXX_Merge(src proto.Message)

func (*QueryAirdropsResponse) XXX_Size

func (m *QueryAirdropsResponse) XXX_Size() int

func (*QueryAirdropsResponse) XXX_Unmarshal

func (m *QueryAirdropsResponse) XXX_Unmarshal(b []byte) error

type QueryClaimRecordRequest

type QueryClaimRecordRequest struct {
	AirdropId uint64 `protobuf:"varint,1,opt,name=airdrop_id,json=airdropId,proto3" json:"airdrop_id,omitempty"`
	Recipient string `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"`
}

QueryClaimRecordRequest is request type for the Query/ClaimRecord RPC method.

func (*QueryClaimRecordRequest) Descriptor

func (*QueryClaimRecordRequest) Descriptor() ([]byte, []int)

func (*QueryClaimRecordRequest) GetAirdropId

func (m *QueryClaimRecordRequest) GetAirdropId() uint64

func (*QueryClaimRecordRequest) GetRecipient

func (m *QueryClaimRecordRequest) GetRecipient() string

func (*QueryClaimRecordRequest) Marshal

func (m *QueryClaimRecordRequest) Marshal() (dAtA []byte, err error)

func (*QueryClaimRecordRequest) MarshalTo

func (m *QueryClaimRecordRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryClaimRecordRequest) MarshalToSizedBuffer

func (m *QueryClaimRecordRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryClaimRecordRequest) ProtoMessage

func (*QueryClaimRecordRequest) ProtoMessage()

func (*QueryClaimRecordRequest) Reset

func (m *QueryClaimRecordRequest) Reset()

func (*QueryClaimRecordRequest) Size

func (m *QueryClaimRecordRequest) Size() (n int)

func (*QueryClaimRecordRequest) String

func (m *QueryClaimRecordRequest) String() string

func (*QueryClaimRecordRequest) Unmarshal

func (m *QueryClaimRecordRequest) Unmarshal(dAtA []byte) error

func (*QueryClaimRecordRequest) XXX_DiscardUnknown

func (m *QueryClaimRecordRequest) XXX_DiscardUnknown()

func (*QueryClaimRecordRequest) XXX_Marshal

func (m *QueryClaimRecordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryClaimRecordRequest) XXX_Merge

func (m *QueryClaimRecordRequest) XXX_Merge(src proto.Message)

func (*QueryClaimRecordRequest) XXX_Size

func (m *QueryClaimRecordRequest) XXX_Size() int

func (*QueryClaimRecordRequest) XXX_Unmarshal

func (m *QueryClaimRecordRequest) XXX_Unmarshal(b []byte) error

type QueryClaimRecordResponse

type QueryClaimRecordResponse struct {
	ClaimRecord ClaimRecord `protobuf:"bytes,1,opt,name=claim_record,json=claimRecord,proto3" json:"claim_record"`
}

QueryClaimRecordResponse is response type for the Query/ClaimRecord RPC method.

func (*QueryClaimRecordResponse) Descriptor

func (*QueryClaimRecordResponse) Descriptor() ([]byte, []int)

func (*QueryClaimRecordResponse) GetClaimRecord

func (m *QueryClaimRecordResponse) GetClaimRecord() ClaimRecord

func (*QueryClaimRecordResponse) Marshal

func (m *QueryClaimRecordResponse) Marshal() (dAtA []byte, err error)

func (*QueryClaimRecordResponse) MarshalTo

func (m *QueryClaimRecordResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryClaimRecordResponse) MarshalToSizedBuffer

func (m *QueryClaimRecordResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryClaimRecordResponse) ProtoMessage

func (*QueryClaimRecordResponse) ProtoMessage()

func (*QueryClaimRecordResponse) Reset

func (m *QueryClaimRecordResponse) Reset()

func (*QueryClaimRecordResponse) Size

func (m *QueryClaimRecordResponse) Size() (n int)

func (*QueryClaimRecordResponse) String

func (m *QueryClaimRecordResponse) String() string

func (*QueryClaimRecordResponse) Unmarshal

func (m *QueryClaimRecordResponse) Unmarshal(dAtA []byte) error

func (*QueryClaimRecordResponse) XXX_DiscardUnknown

func (m *QueryClaimRecordResponse) XXX_DiscardUnknown()

func (*QueryClaimRecordResponse) XXX_Marshal

func (m *QueryClaimRecordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryClaimRecordResponse) XXX_Merge

func (m *QueryClaimRecordResponse) XXX_Merge(src proto.Message)

func (*QueryClaimRecordResponse) XXX_Size

func (m *QueryClaimRecordResponse) XXX_Size() int

func (*QueryClaimRecordResponse) XXX_Unmarshal

func (m *QueryClaimRecordResponse) XXX_Unmarshal(b []byte) error

type QueryClient

type QueryClient interface {
	// Airdrops returns all airdrops.
	Airdrops(ctx context.Context, in *QueryAirdropsRequest, opts ...grpc.CallOption) (*QueryAirdropsResponse, error)
	// Airdrop returns the specific airdrop.
	Airdrop(ctx context.Context, in *QueryAirdropRequest, opts ...grpc.CallOption) (*QueryAirdropResponse, error)
	// ClaimRecord returns the claim record for the recipient address.
	ClaimRecord(ctx context.Context, in *QueryClaimRecordRequest, opts ...grpc.CallOption) (*QueryClaimRecordResponse, 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 {
	// Airdrops returns all airdrops.
	Airdrops(context.Context, *QueryAirdropsRequest) (*QueryAirdropsResponse, error)
	// Airdrop returns the specific airdrop.
	Airdrop(context.Context, *QueryAirdropRequest) (*QueryAirdropResponse, error)
	// ClaimRecord returns the claim record for the recipient address.
	ClaimRecord(context.Context, *QueryClaimRecordRequest) (*QueryClaimRecordResponse, error)
}

QueryServer is the server API for Query service.

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) Claim

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Airdrop

func (*UnimplementedQueryServer) Airdrops

func (*UnimplementedQueryServer) ClaimRecord

Jump to

Keyboard shortcuts

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