types

package
v0.0.0-...-a9c8dba Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: AGPL-3.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 defines the module name
	ModuleName = "stats"

	// TransientStoreKey defines the primary module transient store key
	TransientStoreKey = "tmp_" + ModuleName

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

Module name and store keys

View Source
const (
	// EpochStatsKeyPrefix is the prefix to retrieve the EpochStats for a given epoch
	EpochStatsKeyPrefix = "Epoch:"

	// UserStatsKeyPrefix is the prefix to retrieve the UserStats for a given user
	UserStatsKeyPrefix = "User:"

	// StatsMetadataKey is the key to get the StatsMetadata for the module
	StatsMetadataKey = "Metadata"

	// GlobalStatsKey is the key to get the GlobalStats for the module
	GlobalStatsKey = "Global"

	// BlockStatsKey is the key to get the BlockStats for the module
	BlockStatsKey = "Block"

	// ParamsKey defines the key for the params
	ParamsKey = "Params"
)

State

Variables

View Source
var (
	ErrNonpositiveDuration = errorsmod.Register(
		ModuleName,
		400,
		"Duration is nonpositive",
	)
	ErrInvalidAuthority = errorsmod.Register(
		ModuleName,
		401,
		"Authority is invalid",
	)
)
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 (
	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 (
	ErrInvalidLengthStats        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowStats          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupStats = 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")
)

Functions

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 BlockStats

type BlockStats struct {
	// The fills that occured on this block.
	Fills []*BlockStats_Fill `protobuf:"bytes,1,rep,name=fills,proto3" json:"fills,omitempty"`
}

BlockStats is used to store stats transiently within the scope of a block.

func (*BlockStats) Descriptor

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

func (*BlockStats) GetFills

func (m *BlockStats) GetFills() []*BlockStats_Fill

func (*BlockStats) Marshal

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

func (*BlockStats) MarshalTo

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

func (*BlockStats) MarshalToSizedBuffer

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

func (*BlockStats) ProtoMessage

func (*BlockStats) ProtoMessage()

func (*BlockStats) Reset

func (m *BlockStats) Reset()

func (*BlockStats) Size

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

func (*BlockStats) String

func (m *BlockStats) String() string

func (*BlockStats) Unmarshal

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

func (*BlockStats) XXX_DiscardUnknown

func (m *BlockStats) XXX_DiscardUnknown()

func (*BlockStats) XXX_Marshal

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

func (*BlockStats) XXX_Merge

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

func (*BlockStats) XXX_Size

func (m *BlockStats) XXX_Size() int

func (*BlockStats) XXX_Unmarshal

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

type BlockStats_Fill

type BlockStats_Fill struct {
	// Taker wallet address
	Taker string `protobuf:"bytes,1,opt,name=taker,proto3" json:"taker,omitempty"`
	// Maker wallet address
	Maker string `protobuf:"bytes,2,opt,name=maker,proto3" json:"maker,omitempty"`
	// Notional USDC filled in quantums
	Notional uint64 `protobuf:"varint,3,opt,name=notional,proto3" json:"notional,omitempty"`
}

Fill records data about a fill on this block.

func (*BlockStats_Fill) Descriptor

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

func (*BlockStats_Fill) GetMaker

func (m *BlockStats_Fill) GetMaker() string

func (*BlockStats_Fill) GetNotional

func (m *BlockStats_Fill) GetNotional() uint64

func (*BlockStats_Fill) GetTaker

func (m *BlockStats_Fill) GetTaker() string

func (*BlockStats_Fill) Marshal

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

func (*BlockStats_Fill) MarshalTo

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

func (*BlockStats_Fill) MarshalToSizedBuffer

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

func (*BlockStats_Fill) ProtoMessage

func (*BlockStats_Fill) ProtoMessage()

func (*BlockStats_Fill) Reset

func (m *BlockStats_Fill) Reset()

func (*BlockStats_Fill) Size

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

func (*BlockStats_Fill) String

func (m *BlockStats_Fill) String() string

func (*BlockStats_Fill) Unmarshal

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

func (*BlockStats_Fill) XXX_DiscardUnknown

func (m *BlockStats_Fill) XXX_DiscardUnknown()

func (*BlockStats_Fill) XXX_Marshal

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

func (*BlockStats_Fill) XXX_Merge

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

func (*BlockStats_Fill) XXX_Size

func (m *BlockStats_Fill) XXX_Size() int

func (*BlockStats_Fill) XXX_Unmarshal

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

type EpochStats

type EpochStats struct {
	// Epoch end time
	EpochEndTime time.Time `protobuf:"bytes,1,opt,name=epoch_end_time,json=epochEndTime,proto3,stdtime" json:"epoch_end_time"`
	// Stats for each user in this epoch. Sorted by user.
	Stats []*EpochStats_UserWithStats `protobuf:"bytes,2,rep,name=stats,proto3" json:"stats,omitempty"`
}

EpochStats stores stats for a particular epoch

func (*EpochStats) Descriptor

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

func (*EpochStats) GetEpochEndTime

func (m *EpochStats) GetEpochEndTime() time.Time

func (*EpochStats) GetStats

func (m *EpochStats) GetStats() []*EpochStats_UserWithStats

func (*EpochStats) Marshal

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

func (*EpochStats) MarshalTo

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

func (*EpochStats) MarshalToSizedBuffer

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

func (*EpochStats) ProtoMessage

func (*EpochStats) ProtoMessage()

func (*EpochStats) Reset

func (m *EpochStats) Reset()

func (*EpochStats) Size

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

func (*EpochStats) String

func (m *EpochStats) String() string

func (*EpochStats) Unmarshal

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

func (*EpochStats) XXX_DiscardUnknown

func (m *EpochStats) XXX_DiscardUnknown()

func (*EpochStats) XXX_Marshal

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

func (*EpochStats) XXX_Merge

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

func (*EpochStats) XXX_Size

func (m *EpochStats) XXX_Size() int

func (*EpochStats) XXX_Unmarshal

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

type EpochStats_UserWithStats

type EpochStats_UserWithStats struct {
	User  string     `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	Stats *UserStats `protobuf:"bytes,2,opt,name=stats,proto3" json:"stats,omitempty"`
}

A user and its associated stats

func (*EpochStats_UserWithStats) Descriptor

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

func (*EpochStats_UserWithStats) GetStats

func (m *EpochStats_UserWithStats) GetStats() *UserStats

func (*EpochStats_UserWithStats) GetUser

func (m *EpochStats_UserWithStats) GetUser() string

func (*EpochStats_UserWithStats) Marshal

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

func (*EpochStats_UserWithStats) MarshalTo

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

func (*EpochStats_UserWithStats) MarshalToSizedBuffer

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

func (*EpochStats_UserWithStats) ProtoMessage

func (*EpochStats_UserWithStats) ProtoMessage()

func (*EpochStats_UserWithStats) Reset

func (m *EpochStats_UserWithStats) Reset()

func (*EpochStats_UserWithStats) Size

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

func (*EpochStats_UserWithStats) String

func (m *EpochStats_UserWithStats) String() string

func (*EpochStats_UserWithStats) Unmarshal

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

func (*EpochStats_UserWithStats) XXX_DiscardUnknown

func (m *EpochStats_UserWithStats) XXX_DiscardUnknown()

func (*EpochStats_UserWithStats) XXX_Marshal

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

func (*EpochStats_UserWithStats) XXX_Merge

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

func (*EpochStats_UserWithStats) XXX_Size

func (m *EpochStats_UserWithStats) XXX_Size() int

func (*EpochStats_UserWithStats) XXX_Unmarshal

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

type EpochsKeeper

type EpochsKeeper interface {
	MustGetStatsEpochInfo(ctx sdk.Context) types.EpochInfo
}

EpochsKeeper defines the expected epochs keeper to get epoch info.

type GenesisState

type GenesisState struct {
	// The parameters of the module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

GenesisState defines the stats module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default stats genesis state.

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

func (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

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

func (*GenesisState) XXX_Merge

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

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

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

type GlobalStats

type GlobalStats struct {
	// Notional USDC traded in quantums
	NotionalTraded uint64 `protobuf:"varint,1,opt,name=notional_traded,json=notionalTraded,proto3" json:"notional_traded,omitempty"`
}

GlobalStats stores global stats

func (*GlobalStats) Descriptor

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

func (*GlobalStats) GetNotionalTraded

func (m *GlobalStats) GetNotionalTraded() uint64

func (*GlobalStats) Marshal

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

func (*GlobalStats) MarshalTo

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

func (*GlobalStats) MarshalToSizedBuffer

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

func (*GlobalStats) ProtoMessage

func (*GlobalStats) ProtoMessage()

func (*GlobalStats) Reset

func (m *GlobalStats) Reset()

func (*GlobalStats) Size

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

func (*GlobalStats) String

func (m *GlobalStats) String() string

func (*GlobalStats) Unmarshal

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

func (*GlobalStats) XXX_DiscardUnknown

func (m *GlobalStats) XXX_DiscardUnknown()

func (*GlobalStats) XXX_Marshal

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

func (*GlobalStats) XXX_Merge

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

func (*GlobalStats) XXX_Size

func (m *GlobalStats) XXX_Size() int

func (*GlobalStats) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	// UpdateParams updates the Params in state.
	UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, 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 {
	// UpdateParams updates the Params in state.
	UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
}

MsgServer is the server API for Msg service.

type MsgUpdateParams

type MsgUpdateParams struct {
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// The parameters to update. Each field must be set.
	Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
}

MsgUpdateParams is the Msg/UpdateParams request type.

func (*MsgUpdateParams) Descriptor

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

func (*MsgUpdateParams) GetAuthority

func (m *MsgUpdateParams) GetAuthority() string

func (*MsgUpdateParams) GetParams

func (m *MsgUpdateParams) GetParams() Params

func (*MsgUpdateParams) Marshal

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

func (*MsgUpdateParams) MarshalTo

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

func (*MsgUpdateParams) MarshalToSizedBuffer

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

func (*MsgUpdateParams) ProtoMessage

func (*MsgUpdateParams) ProtoMessage()

func (*MsgUpdateParams) Reset

func (m *MsgUpdateParams) Reset()

func (*MsgUpdateParams) Size

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

func (*MsgUpdateParams) String

func (m *MsgUpdateParams) String() string

func (*MsgUpdateParams) Unmarshal

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

func (*MsgUpdateParams) ValidateBasic

func (msg *MsgUpdateParams) ValidateBasic() error

func (*MsgUpdateParams) XXX_DiscardUnknown

func (m *MsgUpdateParams) XXX_DiscardUnknown()

func (*MsgUpdateParams) XXX_Marshal

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

func (*MsgUpdateParams) XXX_Merge

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

func (*MsgUpdateParams) XXX_Size

func (m *MsgUpdateParams) XXX_Size() int

func (*MsgUpdateParams) XXX_Unmarshal

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

type MsgUpdateParamsResponse

type MsgUpdateParamsResponse struct {
}

MsgUpdateParamsResponse is the Msg/UpdateParams response type.

func (*MsgUpdateParamsResponse) Descriptor

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

func (*MsgUpdateParamsResponse) Marshal

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

func (*MsgUpdateParamsResponse) MarshalTo

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

func (*MsgUpdateParamsResponse) MarshalToSizedBuffer

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

func (*MsgUpdateParamsResponse) ProtoMessage

func (*MsgUpdateParamsResponse) ProtoMessage()

func (*MsgUpdateParamsResponse) Reset

func (m *MsgUpdateParamsResponse) Reset()

func (*MsgUpdateParamsResponse) Size

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

func (*MsgUpdateParamsResponse) String

func (m *MsgUpdateParamsResponse) String() string

func (*MsgUpdateParamsResponse) Unmarshal

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

func (*MsgUpdateParamsResponse) XXX_DiscardUnknown

func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()

func (*MsgUpdateParamsResponse) XXX_Marshal

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

func (*MsgUpdateParamsResponse) XXX_Merge

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

func (*MsgUpdateParamsResponse) XXX_Size

func (m *MsgUpdateParamsResponse) XXX_Size() int

func (*MsgUpdateParamsResponse) XXX_Unmarshal

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

type Params

type Params struct {
	// The desired number of seconds in the look-back window.
	WindowDuration time.Duration `protobuf:"bytes,1,opt,name=window_duration,json=windowDuration,proto3,stdduration" json:"window_duration"`
}

Params defines the parameters for x/stats module.

func (*Params) Descriptor

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

func (*Params) GetWindowDuration

func (m *Params) GetWindowDuration() time.Duration

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

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

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

func (*Params) Validate

func (m *Params) Validate() error

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 {
	// Queries the Params.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// Queries StatsMetadata.
	StatsMetadata(ctx context.Context, in *QueryStatsMetadataRequest, opts ...grpc.CallOption) (*QueryStatsMetadataResponse, error)
	// Queries GlobalStats.
	GlobalStats(ctx context.Context, in *QueryGlobalStatsRequest, opts ...grpc.CallOption) (*QueryGlobalStatsResponse, error)
	// Queries UserStats.
	UserStats(ctx context.Context, in *QueryUserStatsRequest, opts ...grpc.CallOption) (*QueryUserStatsResponse, 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 QueryGlobalStatsRequest

type QueryGlobalStatsRequest struct {
}

QueryGlobalStatsRequest is a request type for the GlobalStats RPC method.

func (*QueryGlobalStatsRequest) Descriptor

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

func (*QueryGlobalStatsRequest) Marshal

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

func (*QueryGlobalStatsRequest) MarshalTo

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

func (*QueryGlobalStatsRequest) MarshalToSizedBuffer

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

func (*QueryGlobalStatsRequest) ProtoMessage

func (*QueryGlobalStatsRequest) ProtoMessage()

func (*QueryGlobalStatsRequest) Reset

func (m *QueryGlobalStatsRequest) Reset()

func (*QueryGlobalStatsRequest) Size

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

func (*QueryGlobalStatsRequest) String

func (m *QueryGlobalStatsRequest) String() string

func (*QueryGlobalStatsRequest) Unmarshal

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

func (*QueryGlobalStatsRequest) XXX_DiscardUnknown

func (m *QueryGlobalStatsRequest) XXX_DiscardUnknown()

func (*QueryGlobalStatsRequest) XXX_Marshal

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

func (*QueryGlobalStatsRequest) XXX_Merge

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

func (*QueryGlobalStatsRequest) XXX_Size

func (m *QueryGlobalStatsRequest) XXX_Size() int

func (*QueryGlobalStatsRequest) XXX_Unmarshal

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

type QueryGlobalStatsResponse

type QueryGlobalStatsResponse struct {
	Stats *GlobalStats `protobuf:"bytes,1,opt,name=stats,proto3" json:"stats,omitempty"`
}

QueryGlobalStatsResponse is a response type for the GlobalStats RPC method.

func (*QueryGlobalStatsResponse) Descriptor

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

func (*QueryGlobalStatsResponse) GetStats

func (m *QueryGlobalStatsResponse) GetStats() *GlobalStats

func (*QueryGlobalStatsResponse) Marshal

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

func (*QueryGlobalStatsResponse) MarshalTo

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

func (*QueryGlobalStatsResponse) MarshalToSizedBuffer

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

func (*QueryGlobalStatsResponse) ProtoMessage

func (*QueryGlobalStatsResponse) ProtoMessage()

func (*QueryGlobalStatsResponse) Reset

func (m *QueryGlobalStatsResponse) Reset()

func (*QueryGlobalStatsResponse) Size

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

func (*QueryGlobalStatsResponse) String

func (m *QueryGlobalStatsResponse) String() string

func (*QueryGlobalStatsResponse) Unmarshal

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

func (*QueryGlobalStatsResponse) XXX_DiscardUnknown

func (m *QueryGlobalStatsResponse) XXX_DiscardUnknown()

func (*QueryGlobalStatsResponse) XXX_Marshal

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

func (*QueryGlobalStatsResponse) XXX_Merge

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

func (*QueryGlobalStatsResponse) XXX_Size

func (m *QueryGlobalStatsResponse) XXX_Size() int

func (*QueryGlobalStatsResponse) XXX_Unmarshal

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

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is a request type for the 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 Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse is a response type for the 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 {
	// Queries the Params.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Queries StatsMetadata.
	StatsMetadata(context.Context, *QueryStatsMetadataRequest) (*QueryStatsMetadataResponse, error)
	// Queries GlobalStats.
	GlobalStats(context.Context, *QueryGlobalStatsRequest) (*QueryGlobalStatsResponse, error)
	// Queries UserStats.
	UserStats(context.Context, *QueryUserStatsRequest) (*QueryUserStatsResponse, error)
}

QueryServer is the server API for Query service.

type QueryStatsMetadataRequest

type QueryStatsMetadataRequest struct {
}

QueryStatsMetadataRequest is a request type for the StatsMetadata RPC method.

func (*QueryStatsMetadataRequest) Descriptor

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

func (*QueryStatsMetadataRequest) Marshal

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

func (*QueryStatsMetadataRequest) MarshalTo

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

func (*QueryStatsMetadataRequest) MarshalToSizedBuffer

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

func (*QueryStatsMetadataRequest) ProtoMessage

func (*QueryStatsMetadataRequest) ProtoMessage()

func (*QueryStatsMetadataRequest) Reset

func (m *QueryStatsMetadataRequest) Reset()

func (*QueryStatsMetadataRequest) Size

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

func (*QueryStatsMetadataRequest) String

func (m *QueryStatsMetadataRequest) String() string

func (*QueryStatsMetadataRequest) Unmarshal

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

func (*QueryStatsMetadataRequest) XXX_DiscardUnknown

func (m *QueryStatsMetadataRequest) XXX_DiscardUnknown()

func (*QueryStatsMetadataRequest) XXX_Marshal

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

func (*QueryStatsMetadataRequest) XXX_Merge

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

func (*QueryStatsMetadataRequest) XXX_Size

func (m *QueryStatsMetadataRequest) XXX_Size() int

func (*QueryStatsMetadataRequest) XXX_Unmarshal

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

type QueryStatsMetadataResponse

type QueryStatsMetadataResponse struct {
	Metadata *StatsMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
}

QueryStatsMetadataResponse is a response type for the StatsMetadata RPC method.

func (*QueryStatsMetadataResponse) Descriptor

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

func (*QueryStatsMetadataResponse) GetMetadata

func (m *QueryStatsMetadataResponse) GetMetadata() *StatsMetadata

func (*QueryStatsMetadataResponse) Marshal

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

func (*QueryStatsMetadataResponse) MarshalTo

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

func (*QueryStatsMetadataResponse) MarshalToSizedBuffer

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

func (*QueryStatsMetadataResponse) ProtoMessage

func (*QueryStatsMetadataResponse) ProtoMessage()

func (*QueryStatsMetadataResponse) Reset

func (m *QueryStatsMetadataResponse) Reset()

func (*QueryStatsMetadataResponse) Size

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

func (*QueryStatsMetadataResponse) String

func (m *QueryStatsMetadataResponse) String() string

func (*QueryStatsMetadataResponse) Unmarshal

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

func (*QueryStatsMetadataResponse) XXX_DiscardUnknown

func (m *QueryStatsMetadataResponse) XXX_DiscardUnknown()

func (*QueryStatsMetadataResponse) XXX_Marshal

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

func (*QueryStatsMetadataResponse) XXX_Merge

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

func (*QueryStatsMetadataResponse) XXX_Size

func (m *QueryStatsMetadataResponse) XXX_Size() int

func (*QueryStatsMetadataResponse) XXX_Unmarshal

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

type QueryUserStatsRequest

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

QueryUserStatsRequest is a request type for the UserStats RPC method.

func (*QueryUserStatsRequest) Descriptor

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

func (*QueryUserStatsRequest) GetUser

func (m *QueryUserStatsRequest) GetUser() string

func (*QueryUserStatsRequest) Marshal

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

func (*QueryUserStatsRequest) MarshalTo

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

func (*QueryUserStatsRequest) MarshalToSizedBuffer

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

func (*QueryUserStatsRequest) ProtoMessage

func (*QueryUserStatsRequest) ProtoMessage()

func (*QueryUserStatsRequest) Reset

func (m *QueryUserStatsRequest) Reset()

func (*QueryUserStatsRequest) Size

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

func (*QueryUserStatsRequest) String

func (m *QueryUserStatsRequest) String() string

func (*QueryUserStatsRequest) Unmarshal

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

func (*QueryUserStatsRequest) XXX_DiscardUnknown

func (m *QueryUserStatsRequest) XXX_DiscardUnknown()

func (*QueryUserStatsRequest) XXX_Marshal

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

func (*QueryUserStatsRequest) XXX_Merge

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

func (*QueryUserStatsRequest) XXX_Size

func (m *QueryUserStatsRequest) XXX_Size() int

func (*QueryUserStatsRequest) XXX_Unmarshal

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

type QueryUserStatsResponse

type QueryUserStatsResponse struct {
	Stats *UserStats `protobuf:"bytes,1,opt,name=stats,proto3" json:"stats,omitempty"`
}

QueryUserStatsResponse is a request type for the UserStats RPC method.

func (*QueryUserStatsResponse) Descriptor

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

func (*QueryUserStatsResponse) GetStats

func (m *QueryUserStatsResponse) GetStats() *UserStats

func (*QueryUserStatsResponse) Marshal

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

func (*QueryUserStatsResponse) MarshalTo

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

func (*QueryUserStatsResponse) MarshalToSizedBuffer

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

func (*QueryUserStatsResponse) ProtoMessage

func (*QueryUserStatsResponse) ProtoMessage()

func (*QueryUserStatsResponse) Reset

func (m *QueryUserStatsResponse) Reset()

func (*QueryUserStatsResponse) Size

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

func (*QueryUserStatsResponse) String

func (m *QueryUserStatsResponse) String() string

func (*QueryUserStatsResponse) Unmarshal

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

func (*QueryUserStatsResponse) XXX_DiscardUnknown

func (m *QueryUserStatsResponse) XXX_DiscardUnknown()

func (*QueryUserStatsResponse) XXX_Marshal

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

func (*QueryUserStatsResponse) XXX_Merge

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

func (*QueryUserStatsResponse) XXX_Size

func (m *QueryUserStatsResponse) XXX_Size() int

func (*QueryUserStatsResponse) XXX_Unmarshal

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

type StatsMetadata

type StatsMetadata struct {
	// The oldest epoch that is included in the stats. The next epoch to be
	// removed from the window.
	TrailingEpoch uint32 `protobuf:"varint,1,opt,name=trailing_epoch,json=trailingEpoch,proto3" json:"trailing_epoch,omitempty"`
}

StatsMetadata stores metadata for the x/stats module

func (*StatsMetadata) Descriptor

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

func (*StatsMetadata) GetTrailingEpoch

func (m *StatsMetadata) GetTrailingEpoch() uint32

func (*StatsMetadata) Marshal

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

func (*StatsMetadata) MarshalTo

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

func (*StatsMetadata) MarshalToSizedBuffer

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

func (*StatsMetadata) ProtoMessage

func (*StatsMetadata) ProtoMessage()

func (*StatsMetadata) Reset

func (m *StatsMetadata) Reset()

func (*StatsMetadata) Size

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

func (*StatsMetadata) String

func (m *StatsMetadata) String() string

func (*StatsMetadata) Unmarshal

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

func (*StatsMetadata) XXX_DiscardUnknown

func (m *StatsMetadata) XXX_DiscardUnknown()

func (*StatsMetadata) XXX_Marshal

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

func (*StatsMetadata) XXX_Merge

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

func (*StatsMetadata) XXX_Size

func (m *StatsMetadata) XXX_Size() int

func (*StatsMetadata) XXX_Unmarshal

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) UpdateParams

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) GlobalStats

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) StatsMetadata

func (*UnimplementedQueryServer) UserStats

type UserStats

type UserStats struct {
	// Taker USDC in quantums
	TakerNotional uint64 `protobuf:"varint,1,opt,name=taker_notional,json=takerNotional,proto3" json:"taker_notional,omitempty"`
	// Maker USDC in quantums
	MakerNotional uint64 `protobuf:"varint,2,opt,name=maker_notional,json=makerNotional,proto3" json:"maker_notional,omitempty"`
}

UserStats stores stats for a User

func (*UserStats) Descriptor

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

func (*UserStats) GetMakerNotional

func (m *UserStats) GetMakerNotional() uint64

func (*UserStats) GetTakerNotional

func (m *UserStats) GetTakerNotional() uint64

func (*UserStats) Marshal

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

func (*UserStats) MarshalTo

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

func (*UserStats) MarshalToSizedBuffer

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

func (*UserStats) ProtoMessage

func (*UserStats) ProtoMessage()

func (*UserStats) Reset

func (m *UserStats) Reset()

func (*UserStats) Size

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

func (*UserStats) String

func (m *UserStats) String() string

func (*UserStats) Unmarshal

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

func (*UserStats) XXX_DiscardUnknown

func (m *UserStats) XXX_DiscardUnknown()

func (*UserStats) XXX_Marshal

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

func (*UserStats) XXX_Merge

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

func (*UserStats) XXX_Size

func (m *UserStats) XXX_Size() int

func (*UserStats) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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