types

package
v6.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	ModuleName = "pools"
	StoreKey   = ModuleName
)
View Source
const (
	AttributeKeyPoolID = "pool_id"
)

Variables

View Source
var (
	ErrPoolNotFound       = errors.Wrap(sdkerrors.ErrNotFound, "pool not found")
	ErrInvalidGenesis     = errors.Register(ModuleName, 1, "invalid genesis state")
	ErrInsufficientShares = errors.Register(ModuleName, 2, "insufficient delegation shares")
	ErrInvalidDenom       = errors.Register(ModuleName, 3, "invalid token denom")
	ErrMultipleTokens     = errors.Register(ModuleName, 4, "multiple tokens not allowed")
	ErrInvalidShares      = errors.Register(ModuleName, 5, "invalid shares")
)
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 (
	NextPoolIDKey        = []byte{0xa1}
	PoolPrefix           = []byte{0xa2}
	PoolAddressSetPrefix = []byte{0xa3}
)
View Source
var (
	ErrInvalidLengthModels        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowModels          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupModels = 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 Query_serviceDesc = _Query_serviceDesc

Functions

func GetPoolAddress

func GetPoolAddress(poolID uint32) sdk.AccAddress

GetPoolAddress generates a pool address from its id

func GetPoolIDBytes

func GetPoolIDBytes(poolID uint32) (poolIDBz []byte)

GetPoolIDBytes returns the byte representation of the pool ID

func ParsePoolID

func ParsePoolID(value string) (uint32, error)

ParsePoolID parses a pool id from a string

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 {
	NewAccountWithAddress(ctx context.Context, addr sdk.AccAddress) sdk.AccountI
	HasAccount(ctx context.Context, addr sdk.AccAddress) bool
	SetAccount(ctx context.Context, acc sdk.AccountI)
}

type GenesisState

type GenesisState struct {
	// NextPoolID represents the id to be used when creating the next pool.
	NextPoolID uint32 `protobuf:"varint,1,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,2,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(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) GetPools

func (m *GenesisState) GetPools() []Pool

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 (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 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 defines total shares issued to a pool's delegators.
	DelegatorShares cosmossdk_io_math.LegacyDec `` /* 135-byte string literal not displayed */
}

Pool defines the structure of a restaking pool

func NewPool

func NewPool(id uint32, denom string) Pool

NewPool creates a new Pool instance

func (Pool) AddTokensFromDelegation

func (p Pool) AddTokensFromDelegation(amount sdk.Coin) (Pool, sdk.DecCoin, error)

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) Descriptor() ([]byte, []int)

func (Pool) GetAddress

func (p Pool) GetAddress() string

func (Pool) GetDelegatorShares

func (p Pool) GetDelegatorShares() sdk.DecCoins

GetDelegatorShares returns delegator shares of the pool as sdk.DecCoins.

func (Pool) GetDenom

func (p Pool) GetDenom() string

func (Pool) GetID

func (p Pool) GetID() uint32

func (Pool) GetSharesDenom

func (p Pool) GetSharesDenom(tokenDenom string) string

GetSharesDenom returns the shares denom for a pool and token denom

func (Pool) GetTokens

func (p Pool) GetTokens() sdk.Coins

GetTokens returns the pool's tokens as sdk.Coins.

func (Pool) InvalidExRate

func (p Pool) InvalidExRate() bool

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) Marshal

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

func (*Pool) MarshalTo

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

func (*Pool) MarshalToSizedBuffer

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

func (*Pool) ProtoMessage

func (*Pool) ProtoMessage()

func (Pool) RemoveDelShares

func (p Pool) RemoveDelShares(shares sdk.DecCoins) (Pool, sdk.Coins, error)

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) Reset

func (m *Pool) Reset()

func (Pool) SharesFromDecCoins

func (p Pool) SharesFromDecCoins(coins sdk.DecCoins) (sdk.DecCoins, error)

SharesFromDecCoins returns the shares of a delegation given a bond amount. It returns an error if the service has no tokens.

func (Pool) SharesFromTokens

func (p Pool) SharesFromTokens(amt sdk.Coins) (sdk.DecCoins, error)

SharesFromTokens returns the shares of a delegation given a bond amount. It returns an error if the pool has no tokens.

func (Pool) SharesFromTokensTruncated

func (p Pool) SharesFromTokensTruncated(amt sdk.Coins) (sdk.DecCoins, error)

SharesFromTokensTruncated returns the truncated shares of a delegation given a bond amount. It returns an error if the pool has no tokens.

func (*Pool) Size

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

func (*Pool) String

func (m *Pool) String() string

func (Pool) TokensFromShares

func (p Pool) TokensFromShares(shares sdk.DecCoins) sdk.DecCoins

TokensFromShares calculates the token worth of provided shares

func (Pool) TokensFromSharesTruncated

func (p Pool) TokensFromSharesTruncated(shares sdk.DecCoins) sdk.DecCoins

TokensFromSharesTruncated calculates the token worth of provided shares, truncated

func (*Pool) Unmarshal

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

func (Pool) Validate

func (p Pool) Validate() error

Validate checks if the pool is valid

func (*Pool) XXX_DiscardUnknown

func (m *Pool) XXX_DiscardUnknown()

func (*Pool) XXX_Marshal

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

func (*Pool) XXX_Merge

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

func (*Pool) XXX_Size

func (m *Pool) XXX_Size() int

func (*Pool) XXX_Unmarshal

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

type PoolsHooks

type PoolsHooks interface {
	AfterPoolCreated(ctx context.Context, poolID uint32) error
}

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) PoolByID

func (*UnimplementedQueryServer) Pools

Jump to

Keyboard shortcuts

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