tokenomics

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 20 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.

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

Index

Constants

View Source
const (
	Query_Params_FullMethodName                   = "/poktroll.tokenomics.Query/Params"
	Query_RelayMiningDifficulty_FullMethodName    = "/poktroll.tokenomics.Query/RelayMiningDifficulty"
	Query_RelayMiningDifficultyAll_FullMethodName = "/poktroll.tokenomics.Query/RelayMiningDifficultyAll"
)
View Source
const (
	Msg_UpdateParams_FullMethodName = "/poktroll.tokenomics.Msg/UpdateParams"
	Msg_UpdateParam_FullMethodName  = "/poktroll.tokenomics.Msg/UpdateParam"
)

Variables

View Source
var File_poktroll_tokenomics_event_proto protoreflect.FileDescriptor
View Source
var File_poktroll_tokenomics_genesis_proto protoreflect.FileDescriptor
View Source
var File_poktroll_tokenomics_params_proto protoreflect.FileDescriptor
View Source
var File_poktroll_tokenomics_query_proto protoreflect.FileDescriptor
View Source
var File_poktroll_tokenomics_relay_mining_difficulty_proto protoreflect.FileDescriptor
View Source
var File_poktroll_tokenomics_tx_proto protoreflect.FileDescriptor
View Source
var Msg_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "poktroll.tokenomics.Msg",
	HandlerType: (*MsgServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "UpdateParams",
			Handler:    _Msg_UpdateParams_Handler,
		},
		{
			MethodName: "UpdateParam",
			Handler:    _Msg_UpdateParam_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "poktroll/tokenomics/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: "poktroll.tokenomics.Query",
	HandlerType: (*QueryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Params",
			Handler:    _Query_Params_Handler,
		},
		{
			MethodName: "RelayMiningDifficulty",
			Handler:    _Query_RelayMiningDifficulty_Handler,
		},
		{
			MethodName: "RelayMiningDifficultyAll",
			Handler:    _Query_RelayMiningDifficultyAll_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "poktroll/tokenomics/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 added in v0.0.3

func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer)

func RegisterQueryServer added in v0.0.3

func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer)

Types

type EventApplicationOverserviced added in v0.0.4

type EventApplicationOverserviced struct {
	ApplicationAddr string        `protobuf:"bytes,1,opt,name=application_addr,json=applicationAddr,proto3" json:"application_addr,omitempty"`
	ExpectedBurn    *v1beta1.Coin `protobuf:"bytes,2,opt,name=expected_burn,json=expectedBurn,proto3" json:"expected_burn,omitempty"`
	EffectiveBurn   *v1beta1.Coin `protobuf:"bytes,3,opt,name=effective_burn,json=effectiveBurn,proto3" json:"effective_burn,omitempty"`
	// contains filtered or unexported fields
}

EventApplicationOverserviced is emitted when an application has less stake than the expected burn.

func (*EventApplicationOverserviced) Descriptor deprecated added in v0.0.4

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

Deprecated: Use EventApplicationOverserviced.ProtoReflect.Descriptor instead.

func (*EventApplicationOverserviced) GetApplicationAddr added in v0.0.4

func (x *EventApplicationOverserviced) GetApplicationAddr() string

func (*EventApplicationOverserviced) GetEffectiveBurn added in v0.0.4

func (x *EventApplicationOverserviced) GetEffectiveBurn() *v1beta1.Coin

func (*EventApplicationOverserviced) GetExpectedBurn added in v0.0.4

func (x *EventApplicationOverserviced) GetExpectedBurn() *v1beta1.Coin

func (*EventApplicationOverserviced) ProtoMessage added in v0.0.4

func (*EventApplicationOverserviced) ProtoMessage()

func (*EventApplicationOverserviced) ProtoReflect added in v0.0.4

func (*EventApplicationOverserviced) Reset added in v0.0.4

func (x *EventApplicationOverserviced) Reset()

func (*EventApplicationOverserviced) String added in v0.0.4

type EventClaimExpired

type EventClaimExpired struct {
	Claim           *proof.Claim `protobuf:"bytes,1,opt,name=claim,proto3" json:"claim,omitempty"`
	NumRelays       uint64       `protobuf:"varint,2,opt,name=num_relays,json=numRelays,proto3" json:"num_relays,omitempty"`
	NumComputeUnits uint64       `protobuf:"varint,3,opt,name=num_compute_units,json=numComputeUnits,proto3" json:"num_compute_units,omitempty"`
	// contains filtered or unexported fields
}

EventClaimExpired is an event emitted during settlement whenever a claim requiring an on-chain proof doesn't have one. The claim cannot be settled, leading to that work never being rewarded.

func (*EventClaimExpired) Descriptor deprecated

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

Deprecated: Use EventClaimExpired.ProtoReflect.Descriptor instead.

func (*EventClaimExpired) GetClaim

func (x *EventClaimExpired) GetClaim() *proof.Claim

func (*EventClaimExpired) GetNumComputeUnits added in v0.0.3

func (x *EventClaimExpired) GetNumComputeUnits() uint64

func (*EventClaimExpired) GetNumRelays added in v0.0.3

func (x *EventClaimExpired) GetNumRelays() uint64

func (*EventClaimExpired) ProtoMessage

func (*EventClaimExpired) ProtoMessage()

func (*EventClaimExpired) ProtoReflect

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

func (*EventClaimExpired) Reset

func (x *EventClaimExpired) Reset()

func (*EventClaimExpired) String

func (x *EventClaimExpired) String() string

type EventClaimSettled

type EventClaimSettled struct {
	Claim            *proof.Claim                 `protobuf:"bytes,1,opt,name=claim,proto3" json:"claim,omitempty"`
	NumRelays        uint64                       `protobuf:"varint,2,opt,name=num_relays,json=numRelays,proto3" json:"num_relays,omitempty"`
	NumComputeUnits  uint64                       `protobuf:"varint,3,opt,name=num_compute_units,json=numComputeUnits,proto3" json:"num_compute_units,omitempty"`
	ProofRequirement proof.ProofRequirementReason `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

EventClaimSettled is an event emitted whenever a claim is settled. The proof_required determines whether the claim requires a proof that has been submitted or not

func (*EventClaimSettled) Descriptor deprecated

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

Deprecated: Use EventClaimSettled.ProtoReflect.Descriptor instead.

func (*EventClaimSettled) GetClaim

func (x *EventClaimSettled) GetClaim() *proof.Claim

func (*EventClaimSettled) GetNumComputeUnits added in v0.0.3

func (x *EventClaimSettled) GetNumComputeUnits() uint64

func (*EventClaimSettled) GetNumRelays added in v0.0.3

func (x *EventClaimSettled) GetNumRelays() uint64

func (*EventClaimSettled) GetProofRequirement added in v0.0.3

func (x *EventClaimSettled) GetProofRequirement() proof.ProofRequirementReason

func (*EventClaimSettled) ProtoMessage

func (*EventClaimSettled) ProtoMessage()

func (*EventClaimSettled) ProtoReflect

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

func (*EventClaimSettled) Reset

func (x *EventClaimSettled) Reset()

func (*EventClaimSettled) String

func (x *EventClaimSettled) String() string

type EventRelayMiningDifficultyUpdated added in v0.0.3

type EventRelayMiningDifficultyUpdated struct {
	ServiceId                string `protobuf:"bytes,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
	PrevTargetHashHexEncoded string `` /* 139-byte string literal not displayed */
	NewTargetHashHexEncoded  string `` /* 136-byte string literal not displayed */
	PrevNumRelaysEma         uint64 `protobuf:"varint,4,opt,name=prev_num_relays_ema,json=prevNumRelaysEma,proto3" json:"prev_num_relays_ema,omitempty"`
	NewNumRelaysEma          uint64 `protobuf:"varint,5,opt,name=new_num_relays_ema,json=newNumRelaysEma,proto3" json:"new_num_relays_ema,omitempty"`
	// contains filtered or unexported fields
}

EventRelayMiningDifficultyUpdated is an event emitted whenever the relay mining difficulty is updated for a given service.

func (*EventRelayMiningDifficultyUpdated) Descriptor deprecated added in v0.0.3

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

Deprecated: Use EventRelayMiningDifficultyUpdated.ProtoReflect.Descriptor instead.

func (*EventRelayMiningDifficultyUpdated) GetNewNumRelaysEma added in v0.0.3

func (x *EventRelayMiningDifficultyUpdated) GetNewNumRelaysEma() uint64

func (*EventRelayMiningDifficultyUpdated) GetNewTargetHashHexEncoded added in v0.0.3

func (x *EventRelayMiningDifficultyUpdated) GetNewTargetHashHexEncoded() string

func (*EventRelayMiningDifficultyUpdated) GetPrevNumRelaysEma added in v0.0.3

func (x *EventRelayMiningDifficultyUpdated) GetPrevNumRelaysEma() uint64

func (*EventRelayMiningDifficultyUpdated) GetPrevTargetHashHexEncoded added in v0.0.3

func (x *EventRelayMiningDifficultyUpdated) GetPrevTargetHashHexEncoded() string

func (*EventRelayMiningDifficultyUpdated) GetServiceId added in v0.0.3

func (x *EventRelayMiningDifficultyUpdated) GetServiceId() string

func (*EventRelayMiningDifficultyUpdated) ProtoMessage added in v0.0.3

func (*EventRelayMiningDifficultyUpdated) ProtoMessage()

func (*EventRelayMiningDifficultyUpdated) ProtoReflect added in v0.0.3

func (*EventRelayMiningDifficultyUpdated) Reset added in v0.0.3

func (*EventRelayMiningDifficultyUpdated) String added in v0.0.3

type GenesisState

type GenesisState struct {

	// params defines all the parameters of the module.
	Params                    *Params                  `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
	RelayMiningDifficultyList []*RelayMiningDifficulty `protobuf:"bytes,2,rep,name=relayMiningDifficultyList,proto3" json:"relayMiningDifficultyList,omitempty"`
	// contains filtered or unexported fields
}

GenesisState defines the tokenomics module's genesis state.

func (*GenesisState) Descriptor deprecated

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

Deprecated: Use GenesisState.ProtoReflect.Descriptor instead.

func (*GenesisState) GetParams

func (x *GenesisState) GetParams() *Params

func (*GenesisState) GetRelayMiningDifficultyList added in v0.0.3

func (x *GenesisState) GetRelayMiningDifficultyList() []*RelayMiningDifficulty

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 MsgClient added in v0.0.3

type MsgClient interface {
	// UpdateParams defines a (governance) operation for updating the module
	// parameters. The authority defaults to the x/gov module account.
	UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
	UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, 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.

Msg defines the Msg service.

func NewMsgClient added in v0.0.3

func NewMsgClient(cc grpc.ClientConnInterface) MsgClient

type MsgServer added in v0.0.3

type MsgServer interface {
	// UpdateParams defines a (governance) operation for updating the module
	// parameters. The authority defaults to the x/gov module account.
	UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
	UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error)
	// contains filtered or unexported methods
}

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

Msg defines the Msg service.

type MsgUpdateParam added in v0.0.2

type MsgUpdateParam struct {

	// authority is the address that controls the module (defaults to x/gov unless overwritten).
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// The (name, as_type) tuple must match the corresponding name and type as
	// specified in the `Params“ message in `proof/params.proto.`
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// Types that are assignable to AsType:
	//
	//	*MsgUpdateParam_AsString
	//	*MsgUpdateParam_AsInt64
	//	*MsgUpdateParam_AsBytes
	AsType isMsgUpdateParam_AsType `protobuf_oneof:"as_type"`
	// contains filtered or unexported fields
}

MsgUpdateParam is the Msg/UpdateParam request type to update a single param.

func (*MsgUpdateParam) Descriptor deprecated added in v0.0.2

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

Deprecated: Use MsgUpdateParam.ProtoReflect.Descriptor instead.

func (*MsgUpdateParam) GetAsBytes added in v0.0.2

func (x *MsgUpdateParam) GetAsBytes() []byte

func (*MsgUpdateParam) GetAsInt64 added in v0.0.2

func (x *MsgUpdateParam) GetAsInt64() int64

func (*MsgUpdateParam) GetAsString added in v0.0.2

func (x *MsgUpdateParam) GetAsString() string

func (*MsgUpdateParam) GetAsType added in v0.0.2

func (x *MsgUpdateParam) GetAsType() isMsgUpdateParam_AsType

func (*MsgUpdateParam) GetAuthority added in v0.0.2

func (x *MsgUpdateParam) GetAuthority() string

func (*MsgUpdateParam) GetName added in v0.0.2

func (x *MsgUpdateParam) GetName() string

func (*MsgUpdateParam) ProtoMessage added in v0.0.2

func (*MsgUpdateParam) ProtoMessage()

func (*MsgUpdateParam) ProtoReflect added in v0.0.2

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

func (*MsgUpdateParam) Reset added in v0.0.2

func (x *MsgUpdateParam) Reset()

func (*MsgUpdateParam) String added in v0.0.2

func (x *MsgUpdateParam) String() string

type MsgUpdateParamResponse added in v0.0.2

type MsgUpdateParamResponse struct {
	Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
	// contains filtered or unexported fields
}

MsgUpdateParamResponse defines the response structure for executing a MsgUpdateParam message after a single param update.

func (*MsgUpdateParamResponse) Descriptor deprecated added in v0.0.2

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

Deprecated: Use MsgUpdateParamResponse.ProtoReflect.Descriptor instead.

func (*MsgUpdateParamResponse) GetParams added in v0.0.2

func (x *MsgUpdateParamResponse) GetParams() *Params

func (*MsgUpdateParamResponse) ProtoMessage added in v0.0.2

func (*MsgUpdateParamResponse) ProtoMessage()

func (*MsgUpdateParamResponse) ProtoReflect added in v0.0.2

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

func (*MsgUpdateParamResponse) Reset added in v0.0.2

func (x *MsgUpdateParamResponse) Reset()

func (*MsgUpdateParamResponse) String added in v0.0.2

func (x *MsgUpdateParamResponse) String() string

type MsgUpdateParam_AsBytes added in v0.0.2

type MsgUpdateParam_AsBytes struct {
	AsBytes []byte `protobuf:"bytes,7,opt,name=as_bytes,json=asBytes,proto3,oneof"`
}

type MsgUpdateParam_AsInt64 added in v0.0.2

type MsgUpdateParam_AsInt64 struct {
	AsInt64 int64 `protobuf:"varint,6,opt,name=as_int64,json=asInt64,proto3,oneof"`
}

type MsgUpdateParam_AsString added in v0.0.2

type MsgUpdateParam_AsString struct {
	AsString string `protobuf:"bytes,3,opt,name=as_string,json=asString,proto3,oneof"`
}

type MsgUpdateParams

type MsgUpdateParams struct {

	// authority is the address that controls the module (defaults to x/gov unless overwritten).
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// params defines the x/tokenomics parameters to update.
	// NOTE: All parameters must be supplied.
	Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"`
	// contains filtered or unexported fields
}

MsgUpdateParams is the Msg/UpdateParams request type to update all params at once.

func (*MsgUpdateParams) Descriptor deprecated

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

Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead.

func (*MsgUpdateParams) GetAuthority

func (x *MsgUpdateParams) GetAuthority() string

func (*MsgUpdateParams) GetParams

func (x *MsgUpdateParams) GetParams() *Params

func (*MsgUpdateParams) ProtoMessage

func (*MsgUpdateParams) ProtoMessage()

func (*MsgUpdateParams) ProtoReflect

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

func (*MsgUpdateParams) Reset

func (x *MsgUpdateParams) Reset()

func (*MsgUpdateParams) String

func (x *MsgUpdateParams) String() string

type MsgUpdateParamsResponse

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

MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message.

func (*MsgUpdateParamsResponse) Descriptor deprecated

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

Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead.

func (*MsgUpdateParamsResponse) ProtoMessage

func (*MsgUpdateParamsResponse) ProtoMessage()

func (*MsgUpdateParamsResponse) ProtoReflect

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

func (*MsgUpdateParamsResponse) Reset

func (x *MsgUpdateParamsResponse) Reset()

func (*MsgUpdateParamsResponse) String

func (x *MsgUpdateParamsResponse) String() string

type Params

type Params struct {

	// The amount of upokt that a compute unit should translate to when settling a session.
	ComputeUnitsToTokensMultiplier uint64 `` /* 158-byte string literal not displayed */
	// contains filtered or unexported fields
}

Params defines the parameters for the tokenomics module.

func (*Params) Descriptor deprecated

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

Deprecated: Use Params.ProtoReflect.Descriptor instead.

func (*Params) GetComputeUnitsToTokensMultiplier

func (x *Params) GetComputeUnitsToTokensMultiplier() uint64

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 QueryAllRelayMiningDifficultyRequest added in v0.0.3

type QueryAllRelayMiningDifficultyRequest struct {
	Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryAllRelayMiningDifficultyRequest) Descriptor deprecated added in v0.0.3

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

Deprecated: Use QueryAllRelayMiningDifficultyRequest.ProtoReflect.Descriptor instead.

func (*QueryAllRelayMiningDifficultyRequest) GetPagination added in v0.0.3

func (*QueryAllRelayMiningDifficultyRequest) ProtoMessage added in v0.0.3

func (*QueryAllRelayMiningDifficultyRequest) ProtoMessage()

func (*QueryAllRelayMiningDifficultyRequest) ProtoReflect added in v0.0.3

func (*QueryAllRelayMiningDifficultyRequest) Reset added in v0.0.3

func (*QueryAllRelayMiningDifficultyRequest) String added in v0.0.3

type QueryAllRelayMiningDifficultyResponse added in v0.0.3

type QueryAllRelayMiningDifficultyResponse struct {
	RelayMiningDifficulty []*RelayMiningDifficulty `protobuf:"bytes,1,rep,name=relayMiningDifficulty,proto3" json:"relayMiningDifficulty,omitempty"`
	Pagination            *v1beta1.PageResponse    `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryAllRelayMiningDifficultyResponse) Descriptor deprecated added in v0.0.3

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

Deprecated: Use QueryAllRelayMiningDifficultyResponse.ProtoReflect.Descriptor instead.

func (*QueryAllRelayMiningDifficultyResponse) GetPagination added in v0.0.3

func (*QueryAllRelayMiningDifficultyResponse) GetRelayMiningDifficulty added in v0.0.3

func (x *QueryAllRelayMiningDifficultyResponse) GetRelayMiningDifficulty() []*RelayMiningDifficulty

func (*QueryAllRelayMiningDifficultyResponse) ProtoMessage added in v0.0.3

func (*QueryAllRelayMiningDifficultyResponse) ProtoMessage()

func (*QueryAllRelayMiningDifficultyResponse) ProtoReflect added in v0.0.3

func (*QueryAllRelayMiningDifficultyResponse) Reset added in v0.0.3

func (*QueryAllRelayMiningDifficultyResponse) String added in v0.0.3

type QueryClient added in v0.0.3

type QueryClient interface {
	// Parameters queries the parameters of the module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// Queries a list of RelayMiningDifficulty items.
	RelayMiningDifficulty(ctx context.Context, in *QueryGetRelayMiningDifficultyRequest, opts ...grpc.CallOption) (*QueryGetRelayMiningDifficultyResponse, error)
	RelayMiningDifficultyAll(ctx context.Context, in *QueryAllRelayMiningDifficultyRequest, opts ...grpc.CallOption) (*QueryAllRelayMiningDifficultyResponse, 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.

Query defines the gRPC querier service.

func NewQueryClient added in v0.0.3

func NewQueryClient(cc grpc.ClientConnInterface) QueryClient

type QueryGetRelayMiningDifficultyRequest added in v0.0.3

type QueryGetRelayMiningDifficultyRequest struct {
	ServiceId string `protobuf:"bytes,1,opt,name=serviceId,proto3" json:"serviceId,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryGetRelayMiningDifficultyRequest) Descriptor deprecated added in v0.0.3

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

Deprecated: Use QueryGetRelayMiningDifficultyRequest.ProtoReflect.Descriptor instead.

func (*QueryGetRelayMiningDifficultyRequest) GetServiceId added in v0.0.3

func (x *QueryGetRelayMiningDifficultyRequest) GetServiceId() string

func (*QueryGetRelayMiningDifficultyRequest) ProtoMessage added in v0.0.3

func (*QueryGetRelayMiningDifficultyRequest) ProtoMessage()

func (*QueryGetRelayMiningDifficultyRequest) ProtoReflect added in v0.0.3

func (*QueryGetRelayMiningDifficultyRequest) Reset added in v0.0.3

func (*QueryGetRelayMiningDifficultyRequest) String added in v0.0.3

type QueryGetRelayMiningDifficultyResponse added in v0.0.3

type QueryGetRelayMiningDifficultyResponse struct {
	RelayMiningDifficulty *RelayMiningDifficulty `protobuf:"bytes,1,opt,name=relayMiningDifficulty,proto3" json:"relayMiningDifficulty,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryGetRelayMiningDifficultyResponse) Descriptor deprecated added in v0.0.3

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

Deprecated: Use QueryGetRelayMiningDifficultyResponse.ProtoReflect.Descriptor instead.

func (*QueryGetRelayMiningDifficultyResponse) GetRelayMiningDifficulty added in v0.0.3

func (x *QueryGetRelayMiningDifficultyResponse) GetRelayMiningDifficulty() *RelayMiningDifficulty

func (*QueryGetRelayMiningDifficultyResponse) ProtoMessage added in v0.0.3

func (*QueryGetRelayMiningDifficultyResponse) ProtoMessage()

func (*QueryGetRelayMiningDifficultyResponse) ProtoReflect added in v0.0.3

func (*QueryGetRelayMiningDifficultyResponse) Reset added in v0.0.3

func (*QueryGetRelayMiningDifficultyResponse) String added in v0.0.3

type QueryParamsRequest

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

QueryParamsRequest is request type for the Query/Params RPC method.

func (*QueryParamsRequest) Descriptor deprecated

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

Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead.

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) ProtoReflect

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

func (*QueryParamsRequest) Reset

func (x *QueryParamsRequest) Reset()

func (*QueryParamsRequest) String

func (x *QueryParamsRequest) String() string

type QueryParamsResponse

type QueryParamsResponse struct {

	// params holds all the parameters of this module.
	Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
	// contains filtered or unexported fields
}

QueryParamsResponse is response type for the Query/Params RPC method.

func (*QueryParamsResponse) Descriptor deprecated

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

Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead.

func (*QueryParamsResponse) GetParams

func (x *QueryParamsResponse) GetParams() *Params

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) ProtoReflect

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

func (*QueryParamsResponse) Reset

func (x *QueryParamsResponse) Reset()

func (*QueryParamsResponse) String

func (x *QueryParamsResponse) String() string

type QueryServer added in v0.0.3

type QueryServer interface {
	// Parameters queries the parameters of the module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Queries a list of RelayMiningDifficulty items.
	RelayMiningDifficulty(context.Context, *QueryGetRelayMiningDifficultyRequest) (*QueryGetRelayMiningDifficultyResponse, error)
	RelayMiningDifficultyAll(context.Context, *QueryAllRelayMiningDifficultyRequest) (*QueryAllRelayMiningDifficultyResponse, error)
	// contains filtered or unexported methods
}

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

Query defines the gRPC querier service.

type RelayMiningDifficulty added in v0.0.3

type RelayMiningDifficulty struct {

	// The service ID the the relay mining difficulty is associated with.
	ServiceId string `protobuf:"bytes,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
	// The block height at which this relay mining difficulty was computed.
	// This is needed to determine how much time has passed since the last time
	// the exponential moving average was computed.
	BlockHeight int64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
	// The exponential moving average of the number of relays for this service.
	NumRelaysEma uint64 `protobuf:"varint,3,opt,name=num_relays_ema,json=numRelaysEma,proto3" json:"num_relays_ema,omitempty"`
	// The target hash determining the difficulty to mine relays for this service.
	// For example, if we use sha256 to hash the (RelayRequest,ReqlayResponse) tuple,
	// and the difficulty has 4 leading zero bits, then the target hash would be:
	// 0b0000111... (until 32 bytes are filled up).
	TargetHash []byte `protobuf:"bytes,4,opt,name=target_hash,json=targetHash,proto3" json:"target_hash,omitempty"`
	// contains filtered or unexported fields
}

RelayMiningDifficulty is a message used to store the on-chain Relay Mining difficulty associated with a specific service ID.

func (*RelayMiningDifficulty) Descriptor deprecated added in v0.0.3

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

Deprecated: Use RelayMiningDifficulty.ProtoReflect.Descriptor instead.

func (*RelayMiningDifficulty) GetBlockHeight added in v0.0.3

func (x *RelayMiningDifficulty) GetBlockHeight() int64

func (*RelayMiningDifficulty) GetNumRelaysEma added in v0.0.3

func (x *RelayMiningDifficulty) GetNumRelaysEma() uint64

func (*RelayMiningDifficulty) GetServiceId added in v0.0.3

func (x *RelayMiningDifficulty) GetServiceId() string

func (*RelayMiningDifficulty) GetTargetHash added in v0.0.3

func (x *RelayMiningDifficulty) GetTargetHash() []byte

func (*RelayMiningDifficulty) ProtoMessage added in v0.0.3

func (*RelayMiningDifficulty) ProtoMessage()

func (*RelayMiningDifficulty) ProtoReflect added in v0.0.3

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

func (*RelayMiningDifficulty) Reset added in v0.0.3

func (x *RelayMiningDifficulty) Reset()

func (*RelayMiningDifficulty) String added in v0.0.3

func (x *RelayMiningDifficulty) String() string

type UnimplementedMsgServer added in v0.0.3

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer must be embedded to have forward compatible implementations.

func (UnimplementedMsgServer) UpdateParam added in v0.0.3

func (UnimplementedMsgServer) UpdateParams added in v0.0.3

type UnimplementedQueryServer added in v0.0.3

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer must be embedded to have forward compatible implementations.

func (UnimplementedQueryServer) Params added in v0.0.3

func (UnimplementedQueryServer) RelayMiningDifficulty added in v0.0.3

func (UnimplementedQueryServer) RelayMiningDifficultyAll added in v0.0.3

type UnsafeMsgServer added in v0.0.3

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 added in v0.0.3

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.

Directories

Path Synopsis
Code generated by protoc-gen-go-pulsar.
Code generated by protoc-gen-go-pulsar.

Jump to

Keyboard shortcuts

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