Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func GetPoolAddress(poolID uint32) sdk.AccAddress
- func GetPoolIDBytes(poolID uint32) (poolIDBz []byte)
- func GetPoolIDFromBytes(bz []byte) (poolID uint32)
- func GetPoolStoreKey(poolID uint32) []byte
- func ParsePoolID(value string) (uint32, error)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- type AccountKeeper
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetNextPoolID() uint32
- func (m *GenesisState) GetParams() Params
- func (m *GenesisState) GetPools() []Pool
- 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 (data *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 Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) GetAllowedServicesIDs() []uint32
- 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 (p *Params) Validate() error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type Pool
- func (p Pool) AddTokensFromDelegation(amount sdk.Coin) (Pool, sdk.DecCoin, error)
- func (*Pool) Descriptor() ([]byte, []int)
- func (p Pool) GetAddress() string
- func (p Pool) GetDelegatorShares() sdk.DecCoins
- func (p Pool) GetDenom() string
- func (p Pool) GetID() uint32
- func (p Pool) GetSharesDenom(tokenDenom string) string
- func (p Pool) GetTokens() sdk.Coins
- func (p Pool) InvalidExRate() bool
- func (m *Pool) Marshal() (dAtA []byte, err error)
- func (m *Pool) MarshalTo(dAtA []byte) (int, error)
- func (m *Pool) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Pool) ProtoMessage()
- func (p Pool) RemoveDelShares(shares sdk.DecCoins) (Pool, sdk.Coins, error)
- func (m *Pool) Reset()
- func (p Pool) SharesFromDecCoins(coins sdk.DecCoins) (sdk.DecCoins, error)
- func (p Pool) SharesFromTokens(amt sdk.Coins) (sdk.DecCoins, error)
- func (p Pool) SharesFromTokensTruncated(amt sdk.Coins) (sdk.DecCoins, error)
- func (m *Pool) Size() (n int)
- func (m *Pool) String() string
- func (p Pool) TokensFromShares(shares sdk.DecCoins) sdk.DecCoins
- func (p Pool) TokensFromSharesTruncated(shares sdk.DecCoins) sdk.DecCoins
- func (m *Pool) Unmarshal(dAtA []byte) error
- func (p Pool) Validate() error
- func (m *Pool) XXX_DiscardUnknown()
- func (m *Pool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Pool) XXX_Merge(src proto.Message)
- func (m *Pool) XXX_Size() int
- func (m *Pool) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryPoolByDenomRequest
- func (*QueryPoolByDenomRequest) Descriptor() ([]byte, []int)
- func (m *QueryPoolByDenomRequest) GetDenom() string
- func (m *QueryPoolByDenomRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryPoolByDenomRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPoolByDenomRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPoolByDenomRequest) ProtoMessage()
- func (m *QueryPoolByDenomRequest) Reset()
- func (m *QueryPoolByDenomRequest) Size() (n int)
- func (m *QueryPoolByDenomRequest) String() string
- func (m *QueryPoolByDenomRequest) Unmarshal(dAtA []byte) error
- func (m *QueryPoolByDenomRequest) XXX_DiscardUnknown()
- func (m *QueryPoolByDenomRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPoolByDenomRequest) XXX_Merge(src proto.Message)
- func (m *QueryPoolByDenomRequest) XXX_Size() int
- func (m *QueryPoolByDenomRequest) XXX_Unmarshal(b []byte) error
- type QueryPoolByIdRequest
- func (*QueryPoolByIdRequest) Descriptor() ([]byte, []int)
- func (m *QueryPoolByIdRequest) GetPoolId() uint32
- func (m *QueryPoolByIdRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryPoolByIdRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPoolByIdRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPoolByIdRequest) ProtoMessage()
- func (m *QueryPoolByIdRequest) Reset()
- func (m *QueryPoolByIdRequest) Size() (n int)
- func (m *QueryPoolByIdRequest) String() string
- func (m *QueryPoolByIdRequest) Unmarshal(dAtA []byte) error
- func (m *QueryPoolByIdRequest) XXX_DiscardUnknown()
- func (m *QueryPoolByIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPoolByIdRequest) XXX_Merge(src proto.Message)
- func (m *QueryPoolByIdRequest) XXX_Size() int
- func (m *QueryPoolByIdRequest) XXX_Unmarshal(b []byte) error
- type QueryPoolResponse
- func (*QueryPoolResponse) Descriptor() ([]byte, []int)
- func (m *QueryPoolResponse) GetPool() Pool
- func (m *QueryPoolResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryPoolResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPoolResponse) ProtoMessage()
- func (m *QueryPoolResponse) Reset()
- func (m *QueryPoolResponse) Size() (n int)
- func (m *QueryPoolResponse) String() string
- func (m *QueryPoolResponse) Unmarshal(dAtA []byte) error
- func (m *QueryPoolResponse) XXX_DiscardUnknown()
- func (m *QueryPoolResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPoolResponse) XXX_Merge(src proto.Message)
- func (m *QueryPoolResponse) XXX_Size() int
- func (m *QueryPoolResponse) XXX_Unmarshal(b []byte) error
- type QueryPoolsRequest
- func (*QueryPoolsRequest) Descriptor() ([]byte, []int)
- func (m *QueryPoolsRequest) GetPagination() *query.PageRequest
- func (m *QueryPoolsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryPoolsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPoolsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPoolsRequest) ProtoMessage()
- func (m *QueryPoolsRequest) Reset()
- func (m *QueryPoolsRequest) Size() (n int)
- func (m *QueryPoolsRequest) String() string
- func (m *QueryPoolsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryPoolsRequest) XXX_DiscardUnknown()
- func (m *QueryPoolsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPoolsRequest) XXX_Merge(src proto.Message)
- func (m *QueryPoolsRequest) XXX_Size() int
- func (m *QueryPoolsRequest) XXX_Unmarshal(b []byte) error
- type QueryPoolsResponse
- func (*QueryPoolsResponse) Descriptor() ([]byte, []int)
- func (m *QueryPoolsResponse) GetPagination() *query.PageResponse
- func (m *QueryPoolsResponse) GetPools() []Pool
- func (m *QueryPoolsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryPoolsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPoolsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPoolsResponse) ProtoMessage()
- func (m *QueryPoolsResponse) Reset()
- func (m *QueryPoolsResponse) Size() (n int)
- func (m *QueryPoolsResponse) String() string
- func (m *QueryPoolsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryPoolsResponse) XXX_DiscardUnknown()
- func (m *QueryPoolsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPoolsResponse) XXX_Merge(src proto.Message)
- func (m *QueryPoolsResponse) XXX_Size() int
- func (m *QueryPoolsResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) PoolByDenom(ctx context.Context, req *QueryPoolByDenomRequest) (*QueryPoolResponse, error)
- func (*UnimplementedQueryServer) PoolByID(ctx context.Context, req *QueryPoolByIdRequest) (*QueryPoolResponse, error)
- func (*UnimplementedQueryServer) Pools(ctx context.Context, req *QueryPoolsRequest) (*QueryPoolsResponse, error)
Constants ¶
const ( ModuleName = "pools" StoreKey = ModuleName )
const (
AttributeKeyPoolID = "pool_id"
)
Variables ¶
var ( ErrPoolNotFound = errors.Wrap(sdkerrors.ErrNotFound, "pool not found") ErrInvalidGenesis = errors.Register(ModuleName, 1, "invalid genesis state") ErrInvalidDenom = errors.Register(ModuleName, 3, "invalid token denom") ErrMultipleTokens = errors.Register(ModuleName, 4, "multiple tokens not allowed") )
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 ( ParamsKey = []byte{0x01} NextPoolIDKey = []byte{0xa1} PoolPrefix = []byte{0xa2} PoolAddressSetPrefix = collections.NewPrefix(0xa3) )
var ( ErrInvalidLengthModels = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowModels = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupModels = fmt.Errorf("proto: unexpected end of group") )
Functions ¶
func GetPoolAddress ¶
func GetPoolAddress(poolID uint32) sdk.AccAddress
GetPoolAddress generates a pool address from its id
func GetPoolIDBytes ¶
GetPoolIDBytes returns the byte representation of the pool ID
func GetPoolIDFromBytes ¶
GetPoolIDFromBytes returns the pool ID from a byte array
func GetPoolStoreKey ¶
GetPoolStoreKey turns a pool ID into a key used to store a pool in the KVStore
func ParsePoolID ¶
ParsePoolID parses a pool id from a string
func RegisterQueryHandler ¶
RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterQueryHandlerClient ¶
func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.
func RegisterQueryHandlerFromEndpoint ¶
func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterQueryHandlerServer ¶
func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
Types ¶
type AccountKeeper ¶
type GenesisState ¶
type GenesisState struct { // Params defines the parameters of the module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` // NextPoolID represents the id to be used when creating the next pool. NextPoolID uint32 `protobuf:"varint,2,opt,name=next_pool_id,json=nextPoolId,proto3" json:"next_pool_id,omitempty" yaml:"next_pool_id"` // Pools defines the list of pools. Pools []Pool `protobuf:"bytes,3,rep,name=pools,proto3" json:"pools" yaml:"pools"` }
GenesisState defines the pools module's genesis state.
func DefaultGenesis ¶
func DefaultGenesis() *GenesisState
DefaultGenesis returns the default GenesisState
func NewGenesis ¶
func NewGenesis(params Params, nextPoolID uint32, pools []Pool) *GenesisState
NewGenesis creates a new GenesisState instance
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetNextPoolID ¶
func (m *GenesisState) GetNextPoolID() uint32
func (*GenesisState) GetParams ¶
func (m *GenesisState) GetParams() Params
func (*GenesisState) GetPools ¶
func (m *GenesisState) GetPools() []Pool
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 (data *GenesisState) Validate() error
Validate checks if the GenesisState is valid
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 Params ¶
type Params struct { // AllowedServicesIDs defines the list of service IDs that the module allows // to join by pools. AllowedServicesIDs []uint32 `protobuf:"varint,1,rep,packed,name=allowed_services_ids,json=allowedServicesIds,proto3" json:"allowed_services_ids,omitempty"` }
Params defines the parameters for the pools module.
func DefaultParams ¶
func DefaultParams() Params
DefaultParams return a Params instance with default values set
func (*Params) Descriptor ¶
func (*Params) GetAllowedServicesIDs ¶
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 Pool ¶
type Pool struct { // ID is the auto-generated unique identifier for the pool ID uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Denom represents the denomination of the tokens that are staked in the pool Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` // Address represents the address of the account that is associated with this // pool. This will be used to store tokens that users delegate to this pool. Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` // Tokens define the delegated tokens. Tokens cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=tokens,proto3,customtype=cosmossdk.io/math.Int" json:"tokens"` DelegatorShares cosmossdk_io_math.LegacyDec `` /* 135-byte string literal not displayed */ }
Pool defines the structure of a restaking pool
func (Pool) AddTokensFromDelegation ¶
AddTokensFromDelegation adds the given amount of tokens to the pool's total tokens, also updating the pool's delegator shares. It returns the updated pool and the shares issued.
func (*Pool) Descriptor ¶
func (Pool) GetAddress ¶
func (Pool) GetDelegatorShares ¶
GetDelegatorShares returns delegator shares of the pool as sdk.DecCoins.
func (Pool) GetSharesDenom ¶
GetSharesDenom returns the shares denom for a pool and token denom
func (Pool) InvalidExRate ¶
InvalidExRate returns whether the exchange rates is invalid. This can happen e.g. if Pool loses all tokens due to slashing. In this case, make all future delegations invalid.
func (*Pool) ProtoMessage ¶
func (*Pool) ProtoMessage()
func (Pool) RemoveDelShares ¶
RemoveDelShares removes delegator shares from an operator and returns the amount of tokens that should be issued for those shares. NOTE: Because token fractions are left in the operator, the exchange rate of future shares of this validator can increase.
func (Pool) SharesFromDecCoins ¶
SharesFromDecCoins returns the shares of a delegation given a bond amount. It returns an error if the service has no tokens.
func (Pool) SharesFromTokens ¶
SharesFromTokens returns the shares of a delegation given a bond amount. It returns an error if the pool has no tokens.
func (Pool) SharesFromTokensTruncated ¶
SharesFromTokensTruncated returns the truncated shares of a delegation given a bond amount. It returns an error if the pool has no tokens.
func (Pool) TokensFromShares ¶
TokensFromShares calculates the token worth of provided shares
func (Pool) TokensFromSharesTruncated ¶
TokensFromSharesTruncated calculates the token worth of provided shares, truncated
func (*Pool) XXX_DiscardUnknown ¶
func (m *Pool) XXX_DiscardUnknown()
func (*Pool) XXX_Unmarshal ¶
type QueryClient ¶
type QueryClient interface { // PoolByID defines a gRPC query method that returns the pool by the given ID. PoolByID(ctx context.Context, in *QueryPoolByIdRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error) // PoolByDenom defines a gRPC query method that returns the pool by the given // denom. PoolByDenom(ctx context.Context, in *QueryPoolByDenomRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error) // Pools defines a gRPC query method that returns all pools. Pools(ctx context.Context, in *QueryPoolsRequest, opts ...grpc.CallOption) (*QueryPoolsResponse, 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 QueryPoolByDenomRequest ¶
type QueryPoolByDenomRequest struct { // Denom is the denom for which the pool is to be queried Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` }
QueryPoolByDenomRequest is the request type for the Query/PollByDenom RPC method.
func NewQueryPoolByDenomRequest ¶
func NewQueryPoolByDenomRequest(denom string) *QueryPoolByDenomRequest
NewQueryPoolByDenomRequest creates a new instance of QueryPoolByDenomRequest
func (*QueryPoolByDenomRequest) Descriptor ¶
func (*QueryPoolByDenomRequest) Descriptor() ([]byte, []int)
func (*QueryPoolByDenomRequest) GetDenom ¶
func (m *QueryPoolByDenomRequest) GetDenom() string
func (*QueryPoolByDenomRequest) Marshal ¶
func (m *QueryPoolByDenomRequest) Marshal() (dAtA []byte, err error)
func (*QueryPoolByDenomRequest) MarshalTo ¶
func (m *QueryPoolByDenomRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryPoolByDenomRequest) MarshalToSizedBuffer ¶
func (m *QueryPoolByDenomRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPoolByDenomRequest) ProtoMessage ¶
func (*QueryPoolByDenomRequest) ProtoMessage()
func (*QueryPoolByDenomRequest) Reset ¶
func (m *QueryPoolByDenomRequest) Reset()
func (*QueryPoolByDenomRequest) Size ¶
func (m *QueryPoolByDenomRequest) Size() (n int)
func (*QueryPoolByDenomRequest) String ¶
func (m *QueryPoolByDenomRequest) String() string
func (*QueryPoolByDenomRequest) Unmarshal ¶
func (m *QueryPoolByDenomRequest) Unmarshal(dAtA []byte) error
func (*QueryPoolByDenomRequest) XXX_DiscardUnknown ¶
func (m *QueryPoolByDenomRequest) XXX_DiscardUnknown()
func (*QueryPoolByDenomRequest) XXX_Marshal ¶
func (m *QueryPoolByDenomRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPoolByDenomRequest) XXX_Merge ¶
func (m *QueryPoolByDenomRequest) XXX_Merge(src proto.Message)
func (*QueryPoolByDenomRequest) XXX_Size ¶
func (m *QueryPoolByDenomRequest) XXX_Size() int
func (*QueryPoolByDenomRequest) XXX_Unmarshal ¶
func (m *QueryPoolByDenomRequest) XXX_Unmarshal(b []byte) error
type QueryPoolByIdRequest ¶
type QueryPoolByIdRequest struct { // PoolID is the ID of the pool to query PoolId uint32 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` }
QueryPoolByIdRequest is the request type for the Query/PoolById RPC method.
func NewQueryPoolByIDRequest ¶
func NewQueryPoolByIDRequest(poolID uint32) *QueryPoolByIdRequest
NewQueryPoolByIDRequest creates a new instance of QueryPoolByIdRequest
func (*QueryPoolByIdRequest) Descriptor ¶
func (*QueryPoolByIdRequest) Descriptor() ([]byte, []int)
func (*QueryPoolByIdRequest) GetPoolId ¶
func (m *QueryPoolByIdRequest) GetPoolId() uint32
func (*QueryPoolByIdRequest) Marshal ¶
func (m *QueryPoolByIdRequest) Marshal() (dAtA []byte, err error)
func (*QueryPoolByIdRequest) MarshalTo ¶
func (m *QueryPoolByIdRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryPoolByIdRequest) MarshalToSizedBuffer ¶
func (m *QueryPoolByIdRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPoolByIdRequest) ProtoMessage ¶
func (*QueryPoolByIdRequest) ProtoMessage()
func (*QueryPoolByIdRequest) Reset ¶
func (m *QueryPoolByIdRequest) Reset()
func (*QueryPoolByIdRequest) Size ¶
func (m *QueryPoolByIdRequest) Size() (n int)
func (*QueryPoolByIdRequest) String ¶
func (m *QueryPoolByIdRequest) String() string
func (*QueryPoolByIdRequest) Unmarshal ¶
func (m *QueryPoolByIdRequest) Unmarshal(dAtA []byte) error
func (*QueryPoolByIdRequest) XXX_DiscardUnknown ¶
func (m *QueryPoolByIdRequest) XXX_DiscardUnknown()
func (*QueryPoolByIdRequest) XXX_Marshal ¶
func (m *QueryPoolByIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPoolByIdRequest) XXX_Merge ¶
func (m *QueryPoolByIdRequest) XXX_Merge(src proto.Message)
func (*QueryPoolByIdRequest) XXX_Size ¶
func (m *QueryPoolByIdRequest) XXX_Size() int
func (*QueryPoolByIdRequest) XXX_Unmarshal ¶
func (m *QueryPoolByIdRequest) XXX_Unmarshal(b []byte) error
type QueryPoolResponse ¶
type QueryPoolResponse struct { // Pool is the queried pool Pool Pool `protobuf:"bytes,1,opt,name=pool,proto3" json:"pool"` }
QueryPoolResponse is the response type for the Query/PoolById and Query/PoolByDenom RPC methods.
func (*QueryPoolResponse) Descriptor ¶
func (*QueryPoolResponse) Descriptor() ([]byte, []int)
func (*QueryPoolResponse) GetPool ¶
func (m *QueryPoolResponse) GetPool() Pool
func (*QueryPoolResponse) Marshal ¶
func (m *QueryPoolResponse) Marshal() (dAtA []byte, err error)
func (*QueryPoolResponse) MarshalTo ¶
func (m *QueryPoolResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryPoolResponse) MarshalToSizedBuffer ¶
func (m *QueryPoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPoolResponse) ProtoMessage ¶
func (*QueryPoolResponse) ProtoMessage()
func (*QueryPoolResponse) Reset ¶
func (m *QueryPoolResponse) Reset()
func (*QueryPoolResponse) Size ¶
func (m *QueryPoolResponse) Size() (n int)
func (*QueryPoolResponse) String ¶
func (m *QueryPoolResponse) String() string
func (*QueryPoolResponse) Unmarshal ¶
func (m *QueryPoolResponse) Unmarshal(dAtA []byte) error
func (*QueryPoolResponse) XXX_DiscardUnknown ¶
func (m *QueryPoolResponse) XXX_DiscardUnknown()
func (*QueryPoolResponse) XXX_Marshal ¶
func (m *QueryPoolResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPoolResponse) XXX_Merge ¶
func (m *QueryPoolResponse) XXX_Merge(src proto.Message)
func (*QueryPoolResponse) XXX_Size ¶
func (m *QueryPoolResponse) XXX_Size() int
func (*QueryPoolResponse) XXX_Unmarshal ¶
func (m *QueryPoolResponse) XXX_Unmarshal(b []byte) error
type QueryPoolsRequest ¶
type QueryPoolsRequest struct {
Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}
QueryPoolsRequest is the request type for the Query/Pools RPC method.
func NewQueryPoolsRequest ¶
func NewQueryPoolsRequest(pagination *query.PageRequest) *QueryPoolsRequest
NewQueryPoolsRequest creates a new instance of QueryPoolsRequest
func (*QueryPoolsRequest) Descriptor ¶
func (*QueryPoolsRequest) Descriptor() ([]byte, []int)
func (*QueryPoolsRequest) GetPagination ¶
func (m *QueryPoolsRequest) GetPagination() *query.PageRequest
func (*QueryPoolsRequest) Marshal ¶
func (m *QueryPoolsRequest) Marshal() (dAtA []byte, err error)
func (*QueryPoolsRequest) MarshalTo ¶
func (m *QueryPoolsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryPoolsRequest) MarshalToSizedBuffer ¶
func (m *QueryPoolsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPoolsRequest) ProtoMessage ¶
func (*QueryPoolsRequest) ProtoMessage()
func (*QueryPoolsRequest) Reset ¶
func (m *QueryPoolsRequest) Reset()
func (*QueryPoolsRequest) Size ¶
func (m *QueryPoolsRequest) Size() (n int)
func (*QueryPoolsRequest) String ¶
func (m *QueryPoolsRequest) String() string
func (*QueryPoolsRequest) Unmarshal ¶
func (m *QueryPoolsRequest) Unmarshal(dAtA []byte) error
func (*QueryPoolsRequest) XXX_DiscardUnknown ¶
func (m *QueryPoolsRequest) XXX_DiscardUnknown()
func (*QueryPoolsRequest) XXX_Marshal ¶
func (m *QueryPoolsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPoolsRequest) XXX_Merge ¶
func (m *QueryPoolsRequest) XXX_Merge(src proto.Message)
func (*QueryPoolsRequest) XXX_Size ¶
func (m *QueryPoolsRequest) XXX_Size() int
func (*QueryPoolsRequest) XXX_Unmarshal ¶
func (m *QueryPoolsRequest) XXX_Unmarshal(b []byte) error
type QueryPoolsResponse ¶
type QueryPoolsResponse struct { // Pools is the list of pool Pools []Pool `protobuf:"bytes,1,rep,name=pools,proto3" json:"pools"` // Pagination defines the pagination response Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryPoolsResponse is the response type for the Query/Pools RPC method.
func (*QueryPoolsResponse) Descriptor ¶
func (*QueryPoolsResponse) Descriptor() ([]byte, []int)
func (*QueryPoolsResponse) GetPagination ¶
func (m *QueryPoolsResponse) GetPagination() *query.PageResponse
func (*QueryPoolsResponse) GetPools ¶
func (m *QueryPoolsResponse) GetPools() []Pool
func (*QueryPoolsResponse) Marshal ¶
func (m *QueryPoolsResponse) Marshal() (dAtA []byte, err error)
func (*QueryPoolsResponse) MarshalTo ¶
func (m *QueryPoolsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryPoolsResponse) MarshalToSizedBuffer ¶
func (m *QueryPoolsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPoolsResponse) ProtoMessage ¶
func (*QueryPoolsResponse) ProtoMessage()
func (*QueryPoolsResponse) Reset ¶
func (m *QueryPoolsResponse) Reset()
func (*QueryPoolsResponse) Size ¶
func (m *QueryPoolsResponse) Size() (n int)
func (*QueryPoolsResponse) String ¶
func (m *QueryPoolsResponse) String() string
func (*QueryPoolsResponse) Unmarshal ¶
func (m *QueryPoolsResponse) Unmarshal(dAtA []byte) error
func (*QueryPoolsResponse) XXX_DiscardUnknown ¶
func (m *QueryPoolsResponse) XXX_DiscardUnknown()
func (*QueryPoolsResponse) XXX_Marshal ¶
func (m *QueryPoolsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPoolsResponse) XXX_Merge ¶
func (m *QueryPoolsResponse) XXX_Merge(src proto.Message)
func (*QueryPoolsResponse) XXX_Size ¶
func (m *QueryPoolsResponse) XXX_Size() int
func (*QueryPoolsResponse) XXX_Unmarshal ¶
func (m *QueryPoolsResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { // PoolByID defines a gRPC query method that returns the pool by the given ID. PoolByID(context.Context, *QueryPoolByIdRequest) (*QueryPoolResponse, error) // PoolByDenom defines a gRPC query method that returns the pool by the given // denom. PoolByDenom(context.Context, *QueryPoolByDenomRequest) (*QueryPoolResponse, error) // Pools defines a gRPC query method that returns all pools. Pools(context.Context, *QueryPoolsRequest) (*QueryPoolsResponse, error) }
QueryServer is the server API for Query service.
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) PoolByDenom ¶
func (*UnimplementedQueryServer) PoolByDenom(ctx context.Context, req *QueryPoolByDenomRequest) (*QueryPoolResponse, error)
func (*UnimplementedQueryServer) PoolByID ¶
func (*UnimplementedQueryServer) PoolByID(ctx context.Context, req *QueryPoolByIdRequest) (*QueryPoolResponse, error)
func (*UnimplementedQueryServer) Pools ¶
func (*UnimplementedQueryServer) Pools(ctx context.Context, req *QueryPoolsRequest) (*QueryPoolsResponse, error)