types

package
v0.0.5-test Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// EventTypeRegisterOracleRequestDoc defines the event type for registering oracle request document
	EventTypeRegisterOracleRequestDoc = "register_oracle_request_doc"

	// EventTypeUpdateOracleRequestDoc defines the event type for updating oracle request document
	EventTypeUpdateOracleRequestDoc = "update_oracle_request_doc"

	// EventTypeCompleteOracleDataSet defines the event type for complete oracle data set
	EventTypeCompleteOracleDataSet = "complete_oracle_data_set"

	// EventTypeUpdateModeratorAddress defines the event type for updating moderator address
	EventTypeUpdateModeratorAddress = "update_moderator_address"

	// EventTypeSubmitOracleData defines the event type for submitting oracle data
	EventTypeSubmitOracleData = "submit_oracle_data"
)

Oracle module event type constants

View Source
const (
	AttributeKeyRequestId        = "request_id"
	AttributeKeyOracleType       = "oracle_type"
	AttributeKeyName             = "name"
	AttributeKeyDescription      = "description"
	AttributeKeyPeriod           = "period"
	AttributeKeyAccountList      = "account_list"
	AttributeKeyEndpoints        = "endpoints"
	AttributeKeyAggregateRule    = "aggregate_rule"
	AttributeKeyStatus           = "status"
	AttributeKeyCreator          = "creator"
	AttributeKeyModeratorAddress = "moderator_address"
	AttributeKeyNonce            = "nonce"
	AttributeKeyFromAddress      = "from_address"
	AttributeKeyRawData          = "raw_data"
	AttributeKeyAggregationRule  = "aggregation_rule"
	AttributeKeyQuorum           = "quorum"
)

Event attribute keys

View Source
const (
	// ModuleName defines the module name
	ModuleName = "oracle"

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

	// RouterKey defines the module's message routing key
	RouterKey = ModuleName

	// MemStoreKey defines the in-memory store key
	MemStoreKey = "mem_oracle"
)
View Source
const (
	AttributeKeyOracleDataNone = "oracle_data_nonce"
)

Variables

View Source
var (
	ErrInvalidRequestId = errorsmod.Register(ModuleName, codeInvalidRequestID, "invalid request id")
	ErrInvalidNonce     = errorsmod.Register(ModuleName, codeInvalidNonce, "invalid nonce")
	ErrInvalidProvider  = errorsmod.Register(ModuleName, codeInvalidProvider, "invalid provider")
	ErrInvalidRawData   = errorsmod.Register(ModuleName, codeInvalidRawData, "invalid raw data")
	ErrQuorumNotMet     = errorsmod.Register(ModuleName, codeQuorumNotMet, "quorum not met")
)
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 (
	KeyParams                = []byte{preficParams}
	KeyModeratorAddress      = []byte{prefixModeratorAddress}
	KeyOracleRequestDoc      = []byte{prefixOracleRequestDoc}
	KeyOracleRequestDocCount = []byte{prefixOracleRequestDocCount}
	KeyOracleData            = []byte{prefixOracleData}
	KeyOracleDataSet         = []byte{prefixOracleDataSet}
)

KV Store key prefixes

View Source
var (
	ErrInvalidLengthOracle        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowOracle          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupOracle = 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 (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var AggregationRule_name = map[int32]string{
	0: "AGGREGATION_RULE_UNSPECIFIED",
	1: "AGGREGATION_RULE_AVG",
	2: "AGGREGATION_RULE_MIN",
	3: "AGGREGATION_RULE_MAX",
	4: "AGGREGATION_RULE_MEDIAN",
}
View Source
var AggregationRule_value = map[string]int32{
	"AGGREGATION_RULE_UNSPECIFIED": 0,
	"AGGREGATION_RULE_AVG":         1,
	"AGGREGATION_RULE_MIN":         2,
	"AGGREGATION_RULE_MAX":         3,
	"AGGREGATION_RULE_MEDIAN":      4,
}
View Source
var (
	ModuleCdc = codec.NewAminoCodec(amino)
)
View Source
var Msg_serviceDesc = _Msg_serviceDesc
View Source
var OracleType_name = map[int32]string{
	0: "ORACLE_TYPE_UNSPECIFIED",
	1: "ORACLE_TYPE_MIN_GAS_PRICE",
	2: "ORACLE_TYPE_CURRENCY",
	3: "ORACLE_TYPE_STOCK",
	4: "ORACLE_TYPE_CRYPTO",
}
View Source
var OracleType_value = map[string]int32{
	"ORACLE_TYPE_UNSPECIFIED":   0,
	"ORACLE_TYPE_MIN_GAS_PRICE": 1,
	"ORACLE_TYPE_CURRENCY":      2,
	"ORACLE_TYPE_STOCK":         3,
	"ORACLE_TYPE_CRYPTO":        4,
}
View Source
var Query_serviceDesc = _Query_serviceDesc
View Source
var RequestStatus_name = map[int32]string{
	0: "REQUEST_STATUS_UNSPECIFIED",
	1: "REQUEST_STATUS_ENABLED",
	2: "REQUEST_STATUS_PAUSED",
	3: "REQUEST_STATUS_DISABLED",
}
View Source
var RequestStatus_value = map[string]int32{
	"REQUEST_STATUS_UNSPECIFIED": 0,
	"REQUEST_STATUS_ENABLED":     1,
	"REQUEST_STATUS_PAUSED":      2,
	"REQUEST_STATUS_DISABLED":    3,
}

Functions

func GetDataSetKey

func GetDataSetKey(request_id uint64, nonce uint64) []byte

GetDataSetKey returns the key for storing a DataSet

func GetOracleDataKey

func GetOracleDataKey(id uint64) []byte

GetOracleDataKey returns the key for storing oracle data

func GetOracleRequestDocKey

func GetOracleRequestDocKey(id uint64) []byte

GetOracleRequestDocKey returns the key for storing OracleRequsetDoc

func GetSubmitDataKey

func GetSubmitDataKey(request_id uint64, nonce uint64) []byte

func GetSubmitDataKeyByProvider

func GetSubmitDataKeyByProvider(request_id uint64, nonce uint64, provider string) []byte

func IDToBytes

func IDToBytes(id uint64) []byte

func IDToBytes32

func IDToBytes32(id uint32) []byte

func ParseOracleDataKey

func ParseOracleDataKey(key []byte) (uint64, error)

ParseOracleDataKey parses the oracle data key and returns the ID

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

RegisterInterfaces registers the x/oracle interfaces types with the interface registry

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers the necessary x/oracle interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization.

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)

func StringToBytes

func StringToBytes(str string) []byte

Types

type AggregationRule

type AggregationRule int32

AggregationRule defines the enumeration for aggregating oracle data Specifies how multiple data points should be combined into a single value

const (
	// Default value, should not be used
	AggregationRule_AGGREGATION_RULE_UNSPECIFIED AggregationRule = 0
	// Use average value to aggregate the data
	AggregationRule_AGGREGATION_RULE_AVG AggregationRule = 1
	// Use minimum value to aggregate the data
	AggregationRule_AGGREGATION_RULE_MIN AggregationRule = 2
	// Use maximum value to aggregate the data
	AggregationRule_AGGREGATION_RULE_MAX AggregationRule = 3
	// Use median value to aggregate the data
	AggregationRule_AGGREGATION_RULE_MEDIAN AggregationRule = 4
)

func (AggregationRule) EnumDescriptor

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

func (AggregationRule) String

func (x AggregationRule) String() string

type DataSet

type DataSet struct {
	// request_id represents the ID of the request this data set belongs to
	RequestId uint64 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// nonce represents the sequential number to prevent replay attacks
	Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// block_height represents the height of the block where the data was aggregated
	BlockHeight uint64 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
	// block_time represents the time of the block where the data was aggregated
	BlockTime uint64 `protobuf:"varint,4,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"`
	// raw_data represents the raw data in string format (can be JSON, CSV, etc.)
	RawData string `protobuf:"bytes,5,opt,name=raw_data,json=rawData,proto3" json:"raw_data,omitempty"`
}

DataSet defines the structure for oracle data sets

func (*DataSet) Descriptor

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

func (*DataSet) GetBlockHeight

func (m *DataSet) GetBlockHeight() uint64

func (*DataSet) GetBlockTime

func (m *DataSet) GetBlockTime() uint64

func (*DataSet) GetNonce

func (m *DataSet) GetNonce() uint64

func (*DataSet) GetRawData

func (m *DataSet) GetRawData() string

func (*DataSet) GetRequestId

func (m *DataSet) GetRequestId() uint64

func (*DataSet) Marshal

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

func (*DataSet) MarshalTo

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

func (*DataSet) MarshalToSizedBuffer

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

func (*DataSet) ProtoMessage

func (*DataSet) ProtoMessage()

func (*DataSet) Reset

func (m *DataSet) Reset()

func (*DataSet) Size

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

func (*DataSet) String

func (m *DataSet) String() string

func (*DataSet) Unmarshal

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

func (*DataSet) XXX_DiscardUnknown

func (m *DataSet) XXX_DiscardUnknown()

func (*DataSet) XXX_Marshal

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

func (*DataSet) XXX_Merge

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

func (*DataSet) XXX_Size

func (m *DataSet) XXX_Size() int

func (*DataSet) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	// params defines all the parameters of the module
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	// oracle_request_doc_count defines the count of oracle request documents
	OracleRequestDocCount uint64 `` /* 129-byte string literal not displayed */
	// request_oracle_docs defines the list of oracle request documents
	OracleRequestDocs []OracleRequestDoc `protobuf:"bytes,3,rep,name=oracle_request_docs,json=oracleRequestDocs,proto3" json:"oracle_request_docs"`
	// moderator_address defines the address of the oracle moderator
	ModeratorAddress string `protobuf:"bytes,4,opt,name=moderator_address,json=moderatorAddress,proto3" json:"moderator_address,omitempty"`
}

GenesisState defines the oracle module's genesis state

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState returns a default genesis state

func NewGenesisState

func NewGenesisState(params Params, docs []OracleRequestDoc, moderatorAddress string, oracleRequestDocCount uint64) GenesisState

NewGenesisState creates a new genesis state.

func (*GenesisState) Descriptor

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

func (*GenesisState) GetModeratorAddress

func (m *GenesisState) GetModeratorAddress() string

func (*GenesisState) GetOracleRequestDocCount

func (m *GenesisState) GetOracleRequestDocCount() uint64

func (*GenesisState) GetOracleRequestDocs

func (m *GenesisState) GetOracleRequestDocs() []OracleRequestDoc

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 MsgClient

type MsgClient interface {
	// RegisterOracleRequestDoc defines a method for registering a new oracle request document
	RegisterOracleRequestDoc(ctx context.Context, in *MsgRegisterOracleRequestDoc, opts ...grpc.CallOption) (*MsgRegisterOracleRequestDocResponse, error)
	// UpdateOracleRequestDoc defines a method for updating an existing oracle request document
	UpdateOracleRequestDoc(ctx context.Context, in *MsgUpdateOracleRequestDoc, opts ...grpc.CallOption) (*MsgUpdateOracleRequestDocResponse, error)
	// SubmitOracleData defines a method for submitting oracle data
	SubmitOracleData(ctx context.Context, in *MsgSubmitOracleData, opts ...grpc.CallOption) (*MsgSubmitOracleDataResponse, error)
	// UpdateModeratorAddress defines a method for updating the moderator address
	UpdateModeratorAddress(ctx context.Context, in *MsgUpdateModeratorAddress, opts ...grpc.CallOption) (*MsgUpdateModeratorAddressResponse, 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 MsgRegisterOracleRequestDoc

type MsgRegisterOracleRequestDoc struct {
	ModeratorAddress string `protobuf:"bytes,1,opt,name=moderator_address,json=moderatorAddress,proto3" json:"moderator_address,omitempty"`
	// The oracle request document to be registered
	RequestDoc OracleRequestDoc `protobuf:"bytes,2,opt,name=request_doc,json=requestDoc,proto3" json:"request_doc"`
}

MsgRegisterOracleRequestDoc represents a message to register a new oracle request document

func NewMsgRegisterOracleRequestDoc

func NewMsgRegisterOracleRequestDoc(
	moderatorAddress string,
	requestDoc OracleRequestDoc,
) *MsgRegisterOracleRequestDoc

NewMsgRegisterOracleRequestDoc creates a new MsgRegisterOracleRequestDoc instance

func (*MsgRegisterOracleRequestDoc) Descriptor

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

func (MsgRegisterOracleRequestDoc) GetSignBytes

func (msg MsgRegisterOracleRequestDoc) GetSignBytes() []byte

GetSignBytes implements the sdk.Msg interface

func (MsgRegisterOracleRequestDoc) GetSigners

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

GetSigners implements the sdk.Msg interface

func (*MsgRegisterOracleRequestDoc) Marshal

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

func (*MsgRegisterOracleRequestDoc) MarshalTo

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

func (*MsgRegisterOracleRequestDoc) MarshalToSizedBuffer

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

func (*MsgRegisterOracleRequestDoc) ProtoMessage

func (*MsgRegisterOracleRequestDoc) ProtoMessage()

func (*MsgRegisterOracleRequestDoc) Reset

func (m *MsgRegisterOracleRequestDoc) Reset()

func (MsgRegisterOracleRequestDoc) Route

func (msg MsgRegisterOracleRequestDoc) Route() string

Route implements the sdk.Msg interface

func (*MsgRegisterOracleRequestDoc) Size

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

func (*MsgRegisterOracleRequestDoc) String

func (m *MsgRegisterOracleRequestDoc) String() string

func (MsgRegisterOracleRequestDoc) Type

Type implements the sdk.Msg interface

func (*MsgRegisterOracleRequestDoc) Unmarshal

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

func (MsgRegisterOracleRequestDoc) ValidateBasic

func (msg MsgRegisterOracleRequestDoc) ValidateBasic() error

ValidateBasic implements the sdk.Msg interface

func (*MsgRegisterOracleRequestDoc) XXX_DiscardUnknown

func (m *MsgRegisterOracleRequestDoc) XXX_DiscardUnknown()

func (*MsgRegisterOracleRequestDoc) XXX_Marshal

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

func (*MsgRegisterOracleRequestDoc) XXX_Merge

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

func (*MsgRegisterOracleRequestDoc) XXX_Size

func (m *MsgRegisterOracleRequestDoc) XXX_Size() int

func (*MsgRegisterOracleRequestDoc) XXX_Unmarshal

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

type MsgRegisterOracleRequestDocResponse

type MsgRegisterOracleRequestDocResponse struct {
	// ID of the registered oracle request
	RequestId uint64 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
}

MsgRegisterOracleRequestDocResponse defines the Msg/RegisterOracleRequestDoc response type

func (*MsgRegisterOracleRequestDocResponse) Descriptor

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

func (*MsgRegisterOracleRequestDocResponse) GetRequestId

func (m *MsgRegisterOracleRequestDocResponse) GetRequestId() uint64

func (*MsgRegisterOracleRequestDocResponse) Marshal

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

func (*MsgRegisterOracleRequestDocResponse) MarshalTo

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

func (*MsgRegisterOracleRequestDocResponse) MarshalToSizedBuffer

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

func (*MsgRegisterOracleRequestDocResponse) ProtoMessage

func (*MsgRegisterOracleRequestDocResponse) ProtoMessage()

func (*MsgRegisterOracleRequestDocResponse) Reset

func (*MsgRegisterOracleRequestDocResponse) Size

func (*MsgRegisterOracleRequestDocResponse) String

func (*MsgRegisterOracleRequestDocResponse) Unmarshal

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

func (*MsgRegisterOracleRequestDocResponse) XXX_DiscardUnknown

func (m *MsgRegisterOracleRequestDocResponse) XXX_DiscardUnknown()

func (*MsgRegisterOracleRequestDocResponse) XXX_Marshal

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

func (*MsgRegisterOracleRequestDocResponse) XXX_Merge

func (*MsgRegisterOracleRequestDocResponse) XXX_Size

func (*MsgRegisterOracleRequestDocResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// RegisterOracleRequestDoc defines a method for registering a new oracle request document
	RegisterOracleRequestDoc(context.Context, *MsgRegisterOracleRequestDoc) (*MsgRegisterOracleRequestDocResponse, error)
	// UpdateOracleRequestDoc defines a method for updating an existing oracle request document
	UpdateOracleRequestDoc(context.Context, *MsgUpdateOracleRequestDoc) (*MsgUpdateOracleRequestDocResponse, error)
	// SubmitOracleData defines a method for submitting oracle data
	SubmitOracleData(context.Context, *MsgSubmitOracleData) (*MsgSubmitOracleDataResponse, error)
	// UpdateModeratorAddress defines a method for updating the moderator address
	UpdateModeratorAddress(context.Context, *MsgUpdateModeratorAddress) (*MsgUpdateModeratorAddressResponse, error)
}

MsgServer is the server API for Msg service.

type MsgSubmitOracleData

type MsgSubmitOracleData struct {
	AuthorityAddress string `protobuf:"bytes,1,opt,name=authority_address,json=authorityAddress,proto3" json:"authority_address,omitempty"`
	// The oracle data set to be submitted, containing the raw data and metadata
	DataSet *SubmitDataSet `protobuf:"bytes,2,opt,name=data_set,json=dataSet,proto3" json:"data_set,omitempty"`
}

MsgSubmitOracleData represents a message to submit oracle data

func NewMsgSubmitOracleData

func NewMsgSubmitOracleData(
	requestId uint64,
	nonce uint64,
	rawData string,
	provider string,
	signature string,
	authorityAddress string,
) *MsgSubmitOracleData

NewMsgSubmitOracleData creates a new MsgSubmitOracleData instance

func (*MsgSubmitOracleData) Descriptor

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

func (MsgSubmitOracleData) GetSignBytes

func (msg MsgSubmitOracleData) GetSignBytes() []byte

GetSignBytes implements the sdk.Msg interface

func (MsgSubmitOracleData) GetSigners

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

GetSigners implements the sdk.Msg interface

func (*MsgSubmitOracleData) Marshal

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

func (*MsgSubmitOracleData) MarshalTo

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

func (*MsgSubmitOracleData) MarshalToSizedBuffer

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

func (*MsgSubmitOracleData) ProtoMessage

func (*MsgSubmitOracleData) ProtoMessage()

func (*MsgSubmitOracleData) Reset

func (m *MsgSubmitOracleData) Reset()

func (MsgSubmitOracleData) Route

func (msg MsgSubmitOracleData) Route() string

Route implements the sdk.Msg interface

func (*MsgSubmitOracleData) Size

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

func (*MsgSubmitOracleData) String

func (m *MsgSubmitOracleData) String() string

func (MsgSubmitOracleData) Type

func (msg MsgSubmitOracleData) Type() string

Type implements the sdk.Msg interface

func (*MsgSubmitOracleData) Unmarshal

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

func (MsgSubmitOracleData) ValidateBasic

func (msg MsgSubmitOracleData) ValidateBasic() error

ValidateBasic implements the sdk.Msg interface

func (*MsgSubmitOracleData) XXX_DiscardUnknown

func (m *MsgSubmitOracleData) XXX_DiscardUnknown()

func (*MsgSubmitOracleData) XXX_Marshal

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

func (*MsgSubmitOracleData) XXX_Merge

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

func (*MsgSubmitOracleData) XXX_Size

func (m *MsgSubmitOracleData) XXX_Size() int

func (*MsgSubmitOracleData) XXX_Unmarshal

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

type MsgSubmitOracleDataResponse

type MsgSubmitOracleDataResponse struct {
}

MsgSubmitOracleDataResponse defines the Msg/SubmitOracleData response type

func (*MsgSubmitOracleDataResponse) Descriptor

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

func (*MsgSubmitOracleDataResponse) Marshal

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

func (*MsgSubmitOracleDataResponse) MarshalTo

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

func (*MsgSubmitOracleDataResponse) MarshalToSizedBuffer

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

func (*MsgSubmitOracleDataResponse) ProtoMessage

func (*MsgSubmitOracleDataResponse) ProtoMessage()

func (*MsgSubmitOracleDataResponse) Reset

func (m *MsgSubmitOracleDataResponse) Reset()

func (*MsgSubmitOracleDataResponse) Size

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

func (*MsgSubmitOracleDataResponse) String

func (m *MsgSubmitOracleDataResponse) String() string

func (*MsgSubmitOracleDataResponse) Unmarshal

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

func (*MsgSubmitOracleDataResponse) XXX_DiscardUnknown

func (m *MsgSubmitOracleDataResponse) XXX_DiscardUnknown()

func (*MsgSubmitOracleDataResponse) XXX_Marshal

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

func (*MsgSubmitOracleDataResponse) XXX_Merge

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

func (*MsgSubmitOracleDataResponse) XXX_Size

func (m *MsgSubmitOracleDataResponse) XXX_Size() int

func (*MsgSubmitOracleDataResponse) XXX_Unmarshal

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

type MsgUpdateModeratorAddress

type MsgUpdateModeratorAddress struct {
	ModeratorAddress    string `protobuf:"bytes,1,opt,name=moderator_address,json=moderatorAddress,proto3" json:"moderator_address,omitempty"`
	NewModeratorAddress string `protobuf:"bytes,2,opt,name=new_moderator_address,json=newModeratorAddress,proto3" json:"new_moderator_address,omitempty"`
}

MsgUpdateModeratorAddress represents a message to update the moderator address

func NewMsgUpdateModeratorAddress

func NewMsgUpdateModeratorAddress(moderatorAddress string, newModeratorAddress string) *MsgUpdateModeratorAddress

NewMsgUpdateModeratorAddress creates a new MsgUpdateModeratorAddress instance

func (*MsgUpdateModeratorAddress) Descriptor

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

func (MsgUpdateModeratorAddress) GetSignBytes

func (msg MsgUpdateModeratorAddress) GetSignBytes() []byte

GetSignBytes implements the sdk.Msg interface

func (MsgUpdateModeratorAddress) GetSigners

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

GetSigners implements the sdk.Msg interface

func (*MsgUpdateModeratorAddress) Marshal

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

func (*MsgUpdateModeratorAddress) MarshalTo

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

func (*MsgUpdateModeratorAddress) MarshalToSizedBuffer

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

func (*MsgUpdateModeratorAddress) ProtoMessage

func (*MsgUpdateModeratorAddress) ProtoMessage()

func (*MsgUpdateModeratorAddress) Reset

func (m *MsgUpdateModeratorAddress) Reset()

func (MsgUpdateModeratorAddress) Route

func (msg MsgUpdateModeratorAddress) Route() string

Route implements the sdk.Msg interface

func (*MsgUpdateModeratorAddress) Size

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

func (*MsgUpdateModeratorAddress) String

func (m *MsgUpdateModeratorAddress) String() string

func (MsgUpdateModeratorAddress) Type

func (msg MsgUpdateModeratorAddress) Type() string

Type implements the sdk.Msg interface

func (*MsgUpdateModeratorAddress) Unmarshal

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

func (MsgUpdateModeratorAddress) ValidateBasic

func (msg MsgUpdateModeratorAddress) ValidateBasic() error

ValidateBasic implements the sdk.Msg interface

func (*MsgUpdateModeratorAddress) XXX_DiscardUnknown

func (m *MsgUpdateModeratorAddress) XXX_DiscardUnknown()

func (*MsgUpdateModeratorAddress) XXX_Marshal

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

func (*MsgUpdateModeratorAddress) XXX_Merge

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

func (*MsgUpdateModeratorAddress) XXX_Size

func (m *MsgUpdateModeratorAddress) XXX_Size() int

func (*MsgUpdateModeratorAddress) XXX_Unmarshal

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

type MsgUpdateModeratorAddressResponse

type MsgUpdateModeratorAddressResponse struct {
}

MsgUpdateModeratorAddressResponse defines the Msg/UpdateModeratorAddress response type

func (*MsgUpdateModeratorAddressResponse) Descriptor

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

func (*MsgUpdateModeratorAddressResponse) Marshal

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

func (*MsgUpdateModeratorAddressResponse) MarshalTo

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

func (*MsgUpdateModeratorAddressResponse) MarshalToSizedBuffer

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

func (*MsgUpdateModeratorAddressResponse) ProtoMessage

func (*MsgUpdateModeratorAddressResponse) ProtoMessage()

func (*MsgUpdateModeratorAddressResponse) Reset

func (*MsgUpdateModeratorAddressResponse) Size

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

func (*MsgUpdateModeratorAddressResponse) String

func (*MsgUpdateModeratorAddressResponse) Unmarshal

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

func (*MsgUpdateModeratorAddressResponse) XXX_DiscardUnknown

func (m *MsgUpdateModeratorAddressResponse) XXX_DiscardUnknown()

func (*MsgUpdateModeratorAddressResponse) XXX_Marshal

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

func (*MsgUpdateModeratorAddressResponse) XXX_Merge

func (*MsgUpdateModeratorAddressResponse) XXX_Size

func (m *MsgUpdateModeratorAddressResponse) XXX_Size() int

func (*MsgUpdateModeratorAddressResponse) XXX_Unmarshal

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

type MsgUpdateOracleRequestDoc

type MsgUpdateOracleRequestDoc struct {
	ModeratorAddress string `protobuf:"bytes,1,opt,name=moderator_address,json=moderatorAddress,proto3" json:"moderator_address,omitempty"`
	// The updated oracle request document
	RequestDoc OracleRequestDoc `protobuf:"bytes,2,opt,name=request_doc,json=requestDoc,proto3" json:"request_doc"`
	// Reason for the update
	Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"`
}

MsgUpdateOracleRequestDoc represents a message to update an existing oracle request document

func NewMsgUpdateOracleRequestDoc

func NewMsgUpdateOracleRequestDoc(
	moderatorAddress string,
	requestDoc OracleRequestDoc,
	reason string,
) *MsgUpdateOracleRequestDoc

NewMsgUpdateOracleRequestDoc creates a new MsgUpdateOracleRequestDoc instance

func (*MsgUpdateOracleRequestDoc) Descriptor

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

func (MsgUpdateOracleRequestDoc) GetSignBytes

func (msg MsgUpdateOracleRequestDoc) GetSignBytes() []byte

GetSignBytes implements the sdk.Msg interface

func (MsgUpdateOracleRequestDoc) GetSigners

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

GetSigners implements the sdk.Msg interface

func (*MsgUpdateOracleRequestDoc) Marshal

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

func (*MsgUpdateOracleRequestDoc) MarshalTo

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

func (*MsgUpdateOracleRequestDoc) MarshalToSizedBuffer

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

func (*MsgUpdateOracleRequestDoc) ProtoMessage

func (*MsgUpdateOracleRequestDoc) ProtoMessage()

func (*MsgUpdateOracleRequestDoc) Reset

func (m *MsgUpdateOracleRequestDoc) Reset()

func (MsgUpdateOracleRequestDoc) Route

func (msg MsgUpdateOracleRequestDoc) Route() string

Route implements the sdk.Msg interface

func (*MsgUpdateOracleRequestDoc) Size

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

func (*MsgUpdateOracleRequestDoc) String

func (m *MsgUpdateOracleRequestDoc) String() string

func (MsgUpdateOracleRequestDoc) Type

func (msg MsgUpdateOracleRequestDoc) Type() string

Type implements the sdk.Msg interface

func (*MsgUpdateOracleRequestDoc) Unmarshal

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

func (MsgUpdateOracleRequestDoc) ValidateBasic

func (msg MsgUpdateOracleRequestDoc) ValidateBasic() error

ValidateBasic implements the sdk.Msg interface

func (*MsgUpdateOracleRequestDoc) XXX_DiscardUnknown

func (m *MsgUpdateOracleRequestDoc) XXX_DiscardUnknown()

func (*MsgUpdateOracleRequestDoc) XXX_Marshal

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

func (*MsgUpdateOracleRequestDoc) XXX_Merge

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

func (*MsgUpdateOracleRequestDoc) XXX_Size

func (m *MsgUpdateOracleRequestDoc) XXX_Size() int

func (*MsgUpdateOracleRequestDoc) XXX_Unmarshal

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

type MsgUpdateOracleRequestDocResponse

type MsgUpdateOracleRequestDocResponse struct {
	// ID of the updated oracle request
	RequestId uint64 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
}

MsgUpdateOracleRequestDocResponse defines the Msg/UpdateOracleRequestDoc response type

func (*MsgUpdateOracleRequestDocResponse) Descriptor

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

func (*MsgUpdateOracleRequestDocResponse) GetRequestId

func (m *MsgUpdateOracleRequestDocResponse) GetRequestId() uint64

func (*MsgUpdateOracleRequestDocResponse) Marshal

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

func (*MsgUpdateOracleRequestDocResponse) MarshalTo

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

func (*MsgUpdateOracleRequestDocResponse) MarshalToSizedBuffer

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

func (*MsgUpdateOracleRequestDocResponse) ProtoMessage

func (*MsgUpdateOracleRequestDocResponse) ProtoMessage()

func (*MsgUpdateOracleRequestDocResponse) Reset

func (*MsgUpdateOracleRequestDocResponse) Size

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

func (*MsgUpdateOracleRequestDocResponse) String

func (*MsgUpdateOracleRequestDocResponse) Unmarshal

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

func (*MsgUpdateOracleRequestDocResponse) XXX_DiscardUnknown

func (m *MsgUpdateOracleRequestDocResponse) XXX_DiscardUnknown()

func (*MsgUpdateOracleRequestDocResponse) XXX_Marshal

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

func (*MsgUpdateOracleRequestDocResponse) XXX_Merge

func (*MsgUpdateOracleRequestDocResponse) XXX_Size

func (m *MsgUpdateOracleRequestDocResponse) XXX_Size() int

func (*MsgUpdateOracleRequestDocResponse) XXX_Unmarshal

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

type OracleEndpoint

type OracleEndpoint struct {
	// URL of the oracle endpoint
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// Type of the oracle endpoint
	ParseRule string `protobuf:"bytes,2,opt,name=parse_rule,json=parseRule,proto3" json:"parse_rule,omitempty"`
}

func (*OracleEndpoint) Descriptor

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

func (*OracleEndpoint) GetParseRule

func (m *OracleEndpoint) GetParseRule() string

func (*OracleEndpoint) GetUrl

func (m *OracleEndpoint) GetUrl() string

func (*OracleEndpoint) Marshal

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

func (*OracleEndpoint) MarshalTo

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

func (*OracleEndpoint) MarshalToSizedBuffer

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

func (*OracleEndpoint) ProtoMessage

func (*OracleEndpoint) ProtoMessage()

func (*OracleEndpoint) Reset

func (m *OracleEndpoint) Reset()

func (*OracleEndpoint) Size

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

func (*OracleEndpoint) String

func (m *OracleEndpoint) String() string

func (*OracleEndpoint) Unmarshal

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

func (*OracleEndpoint) XXX_DiscardUnknown

func (m *OracleEndpoint) XXX_DiscardUnknown()

func (*OracleEndpoint) XXX_Marshal

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

func (*OracleEndpoint) XXX_Merge

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

func (*OracleEndpoint) XXX_Size

func (m *OracleEndpoint) XXX_Size() int

func (*OracleEndpoint) XXX_Unmarshal

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

type OracleHooks

type OracleHooks interface {
	AfterOracleEnd(ctx sdk.Context, dataSet DataSet)
	BeforeOracleStart(ctx sdk.Context, dataSet DataSet)
}

OracleHooks event hooks for oracle processing

type OracleRequestDoc

type OracleRequestDoc struct {
	// Unique identifier for the oracle request
	RequestId uint64 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// Type of oracle data being requested
	OracleType OracleType `protobuf:"varint,2,opt,name=oracle_type,json=oracleType,proto3,enum=guru.oracle.v1.OracleType" json:"oracle_type,omitempty"`
	// Human-readable name for the oracle request
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// Detailed description of what data is needed and its purpose
	Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	// Time period in seconds between data updates
	Period uint32 `protobuf:"varint,5,opt,name=period,proto3" json:"period,omitempty"`
	// List of account addresses that are authorized to provide data
	AccountList []string `protobuf:"bytes,6,rep,name=account_list,json=accountList,proto3" json:"account_list,omitempty"`
	// Minimum number of oracle nodes required to validate the data
	Quorum uint32 `protobuf:"varint,7,opt,name=quorum,proto3" json:"quorum,omitempty"`
	// Source endpoints where the data can be fetched
	Endpoints []*OracleEndpoint `protobuf:"bytes,8,rep,name=endpoints,proto3" json:"endpoints,omitempty"`
	// Rule for aggregating multiple data points (e.g., median, mean)
	AggregationRule AggregationRule `` /* 143-byte string literal not displayed */
	// Current status of the request
	Status RequestStatus `protobuf:"varint,10,opt,name=status,proto3,enum=guru.oracle.v1.RequestStatus" json:"status,omitempty"`
	// Sequential number to ensure data freshness
	Nonce uint64 `protobuf:"varint,12,opt,name=nonce,proto3" json:"nonce,omitempty"`
}

OracleRequestDoc defines the structure for oracle request documents This is the main document that describes what oracle data is needed and how it should be processed

func (*OracleRequestDoc) Descriptor

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

func (*OracleRequestDoc) GetAccountList

func (m *OracleRequestDoc) GetAccountList() []string

func (*OracleRequestDoc) GetAggregationRule

func (m *OracleRequestDoc) GetAggregationRule() AggregationRule

func (*OracleRequestDoc) GetDescription

func (m *OracleRequestDoc) GetDescription() string

func (*OracleRequestDoc) GetEndpoints

func (m *OracleRequestDoc) GetEndpoints() []*OracleEndpoint

func (*OracleRequestDoc) GetName

func (m *OracleRequestDoc) GetName() string

func (*OracleRequestDoc) GetNonce

func (m *OracleRequestDoc) GetNonce() uint64

func (*OracleRequestDoc) GetOracleType

func (m *OracleRequestDoc) GetOracleType() OracleType

func (*OracleRequestDoc) GetPeriod

func (m *OracleRequestDoc) GetPeriod() uint32

func (*OracleRequestDoc) GetQuorum

func (m *OracleRequestDoc) GetQuorum() uint32

func (*OracleRequestDoc) GetRequestId

func (m *OracleRequestDoc) GetRequestId() uint64

func (*OracleRequestDoc) GetStatus

func (m *OracleRequestDoc) GetStatus() RequestStatus

func (*OracleRequestDoc) Marshal

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

func (*OracleRequestDoc) MarshalTo

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

func (*OracleRequestDoc) MarshalToSizedBuffer

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

func (*OracleRequestDoc) ProtoMessage

func (*OracleRequestDoc) ProtoMessage()

func (*OracleRequestDoc) Reset

func (m *OracleRequestDoc) Reset()

func (*OracleRequestDoc) Size

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

func (*OracleRequestDoc) String

func (m *OracleRequestDoc) String() string

func (*OracleRequestDoc) Unmarshal

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

func (OracleRequestDoc) Validate

func (doc OracleRequestDoc) Validate() error

Validate performs basic validation on OracleRequestDoc

func (*OracleRequestDoc) XXX_DiscardUnknown

func (m *OracleRequestDoc) XXX_DiscardUnknown()

func (*OracleRequestDoc) XXX_Marshal

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

func (*OracleRequestDoc) XXX_Merge

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

func (*OracleRequestDoc) XXX_Size

func (m *OracleRequestDoc) XXX_Size() int

func (*OracleRequestDoc) XXX_Unmarshal

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

type OracleType

type OracleType int32

OracleType defines the type of oracle data that can be requested and provided This enum helps categorize different kinds of oracle data sources and their purposes

const (
	// Default value, should not be used
	OracleType_ORACLE_TYPE_UNSPECIFIED OracleType = 0
	// Minimum gas price oracle for network fee estimation
	OracleType_ORACLE_TYPE_MIN_GAS_PRICE OracleType = 1
	// Currency exchange rates and forex data
	OracleType_ORACLE_TYPE_CURRENCY OracleType = 2
	// Stock market data and indices
	OracleType_ORACLE_TYPE_STOCK OracleType = 3
	// Cryptocurrency prices and market data
	OracleType_ORACLE_TYPE_CRYPTO OracleType = 4
)

func (OracleType) EnumDescriptor

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

func (OracleType) String

func (x OracleType) String() string

type Params

type Params struct {
	// enable_oracle defines whether the oracle module is enabled
	EnableOracle bool `protobuf:"varint,1,opt,name=enable_oracle,json=enableOracle,proto3" json:"enable_oracle,omitempty"`
	// submit_window defines the time window in seconds for submitting oracle data
	SubmitWindow uint64 `protobuf:"varint,2,opt,name=submit_window,json=submitWindow,proto3" json:"submit_window,omitempty"`
	// min_submit_per_window defines the minimum number of submissions required per window
	MinSubmitPerWindow cosmossdk_io_math.LegacyDec `` /* 148-byte string literal not displayed */
	// slash_fraction_downtime defines the fraction of stake to slash for downtime
	SlashFractionDowntime cosmossdk_io_math.LegacyDec `` /* 155-byte string literal not displayed */
}

Params defines the parameters for the oracle module

func DefaultParams

func DefaultParams() Params

DefaultParams returns default oracle module parameters

func (*Params) Descriptor

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

func (*Params) GetEnableOracle

func (m *Params) GetEnableOracle() bool

func (*Params) GetSubmitWindow

func (m *Params) GetSubmitWindow() uint64

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 (p Params) Validate() error

Validate performs basic validation on oracle parameters

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 {
	// Parameters queries the parameters of the module
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// OracleSubmitData queries oracle data by ID
	OracleSubmitData(ctx context.Context, in *QueryOracleSubmitDataRequest, opts ...grpc.CallOption) (*QueryOracleSubmitDataResponse, error)
	// OracleData queries oracle data by ID
	OracleData(ctx context.Context, in *QueryOracleDataRequest, opts ...grpc.CallOption) (*QueryOracleDataResponse, error)
	// OracleRequestDoc queries oracle request doc by ID
	OracleRequestDoc(ctx context.Context, in *QueryOracleRequestDocRequest, opts ...grpc.CallOption) (*QueryOracleRequestDocResponse, error)
	// OracleRequestDocs queries an oracle request document list
	OracleRequestDocs(ctx context.Context, in *QueryOracleRequestDocsRequest, opts ...grpc.CallOption) (*QueryOracleRequestDocsResponse, error)
	// ModeratorAddress queries the moderator address
	ModeratorAddress(ctx context.Context, in *QueryModeratorAddressRequest, opts ...grpc.CallOption) (*QueryModeratorAddressResponse, 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 QueryModeratorAddressRequest

type QueryModeratorAddressRequest struct {
}

QueryModeratorAddressRequest is request type for the Query/ModeratorAddress RPC method

func (*QueryModeratorAddressRequest) Descriptor

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

func (*QueryModeratorAddressRequest) Marshal

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

func (*QueryModeratorAddressRequest) MarshalTo

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

func (*QueryModeratorAddressRequest) MarshalToSizedBuffer

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

func (*QueryModeratorAddressRequest) ProtoMessage

func (*QueryModeratorAddressRequest) ProtoMessage()

func (*QueryModeratorAddressRequest) Reset

func (m *QueryModeratorAddressRequest) Reset()

func (*QueryModeratorAddressRequest) Size

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

func (*QueryModeratorAddressRequest) String

func (*QueryModeratorAddressRequest) Unmarshal

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

func (*QueryModeratorAddressRequest) XXX_DiscardUnknown

func (m *QueryModeratorAddressRequest) XXX_DiscardUnknown()

func (*QueryModeratorAddressRequest) XXX_Marshal

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

func (*QueryModeratorAddressRequest) XXX_Merge

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

func (*QueryModeratorAddressRequest) XXX_Size

func (m *QueryModeratorAddressRequest) XXX_Size() int

func (*QueryModeratorAddressRequest) XXX_Unmarshal

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

type QueryModeratorAddressResponse

type QueryModeratorAddressResponse struct {
	// moderator_address is the address of the moderator
	ModeratorAddress string `protobuf:"bytes,1,opt,name=moderator_address,json=moderatorAddress,proto3" json:"moderator_address,omitempty"`
}

QueryModeratorAddressResponse is response type for the Query/ModeratorAddress RPC method

func (*QueryModeratorAddressResponse) Descriptor

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

func (*QueryModeratorAddressResponse) GetModeratorAddress

func (m *QueryModeratorAddressResponse) GetModeratorAddress() string

func (*QueryModeratorAddressResponse) Marshal

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

func (*QueryModeratorAddressResponse) MarshalTo

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

func (*QueryModeratorAddressResponse) MarshalToSizedBuffer

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

func (*QueryModeratorAddressResponse) ProtoMessage

func (*QueryModeratorAddressResponse) ProtoMessage()

func (*QueryModeratorAddressResponse) Reset

func (m *QueryModeratorAddressResponse) Reset()

func (*QueryModeratorAddressResponse) Size

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

func (*QueryModeratorAddressResponse) String

func (*QueryModeratorAddressResponse) Unmarshal

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

func (*QueryModeratorAddressResponse) XXX_DiscardUnknown

func (m *QueryModeratorAddressResponse) XXX_DiscardUnknown()

func (*QueryModeratorAddressResponse) XXX_Marshal

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

func (*QueryModeratorAddressResponse) XXX_Merge

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

func (*QueryModeratorAddressResponse) XXX_Size

func (m *QueryModeratorAddressResponse) XXX_Size() int

func (*QueryModeratorAddressResponse) XXX_Unmarshal

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

type QueryOracleDataRequest

type QueryOracleDataRequest struct {
	// request_id is the unique identifier of the oracle request
	RequestId uint64 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
}

QueryOracleDataRequest is request type for the Query/OracleData RPC method

func (*QueryOracleDataRequest) Descriptor

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

func (*QueryOracleDataRequest) GetRequestId

func (m *QueryOracleDataRequest) GetRequestId() uint64

func (*QueryOracleDataRequest) Marshal

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

func (*QueryOracleDataRequest) MarshalTo

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

func (*QueryOracleDataRequest) MarshalToSizedBuffer

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

func (*QueryOracleDataRequest) ProtoMessage

func (*QueryOracleDataRequest) ProtoMessage()

func (*QueryOracleDataRequest) Reset

func (m *QueryOracleDataRequest) Reset()

func (*QueryOracleDataRequest) Size

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

func (*QueryOracleDataRequest) String

func (m *QueryOracleDataRequest) String() string

func (*QueryOracleDataRequest) Unmarshal

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

func (*QueryOracleDataRequest) XXX_DiscardUnknown

func (m *QueryOracleDataRequest) XXX_DiscardUnknown()

func (*QueryOracleDataRequest) XXX_Marshal

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

func (*QueryOracleDataRequest) XXX_Merge

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

func (*QueryOracleDataRequest) XXX_Size

func (m *QueryOracleDataRequest) XXX_Size() int

func (*QueryOracleDataRequest) XXX_Unmarshal

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

type QueryOracleDataResponse

type QueryOracleDataResponse struct {
	// data is the oracle data for the requested ID
	DataSet *DataSet `protobuf:"bytes,1,opt,name=data_set,json=dataSet,proto3" json:"data_set,omitempty"`
}

QueryOracleDataResponse is response type for the Query/OracleData RPC method

func (*QueryOracleDataResponse) Descriptor

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

func (*QueryOracleDataResponse) GetDataSet

func (m *QueryOracleDataResponse) GetDataSet() *DataSet

func (*QueryOracleDataResponse) Marshal

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

func (*QueryOracleDataResponse) MarshalTo

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

func (*QueryOracleDataResponse) MarshalToSizedBuffer

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

func (*QueryOracleDataResponse) ProtoMessage

func (*QueryOracleDataResponse) ProtoMessage()

func (*QueryOracleDataResponse) Reset

func (m *QueryOracleDataResponse) Reset()

func (*QueryOracleDataResponse) Size

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

func (*QueryOracleDataResponse) String

func (m *QueryOracleDataResponse) String() string

func (*QueryOracleDataResponse) Unmarshal

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

func (*QueryOracleDataResponse) XXX_DiscardUnknown

func (m *QueryOracleDataResponse) XXX_DiscardUnknown()

func (*QueryOracleDataResponse) XXX_Marshal

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

func (*QueryOracleDataResponse) XXX_Merge

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

func (*QueryOracleDataResponse) XXX_Size

func (m *QueryOracleDataResponse) XXX_Size() int

func (*QueryOracleDataResponse) XXX_Unmarshal

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

type QueryOracleRequestDocRequest

type QueryOracleRequestDocRequest struct {
	// request_id is the unique identifier of the oracle request
	RequestId uint64 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
}

QueryOracleRequestRequest is request type for the Query/OracleRequest RPC method

func (*QueryOracleRequestDocRequest) Descriptor

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

func (*QueryOracleRequestDocRequest) GetRequestId

func (m *QueryOracleRequestDocRequest) GetRequestId() uint64

func (*QueryOracleRequestDocRequest) Marshal

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

func (*QueryOracleRequestDocRequest) MarshalTo

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

func (*QueryOracleRequestDocRequest) MarshalToSizedBuffer

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

func (*QueryOracleRequestDocRequest) ProtoMessage

func (*QueryOracleRequestDocRequest) ProtoMessage()

func (*QueryOracleRequestDocRequest) Reset

func (m *QueryOracleRequestDocRequest) Reset()

func (*QueryOracleRequestDocRequest) Size

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

func (*QueryOracleRequestDocRequest) String

func (*QueryOracleRequestDocRequest) Unmarshal

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

func (*QueryOracleRequestDocRequest) XXX_DiscardUnknown

func (m *QueryOracleRequestDocRequest) XXX_DiscardUnknown()

func (*QueryOracleRequestDocRequest) XXX_Marshal

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

func (*QueryOracleRequestDocRequest) XXX_Merge

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

func (*QueryOracleRequestDocRequest) XXX_Size

func (m *QueryOracleRequestDocRequest) XXX_Size() int

func (*QueryOracleRequestDocRequest) XXX_Unmarshal

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

type QueryOracleRequestDocResponse

type QueryOracleRequestDocResponse struct {
	// request is the oracle request for the requested ID
	RequestDoc OracleRequestDoc `protobuf:"bytes,1,opt,name=request_doc,json=requestDoc,proto3" json:"request_doc"`
}

QueryOracleRequestResponse is response type for the Query/OracleRequest RPC method

func (*QueryOracleRequestDocResponse) Descriptor

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

func (*QueryOracleRequestDocResponse) GetRequestDoc

func (*QueryOracleRequestDocResponse) Marshal

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

func (*QueryOracleRequestDocResponse) MarshalTo

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

func (*QueryOracleRequestDocResponse) MarshalToSizedBuffer

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

func (*QueryOracleRequestDocResponse) ProtoMessage

func (*QueryOracleRequestDocResponse) ProtoMessage()

func (*QueryOracleRequestDocResponse) Reset

func (m *QueryOracleRequestDocResponse) Reset()

func (*QueryOracleRequestDocResponse) Size

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

func (*QueryOracleRequestDocResponse) String

func (*QueryOracleRequestDocResponse) Unmarshal

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

func (*QueryOracleRequestDocResponse) XXX_DiscardUnknown

func (m *QueryOracleRequestDocResponse) XXX_DiscardUnknown()

func (*QueryOracleRequestDocResponse) XXX_Marshal

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

func (*QueryOracleRequestDocResponse) XXX_Merge

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

func (*QueryOracleRequestDocResponse) XXX_Size

func (m *QueryOracleRequestDocResponse) XXX_Size() int

func (*QueryOracleRequestDocResponse) XXX_Unmarshal

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

type QueryOracleRequestDocsRequest

type QueryOracleRequestDocsRequest struct {
	Status RequestStatus `protobuf:"varint,1,opt,name=status,proto3,enum=guru.oracle.v1.RequestStatus" json:"status,omitempty"`
}

QueryOracleRequestDocRequest is the request type for the Query/OracleRequestDoc RPC method

func (*QueryOracleRequestDocsRequest) Descriptor

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

func (*QueryOracleRequestDocsRequest) GetStatus

func (*QueryOracleRequestDocsRequest) Marshal

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

func (*QueryOracleRequestDocsRequest) MarshalTo

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

func (*QueryOracleRequestDocsRequest) MarshalToSizedBuffer

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

func (*QueryOracleRequestDocsRequest) ProtoMessage

func (*QueryOracleRequestDocsRequest) ProtoMessage()

func (*QueryOracleRequestDocsRequest) Reset

func (m *QueryOracleRequestDocsRequest) Reset()

func (*QueryOracleRequestDocsRequest) Size

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

func (*QueryOracleRequestDocsRequest) String

func (*QueryOracleRequestDocsRequest) Unmarshal

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

func (*QueryOracleRequestDocsRequest) XXX_DiscardUnknown

func (m *QueryOracleRequestDocsRequest) XXX_DiscardUnknown()

func (*QueryOracleRequestDocsRequest) XXX_Marshal

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

func (*QueryOracleRequestDocsRequest) XXX_Merge

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

func (*QueryOracleRequestDocsRequest) XXX_Size

func (m *QueryOracleRequestDocsRequest) XXX_Size() int

func (*QueryOracleRequestDocsRequest) XXX_Unmarshal

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

type QueryOracleRequestDocsResponse

type QueryOracleRequestDocsResponse struct {
	OracleRequestDocs []*OracleRequestDoc `protobuf:"bytes,1,rep,name=oracle_request_docs,json=oracleRequestDocs,proto3" json:"oracle_request_docs,omitempty"`
}

QueryOracleRequestDocResponse is the response type for the Query/OracleRequestDoc RPC method

func (*QueryOracleRequestDocsResponse) Descriptor

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

func (*QueryOracleRequestDocsResponse) GetOracleRequestDocs

func (m *QueryOracleRequestDocsResponse) GetOracleRequestDocs() []*OracleRequestDoc

func (*QueryOracleRequestDocsResponse) Marshal

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

func (*QueryOracleRequestDocsResponse) MarshalTo

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

func (*QueryOracleRequestDocsResponse) MarshalToSizedBuffer

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

func (*QueryOracleRequestDocsResponse) ProtoMessage

func (*QueryOracleRequestDocsResponse) ProtoMessage()

func (*QueryOracleRequestDocsResponse) Reset

func (m *QueryOracleRequestDocsResponse) Reset()

func (*QueryOracleRequestDocsResponse) Size

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

func (*QueryOracleRequestDocsResponse) String

func (*QueryOracleRequestDocsResponse) Unmarshal

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

func (*QueryOracleRequestDocsResponse) XXX_DiscardUnknown

func (m *QueryOracleRequestDocsResponse) XXX_DiscardUnknown()

func (*QueryOracleRequestDocsResponse) XXX_Marshal

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

func (*QueryOracleRequestDocsResponse) XXX_Merge

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

func (*QueryOracleRequestDocsResponse) XXX_Size

func (m *QueryOracleRequestDocsResponse) XXX_Size() int

func (*QueryOracleRequestDocsResponse) XXX_Unmarshal

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

type QueryOracleSubmitDataRequest

type QueryOracleSubmitDataRequest struct {
	// request_id is the unique identifier of the oracle request
	RequestId uint64 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	Nonce     uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"`
	Provider  string `protobuf:"bytes,3,opt,name=provider,proto3" json:"provider,omitempty"`
}

QueryOracleSubmitDataRequest is request type for the Query/OracleSubmitData RPC method

func (*QueryOracleSubmitDataRequest) Descriptor

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

func (*QueryOracleSubmitDataRequest) GetNonce

func (m *QueryOracleSubmitDataRequest) GetNonce() uint64

func (*QueryOracleSubmitDataRequest) GetProvider

func (m *QueryOracleSubmitDataRequest) GetProvider() string

func (*QueryOracleSubmitDataRequest) GetRequestId

func (m *QueryOracleSubmitDataRequest) GetRequestId() uint64

func (*QueryOracleSubmitDataRequest) Marshal

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

func (*QueryOracleSubmitDataRequest) MarshalTo

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

func (*QueryOracleSubmitDataRequest) MarshalToSizedBuffer

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

func (*QueryOracleSubmitDataRequest) ProtoMessage

func (*QueryOracleSubmitDataRequest) ProtoMessage()

func (*QueryOracleSubmitDataRequest) Reset

func (m *QueryOracleSubmitDataRequest) Reset()

func (*QueryOracleSubmitDataRequest) Size

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

func (*QueryOracleSubmitDataRequest) String

func (*QueryOracleSubmitDataRequest) Unmarshal

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

func (*QueryOracleSubmitDataRequest) XXX_DiscardUnknown

func (m *QueryOracleSubmitDataRequest) XXX_DiscardUnknown()

func (*QueryOracleSubmitDataRequest) XXX_Marshal

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

func (*QueryOracleSubmitDataRequest) XXX_Merge

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

func (*QueryOracleSubmitDataRequest) XXX_Size

func (m *QueryOracleSubmitDataRequest) XXX_Size() int

func (*QueryOracleSubmitDataRequest) XXX_Unmarshal

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

type QueryOracleSubmitDataResponse

type QueryOracleSubmitDataResponse struct {
	// submit_datas is the list of oracle submit data for the requested ID, nonce and provider
	SubmitDatas []*SubmitDataSet `protobuf:"bytes,1,rep,name=submit_datas,json=submitDatas,proto3" json:"submit_datas,omitempty"`
}

QueryOracleSubmitDataResponse is response type for the Query/OracleSubmitData RPC method

func (*QueryOracleSubmitDataResponse) Descriptor

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

func (*QueryOracleSubmitDataResponse) GetSubmitDatas

func (m *QueryOracleSubmitDataResponse) GetSubmitDatas() []*SubmitDataSet

func (*QueryOracleSubmitDataResponse) Marshal

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

func (*QueryOracleSubmitDataResponse) MarshalTo

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

func (*QueryOracleSubmitDataResponse) MarshalToSizedBuffer

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

func (*QueryOracleSubmitDataResponse) ProtoMessage

func (*QueryOracleSubmitDataResponse) ProtoMessage()

func (*QueryOracleSubmitDataResponse) Reset

func (m *QueryOracleSubmitDataResponse) Reset()

func (*QueryOracleSubmitDataResponse) Size

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

func (*QueryOracleSubmitDataResponse) String

func (*QueryOracleSubmitDataResponse) Unmarshal

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

func (*QueryOracleSubmitDataResponse) XXX_DiscardUnknown

func (m *QueryOracleSubmitDataResponse) XXX_DiscardUnknown()

func (*QueryOracleSubmitDataResponse) XXX_Marshal

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

func (*QueryOracleSubmitDataResponse) XXX_Merge

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

func (*QueryOracleSubmitDataResponse) XXX_Size

func (m *QueryOracleSubmitDataResponse) XXX_Size() int

func (*QueryOracleSubmitDataResponse) XXX_Unmarshal

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

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is request type for the Query/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 holds all the parameters of this module
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse is response type for the Query/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 {
	// Parameters queries the parameters of the module
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// OracleSubmitData queries oracle data by ID
	OracleSubmitData(context.Context, *QueryOracleSubmitDataRequest) (*QueryOracleSubmitDataResponse, error)
	// OracleData queries oracle data by ID
	OracleData(context.Context, *QueryOracleDataRequest) (*QueryOracleDataResponse, error)
	// OracleRequestDoc queries oracle request doc by ID
	OracleRequestDoc(context.Context, *QueryOracleRequestDocRequest) (*QueryOracleRequestDocResponse, error)
	// OracleRequestDocs queries an oracle request document list
	OracleRequestDocs(context.Context, *QueryOracleRequestDocsRequest) (*QueryOracleRequestDocsResponse, error)
	// ModeratorAddress queries the moderator address
	ModeratorAddress(context.Context, *QueryModeratorAddressRequest) (*QueryModeratorAddressResponse, error)
}

QueryServer is the server API for Query service.

type RequestStatus

type RequestStatus int32

RequestStatus defines the current state of an oracle request This helps track the lifecycle of oracle data requests

const (
	// Default value, should not be used
	RequestStatus_REQUEST_STATUS_UNSPECIFIED RequestStatus = 0
	// Request is enabled
	RequestStatus_REQUEST_STATUS_ENABLED RequestStatus = 1
	// Request is paused
	RequestStatus_REQUEST_STATUS_PAUSED RequestStatus = 2
	// Request is disabled
	RequestStatus_REQUEST_STATUS_DISABLED RequestStatus = 3
)

func (RequestStatus) EnumDescriptor

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

func (RequestStatus) String

func (x RequestStatus) String() string

type SubmitDataSet

type SubmitDataSet struct {
	// ID of the request this data set belongs to
	RequestId uint64 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// Sequential number to prevent replay attacks
	Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// Raw data in string format (can be JSON, CSV, etc.)
	RawData string `protobuf:"bytes,3,opt,name=raw_data,json=rawData,proto3" json:"raw_data,omitempty"`
	// Address of the data provider
	Provider string `protobuf:"bytes,4,opt,name=provider,proto3" json:"provider,omitempty"`
	// Cryptographic signature of the data for verification
	Signature string `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"`
}

SubmitDataSet defines the structure for oracle data sets for submit This represents a single data point provided by an oracle node

func (*SubmitDataSet) Descriptor

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

func (*SubmitDataSet) GetNonce

func (m *SubmitDataSet) GetNonce() uint64

func (*SubmitDataSet) GetProvider

func (m *SubmitDataSet) GetProvider() string

func (*SubmitDataSet) GetRawData

func (m *SubmitDataSet) GetRawData() string

func (*SubmitDataSet) GetRequestId

func (m *SubmitDataSet) GetRequestId() uint64

func (*SubmitDataSet) GetSignature

func (m *SubmitDataSet) GetSignature() string

func (*SubmitDataSet) Marshal

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

func (*SubmitDataSet) MarshalTo

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

func (*SubmitDataSet) MarshalToSizedBuffer

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

func (*SubmitDataSet) ProtoMessage

func (*SubmitDataSet) ProtoMessage()

func (*SubmitDataSet) Reset

func (m *SubmitDataSet) Reset()

func (*SubmitDataSet) Size

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

func (*SubmitDataSet) String

func (m *SubmitDataSet) String() string

func (*SubmitDataSet) Unmarshal

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

func (*SubmitDataSet) XXX_DiscardUnknown

func (m *SubmitDataSet) XXX_DiscardUnknown()

func (*SubmitDataSet) XXX_Marshal

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

func (*SubmitDataSet) XXX_Merge

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

func (*SubmitDataSet) XXX_Size

func (m *SubmitDataSet) XXX_Size() int

func (*SubmitDataSet) XXX_Unmarshal

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) RegisterOracleRequestDoc

func (*UnimplementedMsgServer) SubmitOracleData

func (*UnimplementedMsgServer) UpdateModeratorAddress

func (*UnimplementedMsgServer) UpdateOracleRequestDoc

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) ModeratorAddress

func (*UnimplementedQueryServer) OracleData

func (*UnimplementedQueryServer) OracleRequestDoc

func (*UnimplementedQueryServer) OracleRequestDocs

func (*UnimplementedQueryServer) OracleSubmitData

func (*UnimplementedQueryServer) Params

Jump to

Keyboard shortcuts

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