Versions in this module Expand all Collapse all v1 v1.7.3 Jan 2, 2023 v1.7.2 Jan 2, 2023 Changes in this version + const AttributeKeyConsumer + const AttributeKeyGenHeight + const AttributeKeyOracle + const AttributeKeyRandom + const AttributeKeyRequestContextID + const AttributeKeyRequestID + const AttributeValueCategory + const AuthorDescription + const DefaultBlockInterval + const EventTypeGenerateRandom + const EventTypeRequestRandom + const EventTypeRequestService + const ModuleName + const QuerierRoute + const QueryRandom + const QueryRandomRequestQueue + const RandPrec + const RouterKey + const SeedBytesLength + const ServiceDesc + const ServiceName + const ServiceSchemas + const ServiceValueJSONPath + const StoreKey + const TypeMsgRequestRandom + var Author = sdk.AccAddress(crypto.AddressHash([]byte(types.ModuleName))) + var ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + var ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + var ErrIntOverflowRandom = fmt.Errorf("proto: integer overflow") + var ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + var ErrInvalidHeight = sdkerrors.Register(ModuleName, 3, "invalid height, must be greater than 0") + var ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrInvalidLengthRandom = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrInvalidReqID = sdkerrors.Register(ModuleName, 2, "invalid request id") + var ErrInvalidRequestContextID = sdkerrors.Register(ModuleName, 5, "invalid request context id") + var ErrInvalidServiceBindings = sdkerrors.Register(ModuleName, 4, "no service bindings available") + var ErrInvalidServiceFeeCap = sdkerrors.Register(ModuleName, 6, "invalid service fee cap") + var ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") + var ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") + var ErrUnexpectedEndOfGroupRandom = fmt.Errorf("proto: unexpected end of group") + var ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") + var ModuleCdc = codec.NewAminoCodec(amino) + var OracleRandomRequestKey = []byte + var RandomKey = []byte + var RandomRequestQueueKey = []byte + var ServiceTags = []string + func CheckReqID(reqID string) error + func GenerateRequestID(r Request) []byte + func GetSvcDefinition() servicetypes.ServiceDefinition + func KeyOracleRandomRequest(requestContextID []byte) []byte + func KeyRandom(reqID []byte) []byte + func KeyRandomRequestQueue(height int64, reqID []byte) []byte + func KeyRandomRequestQueueSubspace(height int64) []byte + func RegisterInterfaces(registry types.InterfaceRegistry) + func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) + func RegisterMsgServer(s grpc1.Server, srv MsgServer) + func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error + func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error + func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error) + func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error + func RegisterQueryServer(s grpc1.Server, srv QueryServer) + func SHA256(data []byte) []byte + func ValidateGenesis(data GenesisState) error + func ValidateServiceFeeCap(serviceFeeCap sdk.Coins) error + type AccountKeeper interface + GetAccount func(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI + type BankKeeper interface + SpendableCoins func(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins + type GenesisState struct + PendingRandomRequests map[string]Requests + func DefaultGenesisState() *GenesisState + func NewGenesisState(pendingRequests map[string]Requests) *GenesisState + func (*GenesisState) Descriptor() ([]byte, []int) + func (*GenesisState) ProtoMessage() + func (m *GenesisState) GetPendingRandomRequests() map[string]Requests + func (m *GenesisState) Marshal() (dAtA []byte, err error) + func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) + func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *GenesisState) Reset() + func (m *GenesisState) Size() (n int) + func (m *GenesisState) String() string + func (m *GenesisState) Unmarshal(dAtA []byte) error + func (m *GenesisState) XXX_DiscardUnknown() + func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *GenesisState) XXX_Merge(src proto.Message) + func (m *GenesisState) XXX_Size() int + func (m *GenesisState) XXX_Unmarshal(b []byte) error + type MsgClient interface + RequestRandom func(ctx context.Context, in *MsgRequestRandom, opts ...grpc.CallOption) (*MsgRequestRandomResponse, error) + func NewMsgClient(cc grpc1.ClientConn) MsgClient + type MsgRequestRandom struct + BlockInterval uint64 + Consumer string + Oracle bool + ServiceFeeCap github_com_cosmos_cosmos_sdk_types.Coins + func NewMsgRequestRandom(consumer string, blockInterval uint64, oracle bool, serviceFeeCap sdk.Coins) *MsgRequestRandom + func (*MsgRequestRandom) Descriptor() ([]byte, []int) + func (*MsgRequestRandom) ProtoMessage() + func (m *MsgRequestRandom) GetBlockInterval() uint64 + func (m *MsgRequestRandom) GetConsumer() string + func (m *MsgRequestRandom) GetOracle() bool + func (m *MsgRequestRandom) GetServiceFeeCap() github_com_cosmos_cosmos_sdk_types.Coins + func (m *MsgRequestRandom) Marshal() (dAtA []byte, err error) + func (m *MsgRequestRandom) MarshalTo(dAtA []byte) (int, error) + func (m *MsgRequestRandom) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *MsgRequestRandom) Reset() + func (m *MsgRequestRandom) Size() (n int) + func (m *MsgRequestRandom) String() string + func (m *MsgRequestRandom) Unmarshal(dAtA []byte) error + func (m *MsgRequestRandom) XXX_DiscardUnknown() + func (m *MsgRequestRandom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *MsgRequestRandom) XXX_Merge(src proto.Message) + func (m *MsgRequestRandom) XXX_Size() int + func (m *MsgRequestRandom) XXX_Unmarshal(b []byte) error + func (msg MsgRequestRandom) GetSignBytes() []byte + func (msg MsgRequestRandom) GetSigners() []sdk.AccAddress + func (msg MsgRequestRandom) Route() string + func (msg MsgRequestRandom) Type() string + func (msg MsgRequestRandom) ValidateBasic() error + type MsgRequestRandomResponse struct + func (*MsgRequestRandomResponse) Descriptor() ([]byte, []int) + func (*MsgRequestRandomResponse) ProtoMessage() + func (m *MsgRequestRandomResponse) Marshal() (dAtA []byte, err error) + func (m *MsgRequestRandomResponse) MarshalTo(dAtA []byte) (int, error) + func (m *MsgRequestRandomResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *MsgRequestRandomResponse) Reset() + func (m *MsgRequestRandomResponse) Size() (n int) + func (m *MsgRequestRandomResponse) String() string + func (m *MsgRequestRandomResponse) Unmarshal(dAtA []byte) error + func (m *MsgRequestRandomResponse) XXX_DiscardUnknown() + func (m *MsgRequestRandomResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *MsgRequestRandomResponse) XXX_Merge(src proto.Message) + func (m *MsgRequestRandomResponse) XXX_Size() int + func (m *MsgRequestRandomResponse) XXX_Unmarshal(b []byte) error + type MsgServer interface + RequestRandom func(context.Context, *MsgRequestRandom) (*MsgRequestRandomResponse, error) + type PRNG struct + BlockHash []byte + BlockTimestamp int64 + Oracle bool + OracleSeed []byte + TxInitiator sdk.AccAddress + func MakePRNG(blockHash []byte, blockTimestampt int64, txInitiator sdk.AccAddress, ...) PRNG + func (p PRNG) GetRand() *big.Rat + func (p PRNG) Intn(n int) int + type QueryClient interface + Random func(ctx context.Context, in *QueryRandomRequest, opts ...grpc.CallOption) (*QueryRandomResponse, error) + RandomRequestQueue func(ctx context.Context, in *QueryRandomRequestQueueRequest, ...) (*QueryRandomRequestQueueResponse, error) + func NewQueryClient(cc grpc1.ClientConn) QueryClient + type QueryRandomParams struct + ReqID string + type QueryRandomRequest struct + ReqId string + func (*QueryRandomRequest) Descriptor() ([]byte, []int) + func (*QueryRandomRequest) ProtoMessage() + func (m *QueryRandomRequest) GetReqId() string + func (m *QueryRandomRequest) Marshal() (dAtA []byte, err error) + func (m *QueryRandomRequest) MarshalTo(dAtA []byte) (int, error) + func (m *QueryRandomRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *QueryRandomRequest) Reset() + func (m *QueryRandomRequest) Size() (n int) + func (m *QueryRandomRequest) String() string + func (m *QueryRandomRequest) Unmarshal(dAtA []byte) error + func (m *QueryRandomRequest) XXX_DiscardUnknown() + func (m *QueryRandomRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *QueryRandomRequest) XXX_Merge(src proto.Message) + func (m *QueryRandomRequest) XXX_Size() int + func (m *QueryRandomRequest) XXX_Unmarshal(b []byte) error + type QueryRandomRequestQueueParams struct + Height int64 + type QueryRandomRequestQueueRequest struct + Height int64 + func (*QueryRandomRequestQueueRequest) Descriptor() ([]byte, []int) + func (*QueryRandomRequestQueueRequest) ProtoMessage() + func (m *QueryRandomRequestQueueRequest) GetHeight() int64 + func (m *QueryRandomRequestQueueRequest) Marshal() (dAtA []byte, err error) + func (m *QueryRandomRequestQueueRequest) MarshalTo(dAtA []byte) (int, error) + func (m *QueryRandomRequestQueueRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *QueryRandomRequestQueueRequest) Reset() + func (m *QueryRandomRequestQueueRequest) Size() (n int) + func (m *QueryRandomRequestQueueRequest) String() string + func (m *QueryRandomRequestQueueRequest) Unmarshal(dAtA []byte) error + func (m *QueryRandomRequestQueueRequest) XXX_DiscardUnknown() + func (m *QueryRandomRequestQueueRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *QueryRandomRequestQueueRequest) XXX_Merge(src proto.Message) + func (m *QueryRandomRequestQueueRequest) XXX_Size() int + func (m *QueryRandomRequestQueueRequest) XXX_Unmarshal(b []byte) error + type QueryRandomRequestQueueResponse struct + Requests []Request + func (*QueryRandomRequestQueueResponse) Descriptor() ([]byte, []int) + func (*QueryRandomRequestQueueResponse) ProtoMessage() + func (m *QueryRandomRequestQueueResponse) GetRequests() []Request + func (m *QueryRandomRequestQueueResponse) Marshal() (dAtA []byte, err error) + func (m *QueryRandomRequestQueueResponse) MarshalTo(dAtA []byte) (int, error) + func (m *QueryRandomRequestQueueResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *QueryRandomRequestQueueResponse) Reset() + func (m *QueryRandomRequestQueueResponse) Size() (n int) + func (m *QueryRandomRequestQueueResponse) String() string + func (m *QueryRandomRequestQueueResponse) Unmarshal(dAtA []byte) error + func (m *QueryRandomRequestQueueResponse) XXX_DiscardUnknown() + func (m *QueryRandomRequestQueueResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *QueryRandomRequestQueueResponse) XXX_Merge(src proto.Message) + func (m *QueryRandomRequestQueueResponse) XXX_Size() int + func (m *QueryRandomRequestQueueResponse) XXX_Unmarshal(b []byte) error + type QueryRandomResponse struct + Random *Random + func (*QueryRandomResponse) Descriptor() ([]byte, []int) + func (*QueryRandomResponse) ProtoMessage() + func (m *QueryRandomResponse) GetRandom() *Random + func (m *QueryRandomResponse) Marshal() (dAtA []byte, err error) + func (m *QueryRandomResponse) MarshalTo(dAtA []byte) (int, error) + func (m *QueryRandomResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *QueryRandomResponse) Reset() + func (m *QueryRandomResponse) Size() (n int) + func (m *QueryRandomResponse) String() string + func (m *QueryRandomResponse) Unmarshal(dAtA []byte) error + func (m *QueryRandomResponse) XXX_DiscardUnknown() + func (m *QueryRandomResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *QueryRandomResponse) XXX_Merge(src proto.Message) + func (m *QueryRandomResponse) XXX_Size() int + func (m *QueryRandomResponse) XXX_Unmarshal(b []byte) error + type QueryServer interface + Random func(context.Context, *QueryRandomRequest) (*QueryRandomResponse, error) + RandomRequestQueue func(context.Context, *QueryRandomRequestQueueRequest) (*QueryRandomRequestQueueResponse, error) + type RNG interface + GetRand func() big.Rat + type Random struct + Height int64 + RequestTxHash string + Value string + func NewRandom(requestTxHash string, height int64, value string) Random + func (*Random) Descriptor() ([]byte, []int) + func (*Random) ProtoMessage() + func (m *Random) GetHeight() int64 + func (m *Random) GetRequestTxHash() string + func (m *Random) GetValue() string + func (m *Random) Marshal() (dAtA []byte, err error) + func (m *Random) MarshalTo(dAtA []byte) (int, error) + func (m *Random) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *Random) Reset() + func (m *Random) Size() (n int) + func (m *Random) String() string + func (m *Random) Unmarshal(dAtA []byte) error + func (m *Random) XXX_DiscardUnknown() + func (m *Random) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Random) XXX_Merge(src proto.Message) + func (m *Random) XXX_Size() int + func (m *Random) XXX_Unmarshal(b []byte) error + type Request struct + Consumer string + Height int64 + Oracle bool + ServiceContextID string + ServiceFeeCap github_com_cosmos_cosmos_sdk_types.Coins + TxHash string + func NewRequest(height int64, consumer string, txHash string, oracle bool, ...) Request + func (*Request) Descriptor() ([]byte, []int) + func (*Request) ProtoMessage() + func (m *Request) GetConsumer() string + func (m *Request) GetHeight() int64 + func (m *Request) GetOracle() bool + func (m *Request) GetServiceContextID() string + func (m *Request) GetServiceFeeCap() github_com_cosmos_cosmos_sdk_types.Coins + func (m *Request) GetTxHash() string + func (m *Request) Marshal() (dAtA []byte, err error) + func (m *Request) MarshalTo(dAtA []byte) (int, error) + func (m *Request) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *Request) Reset() + func (m *Request) Size() (n int) + func (m *Request) String() string + func (m *Request) Unmarshal(dAtA []byte) error + func (m *Request) XXX_DiscardUnknown() + func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Request) XXX_Merge(src proto.Message) + func (m *Request) XXX_Size() int + func (m *Request) XXX_Unmarshal(b []byte) error + type Requests struct + Requests []Request + func (*Requests) Descriptor() ([]byte, []int) + func (*Requests) ProtoMessage() + func (m *Requests) GetRequests() []Request + func (m *Requests) Marshal() (dAtA []byte, err error) + func (m *Requests) MarshalTo(dAtA []byte) (int, error) + func (m *Requests) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *Requests) Reset() + func (m *Requests) Size() (n int) + func (m *Requests) String() string + func (m *Requests) Unmarshal(dAtA []byte) error + func (m *Requests) XXX_DiscardUnknown() + func (m *Requests) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Requests) XXX_Merge(src proto.Message) + func (m *Requests) XXX_Size() int + func (m *Requests) XXX_Unmarshal(b []byte) error + type ServiceKeeper interface + CreateRequestContext func(ctx sdk.Context, serviceName string, providers []sdk.AccAddress, ...) (tmbytes.HexBytes, error) + GetParams func(ctx sdk.Context) servicetypes.Params + GetRequestContext func(ctx sdk.Context, requestContextID tmbytes.HexBytes) (service.RequestContext, bool) + PauseRequestContext func(ctx sdk.Context, requestContextID tmbytes.HexBytes, consumer sdk.AccAddress) error + RegisterResponseCallback func(moduleName string, respCallback service.ResponseCallback) error + RegisterStateCallback func(moduleName string, stateCallback service.StateCallback) error + ServiceBindingsIterator func(ctx sdk.Context, serviceName string) sdk.Iterator + StartRequestContext func(ctx sdk.Context, requestContextID tmbytes.HexBytes, consumer sdk.AccAddress) error + UpdateRequestContext func(ctx sdk.Context, requestContextID tmbytes.HexBytes, providers []sdk.AccAddress, ...) error + type UnimplementedMsgServer struct + func (*UnimplementedMsgServer) RequestRandom(ctx context.Context, req *MsgRequestRandom) (*MsgRequestRandomResponse, error) + type UnimplementedQueryServer struct + func (*UnimplementedQueryServer) Random(ctx context.Context, req *QueryRandomRequest) (*QueryRandomResponse, error) + func (*UnimplementedQueryServer) RandomRequestQueue(ctx context.Context, req *QueryRandomRequestQueueRequest) (*QueryRandomRequestQueueResponse, error)