ratelimitv1

package
v8.0.0 Latest Latest
Warning

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

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

Documentation

Overview

Code generated by protoc-gen-go-pulsar. DO NOT EDIT.

Code generated by protoc-gen-go-pulsar. DO NOT EDIT.

Code generated by protoc-gen-go-pulsar. DO NOT EDIT.

Code generated by protoc-gen-go-pulsar. DO NOT EDIT.

Code generated by protoc-gen-go-pulsar. DO NOT EDIT.

Index

Constants

View Source
const (
	Query_AllRateLimits_FullMethodName           = "/ratelimit.v1.Query/AllRateLimits"
	Query_RateLimit_FullMethodName               = "/ratelimit.v1.Query/RateLimit"
	Query_RateLimitsByChainId_FullMethodName     = "/ratelimit.v1.Query/RateLimitsByChainId"
	Query_RateLimitsByChannelId_FullMethodName   = "/ratelimit.v1.Query/RateLimitsByChannelId"
	Query_AllBlacklistedDenoms_FullMethodName    = "/ratelimit.v1.Query/AllBlacklistedDenoms"
	Query_AllWhitelistedAddresses_FullMethodName = "/ratelimit.v1.Query/AllWhitelistedAddresses"
)
View Source
const (
	Msg_AddRateLimit_FullMethodName    = "/ratelimit.v1.Msg/AddRateLimit"
	Msg_UpdateRateLimit_FullMethodName = "/ratelimit.v1.Msg/UpdateRateLimit"
	Msg_RemoveRateLimit_FullMethodName = "/ratelimit.v1.Msg/RemoveRateLimit"
	Msg_ResetRateLimit_FullMethodName  = "/ratelimit.v1.Msg/ResetRateLimit"
)

Variables

View Source
var (
	PacketDirection_name = map[int32]string{
		0: "PACKET_SEND",
		1: "PACKET_RECV",
	}
	PacketDirection_value = map[string]int32{
		"PACKET_SEND": 0,
		"PACKET_RECV": 1,
	}
)

Enum value maps for PacketDirection.

View Source
var File_ratelimit_v1_genesis_proto protoreflect.FileDescriptor
View Source
var File_ratelimit_v1_params_proto protoreflect.FileDescriptor
View Source
var File_ratelimit_v1_query_proto protoreflect.FileDescriptor
View Source
var File_ratelimit_v1_ratelimit_proto protoreflect.FileDescriptor
View Source
var File_ratelimit_v1_tx_proto protoreflect.FileDescriptor
View Source
var Msg_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ratelimit.v1.Msg",
	HandlerType: (*MsgServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AddRateLimit",
			Handler:    _Msg_AddRateLimit_Handler,
		},
		{
			MethodName: "UpdateRateLimit",
			Handler:    _Msg_UpdateRateLimit_Handler,
		},
		{
			MethodName: "RemoveRateLimit",
			Handler:    _Msg_RemoveRateLimit_Handler,
		},
		{
			MethodName: "ResetRateLimit",
			Handler:    _Msg_ResetRateLimit_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "ratelimit/v1/tx.proto",
}

Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var Query_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ratelimit.v1.Query",
	HandlerType: (*QueryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AllRateLimits",
			Handler:    _Query_AllRateLimits_Handler,
		},
		{
			MethodName: "RateLimit",
			Handler:    _Query_RateLimit_Handler,
		},
		{
			MethodName: "RateLimitsByChainId",
			Handler:    _Query_RateLimitsByChainId_Handler,
		},
		{
			MethodName: "RateLimitsByChannelId",
			Handler:    _Query_RateLimitsByChannelId_Handler,
		},
		{
			MethodName: "AllBlacklistedDenoms",
			Handler:    _Query_AllBlacklistedDenoms_Handler,
		},
		{
			MethodName: "AllWhitelistedAddresses",
			Handler:    _Query_AllWhitelistedAddresses_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "ratelimit/v1/query.proto",
}

Query_ServiceDesc is the grpc.ServiceDesc for Query service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterMsgServer

func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer)

func RegisterQueryServer

func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer)

Types

type Flow

type Flow struct {

	// Inflow defines the total amount of inbound transfers for the given
	// rate limit in the current window
	Inflow string `protobuf:"bytes,1,opt,name=inflow,proto3" json:"inflow,omitempty"`
	// Outflow defines the total amount of outbound transfers for the given
	// rate limit in the current window
	Outflow string `protobuf:"bytes,2,opt,name=outflow,proto3" json:"outflow,omitempty"`
	// ChannelValue stores the total supply of the denom at the start of
	// the rate limit. This is used as the denominator when checking
	// the rate limit threshold
	// The ChannelValue is fixed for the duration of the rate limit window
	ChannelValue string `protobuf:"bytes,3,opt,name=channel_value,json=channelValue,proto3" json:"channel_value,omitempty"`
	// contains filtered or unexported fields
}

func (*Flow) Descriptor deprecated

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

Deprecated: Use Flow.ProtoReflect.Descriptor instead.

func (*Flow) GetChannelValue

func (x *Flow) GetChannelValue() string

func (*Flow) GetInflow

func (x *Flow) GetInflow() string

func (*Flow) GetOutflow

func (x *Flow) GetOutflow() string

func (*Flow) ProtoMessage

func (*Flow) ProtoMessage()

func (*Flow) ProtoReflect

func (x *Flow) ProtoReflect() protoreflect.Message

func (*Flow) Reset

func (x *Flow) Reset()

func (*Flow) String

func (x *Flow) String() string

type GenesisState

type GenesisState struct {
	Params                           *Params                   `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
	RateLimits                       []*RateLimit              `protobuf:"bytes,2,rep,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"`
	WhitelistedAddressPairs          []*WhitelistedAddressPair `` /* 132-byte string literal not displayed */
	BlacklistedDenoms                []string                  `protobuf:"bytes,4,rep,name=blacklisted_denoms,json=blacklistedDenoms,proto3" json:"blacklisted_denoms,omitempty"`
	PendingSendPacketSequenceNumbers []string                  `` /* 163-byte string literal not displayed */
	HourEpoch                        *HourEpoch                `protobuf:"bytes,6,opt,name=hour_epoch,json=hourEpoch,proto3" json:"hour_epoch,omitempty"`
	// contains filtered or unexported fields
}

GenesisState defines the ratelimit module's genesis state.

func (*GenesisState) Descriptor deprecated

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

Deprecated: Use GenesisState.ProtoReflect.Descriptor instead.

func (*GenesisState) GetBlacklistedDenoms

func (x *GenesisState) GetBlacklistedDenoms() []string

func (*GenesisState) GetHourEpoch

func (x *GenesisState) GetHourEpoch() *HourEpoch

func (*GenesisState) GetParams

func (x *GenesisState) GetParams() *Params

func (*GenesisState) GetPendingSendPacketSequenceNumbers

func (x *GenesisState) GetPendingSendPacketSequenceNumbers() []string

func (*GenesisState) GetRateLimits

func (x *GenesisState) GetRateLimits() []*RateLimit

func (*GenesisState) GetWhitelistedAddressPairs

func (x *GenesisState) GetWhitelistedAddressPairs() []*WhitelistedAddressPair

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) ProtoReflect

func (x *GenesisState) ProtoReflect() protoreflect.Message

func (*GenesisState) Reset

func (x *GenesisState) Reset()

func (*GenesisState) String

func (x *GenesisState) String() string

type HourEpoch

type HourEpoch struct {
	EpochNumber      uint64                 `protobuf:"varint,1,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty"`
	Duration         *durationpb.Duration   `protobuf:"bytes,2,opt,name=duration,proto3" json:"duration,omitempty"`
	EpochStartTime   *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=epoch_start_time,json=epochStartTime,proto3" json:"epoch_start_time,omitempty"`
	EpochStartHeight int64                  `protobuf:"varint,4,opt,name=epoch_start_height,json=epochStartHeight,proto3" json:"epoch_start_height,omitempty"`
	// contains filtered or unexported fields
}

func (*HourEpoch) Descriptor deprecated

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

Deprecated: Use HourEpoch.ProtoReflect.Descriptor instead.

func (*HourEpoch) GetDuration

func (x *HourEpoch) GetDuration() *durationpb.Duration

func (*HourEpoch) GetEpochNumber

func (x *HourEpoch) GetEpochNumber() uint64

func (*HourEpoch) GetEpochStartHeight

func (x *HourEpoch) GetEpochStartHeight() int64

func (*HourEpoch) GetEpochStartTime

func (x *HourEpoch) GetEpochStartTime() *timestamppb.Timestamp

func (*HourEpoch) ProtoMessage

func (*HourEpoch) ProtoMessage()

func (*HourEpoch) ProtoReflect

func (x *HourEpoch) ProtoReflect() protoreflect.Message

func (*HourEpoch) Reset

func (x *HourEpoch) Reset()

func (*HourEpoch) String

func (x *HourEpoch) String() string

type MsgAddRateLimit

type MsgAddRateLimit struct {

	// Authority defines the x/gov module account
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// Denom for the rate limit, as it appears on the rate limited chain
	// When rate limiting a non-native token, this will be an ibc denom
	Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"`
	// ChannelId for the rate limit, on the side of the rate limited chain
	ChannelId string `protobuf:"bytes,3,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	// MaxPercentSend defines the threshold for outflows
	// The threshold is defined as a percentage (e.g. 10 indicates 10%)
	MaxPercentSend string `protobuf:"bytes,4,opt,name=max_percent_send,json=maxPercentSend,proto3" json:"max_percent_send,omitempty"`
	// MaxPercentSend defines the threshold for inflows
	// The threshold is defined as a percentage (e.g. 10 indicates 10%)
	MaxPercentRecv string `protobuf:"bytes,5,opt,name=max_percent_recv,json=maxPercentRecv,proto3" json:"max_percent_recv,omitempty"`
	// DurationHours specifies the number of hours before the rate limit
	// is reset (e.g. 24 indicates that the rate limit is reset each day)
	DurationHours uint64 `protobuf:"varint,6,opt,name=duration_hours,json=durationHours,proto3" json:"duration_hours,omitempty"`
	// contains filtered or unexported fields
}

Gov tx to add a new rate limit

func (*MsgAddRateLimit) Descriptor deprecated

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

Deprecated: Use MsgAddRateLimit.ProtoReflect.Descriptor instead.

func (*MsgAddRateLimit) GetAuthority

func (x *MsgAddRateLimit) GetAuthority() string

func (*MsgAddRateLimit) GetChannelId

func (x *MsgAddRateLimit) GetChannelId() string

func (*MsgAddRateLimit) GetDenom

func (x *MsgAddRateLimit) GetDenom() string

func (*MsgAddRateLimit) GetDurationHours

func (x *MsgAddRateLimit) GetDurationHours() uint64

func (*MsgAddRateLimit) GetMaxPercentRecv

func (x *MsgAddRateLimit) GetMaxPercentRecv() string

func (*MsgAddRateLimit) GetMaxPercentSend

func (x *MsgAddRateLimit) GetMaxPercentSend() string

func (*MsgAddRateLimit) ProtoMessage

func (*MsgAddRateLimit) ProtoMessage()

func (*MsgAddRateLimit) ProtoReflect

func (x *MsgAddRateLimit) ProtoReflect() protoreflect.Message

func (*MsgAddRateLimit) Reset

func (x *MsgAddRateLimit) Reset()

func (*MsgAddRateLimit) String

func (x *MsgAddRateLimit) String() string

type MsgAddRateLimitResponse

type MsgAddRateLimitResponse struct {
	// contains filtered or unexported fields
}

func (*MsgAddRateLimitResponse) Descriptor deprecated

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

Deprecated: Use MsgAddRateLimitResponse.ProtoReflect.Descriptor instead.

func (*MsgAddRateLimitResponse) ProtoMessage

func (*MsgAddRateLimitResponse) ProtoMessage()

func (*MsgAddRateLimitResponse) ProtoReflect

func (x *MsgAddRateLimitResponse) ProtoReflect() protoreflect.Message

func (*MsgAddRateLimitResponse) Reset

func (x *MsgAddRateLimitResponse) Reset()

func (*MsgAddRateLimitResponse) String

func (x *MsgAddRateLimitResponse) String() string

type MsgClient

type MsgClient interface {
	// Gov tx to add a new rate limit
	AddRateLimit(ctx context.Context, in *MsgAddRateLimit, opts ...grpc.CallOption) (*MsgAddRateLimitResponse, error)
	// Gov tx to update an existing rate limit
	UpdateRateLimit(ctx context.Context, in *MsgUpdateRateLimit, opts ...grpc.CallOption) (*MsgUpdateRateLimitResponse, error)
	// Gov tx to remove a rate limit
	RemoveRateLimit(ctx context.Context, in *MsgRemoveRateLimit, opts ...grpc.CallOption) (*MsgRemoveRateLimitResponse, error)
	// Gov tx to reset the flow on a rate limit
	ResetRateLimit(ctx context.Context, in *MsgResetRateLimit, opts ...grpc.CallOption) (*MsgResetRateLimitResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc.ClientConnInterface) MsgClient

type MsgRemoveRateLimit

type MsgRemoveRateLimit struct {

	// Authority defines the x/gov module account
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// Denom for the rate limit, as it appears on the rate limited chain
	// When rate limiting a non-native token, this will be an ibc denom
	Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"`
	// ChannelId for the rate limit, on the side of the rate limited chain
	ChannelId string `protobuf:"bytes,3,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	// contains filtered or unexported fields
}

Gov tx to remove a rate limit

func (*MsgRemoveRateLimit) Descriptor deprecated

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

Deprecated: Use MsgRemoveRateLimit.ProtoReflect.Descriptor instead.

func (*MsgRemoveRateLimit) GetAuthority

func (x *MsgRemoveRateLimit) GetAuthority() string

func (*MsgRemoveRateLimit) GetChannelId

func (x *MsgRemoveRateLimit) GetChannelId() string

func (*MsgRemoveRateLimit) GetDenom

func (x *MsgRemoveRateLimit) GetDenom() string

func (*MsgRemoveRateLimit) ProtoMessage

func (*MsgRemoveRateLimit) ProtoMessage()

func (*MsgRemoveRateLimit) ProtoReflect

func (x *MsgRemoveRateLimit) ProtoReflect() protoreflect.Message

func (*MsgRemoveRateLimit) Reset

func (x *MsgRemoveRateLimit) Reset()

func (*MsgRemoveRateLimit) String

func (x *MsgRemoveRateLimit) String() string

type MsgRemoveRateLimitResponse

type MsgRemoveRateLimitResponse struct {
	// contains filtered or unexported fields
}

func (*MsgRemoveRateLimitResponse) Descriptor deprecated

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

Deprecated: Use MsgRemoveRateLimitResponse.ProtoReflect.Descriptor instead.

func (*MsgRemoveRateLimitResponse) ProtoMessage

func (*MsgRemoveRateLimitResponse) ProtoMessage()

func (*MsgRemoveRateLimitResponse) ProtoReflect

func (*MsgRemoveRateLimitResponse) Reset

func (x *MsgRemoveRateLimitResponse) Reset()

func (*MsgRemoveRateLimitResponse) String

func (x *MsgRemoveRateLimitResponse) String() string

type MsgResetRateLimit

type MsgResetRateLimit struct {

	// Authority defines the x/gov module account
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// Denom for the rate limit, as it appears on the rate limited chain
	// When rate limiting a non-native token, this will be an ibc denom
	Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"`
	// ChannelId for the rate limit, on the side of the rate limited chain
	ChannelId string `protobuf:"bytes,3,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	// contains filtered or unexported fields
}

Gov tx to reset the flow on a rate limit

func (*MsgResetRateLimit) Descriptor deprecated

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

Deprecated: Use MsgResetRateLimit.ProtoReflect.Descriptor instead.

func (*MsgResetRateLimit) GetAuthority

func (x *MsgResetRateLimit) GetAuthority() string

func (*MsgResetRateLimit) GetChannelId

func (x *MsgResetRateLimit) GetChannelId() string

func (*MsgResetRateLimit) GetDenom

func (x *MsgResetRateLimit) GetDenom() string

func (*MsgResetRateLimit) ProtoMessage

func (*MsgResetRateLimit) ProtoMessage()

func (*MsgResetRateLimit) ProtoReflect

func (x *MsgResetRateLimit) ProtoReflect() protoreflect.Message

func (*MsgResetRateLimit) Reset

func (x *MsgResetRateLimit) Reset()

func (*MsgResetRateLimit) String

func (x *MsgResetRateLimit) String() string

type MsgResetRateLimitResponse

type MsgResetRateLimitResponse struct {
	// contains filtered or unexported fields
}

func (*MsgResetRateLimitResponse) Descriptor deprecated

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

Deprecated: Use MsgResetRateLimitResponse.ProtoReflect.Descriptor instead.

func (*MsgResetRateLimitResponse) ProtoMessage

func (*MsgResetRateLimitResponse) ProtoMessage()

func (*MsgResetRateLimitResponse) ProtoReflect

func (*MsgResetRateLimitResponse) Reset

func (x *MsgResetRateLimitResponse) Reset()

func (*MsgResetRateLimitResponse) String

func (x *MsgResetRateLimitResponse) String() string

type MsgServer

type MsgServer interface {
	// Gov tx to add a new rate limit
	AddRateLimit(context.Context, *MsgAddRateLimit) (*MsgAddRateLimitResponse, error)
	// Gov tx to update an existing rate limit
	UpdateRateLimit(context.Context, *MsgUpdateRateLimit) (*MsgUpdateRateLimitResponse, error)
	// Gov tx to remove a rate limit
	RemoveRateLimit(context.Context, *MsgRemoveRateLimit) (*MsgRemoveRateLimitResponse, error)
	// Gov tx to reset the flow on a rate limit
	ResetRateLimit(context.Context, *MsgResetRateLimit) (*MsgResetRateLimitResponse, error)
	// contains filtered or unexported methods
}

MsgServer is the server API for Msg service. All implementations must embed UnimplementedMsgServer for forward compatibility

type MsgUpdateRateLimit

type MsgUpdateRateLimit struct {

	// Authority defines the x/gov module account
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// Denom for the rate limit, as it appears on the rate limited chain
	// When rate limiting a non-native token, this will be an ibc denom
	Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"`
	// ChannelId for the rate limit, on the side of the rate limited chain
	ChannelId string `protobuf:"bytes,3,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	// MaxPercentSend defines the threshold for outflows
	// The threshold is defined as a percentage (e.g. 10 indicates 10%)
	MaxPercentSend string `protobuf:"bytes,4,opt,name=max_percent_send,json=maxPercentSend,proto3" json:"max_percent_send,omitempty"`
	// MaxPercentSend defines the threshold for inflows
	// The threshold is defined as a percentage (e.g. 10 indicates 10%)
	MaxPercentRecv string `protobuf:"bytes,5,opt,name=max_percent_recv,json=maxPercentRecv,proto3" json:"max_percent_recv,omitempty"`
	// DurationHours specifies the number of hours before the rate limit
	// is reset (e.g. 24 indicates that the rate limit is reset each day)
	DurationHours uint64 `protobuf:"varint,6,opt,name=duration_hours,json=durationHours,proto3" json:"duration_hours,omitempty"`
	// contains filtered or unexported fields
}

Gov tx to update an existing rate limit

func (*MsgUpdateRateLimit) Descriptor deprecated

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

Deprecated: Use MsgUpdateRateLimit.ProtoReflect.Descriptor instead.

func (*MsgUpdateRateLimit) GetAuthority

func (x *MsgUpdateRateLimit) GetAuthority() string

func (*MsgUpdateRateLimit) GetChannelId

func (x *MsgUpdateRateLimit) GetChannelId() string

func (*MsgUpdateRateLimit) GetDenom

func (x *MsgUpdateRateLimit) GetDenom() string

func (*MsgUpdateRateLimit) GetDurationHours

func (x *MsgUpdateRateLimit) GetDurationHours() uint64

func (*MsgUpdateRateLimit) GetMaxPercentRecv

func (x *MsgUpdateRateLimit) GetMaxPercentRecv() string

func (*MsgUpdateRateLimit) GetMaxPercentSend

func (x *MsgUpdateRateLimit) GetMaxPercentSend() string

func (*MsgUpdateRateLimit) ProtoMessage

func (*MsgUpdateRateLimit) ProtoMessage()

func (*MsgUpdateRateLimit) ProtoReflect

func (x *MsgUpdateRateLimit) ProtoReflect() protoreflect.Message

func (*MsgUpdateRateLimit) Reset

func (x *MsgUpdateRateLimit) Reset()

func (*MsgUpdateRateLimit) String

func (x *MsgUpdateRateLimit) String() string

type MsgUpdateRateLimitResponse

type MsgUpdateRateLimitResponse struct {
	// contains filtered or unexported fields
}

func (*MsgUpdateRateLimitResponse) Descriptor deprecated

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

Deprecated: Use MsgUpdateRateLimitResponse.ProtoReflect.Descriptor instead.

func (*MsgUpdateRateLimitResponse) ProtoMessage

func (*MsgUpdateRateLimitResponse) ProtoMessage()

func (*MsgUpdateRateLimitResponse) ProtoReflect

func (*MsgUpdateRateLimitResponse) Reset

func (x *MsgUpdateRateLimitResponse) Reset()

func (*MsgUpdateRateLimitResponse) String

func (x *MsgUpdateRateLimitResponse) String() string

type PacketDirection

type PacketDirection int32

PacketDirection defines whether the transfer packet is being sent from this chain or is being received on this chain

const (
	PacketDirection_PACKET_SEND PacketDirection = 0
	PacketDirection_PACKET_RECV PacketDirection = 1
)

func (PacketDirection) Descriptor

func (PacketDirection) Enum

func (x PacketDirection) Enum() *PacketDirection

func (PacketDirection) EnumDescriptor deprecated

func (PacketDirection) EnumDescriptor() ([]byte, []int)

Deprecated: Use PacketDirection.Descriptor instead.

func (PacketDirection) Number

func (PacketDirection) String

func (x PacketDirection) String() string

func (PacketDirection) Type

type Params

type Params struct {
	// contains filtered or unexported fields
}

Params defines the ratelimit module's parameters.

func (*Params) Descriptor deprecated

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

Deprecated: Use Params.ProtoReflect.Descriptor instead.

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) ProtoReflect

func (x *Params) ProtoReflect() protoreflect.Message

func (*Params) Reset

func (x *Params) Reset()

func (*Params) String

func (x *Params) String() string

type Path

type Path struct {
	Denom     string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
	ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	// contains filtered or unexported fields
}

Path holds the denom and channelID that define the rate limited route

func (*Path) Descriptor deprecated

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

Deprecated: Use Path.ProtoReflect.Descriptor instead.

func (*Path) GetChannelId

func (x *Path) GetChannelId() string

func (*Path) GetDenom

func (x *Path) GetDenom() string

func (*Path) ProtoMessage

func (*Path) ProtoMessage()

func (*Path) ProtoReflect

func (x *Path) ProtoReflect() protoreflect.Message

func (*Path) Reset

func (x *Path) Reset()

func (*Path) String

func (x *Path) String() string

type QueryAllBlacklistedDenomsRequest

type QueryAllBlacklistedDenomsRequest struct {
	// contains filtered or unexported fields
}

Queries all blacklisted denoms

func (*QueryAllBlacklistedDenomsRequest) Descriptor deprecated

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

Deprecated: Use QueryAllBlacklistedDenomsRequest.ProtoReflect.Descriptor instead.

func (*QueryAllBlacklistedDenomsRequest) ProtoMessage

func (*QueryAllBlacklistedDenomsRequest) ProtoMessage()

func (*QueryAllBlacklistedDenomsRequest) ProtoReflect

func (*QueryAllBlacklistedDenomsRequest) Reset

func (*QueryAllBlacklistedDenomsRequest) String

type QueryAllBlacklistedDenomsResponse

type QueryAllBlacklistedDenomsResponse struct {
	Denoms []string `protobuf:"bytes,1,rep,name=denoms,proto3" json:"denoms,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryAllBlacklistedDenomsResponse) Descriptor deprecated

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

Deprecated: Use QueryAllBlacklistedDenomsResponse.ProtoReflect.Descriptor instead.

func (*QueryAllBlacklistedDenomsResponse) GetDenoms

func (x *QueryAllBlacklistedDenomsResponse) GetDenoms() []string

func (*QueryAllBlacklistedDenomsResponse) ProtoMessage

func (*QueryAllBlacklistedDenomsResponse) ProtoMessage()

func (*QueryAllBlacklistedDenomsResponse) ProtoReflect

func (*QueryAllBlacklistedDenomsResponse) Reset

func (*QueryAllBlacklistedDenomsResponse) String

type QueryAllRateLimitsRequest

type QueryAllRateLimitsRequest struct {
	// contains filtered or unexported fields
}

Queries all rate limits

func (*QueryAllRateLimitsRequest) Descriptor deprecated

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

Deprecated: Use QueryAllRateLimitsRequest.ProtoReflect.Descriptor instead.

func (*QueryAllRateLimitsRequest) ProtoMessage

func (*QueryAllRateLimitsRequest) ProtoMessage()

func (*QueryAllRateLimitsRequest) ProtoReflect

func (*QueryAllRateLimitsRequest) Reset

func (x *QueryAllRateLimitsRequest) Reset()

func (*QueryAllRateLimitsRequest) String

func (x *QueryAllRateLimitsRequest) String() string

type QueryAllRateLimitsResponse

type QueryAllRateLimitsResponse struct {
	RateLimits []*RateLimit `protobuf:"bytes,1,rep,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryAllRateLimitsResponse) Descriptor deprecated

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

Deprecated: Use QueryAllRateLimitsResponse.ProtoReflect.Descriptor instead.

func (*QueryAllRateLimitsResponse) GetRateLimits

func (x *QueryAllRateLimitsResponse) GetRateLimits() []*RateLimit

func (*QueryAllRateLimitsResponse) ProtoMessage

func (*QueryAllRateLimitsResponse) ProtoMessage()

func (*QueryAllRateLimitsResponse) ProtoReflect

func (*QueryAllRateLimitsResponse) Reset

func (x *QueryAllRateLimitsResponse) Reset()

func (*QueryAllRateLimitsResponse) String

func (x *QueryAllRateLimitsResponse) String() string

type QueryAllWhitelistedAddressesRequest

type QueryAllWhitelistedAddressesRequest struct {
	// contains filtered or unexported fields
}

Queries all whitelisted address pairs

func (*QueryAllWhitelistedAddressesRequest) Descriptor deprecated

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

Deprecated: Use QueryAllWhitelistedAddressesRequest.ProtoReflect.Descriptor instead.

func (*QueryAllWhitelistedAddressesRequest) ProtoMessage

func (*QueryAllWhitelistedAddressesRequest) ProtoMessage()

func (*QueryAllWhitelistedAddressesRequest) ProtoReflect

func (*QueryAllWhitelistedAddressesRequest) Reset

func (*QueryAllWhitelistedAddressesRequest) String

type QueryAllWhitelistedAddressesResponse

type QueryAllWhitelistedAddressesResponse struct {
	AddressPairs []*WhitelistedAddressPair `protobuf:"bytes,1,rep,name=address_pairs,json=addressPairs,proto3" json:"address_pairs,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryAllWhitelistedAddressesResponse) Descriptor deprecated

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

Deprecated: Use QueryAllWhitelistedAddressesResponse.ProtoReflect.Descriptor instead.

func (*QueryAllWhitelistedAddressesResponse) GetAddressPairs

func (*QueryAllWhitelistedAddressesResponse) ProtoMessage

func (*QueryAllWhitelistedAddressesResponse) ProtoMessage()

func (*QueryAllWhitelistedAddressesResponse) ProtoReflect

func (*QueryAllWhitelistedAddressesResponse) Reset

func (*QueryAllWhitelistedAddressesResponse) String

type QueryClient

type QueryClient interface {
	// Queries all rate limits
	AllRateLimits(ctx context.Context, in *QueryAllRateLimitsRequest, opts ...grpc.CallOption) (*QueryAllRateLimitsResponse, error)
	// Queries a specific rate limit by channel ID and denom
	// Ex:
	//   - /ratelimit/{channel_id}/by_denom?denom={denom}
	RateLimit(ctx context.Context, in *QueryRateLimitRequest, opts ...grpc.CallOption) (*QueryRateLimitResponse, error)
	// Queries all the rate limits for a given chain
	RateLimitsByChainId(ctx context.Context, in *QueryRateLimitsByChainIdRequest, opts ...grpc.CallOption) (*QueryRateLimitsByChainIdResponse, error)
	// Queries all the rate limits for a given channel ID
	RateLimitsByChannelId(ctx context.Context, in *QueryRateLimitsByChannelIdRequest, opts ...grpc.CallOption) (*QueryRateLimitsByChannelIdResponse, error)
	// Queries all blacklisted denoms
	AllBlacklistedDenoms(ctx context.Context, in *QueryAllBlacklistedDenomsRequest, opts ...grpc.CallOption) (*QueryAllBlacklistedDenomsResponse, error)
	// Queries all whitelisted address pairs
	AllWhitelistedAddresses(ctx context.Context, in *QueryAllWhitelistedAddressesRequest, opts ...grpc.CallOption) (*QueryAllWhitelistedAddressesResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc.ClientConnInterface) QueryClient

type QueryRateLimitRequest

type QueryRateLimitRequest struct {
	Denom     string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
	ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	// contains filtered or unexported fields
}

Queries a specific rate limit by channel ID and denom

func (*QueryRateLimitRequest) Descriptor deprecated

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

Deprecated: Use QueryRateLimitRequest.ProtoReflect.Descriptor instead.

func (*QueryRateLimitRequest) GetChannelId

func (x *QueryRateLimitRequest) GetChannelId() string

func (*QueryRateLimitRequest) GetDenom

func (x *QueryRateLimitRequest) GetDenom() string

func (*QueryRateLimitRequest) ProtoMessage

func (*QueryRateLimitRequest) ProtoMessage()

func (*QueryRateLimitRequest) ProtoReflect

func (x *QueryRateLimitRequest) ProtoReflect() protoreflect.Message

func (*QueryRateLimitRequest) Reset

func (x *QueryRateLimitRequest) Reset()

func (*QueryRateLimitRequest) String

func (x *QueryRateLimitRequest) String() string

type QueryRateLimitResponse

type QueryRateLimitResponse struct {
	RateLimit *RateLimit `protobuf:"bytes,1,opt,name=rate_limit,json=rateLimit,proto3" json:"rate_limit,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryRateLimitResponse) Descriptor deprecated

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

Deprecated: Use QueryRateLimitResponse.ProtoReflect.Descriptor instead.

func (*QueryRateLimitResponse) GetRateLimit

func (x *QueryRateLimitResponse) GetRateLimit() *RateLimit

func (*QueryRateLimitResponse) ProtoMessage

func (*QueryRateLimitResponse) ProtoMessage()

func (*QueryRateLimitResponse) ProtoReflect

func (x *QueryRateLimitResponse) ProtoReflect() protoreflect.Message

func (*QueryRateLimitResponse) Reset

func (x *QueryRateLimitResponse) Reset()

func (*QueryRateLimitResponse) String

func (x *QueryRateLimitResponse) String() string

type QueryRateLimitsByChainIdRequest

type QueryRateLimitsByChainIdRequest struct {
	ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	// contains filtered or unexported fields
}

Queries all the rate limits for a given chain

func (*QueryRateLimitsByChainIdRequest) Descriptor deprecated

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

Deprecated: Use QueryRateLimitsByChainIdRequest.ProtoReflect.Descriptor instead.

func (*QueryRateLimitsByChainIdRequest) GetChainId

func (x *QueryRateLimitsByChainIdRequest) GetChainId() string

func (*QueryRateLimitsByChainIdRequest) ProtoMessage

func (*QueryRateLimitsByChainIdRequest) ProtoMessage()

func (*QueryRateLimitsByChainIdRequest) ProtoReflect

func (*QueryRateLimitsByChainIdRequest) Reset

func (*QueryRateLimitsByChainIdRequest) String

type QueryRateLimitsByChainIdResponse

type QueryRateLimitsByChainIdResponse struct {
	RateLimits []*RateLimit `protobuf:"bytes,1,rep,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryRateLimitsByChainIdResponse) Descriptor deprecated

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

Deprecated: Use QueryRateLimitsByChainIdResponse.ProtoReflect.Descriptor instead.

func (*QueryRateLimitsByChainIdResponse) GetRateLimits

func (x *QueryRateLimitsByChainIdResponse) GetRateLimits() []*RateLimit

func (*QueryRateLimitsByChainIdResponse) ProtoMessage

func (*QueryRateLimitsByChainIdResponse) ProtoMessage()

func (*QueryRateLimitsByChainIdResponse) ProtoReflect

func (*QueryRateLimitsByChainIdResponse) Reset

func (*QueryRateLimitsByChainIdResponse) String

type QueryRateLimitsByChannelIdRequest

type QueryRateLimitsByChannelIdRequest struct {
	ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	// contains filtered or unexported fields
}

Queries all the rate limits for a given channel ID

func (*QueryRateLimitsByChannelIdRequest) Descriptor deprecated

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

Deprecated: Use QueryRateLimitsByChannelIdRequest.ProtoReflect.Descriptor instead.

func (*QueryRateLimitsByChannelIdRequest) GetChannelId

func (x *QueryRateLimitsByChannelIdRequest) GetChannelId() string

func (*QueryRateLimitsByChannelIdRequest) ProtoMessage

func (*QueryRateLimitsByChannelIdRequest) ProtoMessage()

func (*QueryRateLimitsByChannelIdRequest) ProtoReflect

func (*QueryRateLimitsByChannelIdRequest) Reset

func (*QueryRateLimitsByChannelIdRequest) String

type QueryRateLimitsByChannelIdResponse

type QueryRateLimitsByChannelIdResponse struct {
	RateLimits []*RateLimit `protobuf:"bytes,1,rep,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryRateLimitsByChannelIdResponse) Descriptor deprecated

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

Deprecated: Use QueryRateLimitsByChannelIdResponse.ProtoReflect.Descriptor instead.

func (*QueryRateLimitsByChannelIdResponse) GetRateLimits

func (x *QueryRateLimitsByChannelIdResponse) GetRateLimits() []*RateLimit

func (*QueryRateLimitsByChannelIdResponse) ProtoMessage

func (*QueryRateLimitsByChannelIdResponse) ProtoMessage()

func (*QueryRateLimitsByChannelIdResponse) ProtoReflect

func (*QueryRateLimitsByChannelIdResponse) Reset

func (*QueryRateLimitsByChannelIdResponse) String

type QueryServer

type QueryServer interface {
	// Queries all rate limits
	AllRateLimits(context.Context, *QueryAllRateLimitsRequest) (*QueryAllRateLimitsResponse, error)
	// Queries a specific rate limit by channel ID and denom
	// Ex:
	//   - /ratelimit/{channel_id}/by_denom?denom={denom}
	RateLimit(context.Context, *QueryRateLimitRequest) (*QueryRateLimitResponse, error)
	// Queries all the rate limits for a given chain
	RateLimitsByChainId(context.Context, *QueryRateLimitsByChainIdRequest) (*QueryRateLimitsByChainIdResponse, error)
	// Queries all the rate limits for a given channel ID
	RateLimitsByChannelId(context.Context, *QueryRateLimitsByChannelIdRequest) (*QueryRateLimitsByChannelIdResponse, error)
	// Queries all blacklisted denoms
	AllBlacklistedDenoms(context.Context, *QueryAllBlacklistedDenomsRequest) (*QueryAllBlacklistedDenomsResponse, error)
	// Queries all whitelisted address pairs
	AllWhitelistedAddresses(context.Context, *QueryAllWhitelistedAddressesRequest) (*QueryAllWhitelistedAddressesResponse, error)
	// contains filtered or unexported methods
}

QueryServer is the server API for Query service. All implementations must embed UnimplementedQueryServer for forward compatibility

type Quota

type Quota struct {

	// MaxPercentSend defines the threshold for outflows
	// The threshold is defined as a percentage (e.g. 10 indicates 10%)
	MaxPercentSend string `protobuf:"bytes,1,opt,name=max_percent_send,json=maxPercentSend,proto3" json:"max_percent_send,omitempty"`
	// MaxPercentSend defines the threshold for inflows
	// The threshold is defined as a percentage (e.g. 10 indicates 10%)
	MaxPercentRecv string `protobuf:"bytes,2,opt,name=max_percent_recv,json=maxPercentRecv,proto3" json:"max_percent_recv,omitempty"`
	// DurationHours specifies the number of hours before the rate limit
	// is reset (e.g. 24 indicates that the rate limit is reset each day)
	DurationHours uint64 `protobuf:"varint,3,opt,name=duration_hours,json=durationHours,proto3" json:"duration_hours,omitempty"`
	// contains filtered or unexported fields
}

Quota defines the rate limit thresholds for transfer packets

func (*Quota) Descriptor deprecated

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

Deprecated: Use Quota.ProtoReflect.Descriptor instead.

func (*Quota) GetDurationHours

func (x *Quota) GetDurationHours() uint64

func (*Quota) GetMaxPercentRecv

func (x *Quota) GetMaxPercentRecv() string

func (*Quota) GetMaxPercentSend

func (x *Quota) GetMaxPercentSend() string

func (*Quota) ProtoMessage

func (*Quota) ProtoMessage()

func (*Quota) ProtoReflect

func (x *Quota) ProtoReflect() protoreflect.Message

func (*Quota) Reset

func (x *Quota) Reset()

func (*Quota) String

func (x *Quota) String() string

type RateLimit

type RateLimit struct {
	Path  *Path  `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	Quota *Quota `protobuf:"bytes,2,opt,name=quota,proto3" json:"quota,omitempty"`
	Flow  *Flow  `protobuf:"bytes,3,opt,name=flow,proto3" json:"flow,omitempty"`
	// contains filtered or unexported fields
}

RateLimit stores all the context about a given rate limit, including the relevant denom and channel, rate limit thresholds, and current progress towards the limits

func (*RateLimit) Descriptor deprecated

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

Deprecated: Use RateLimit.ProtoReflect.Descriptor instead.

func (*RateLimit) GetFlow

func (x *RateLimit) GetFlow() *Flow

func (*RateLimit) GetPath

func (x *RateLimit) GetPath() *Path

func (*RateLimit) GetQuota

func (x *RateLimit) GetQuota() *Quota

func (*RateLimit) ProtoMessage

func (*RateLimit) ProtoMessage()

func (*RateLimit) ProtoReflect

func (x *RateLimit) ProtoReflect() protoreflect.Message

func (*RateLimit) Reset

func (x *RateLimit) Reset()

func (*RateLimit) String

func (x *RateLimit) String() string

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer must be embedded to have forward compatible implementations.

func (UnimplementedMsgServer) AddRateLimit

func (UnimplementedMsgServer) RemoveRateLimit

func (UnimplementedMsgServer) ResetRateLimit

func (UnimplementedMsgServer) UpdateRateLimit

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer must be embedded to have forward compatible implementations.

func (UnimplementedQueryServer) RateLimit

type UnsafeMsgServer

type UnsafeMsgServer interface {
	// contains filtered or unexported methods
}

UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MsgServer will result in compilation errors.

type UnsafeQueryServer

type UnsafeQueryServer interface {
	// contains filtered or unexported methods
}

UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to QueryServer will result in compilation errors.

type WhitelistedAddressPair

type WhitelistedAddressPair struct {
	Sender   string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"`
	// contains filtered or unexported fields
}

WhitelistedAddressPair represents a sender-receiver combo that is not subject to rate limit restrictions

func (*WhitelistedAddressPair) Descriptor deprecated

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

Deprecated: Use WhitelistedAddressPair.ProtoReflect.Descriptor instead.

func (*WhitelistedAddressPair) GetReceiver

func (x *WhitelistedAddressPair) GetReceiver() string

func (*WhitelistedAddressPair) GetSender

func (x *WhitelistedAddressPair) GetSender() string

func (*WhitelistedAddressPair) ProtoMessage

func (*WhitelistedAddressPair) ProtoMessage()

func (*WhitelistedAddressPair) ProtoReflect

func (x *WhitelistedAddressPair) ProtoReflect() protoreflect.Message

func (*WhitelistedAddressPair) Reset

func (x *WhitelistedAddressPair) Reset()

func (*WhitelistedAddressPair) String

func (x *WhitelistedAddressPair) String() string

Jump to

Keyboard shortcuts

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