types

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 License: Apache-2.0 Imports: 30 Imported by: 39

Documentation

Overview

nolint

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeSwap            = "swap"
	EventTypeAddLiquidity    = "add_liquidity"
	EventTypeRemoveLiquidity = "remove_liquidity"

	AttributeValueAmount     = "amount"
	AttributeValueSender     = "sender"
	AttributeValueRecipient  = "recipient"
	AttributeValueIsBuyOrder = "is_buy_order"
	AttributeValueTokenPair  = "token_pair"

	AttributeValueCategory = ModuleName
)

coinswap module event types

View Source
const (
	// ModuleName is the name of the module.
	ModuleName = "coinswap"

	// RouterKey is the message route for the coinswap module.
	RouterKey = ModuleName

	// StoreKey is the default store key for the coinswap module.
	StoreKey = ModuleName

	// QuerierRoute is the querier route for the coinswap module.
	QuerierRoute = StoreKey
)
View Source
const (
	FormatUniABSPrefix = "uni:"   // format uni ABS Prefix
	FormatUniDenom     = "uni:%s" // format uni denom

	TypeMsgAddLiquidity    = "add_liquidity"    // type for MsgAddLiquidity
	TypeMsgRemoveLiquidity = "remove_liquidity" // type for MsgRemoveLiquidity
	TypeMsgSwapOrder       = "swap_order"       // type for MsgSwapOrder
)
View Source
const (
	// QueryLiquidity liquidity query endpoint supported by the coinswap querier
	QueryLiquidity = "liquidity"
)
View Source
const (
	// StandardDenom for coinswap
	StandardDenom = sdk.DefaultBondDenom
)

Variables

View Source
var (
	ErrInvalidLengthCoinswap        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowCoinswap          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupCoinswap = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrReservePoolNotExists    = sdkerrors.Register(ModuleName, 1, "reserve pool not exists")
	ErrEqualDenom              = sdkerrors.Register(ModuleName, 2, "input and output denomination are equal")
	ErrNotContainStandardDenom = sdkerrors.Register(ModuleName, 3, "must have one standard denom")
	ErrMustStandardDenom       = sdkerrors.Register(ModuleName, 4, "must be standard denom")
	ErrInvalidDenom            = sdkerrors.Register(ModuleName, 5, "invalid denom")
	ErrInvalidDeadline         = sdkerrors.Register(ModuleName, 6, "invalid deadline")
	ErrConstraintNotMet        = sdkerrors.Register(ModuleName, 7, "constraint not met")
	ErrInsufficientFunds       = sdkerrors.Register(ModuleName, 8, "insufficient funds")
)

coinswap 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 (
	KeyFee           = []byte("Fee")           // fee key
	KeyStandardDenom = []byte("StandardDenom") // standard token denom key
)

Parameter store keys

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 (
	ModuleCdc = codec.NewAminoCodec(amino)
)

Functions

func CheckUniDenom

func CheckUniDenom(uniDenom string) error

CheckUniDenom returns nil if the uni denom is valid

func GetCoinDenomFromUniDenom

func GetCoinDenomFromUniDenom(uniDenom string) (string, error)

GetCoinDenomFromUniDenom returns the token denom by uni denom

func GetReservePoolAddr

func GetReservePoolAddr(uniDenom string) sdk.AccAddress

GetReservePoolAddr returns the poor address for the provided provided liquidity denomination.

func GetTokenPairByDenom

func GetTokenPairByDenom(inputDenom, outputDenom string) string

GetTokenPairByDenom return the token pair for the provided denominations

func GetUniDenomFromDenom

func GetUniDenomFromDenom(denom string) (string, error)

GetUniDenomFromDenom returns the uni denom for the provided denomination.

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamTypeTable returns the TypeTable for coinswap module

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers concrete types on the codec.

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)

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

ValidateGenesis - placeholder function

Types

type AccountKeeper

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

AccountKeeper defines the expected account keeper

type BankKeeper

type BankKeeper interface {
	SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
	GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin

	GetSupply(ctx sdk.Context) bankexported.SupplyI
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
	BurnCoins(ctx sdk.Context, name string, amt sdk.Coins) error
	MintCoins(ctx sdk.Context, name string, amt sdk.Coins) error
}

BankKeeper defines the expected bank send keeper

type GenesisState

type GenesisState struct {
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

GenesisState defines the coinswap module's genesis state.

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState creates a default GenesisState object

func NewGenesisState

func NewGenesisState(params Params) *GenesisState

NewGenesisState is the constructor function for GenesisState

func (*GenesisState) Descriptor

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

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

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

type Input struct {
	Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"`
	Coin    types.Coin                                    `protobuf:"bytes,2,opt,name=coin,proto3" json:"coin"`
}

Input defines the properties of order's input

func (*Input) Descriptor

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

func (*Input) Marshal

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

func (*Input) MarshalTo

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

func (*Input) MarshalToSizedBuffer

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

func (*Input) ProtoMessage

func (*Input) ProtoMessage()

func (*Input) Reset

func (m *Input) Reset()

func (*Input) Size

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

func (*Input) String

func (m *Input) String() string

func (*Input) Unmarshal

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

func (*Input) XXX_DiscardUnknown

func (m *Input) XXX_DiscardUnknown()

func (*Input) XXX_Marshal

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

func (*Input) XXX_Merge

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

func (*Input) XXX_Size

func (m *Input) XXX_Size() int

func (*Input) XXX_Unmarshal

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

type MsgAddLiquidity

type MsgAddLiquidity struct {
	MaxToken         types.Coin                                    `protobuf:"bytes,1,opt,name=max_token,json=maxToken,proto3" json:"max_token" yaml:"max_token"`
	ExactStandardAmt github_com_cosmos_cosmos_sdk_types.Int        `` /* 177-byte string literal not displayed */
	MinLiquidity     github_com_cosmos_cosmos_sdk_types.Int        `` /* 158-byte string literal not displayed */
	Deadline         int64                                         `protobuf:"varint,4,opt,name=deadline,proto3" json:"deadline,omitempty"`
	Sender           github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,5,opt,name=sender,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"sender,omitempty"`
}

MsgAddLiquidity represents a msg for adding liquidity to a reserve pool

func NewMsgAddLiquidity

func NewMsgAddLiquidity(
	maxToken sdk.Coin,
	exactStandardAmt sdk.Int,
	minLiquidity sdk.Int,
	deadline int64,
	sender sdk.AccAddress,
) *MsgAddLiquidity

NewMsgAddLiquidity creates a new MsgAddLiquidity object.

func (*MsgAddLiquidity) Descriptor

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

func (MsgAddLiquidity) GetSignBytes

func (msg MsgAddLiquidity) GetSignBytes() []byte

GetSignBytes implements Msg.

func (MsgAddLiquidity) GetSigners

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

GetSigners implements Msg.

func (*MsgAddLiquidity) Marshal

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

func (*MsgAddLiquidity) MarshalTo

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

func (*MsgAddLiquidity) MarshalToSizedBuffer

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

func (*MsgAddLiquidity) ProtoMessage

func (*MsgAddLiquidity) ProtoMessage()

func (*MsgAddLiquidity) Reset

func (m *MsgAddLiquidity) Reset()

func (MsgAddLiquidity) Route

func (msg MsgAddLiquidity) Route() string

Route implements Msg.

func (*MsgAddLiquidity) Size

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

func (*MsgAddLiquidity) String

func (m *MsgAddLiquidity) String() string

func (MsgAddLiquidity) Type

func (msg MsgAddLiquidity) Type() string

Type implements Msg.

func (*MsgAddLiquidity) Unmarshal

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

func (MsgAddLiquidity) ValidateBasic

func (msg MsgAddLiquidity) ValidateBasic() error

ValidateBasic implements Msg.

func (*MsgAddLiquidity) XXX_DiscardUnknown

func (m *MsgAddLiquidity) XXX_DiscardUnknown()

func (*MsgAddLiquidity) XXX_Marshal

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

func (*MsgAddLiquidity) XXX_Merge

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

func (*MsgAddLiquidity) XXX_Size

func (m *MsgAddLiquidity) XXX_Size() int

func (*MsgAddLiquidity) XXX_Unmarshal

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

type MsgRemoveLiquidity

type MsgRemoveLiquidity struct {
	WithdrawLiquidity types.Coin                                    `` /* 128-byte string literal not displayed */
	MinToken          github_com_cosmos_cosmos_sdk_types.Int        `` /* 142-byte string literal not displayed */
	MinStandardAmt    github_com_cosmos_cosmos_sdk_types.Int        `` /* 169-byte string literal not displayed */
	Deadline          int64                                         `protobuf:"varint,4,opt,name=deadline,proto3" json:"deadline,omitempty"`
	Sender            github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,5,opt,name=sender,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"sender,omitempty"`
}

MsgRemoveLiquidity - struct for removing liquidity from a reserve pool

func NewMsgRemoveLiquidity

func NewMsgRemoveLiquidity(
	minToken sdk.Int,
	withdrawLiquidity sdk.Coin,
	minStandardAmt sdk.Int,
	deadline int64,
	sender sdk.AccAddress,
) *MsgRemoveLiquidity

NewMsgRemoveLiquidity creates a new MsgRemoveLiquidity object

func (*MsgRemoveLiquidity) Descriptor

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

func (MsgRemoveLiquidity) GetSignBytes

func (msg MsgRemoveLiquidity) GetSignBytes() []byte

GetSignBytes implements Msg.

func (MsgRemoveLiquidity) GetSigners

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

GetSigners implements Msg.

func (*MsgRemoveLiquidity) Marshal

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

func (*MsgRemoveLiquidity) MarshalTo

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

func (*MsgRemoveLiquidity) MarshalToSizedBuffer

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

func (*MsgRemoveLiquidity) ProtoMessage

func (*MsgRemoveLiquidity) ProtoMessage()

func (*MsgRemoveLiquidity) Reset

func (m *MsgRemoveLiquidity) Reset()

func (MsgRemoveLiquidity) Route

func (msg MsgRemoveLiquidity) Route() string

Route implements Msg.

func (*MsgRemoveLiquidity) Size

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

func (*MsgRemoveLiquidity) String

func (m *MsgRemoveLiquidity) String() string

func (MsgRemoveLiquidity) Type

func (msg MsgRemoveLiquidity) Type() string

Type implements Msg.

func (*MsgRemoveLiquidity) Unmarshal

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

func (MsgRemoveLiquidity) ValidateBasic

func (msg MsgRemoveLiquidity) ValidateBasic() error

ValidateBasic implements Msg.

func (*MsgRemoveLiquidity) XXX_DiscardUnknown

func (m *MsgRemoveLiquidity) XXX_DiscardUnknown()

func (*MsgRemoveLiquidity) XXX_Marshal

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

func (*MsgRemoveLiquidity) XXX_Merge

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

func (*MsgRemoveLiquidity) XXX_Size

func (m *MsgRemoveLiquidity) XXX_Size() int

func (*MsgRemoveLiquidity) XXX_Unmarshal

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

type MsgSwapOrder

type MsgSwapOrder struct {
	Input      Input  `protobuf:"bytes,1,opt,name=input,proto3" json:"input"`
	Output     Output `protobuf:"bytes,2,opt,name=output,proto3" json:"output"`
	Deadline   int64  `protobuf:"varint,3,opt,name=deadline,proto3" json:"deadline,omitempty"`
	IsBuyOrder bool   `protobuf:"varint,4,opt,name=is_buy_order,json=isBuyOrder,proto3" json:"is_buy_order,omitempty" yaml:"is_buy_order"`
}

MsgSwapOrder represents a msg for swap order

func NewMsgSwapOrder

func NewMsgSwapOrder(
	input Input,
	output Output,
	deadline int64,
	isBuyOrder bool,
) *MsgSwapOrder

NewMsgSwapOrder creates a new MsgSwapOrder object.

func (*MsgSwapOrder) Descriptor

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

func (MsgSwapOrder) GetSignBytes

func (msg MsgSwapOrder) GetSignBytes() []byte

GetSignBytes implements Msg.

func (MsgSwapOrder) GetSigners

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

GetSigners implements Msg.

func (*MsgSwapOrder) Marshal

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

func (*MsgSwapOrder) MarshalTo

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

func (*MsgSwapOrder) MarshalToSizedBuffer

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

func (*MsgSwapOrder) ProtoMessage

func (*MsgSwapOrder) ProtoMessage()

func (*MsgSwapOrder) Reset

func (m *MsgSwapOrder) Reset()

func (MsgSwapOrder) Route

func (msg MsgSwapOrder) Route() string

Route implements Msg.

func (*MsgSwapOrder) Size

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

func (*MsgSwapOrder) String

func (m *MsgSwapOrder) String() string

func (MsgSwapOrder) Type

func (msg MsgSwapOrder) Type() string

Type implements Msg.

func (*MsgSwapOrder) Unmarshal

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

func (MsgSwapOrder) ValidateBasic

func (msg MsgSwapOrder) ValidateBasic() error

ValidateBasic implements Msg.

func (*MsgSwapOrder) XXX_DiscardUnknown

func (m *MsgSwapOrder) XXX_DiscardUnknown()

func (*MsgSwapOrder) XXX_Marshal

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

func (*MsgSwapOrder) XXX_Merge

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

func (*MsgSwapOrder) XXX_Size

func (m *MsgSwapOrder) XXX_Size() int

func (*MsgSwapOrder) XXX_Unmarshal

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

type Output

type Output struct {
	Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"`
	Coin    types.Coin                                    `protobuf:"bytes,2,opt,name=coin,proto3" json:"coin"`
}

Output defines the properties of order's output

func (*Output) Descriptor

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

func (*Output) Marshal

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

func (*Output) MarshalTo

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

func (*Output) MarshalToSizedBuffer

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

func (*Output) ProtoMessage

func (*Output) ProtoMessage()

func (*Output) Reset

func (m *Output) Reset()

func (*Output) Size

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

func (*Output) String

func (m *Output) String() string

func (*Output) Unmarshal

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

func (*Output) XXX_DiscardUnknown

func (m *Output) XXX_DiscardUnknown()

func (*Output) XXX_Marshal

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

func (*Output) XXX_Merge

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

func (*Output) XXX_Size

func (m *Output) XXX_Size() int

func (*Output) XXX_Unmarshal

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

type Params

type Params struct {
	Fee           github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=fee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"fee"`
	StandardDenom string                                 `protobuf:"bytes,2,opt,name=standard_denom,json=standardDenom,proto3" json:"standard_denom,omitempty" yaml:"standard_denom"`
}

token parameters

func DefaultParams

func DefaultParams() Params

DefaultParams returns the default coinswap module parameters

func NewParams

func NewParams(fee sdk.Dec, feeDenom string) Params

NewParams coinswap paramtypes constructor

func (*Params) Descriptor

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

func (*Params) Equal

func (this *Params) Equal(that interface{}) bool

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

KeyValuePairs implements paramtypes.KeyValuePairs

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 returns a human readable string representation of the parameters.

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

Validate returns err if Params is invalid

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 QueryClient

type QueryClient interface {
	// Liquidity returns the total liquidity available for the provided denomination
	Liquidity(ctx context.Context, in *QueryLiquidityRequest, opts ...grpc.CallOption) (*QueryLiquidityResponse, 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 QueryLiquidityParams

type QueryLiquidityParams struct {
	ID string `json:"id" yaml:"id"` // same as uniDenom
}

QueryLiquidityParams is the query parameters for 'custom/swap/liquidity'

type QueryLiquidityRequest

type QueryLiquidityRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}

QueryLiquidityRequest is request type for the Query/Liquidity RPC method

func (*QueryLiquidityRequest) Descriptor

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

func (*QueryLiquidityRequest) GetId

func (m *QueryLiquidityRequest) GetId() string

func (*QueryLiquidityRequest) Marshal

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

func (*QueryLiquidityRequest) MarshalTo

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

func (*QueryLiquidityRequest) MarshalToSizedBuffer

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

func (*QueryLiquidityRequest) ProtoMessage

func (*QueryLiquidityRequest) ProtoMessage()

func (*QueryLiquidityRequest) Reset

func (m *QueryLiquidityRequest) Reset()

func (*QueryLiquidityRequest) Size

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

func (*QueryLiquidityRequest) String

func (m *QueryLiquidityRequest) String() string

func (*QueryLiquidityRequest) Unmarshal

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

func (*QueryLiquidityRequest) XXX_DiscardUnknown

func (m *QueryLiquidityRequest) XXX_DiscardUnknown()

func (*QueryLiquidityRequest) XXX_Marshal

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

func (*QueryLiquidityRequest) XXX_Merge

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

func (*QueryLiquidityRequest) XXX_Size

func (m *QueryLiquidityRequest) XXX_Size() int

func (*QueryLiquidityRequest) XXX_Unmarshal

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

type QueryLiquidityResponse

type QueryLiquidityResponse struct {
	Standard  types.Coin `protobuf:"bytes,1,opt,name=standard,proto3" json:"standard"`
	Token     types.Coin `protobuf:"bytes,2,opt,name=token,proto3" json:"token"`
	Liquidity types.Coin `protobuf:"bytes,3,opt,name=liquidity,proto3" json:"liquidity"`
	Fee       string     `protobuf:"bytes,4,opt,name=fee,proto3" json:"fee,omitempty"`
}

QueryLiquidityResponse is response type for the Query/Liquidity RPC method

func (*QueryLiquidityResponse) Descriptor

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

func (*QueryLiquidityResponse) GetFee

func (m *QueryLiquidityResponse) GetFee() string

func (*QueryLiquidityResponse) GetLiquidity

func (m *QueryLiquidityResponse) GetLiquidity() types.Coin

func (*QueryLiquidityResponse) GetStandard

func (m *QueryLiquidityResponse) GetStandard() types.Coin

func (*QueryLiquidityResponse) GetToken

func (m *QueryLiquidityResponse) GetToken() types.Coin

func (*QueryLiquidityResponse) Marshal

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

func (*QueryLiquidityResponse) MarshalTo

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

func (*QueryLiquidityResponse) MarshalToSizedBuffer

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

func (*QueryLiquidityResponse) ProtoMessage

func (*QueryLiquidityResponse) ProtoMessage()

func (*QueryLiquidityResponse) Reset

func (m *QueryLiquidityResponse) Reset()

func (*QueryLiquidityResponse) Size

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

func (*QueryLiquidityResponse) String

func (m *QueryLiquidityResponse) String() string

func (*QueryLiquidityResponse) Unmarshal

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

func (*QueryLiquidityResponse) XXX_DiscardUnknown

func (m *QueryLiquidityResponse) XXX_DiscardUnknown()

func (*QueryLiquidityResponse) XXX_Marshal

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

func (*QueryLiquidityResponse) XXX_Merge

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

func (*QueryLiquidityResponse) XXX_Size

func (m *QueryLiquidityResponse) XXX_Size() int

func (*QueryLiquidityResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Liquidity returns the total liquidity available for the provided denomination
	Liquidity(context.Context, *QueryLiquidityRequest) (*QueryLiquidityResponse, 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) Liquidity

Jump to

Keyboard shortcuts

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