types

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: Apache-2.0 Imports: 37 Imported by: 1

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

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

	// StoreKey defines the primary module store key
	StoreKey = ModuleName

	// RouterKey defines the module's message routing key
	RouterKey = ModuleName

	// MemStoreKey defines the in-memory store key
	MemStoreKey = "mem_tier"
)
View Source
const DefaultIndex uint64 = 1

DefaultIndex is the default global index

View Source
const (
	// PortfolioKeyPrefix is the prefix to retrieve all Portfolio
	PortfolioKeyPrefix = "Portfolio/value/"
)
View Source
const TypeMsgSetPortfolio = "set_portfolio"

Variables

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 (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthPortfolio        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPortfolio          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPortfolio = fmt.Errorf("proto: unexpected end of group")
)
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 (
	ErrSample = sdkerrors.Register(ModuleName, 1100, "sample error")
)

x/tier module sentinel errors

Functions

func KeyPrefix

func KeyPrefix(p string) []byte

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable the param key table for launch module

func PortfolioKey

func PortfolioKey(
	asset string,
) []byte

PortfolioKey returns the store key to retrieve a Portfolio from the index fields

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

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 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) types.AccountI
}

AccountKeeper defines the expected account keeper used for simulations (noalias)

type AmmKeeper

type AmmKeeper interface {
	// GetPool returns a pool from its index
	GetPool(sdk.Context, uint64) (ammtypes.Pool, bool)
	// Get all pools
	GetAllPool(sdk.Context) []ammtypes.Pool
	// IterateCommitments iterates over all Commitments and performs a callback.
	IterateLiquidityPools(sdk.Context, func(ammtypes.Pool) bool)
	PoolExtraInfo(ctx sdk.Context, pool ammtypes.Pool) ammtypes.PoolExtraInfo
}

type AssetProfileKeeper

type AssetProfileKeeper interface {
	GetEntry(ctx sdk.Context, baseDenom string) (val assetprofiletypes.Entry, found bool)
	// GetUsdcDenom returns USDC denom
	GetUsdcDenom(ctx sdk.Context) (string, bool)
	// GetEntryByDenom returns a entry from its denom value
	GetEntryByDenom(ctx sdk.Context, denom string) (val assetprofiletypes.Entry, found bool)
}

AssetProfileKeeper defines the expected interface needed to retrieve denom info

type BankKeeper

type BankKeeper interface {
	GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin

	SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
}

BankKeeper defines the expected interface needed to retrieve account balances.

type CommitmentKeeper

type CommitmentKeeper interface {
	GetCommitments(ctx sdk.Context, creator string) commitmenttypes.Commitments
}

type EstakingKeeper

type EstakingKeeper interface {
	Rewards(goCtx context.Context, req *estakingtypes.QueryRewardsRequest) (*estakingtypes.QueryRewardsResponse, error)
}

type GenesisState

type GenesisState struct {
	Params        Params      `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	PortfolioList []Portfolio `protobuf:"bytes,2,rep,name=portfolioList,proto3" json:"portfolioList"`
}

GenesisState defines the tier 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) GetPortfolioList

func (m *GenesisState) GetPortfolioList() []Portfolio

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. No data at genesis

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 MasterchefKeeper

type MasterchefKeeper interface {
	UserPendingReward(goCtx context.Context, req *mastercheftypes.QueryUserPendingRewardRequest) (*mastercheftypes.QueryUserPendingRewardResponse, error)
}

type MsgClient

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

MsgServer is the server API for Msg service.

type MsgSetPortfolio

type MsgSetPortfolio struct {
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	User    string `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
}

func NewMsgSetPortfolio

func NewMsgSetPortfolio(creator string, user string) *MsgSetPortfolio

func (*MsgSetPortfolio) Descriptor

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

func (*MsgSetPortfolio) GetCreator

func (m *MsgSetPortfolio) GetCreator() string

func (*MsgSetPortfolio) GetSignBytes

func (msg *MsgSetPortfolio) GetSignBytes() []byte

func (*MsgSetPortfolio) GetSigners

func (msg *MsgSetPortfolio) GetSigners() []sdk.AccAddress

func (*MsgSetPortfolio) GetUser

func (m *MsgSetPortfolio) GetUser() string

func (*MsgSetPortfolio) Marshal

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

func (*MsgSetPortfolio) MarshalTo

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

func (*MsgSetPortfolio) MarshalToSizedBuffer

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

func (*MsgSetPortfolio) ProtoMessage

func (*MsgSetPortfolio) ProtoMessage()

func (*MsgSetPortfolio) Reset

func (m *MsgSetPortfolio) Reset()

func (*MsgSetPortfolio) Route

func (msg *MsgSetPortfolio) Route() string

func (*MsgSetPortfolio) Size

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

func (*MsgSetPortfolio) String

func (m *MsgSetPortfolio) String() string

func (*MsgSetPortfolio) Type

func (msg *MsgSetPortfolio) Type() string

func (*MsgSetPortfolio) Unmarshal

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

func (*MsgSetPortfolio) ValidateBasic

func (msg *MsgSetPortfolio) ValidateBasic() error

func (*MsgSetPortfolio) XXX_DiscardUnknown

func (m *MsgSetPortfolio) XXX_DiscardUnknown()

func (*MsgSetPortfolio) XXX_Marshal

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

func (*MsgSetPortfolio) XXX_Merge

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

func (*MsgSetPortfolio) XXX_Size

func (m *MsgSetPortfolio) XXX_Size() int

func (*MsgSetPortfolio) XXX_Unmarshal

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

type MsgSetPortfolioResponse

type MsgSetPortfolioResponse struct {
}

func (*MsgSetPortfolioResponse) Descriptor

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

func (*MsgSetPortfolioResponse) Marshal

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

func (*MsgSetPortfolioResponse) MarshalTo

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

func (*MsgSetPortfolioResponse) MarshalToSizedBuffer

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

func (*MsgSetPortfolioResponse) ProtoMessage

func (*MsgSetPortfolioResponse) ProtoMessage()

func (*MsgSetPortfolioResponse) Reset

func (m *MsgSetPortfolioResponse) Reset()

func (*MsgSetPortfolioResponse) Size

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

func (*MsgSetPortfolioResponse) String

func (m *MsgSetPortfolioResponse) String() string

func (*MsgSetPortfolioResponse) Unmarshal

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

func (*MsgSetPortfolioResponse) XXX_DiscardUnknown

func (m *MsgSetPortfolioResponse) XXX_DiscardUnknown()

func (*MsgSetPortfolioResponse) XXX_Marshal

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

func (*MsgSetPortfolioResponse) XXX_Merge

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

func (*MsgSetPortfolioResponse) XXX_Size

func (m *MsgSetPortfolioResponse) XXX_Size() int

func (*MsgSetPortfolioResponse) XXX_Unmarshal

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

type OracleKeeper

type OracleKeeper interface {
	GetAssetPrice(ctx sdk.Context, asset string) (oracletypes.Price, bool)
	GetAssetPriceFromDenom(ctx sdk.Context, denom string) sdk.Dec
	GetPriceFeeder(ctx sdk.Context, feeder string) (val oracletypes.PriceFeeder, found bool)
}

type Params

type Params struct {
}

Params defines the parameters for the module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters

func NewParams

func NewParams() Params

NewParams creates a new Params instance

func (*Params) Descriptor

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

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs

ParamSetPairs get the params.ParamSet

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (Params) String

func (p Params) String() string

String implements the Stringer interface.

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

Validate validates the set of params

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type PerpetualKeeper

type PerpetualKeeper interface {
	GetMTPsForAddress(ctx sdk.Context, mtpAddress sdk.Address, pagination *query.PageRequest) ([]*perpetualtypes.MTP, *query.PageResponse, error)
}

type Portfolio

type Portfolio struct {
	Creator   string                                 `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	Portfolio github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=portfolio,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"portfolio"`
}

func (*Portfolio) Descriptor

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

func (*Portfolio) GetCreator

func (m *Portfolio) GetCreator() string

func (*Portfolio) Marshal

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

func (*Portfolio) MarshalTo

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

func (*Portfolio) MarshalToSizedBuffer

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

func (*Portfolio) ProtoMessage

func (*Portfolio) ProtoMessage()

func (*Portfolio) Reset

func (m *Portfolio) Reset()

func (*Portfolio) Size

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

func (*Portfolio) String

func (m *Portfolio) String() string

func (*Portfolio) Unmarshal

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

func (*Portfolio) XXX_DiscardUnknown

func (m *Portfolio) XXX_DiscardUnknown()

func (*Portfolio) XXX_Marshal

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

func (*Portfolio) XXX_Merge

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

func (*Portfolio) XXX_Size

func (m *Portfolio) XXX_Size() int

func (*Portfolio) XXX_Unmarshal

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

type QueryAllPortfolioRequest

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

func (*QueryAllPortfolioRequest) Descriptor

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

func (*QueryAllPortfolioRequest) GetPagination

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

func (*QueryAllPortfolioRequest) Marshal

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

func (*QueryAllPortfolioRequest) MarshalTo

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

func (*QueryAllPortfolioRequest) MarshalToSizedBuffer

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

func (*QueryAllPortfolioRequest) ProtoMessage

func (*QueryAllPortfolioRequest) ProtoMessage()

func (*QueryAllPortfolioRequest) Reset

func (m *QueryAllPortfolioRequest) Reset()

func (*QueryAllPortfolioRequest) Size

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

func (*QueryAllPortfolioRequest) String

func (m *QueryAllPortfolioRequest) String() string

func (*QueryAllPortfolioRequest) Unmarshal

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

func (*QueryAllPortfolioRequest) XXX_DiscardUnknown

func (m *QueryAllPortfolioRequest) XXX_DiscardUnknown()

func (*QueryAllPortfolioRequest) XXX_Marshal

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

func (*QueryAllPortfolioRequest) XXX_Merge

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

func (*QueryAllPortfolioRequest) XXX_Size

func (m *QueryAllPortfolioRequest) XXX_Size() int

func (*QueryAllPortfolioRequest) XXX_Unmarshal

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

type QueryAllPortfolioResponse

type QueryAllPortfolioResponse struct {
	Portfolio  []Portfolio         `protobuf:"bytes,1,rep,name=portfolio,proto3" json:"portfolio"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QueryAllPortfolioResponse) Descriptor

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

func (*QueryAllPortfolioResponse) GetPagination

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

func (*QueryAllPortfolioResponse) GetPortfolio

func (m *QueryAllPortfolioResponse) GetPortfolio() []Portfolio

func (*QueryAllPortfolioResponse) Marshal

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

func (*QueryAllPortfolioResponse) MarshalTo

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

func (*QueryAllPortfolioResponse) MarshalToSizedBuffer

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

func (*QueryAllPortfolioResponse) ProtoMessage

func (*QueryAllPortfolioResponse) ProtoMessage()

func (*QueryAllPortfolioResponse) Reset

func (m *QueryAllPortfolioResponse) Reset()

func (*QueryAllPortfolioResponse) Size

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

func (*QueryAllPortfolioResponse) String

func (m *QueryAllPortfolioResponse) String() string

func (*QueryAllPortfolioResponse) Unmarshal

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

func (*QueryAllPortfolioResponse) XXX_DiscardUnknown

func (m *QueryAllPortfolioResponse) XXX_DiscardUnknown()

func (*QueryAllPortfolioResponse) XXX_Marshal

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

func (*QueryAllPortfolioResponse) XXX_Merge

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

func (*QueryAllPortfolioResponse) XXX_Size

func (m *QueryAllPortfolioResponse) XXX_Size() int

func (*QueryAllPortfolioResponse) XXX_Unmarshal

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

type QueryCalculateDiscountRequest

type QueryCalculateDiscountRequest struct {
	User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
}

func (*QueryCalculateDiscountRequest) Descriptor

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

func (*QueryCalculateDiscountRequest) GetUser

func (*QueryCalculateDiscountRequest) Marshal

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

func (*QueryCalculateDiscountRequest) MarshalTo

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

func (*QueryCalculateDiscountRequest) MarshalToSizedBuffer

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

func (*QueryCalculateDiscountRequest) ProtoMessage

func (*QueryCalculateDiscountRequest) ProtoMessage()

func (*QueryCalculateDiscountRequest) Reset

func (m *QueryCalculateDiscountRequest) Reset()

func (*QueryCalculateDiscountRequest) Size

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

func (*QueryCalculateDiscountRequest) String

func (*QueryCalculateDiscountRequest) Unmarshal

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

func (*QueryCalculateDiscountRequest) XXX_DiscardUnknown

func (m *QueryCalculateDiscountRequest) XXX_DiscardUnknown()

func (*QueryCalculateDiscountRequest) XXX_Marshal

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

func (*QueryCalculateDiscountRequest) XXX_Merge

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

func (*QueryCalculateDiscountRequest) XXX_Size

func (m *QueryCalculateDiscountRequest) XXX_Size() int

func (*QueryCalculateDiscountRequest) XXX_Unmarshal

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

type QueryCalculateDiscountResponse

type QueryCalculateDiscountResponse struct {
	Discount  string `protobuf:"bytes,1,opt,name=discount,proto3" json:"discount,omitempty"`
	Tier      string `protobuf:"bytes,2,opt,name=tier,proto3" json:"tier,omitempty"`
	Portfolio string `protobuf:"bytes,3,opt,name=portfolio,proto3" json:"portfolio,omitempty"`
}

func (*QueryCalculateDiscountResponse) Descriptor

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

func (*QueryCalculateDiscountResponse) GetDiscount

func (m *QueryCalculateDiscountResponse) GetDiscount() string

func (*QueryCalculateDiscountResponse) GetPortfolio

func (m *QueryCalculateDiscountResponse) GetPortfolio() string

func (*QueryCalculateDiscountResponse) GetTier

func (*QueryCalculateDiscountResponse) Marshal

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

func (*QueryCalculateDiscountResponse) MarshalTo

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

func (*QueryCalculateDiscountResponse) MarshalToSizedBuffer

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

func (*QueryCalculateDiscountResponse) ProtoMessage

func (*QueryCalculateDiscountResponse) ProtoMessage()

func (*QueryCalculateDiscountResponse) Reset

func (m *QueryCalculateDiscountResponse) Reset()

func (*QueryCalculateDiscountResponse) Size

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

func (*QueryCalculateDiscountResponse) String

func (*QueryCalculateDiscountResponse) Unmarshal

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

func (*QueryCalculateDiscountResponse) XXX_DiscardUnknown

func (m *QueryCalculateDiscountResponse) XXX_DiscardUnknown()

func (*QueryCalculateDiscountResponse) XXX_Marshal

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

func (*QueryCalculateDiscountResponse) XXX_Merge

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

func (*QueryCalculateDiscountResponse) XXX_Size

func (m *QueryCalculateDiscountResponse) XXX_Size() int

func (*QueryCalculateDiscountResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Parameters queries the parameters of the module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// Queries a list of Portfolio items.
	Portfolio(ctx context.Context, in *QueryGetPortfolioRequest, opts ...grpc.CallOption) (*QueryGetPortfolioResponse, error)
	PortfolioAll(ctx context.Context, in *QueryAllPortfolioRequest, opts ...grpc.CallOption) (*QueryAllPortfolioResponse, error)
	// Queries a list of CalculateDiscount items.
	CalculateDiscount(ctx context.Context, in *QueryCalculateDiscountRequest, opts ...grpc.CallOption) (*QueryCalculateDiscountResponse, 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 QueryGetPortfolioRequest

type QueryGetPortfolioRequest struct {
	User      string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	AssetType string `protobuf:"bytes,2,opt,name=assetType,proto3" json:"assetType,omitempty"`
}

func (*QueryGetPortfolioRequest) Descriptor

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

func (*QueryGetPortfolioRequest) GetAssetType

func (m *QueryGetPortfolioRequest) GetAssetType() string

func (*QueryGetPortfolioRequest) GetUser

func (m *QueryGetPortfolioRequest) GetUser() string

func (*QueryGetPortfolioRequest) Marshal

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

func (*QueryGetPortfolioRequest) MarshalTo

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

func (*QueryGetPortfolioRequest) MarshalToSizedBuffer

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

func (*QueryGetPortfolioRequest) ProtoMessage

func (*QueryGetPortfolioRequest) ProtoMessage()

func (*QueryGetPortfolioRequest) Reset

func (m *QueryGetPortfolioRequest) Reset()

func (*QueryGetPortfolioRequest) Size

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

func (*QueryGetPortfolioRequest) String

func (m *QueryGetPortfolioRequest) String() string

func (*QueryGetPortfolioRequest) Unmarshal

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

func (*QueryGetPortfolioRequest) XXX_DiscardUnknown

func (m *QueryGetPortfolioRequest) XXX_DiscardUnknown()

func (*QueryGetPortfolioRequest) XXX_Marshal

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

func (*QueryGetPortfolioRequest) XXX_Merge

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

func (*QueryGetPortfolioRequest) XXX_Size

func (m *QueryGetPortfolioRequest) XXX_Size() int

func (*QueryGetPortfolioRequest) XXX_Unmarshal

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

type QueryGetPortfolioResponse

type QueryGetPortfolioResponse struct {
	TotalPortfolio string `protobuf:"bytes,1,opt,name=total_portfolio,json=totalPortfolio,proto3" json:"total_portfolio,omitempty"`
}

func (*QueryGetPortfolioResponse) Descriptor

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

func (*QueryGetPortfolioResponse) GetTotalPortfolio

func (m *QueryGetPortfolioResponse) GetTotalPortfolio() string

func (*QueryGetPortfolioResponse) Marshal

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

func (*QueryGetPortfolioResponse) MarshalTo

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

func (*QueryGetPortfolioResponse) MarshalToSizedBuffer

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

func (*QueryGetPortfolioResponse) ProtoMessage

func (*QueryGetPortfolioResponse) ProtoMessage()

func (*QueryGetPortfolioResponse) Reset

func (m *QueryGetPortfolioResponse) Reset()

func (*QueryGetPortfolioResponse) Size

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

func (*QueryGetPortfolioResponse) String

func (m *QueryGetPortfolioResponse) String() string

func (*QueryGetPortfolioResponse) Unmarshal

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

func (*QueryGetPortfolioResponse) XXX_DiscardUnknown

func (m *QueryGetPortfolioResponse) XXX_DiscardUnknown()

func (*QueryGetPortfolioResponse) XXX_Marshal

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

func (*QueryGetPortfolioResponse) XXX_Merge

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

func (*QueryGetPortfolioResponse) XXX_Size

func (m *QueryGetPortfolioResponse) XXX_Size() int

func (*QueryGetPortfolioResponse) XXX_Unmarshal

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

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 QueryServer

type QueryServer interface {
	// Parameters queries the parameters of the module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Queries a list of Portfolio items.
	Portfolio(context.Context, *QueryGetPortfolioRequest) (*QueryGetPortfolioResponse, error)
	PortfolioAll(context.Context, *QueryAllPortfolioRequest) (*QueryAllPortfolioResponse, error)
	// Queries a list of CalculateDiscount items.
	CalculateDiscount(context.Context, *QueryCalculateDiscountRequest) (*QueryCalculateDiscountResponse, error)
}

QueryServer is the server API for Query service.

type StakingKeeper

type StakingKeeper interface {
	BondDenom(ctx sdk.Context) string
	GetUnbondingDelegations(ctx sdk.Context, delegator sdk.AccAddress, maxRetrieve uint16) (unbondingDelegations []stakingtypes.UnbondingDelegation)
	GetDelegatorValidators(
		ctx sdk.Context, delegatorAddr sdk.AccAddress, maxRetrieve uint32,
	) stakingtypes.Validators
	GetAllDelegatorDelegations(ctx sdk.Context, delegator sdk.AccAddress) []stakingtypes.Delegation
}

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) SetPortfolio

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) CalculateDiscount

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) Portfolio

func (*UnimplementedQueryServer) PortfolioAll

Jump to

Keyboard shortcuts

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