types

package
v0.0.0-...-aba6083 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	AttributeValueModule = ModuleName

	EventTypeJoin                   = "join"
	AttributeKeyID                  = "id"
	AttributeKeyOperatorAddress     = "operator_address"
	AttributeKeyEnclaveReportBase64 = "enclave_report_base64"
	AttributeKeyEncPubKeyBase64     = "enc_pub_key_base64"

	EventTypeVoteForJoin = "vote_for_join"
	AttributeKeyOption   = "option"
	AttributeKeyVoter    = "voter"

	EventTypeJoinResult = "join_result"
	AttributeKeyStatus  = "status"
	AttributeKeyValue   = "value"
)
View Source
const (
	// ModuleName defines the module name
	ModuleName = "oracle"

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

	// RouterKey is the message route for slashing
	RouterKey = ModuleName

	// QuerierRoute defines the module's query routing key
	QuerierRoute = ModuleName

	// MemStoreKey defines the in-memory store key
	MemStoreKey = "mem_oracle"
)
View Source
const DefaultIndex uint64 = 1

DefaultIndex is the default capability global index

View Source
const TypeMsgInit = "init"
View Source
const TypeMsgJoin = "join"
View Source
const TypeMsgVoteForJoin = "voteForJoin"

Variables

View Source
var (
	ErrUnknownJoin  = sdkerrors.Register(ModuleName, 2, "unknown join")
	ErrClosedJoin   = sdkerrors.Register(ModuleName, 3, "join was already closed")
	ErrJoinExists   = sdkerrors.Register(ModuleName, 4, "join already exists")
	ErrOracleExists = sdkerrors.Register(ModuleName, 5, "oracle already exists")
	ErrOraclesExist = sdkerrors.Register(ModuleName, 6, "oracles already exist")
)

x/oracle module sentinel errors

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 (
	NextJoinIDKey             = []byte{0x00}
	JoinKeyPrefix             = []byte{0x01}
	PendingJoinQueueKeyPrefix = []byte{0x02}
	VoteForJoinKeyPrefix      = []byte{0x03}
	OracleKeyPrefix           = []byte{0x04}
	OraclePubKeyKey           = []byte{0x05}
)
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 (
	KeyMaxOracles            = []byte("MaxOracles")
	DefaultMaxOracles uint64 = 10
)
View Source
var (
	KeySlashFractionDowntime            = []byte("SlashFractionDowntime")
	DefaultSlashFractionDowntime string = "0.05"
)
View Source
var (
	KeySlashFractionWrongVote            = []byte("SlashFractionWrongVote")
	DefaultSlashFractionWrongVote string = "0.10"
)
View Source
var (
	KeyDowntimeDuration            = []byte("DowntimeDuration")
	DefaultDowntimeDuration string = "30s"
)
View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	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 JoinStatus_name = map[int32]string{
	0: "JOIN_STATUS_PENDING",
	1: "JOIN_STATUS_APPROVED",
	2: "JOIN_STATUS_REJECTED",
}
View Source
var JoinStatus_value = map[string]int32{
	"JOIN_STATUS_PENDING":  0,
	"JOIN_STATUS_APPROVED": 1,
	"JOIN_STATUS_REJECTED": 2,
}
View Source
var VoteOption_name = map[int32]string{
	0: "VOTE_OPTION_YES",
	1: "VOTE_OPTION_NO",
}
View Source
var VoteOption_value = map[string]int32{
	"VOTE_OPTION_YES": 0,
	"VOTE_OPTION_NO":  1,
}

Functions

func GetJoinIDBytes

func GetJoinIDBytes(joinID uint64) []byte

func GetJoinIDFromBytes

func GetJoinIDFromBytes(bz []byte) uint64

func JoinKey

func JoinKey(joinID uint64) []byte

JoinKey returns the store key to retrieve a Join from the index fields

func OracleKey

func OracleKey(operatorAddress string) []byte

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable the param key table for launch module

func PendingJoinQueueKey

func PendingJoinQueueKey(joinID uint64) []byte

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func SplitPendingJoinQueueKey

func SplitPendingJoinQueueKey(key []byte) uint64

func VoteForJoinKey

func VoteForJoinKey(joinID uint64, voter string) []byte

VoteForJoinKey returns the store key to retrieve a VoteForJoin from the index fields

func VoteForJoinsKey

func VoteForJoinsKey(joinID uint64) []byte

VoteForJoinsKey gets the 1st part of the votes key based on the joinID

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI
}

AccountKeeper defines the expected account keeper used for simulations (noalias)

type BankKeeper

type BankKeeper interface {
	SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
}

BankKeeper defines the expected interface needed to retrieve account balances.

type GenesisState

type GenesisState struct {
	Params       Params       `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	OraclePubKey OraclePubKey `protobuf:"bytes,2,opt,name=oracle_pub_key,json=oraclePubKey,proto3" json:"oracle_pub_key"`
	OracleList   []Oracle     `protobuf:"bytes,3,rep,name=oracle_list,json=oracleList,proto3" json:"oracle_list"`
	NextJoinID   uint64       `protobuf:"varint,4,opt,name=next_join_id,json=nextJoinId,proto3" json:"next_join_id,omitempty"`
	JoinList     []Join       `protobuf:"bytes,5,rep,name=join_list,json=joinList,proto3" json:"join_list"`
}

GenesisState defines the oracle module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default Capability genesis state

func (*GenesisState) Descriptor

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

func (*GenesisState) GetJoinList

func (m *GenesisState) GetJoinList() []Join

func (*GenesisState) GetNextJoinID

func (m *GenesisState) GetNextJoinID() uint64

func (*GenesisState) GetOracleList

func (m *GenesisState) GetOracleList() []Oracle

func (*GenesisState) GetOraclePubKey

func (m *GenesisState) GetOraclePubKey() OraclePubKey

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 Join

type Join struct {
	ID              uint64            `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	OperatorAddress string            `protobuf:"bytes,2,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty"`
	EnclaveReport   []byte            `protobuf:"bytes,3,opt,name=enclave_report,json=enclaveReport,proto3" json:"enclave_report,omitempty"`
	EncPubKey       *secp256k1.PubKey `protobuf:"bytes,4,opt,name=enc_pub_key,json=encPubKey,proto3" json:"enc_pub_key,omitempty"`
	Status          JoinStatus        `protobuf:"varint,5,opt,name=status,proto3,enum=dhub.oracle.JoinStatus" json:"status,omitempty"`
	TallyResult     TallyResult       `protobuf:"bytes,6,opt,name=tally_result,json=tallyResult,proto3" json:"tally_result"`
}

func (*Join) Descriptor

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

func (*Join) GetEncPubKey

func (m *Join) GetEncPubKey() *secp256k1.PubKey

func (*Join) GetEnclaveReport

func (m *Join) GetEnclaveReport() []byte

func (*Join) GetID

func (m *Join) GetID() uint64

func (*Join) GetOperatorAddress

func (m *Join) GetOperatorAddress() string

func (*Join) GetStatus

func (m *Join) GetStatus() JoinStatus

func (*Join) GetTallyResult

func (m *Join) GetTallyResult() TallyResult

func (*Join) Marshal

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

func (*Join) MarshalTo

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

func (*Join) MarshalToSizedBuffer

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

func (*Join) ProtoMessage

func (*Join) ProtoMessage()

func (*Join) Reset

func (m *Join) Reset()

func (*Join) Size

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

func (*Join) String

func (m *Join) String() string

func (*Join) Unmarshal

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

func (*Join) XXX_DiscardUnknown

func (m *Join) XXX_DiscardUnknown()

func (*Join) XXX_Marshal

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

func (*Join) XXX_Merge

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

func (*Join) XXX_Size

func (m *Join) XXX_Size() int

func (*Join) XXX_Unmarshal

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

type JoinStatus

type JoinStatus int32
const (
	JOIN_STATUS_PENDING  JoinStatus = 0
	JOIN_STATUS_APPROVED JoinStatus = 1
	JOIN_STATUS_REJECTED JoinStatus = 2
)

func (JoinStatus) EnumDescriptor

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

func (JoinStatus) String

func (x JoinStatus) String() string

type MsgClient

type MsgClient interface {
	Init(ctx context.Context, in *MsgInit, opts ...grpc.CallOption) (*MsgInitResponse, error)
	Join(ctx context.Context, in *MsgJoin, opts ...grpc.CallOption) (*MsgJoinResponse, error)
	VoteForJoin(ctx context.Context, in *MsgVoteForJoin, opts ...grpc.CallOption) (*MsgVoteForJoinResponse, 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 MsgInit

type MsgInit struct {
	OperatorAddress string            `protobuf:"bytes,1,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty"`
	EnclaveReport   []byte            `protobuf:"bytes,2,opt,name=enclave_report,json=enclaveReport,proto3" json:"enclave_report,omitempty"`
	OraclePubKey    *secp256k1.PubKey `protobuf:"bytes,3,opt,name=oracle_pub_key,json=oraclePubKey,proto3" json:"oracle_pub_key,omitempty"`
}

func NewMsgInit

func NewMsgInit(operatorAddress string, enclaveReport []byte, oraclePubKey *secp256k1.PubKey) *MsgInit

func (*MsgInit) Descriptor

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

func (*MsgInit) GetEnclaveReport

func (m *MsgInit) GetEnclaveReport() []byte

func (*MsgInit) GetOperatorAddress

func (m *MsgInit) GetOperatorAddress() string

func (*MsgInit) GetOraclePubKey

func (m *MsgInit) GetOraclePubKey() *secp256k1.PubKey

func (*MsgInit) GetSignBytes

func (msg *MsgInit) GetSignBytes() []byte

func (*MsgInit) GetSigners

func (msg *MsgInit) GetSigners() []sdk.AccAddress

func (*MsgInit) Marshal

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

func (*MsgInit) MarshalTo

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

func (*MsgInit) MarshalToSizedBuffer

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

func (*MsgInit) ProtoMessage

func (*MsgInit) ProtoMessage()

func (*MsgInit) Reset

func (m *MsgInit) Reset()

func (*MsgInit) Route

func (msg *MsgInit) Route() string

func (*MsgInit) Size

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

func (*MsgInit) String

func (m *MsgInit) String() string

func (*MsgInit) Type

func (msg *MsgInit) Type() string

func (*MsgInit) Unmarshal

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

func (*MsgInit) ValidateBasic

func (msg *MsgInit) ValidateBasic() error

func (*MsgInit) XXX_DiscardUnknown

func (m *MsgInit) XXX_DiscardUnknown()

func (*MsgInit) XXX_Marshal

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

func (*MsgInit) XXX_Merge

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

func (*MsgInit) XXX_Size

func (m *MsgInit) XXX_Size() int

func (*MsgInit) XXX_Unmarshal

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

type MsgInitResponse

type MsgInitResponse struct {
}

func (*MsgInitResponse) Descriptor

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

func (*MsgInitResponse) Marshal

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

func (*MsgInitResponse) MarshalTo

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

func (*MsgInitResponse) MarshalToSizedBuffer

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

func (*MsgInitResponse) ProtoMessage

func (*MsgInitResponse) ProtoMessage()

func (*MsgInitResponse) Reset

func (m *MsgInitResponse) Reset()

func (*MsgInitResponse) Size

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

func (*MsgInitResponse) String

func (m *MsgInitResponse) String() string

func (*MsgInitResponse) Unmarshal

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

func (*MsgInitResponse) XXX_DiscardUnknown

func (m *MsgInitResponse) XXX_DiscardUnknown()

func (*MsgInitResponse) XXX_Marshal

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

func (*MsgInitResponse) XXX_Merge

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

func (*MsgInitResponse) XXX_Size

func (m *MsgInitResponse) XXX_Size() int

func (*MsgInitResponse) XXX_Unmarshal

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

type MsgJoin

type MsgJoin struct {
	OperatorAddress string            `protobuf:"bytes,1,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty"`
	EnclaveReport   []byte            `protobuf:"bytes,2,opt,name=enclave_report,json=enclaveReport,proto3" json:"enclave_report,omitempty"`
	EncPubKey       *secp256k1.PubKey `protobuf:"bytes,3,opt,name=enc_pub_key,json=encPubKey,proto3" json:"enc_pub_key,omitempty"`
}

func NewMsgJoin

func NewMsgJoin(operatorAddress string, enclaveReport []byte, encPubKey *secp256k1.PubKey) *MsgJoin

func (*MsgJoin) Descriptor

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

func (*MsgJoin) GetEncPubKey

func (m *MsgJoin) GetEncPubKey() *secp256k1.PubKey

func (*MsgJoin) GetEnclaveReport

func (m *MsgJoin) GetEnclaveReport() []byte

func (*MsgJoin) GetOperatorAddress

func (m *MsgJoin) GetOperatorAddress() string

func (*MsgJoin) GetSignBytes

func (msg *MsgJoin) GetSignBytes() []byte

func (*MsgJoin) GetSigners

func (msg *MsgJoin) GetSigners() []sdk.AccAddress

func (*MsgJoin) Marshal

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

func (*MsgJoin) MarshalTo

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

func (*MsgJoin) MarshalToSizedBuffer

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

func (*MsgJoin) ProtoMessage

func (*MsgJoin) ProtoMessage()

func (*MsgJoin) Reset

func (m *MsgJoin) Reset()

func (*MsgJoin) Route

func (msg *MsgJoin) Route() string

func (*MsgJoin) Size

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

func (*MsgJoin) String

func (m *MsgJoin) String() string

func (*MsgJoin) Type

func (msg *MsgJoin) Type() string

func (*MsgJoin) Unmarshal

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

func (*MsgJoin) ValidateBasic

func (msg *MsgJoin) ValidateBasic() error

func (*MsgJoin) XXX_DiscardUnknown

func (m *MsgJoin) XXX_DiscardUnknown()

func (*MsgJoin) XXX_Marshal

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

func (*MsgJoin) XXX_Merge

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

func (*MsgJoin) XXX_Size

func (m *MsgJoin) XXX_Size() int

func (*MsgJoin) XXX_Unmarshal

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

type MsgJoinResponse

type MsgJoinResponse struct {
	ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}

func (*MsgJoinResponse) Descriptor

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

func (*MsgJoinResponse) GetID

func (m *MsgJoinResponse) GetID() uint64

func (*MsgJoinResponse) Marshal

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

func (*MsgJoinResponse) MarshalTo

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

func (*MsgJoinResponse) MarshalToSizedBuffer

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

func (*MsgJoinResponse) ProtoMessage

func (*MsgJoinResponse) ProtoMessage()

func (*MsgJoinResponse) Reset

func (m *MsgJoinResponse) Reset()

func (*MsgJoinResponse) Size

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

func (*MsgJoinResponse) String

func (m *MsgJoinResponse) String() string

func (*MsgJoinResponse) Unmarshal

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

func (*MsgJoinResponse) XXX_DiscardUnknown

func (m *MsgJoinResponse) XXX_DiscardUnknown()

func (*MsgJoinResponse) XXX_Marshal

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

func (*MsgJoinResponse) XXX_Merge

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

func (*MsgJoinResponse) XXX_Size

func (m *MsgJoinResponse) XXX_Size() int

func (*MsgJoinResponse) XXX_Unmarshal

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

type MsgServer

MsgServer is the server API for Msg service.

type MsgVoteForJoin

type MsgVoteForJoin struct {
	JoinID                    uint64     `protobuf:"varint,1,opt,name=join_id,json=joinId,proto3" json:"join_id,omitempty"`
	Option                    VoteOption `protobuf:"varint,2,opt,name=option,proto3,enum=dhub.oracle.VoteOption" json:"option,omitempty"`
	EncryptedOraclePrivKeyB64 string     `` /* 142-byte string literal not displayed */
	Voter                     string     `protobuf:"bytes,4,opt,name=voter,proto3" json:"voter,omitempty"`
}

func NewMsgVoteForJoin

func NewMsgVoteForJoin(joinID uint64, option VoteOption, encryptedOraclePrivKeyB64 string, voter string) *MsgVoteForJoin

func (*MsgVoteForJoin) Descriptor

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

func (*MsgVoteForJoin) GetEncryptedOraclePrivKeyB64

func (m *MsgVoteForJoin) GetEncryptedOraclePrivKeyB64() string

func (*MsgVoteForJoin) GetJoinID

func (m *MsgVoteForJoin) GetJoinID() uint64

func (*MsgVoteForJoin) GetOption

func (m *MsgVoteForJoin) GetOption() VoteOption

func (*MsgVoteForJoin) GetSignBytes

func (msg *MsgVoteForJoin) GetSignBytes() []byte

func (*MsgVoteForJoin) GetSigners

func (msg *MsgVoteForJoin) GetSigners() []sdk.AccAddress

func (*MsgVoteForJoin) GetVoter

func (m *MsgVoteForJoin) GetVoter() string

func (*MsgVoteForJoin) Marshal

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

func (*MsgVoteForJoin) MarshalTo

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

func (*MsgVoteForJoin) MarshalToSizedBuffer

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

func (*MsgVoteForJoin) ProtoMessage

func (*MsgVoteForJoin) ProtoMessage()

func (*MsgVoteForJoin) Reset

func (m *MsgVoteForJoin) Reset()

func (*MsgVoteForJoin) Route

func (msg *MsgVoteForJoin) Route() string

func (*MsgVoteForJoin) Size

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

func (*MsgVoteForJoin) String

func (m *MsgVoteForJoin) String() string

func (*MsgVoteForJoin) Type

func (msg *MsgVoteForJoin) Type() string

func (*MsgVoteForJoin) Unmarshal

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

func (*MsgVoteForJoin) ValidateBasic

func (msg *MsgVoteForJoin) ValidateBasic() error

func (*MsgVoteForJoin) XXX_DiscardUnknown

func (m *MsgVoteForJoin) XXX_DiscardUnknown()

func (*MsgVoteForJoin) XXX_Marshal

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

func (*MsgVoteForJoin) XXX_Merge

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

func (*MsgVoteForJoin) XXX_Size

func (m *MsgVoteForJoin) XXX_Size() int

func (*MsgVoteForJoin) XXX_Unmarshal

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

type MsgVoteForJoinResponse

type MsgVoteForJoinResponse struct {
}

func (*MsgVoteForJoinResponse) Descriptor

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

func (*MsgVoteForJoinResponse) Marshal

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

func (*MsgVoteForJoinResponse) MarshalTo

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

func (*MsgVoteForJoinResponse) MarshalToSizedBuffer

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

func (*MsgVoteForJoinResponse) ProtoMessage

func (*MsgVoteForJoinResponse) ProtoMessage()

func (*MsgVoteForJoinResponse) Reset

func (m *MsgVoteForJoinResponse) Reset()

func (*MsgVoteForJoinResponse) Size

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

func (*MsgVoteForJoinResponse) String

func (m *MsgVoteForJoinResponse) String() string

func (*MsgVoteForJoinResponse) Unmarshal

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

func (*MsgVoteForJoinResponse) XXX_DiscardUnknown

func (m *MsgVoteForJoinResponse) XXX_DiscardUnknown()

func (*MsgVoteForJoinResponse) XXX_Marshal

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

func (*MsgVoteForJoinResponse) XXX_Merge

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

func (*MsgVoteForJoinResponse) XXX_Size

func (m *MsgVoteForJoinResponse) XXX_Size() int

func (*MsgVoteForJoinResponse) XXX_Unmarshal

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

type Oracle

type Oracle struct {
	OperatorAddress string                                 `protobuf:"bytes,1,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty"`
	EnclaveReport   []byte                                 `protobuf:"bytes,2,opt,name=enclave_report,json=enclaveReport,proto3" json:"enclave_report,omitempty"`
	Stake           github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=stake,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"stake"`
}

func (*Oracle) Descriptor

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

func (*Oracle) GetEnclaveReport

func (m *Oracle) GetEnclaveReport() []byte

func (*Oracle) GetOperatorAddress

func (m *Oracle) GetOperatorAddress() string

func (*Oracle) Marshal

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

func (*Oracle) MarshalTo

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

func (*Oracle) MarshalToSizedBuffer

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

func (*Oracle) ProtoMessage

func (*Oracle) ProtoMessage()

func (*Oracle) Reset

func (m *Oracle) Reset()

func (*Oracle) Size

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

func (*Oracle) String

func (m *Oracle) String() string

func (*Oracle) Unmarshal

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

func (*Oracle) XXX_DiscardUnknown

func (m *Oracle) XXX_DiscardUnknown()

func (*Oracle) XXX_Marshal

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

func (*Oracle) XXX_Merge

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

func (*Oracle) XXX_Size

func (m *Oracle) XXX_Size() int

func (*Oracle) XXX_Unmarshal

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

type OraclePubKey

type OraclePubKey struct {
	PubKey *secp256k1.PubKey `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"`
}

func (*OraclePubKey) Descriptor

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

func (*OraclePubKey) GetPubKey

func (m *OraclePubKey) GetPubKey() *secp256k1.PubKey

func (*OraclePubKey) Marshal

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

func (*OraclePubKey) MarshalTo

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

func (*OraclePubKey) MarshalToSizedBuffer

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

func (*OraclePubKey) ProtoMessage

func (*OraclePubKey) ProtoMessage()

func (*OraclePubKey) Reset

func (m *OraclePubKey) Reset()

func (*OraclePubKey) Size

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

func (*OraclePubKey) String

func (m *OraclePubKey) String() string

func (*OraclePubKey) Unmarshal

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

func (*OraclePubKey) XXX_DiscardUnknown

func (m *OraclePubKey) XXX_DiscardUnknown()

func (*OraclePubKey) XXX_Marshal

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

func (*OraclePubKey) XXX_Merge

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

func (*OraclePubKey) XXX_Size

func (m *OraclePubKey) XXX_Size() int

func (*OraclePubKey) XXX_Unmarshal

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

type Params

type Params struct {
	MaxOracles             uint64 `protobuf:"varint,1,opt,name=max_oracles,json=maxOracles,proto3" json:"max_oracles,omitempty" yaml:"max_oracles"`
	SlashFractionDowntime  string `` /* 157-byte string literal not displayed */
	SlashFractionWrongVote string `` /* 164-byte string literal not displayed */
	DowntimeDuration       string `` /* 134-byte string literal not displayed */
}

Params defines the parameters for the module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters

func NewParams

func NewParams(
	maxOracles uint64,
	slashFractionDowntime string,
	slashFractionWrongVote string,
	downtimeDuration string,
) Params

NewParams creates a new Params instance

func (*Params) Descriptor

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

func (*Params) GetDowntimeDuration

func (m *Params) GetDowntimeDuration() string

func (*Params) GetMaxOracles

func (m *Params) GetMaxOracles() uint64

func (*Params) GetSlashFractionDowntime

func (m *Params) GetSlashFractionDowntime() string

func (*Params) GetSlashFractionWrongVote

func (m *Params) GetSlashFractionWrongVote() string

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

func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs

ParamSetPairs get the params.ParamSet

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 (p Params) String() string

String implements the Stringer interface.

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

Validate validates the set of params

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 QueryAllJoinRequest

type QueryAllJoinRequest struct {
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QueryAllJoinRequest) Descriptor

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

func (*QueryAllJoinRequest) GetPagination

func (m *QueryAllJoinRequest) GetPagination() *query.PageRequest

func (*QueryAllJoinRequest) Marshal

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

func (*QueryAllJoinRequest) MarshalTo

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

func (*QueryAllJoinRequest) MarshalToSizedBuffer

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

func (*QueryAllJoinRequest) ProtoMessage

func (*QueryAllJoinRequest) ProtoMessage()

func (*QueryAllJoinRequest) Reset

func (m *QueryAllJoinRequest) Reset()

func (*QueryAllJoinRequest) Size

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

func (*QueryAllJoinRequest) String

func (m *QueryAllJoinRequest) String() string

func (*QueryAllJoinRequest) Unmarshal

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

func (*QueryAllJoinRequest) XXX_DiscardUnknown

func (m *QueryAllJoinRequest) XXX_DiscardUnknown()

func (*QueryAllJoinRequest) XXX_Marshal

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

func (*QueryAllJoinRequest) XXX_Merge

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

func (*QueryAllJoinRequest) XXX_Size

func (m *QueryAllJoinRequest) XXX_Size() int

func (*QueryAllJoinRequest) XXX_Unmarshal

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

type QueryAllJoinResponse

type QueryAllJoinResponse struct {
	Join       []Join              `protobuf:"bytes,1,rep,name=join,proto3" json:"join"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QueryAllJoinResponse) Descriptor

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

func (*QueryAllJoinResponse) GetJoin

func (m *QueryAllJoinResponse) GetJoin() []Join

func (*QueryAllJoinResponse) GetPagination

func (m *QueryAllJoinResponse) GetPagination() *query.PageResponse

func (*QueryAllJoinResponse) Marshal

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

func (*QueryAllJoinResponse) MarshalTo

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

func (*QueryAllJoinResponse) MarshalToSizedBuffer

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

func (*QueryAllJoinResponse) ProtoMessage

func (*QueryAllJoinResponse) ProtoMessage()

func (*QueryAllJoinResponse) Reset

func (m *QueryAllJoinResponse) Reset()

func (*QueryAllJoinResponse) Size

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

func (*QueryAllJoinResponse) String

func (m *QueryAllJoinResponse) String() string

func (*QueryAllJoinResponse) Unmarshal

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

func (*QueryAllJoinResponse) XXX_DiscardUnknown

func (m *QueryAllJoinResponse) XXX_DiscardUnknown()

func (*QueryAllJoinResponse) XXX_Marshal

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

func (*QueryAllJoinResponse) XXX_Merge

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

func (*QueryAllJoinResponse) XXX_Size

func (m *QueryAllJoinResponse) XXX_Size() int

func (*QueryAllJoinResponse) XXX_Unmarshal

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

type QueryAllOracleRequest

type QueryAllOracleRequest struct {
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QueryAllOracleRequest) Descriptor

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

func (*QueryAllOracleRequest) GetPagination

func (m *QueryAllOracleRequest) GetPagination() *query.PageRequest

func (*QueryAllOracleRequest) Marshal

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

func (*QueryAllOracleRequest) MarshalTo

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

func (*QueryAllOracleRequest) MarshalToSizedBuffer

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

func (*QueryAllOracleRequest) ProtoMessage

func (*QueryAllOracleRequest) ProtoMessage()

func (*QueryAllOracleRequest) Reset

func (m *QueryAllOracleRequest) Reset()

func (*QueryAllOracleRequest) Size

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

func (*QueryAllOracleRequest) String

func (m *QueryAllOracleRequest) String() string

func (*QueryAllOracleRequest) Unmarshal

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

func (*QueryAllOracleRequest) XXX_DiscardUnknown

func (m *QueryAllOracleRequest) XXX_DiscardUnknown()

func (*QueryAllOracleRequest) XXX_Marshal

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

func (*QueryAllOracleRequest) XXX_Merge

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

func (*QueryAllOracleRequest) XXX_Size

func (m *QueryAllOracleRequest) XXX_Size() int

func (*QueryAllOracleRequest) XXX_Unmarshal

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

type QueryAllOracleResponse

type QueryAllOracleResponse struct {
	Oracle     []Oracle            `protobuf:"bytes,1,rep,name=oracle,proto3" json:"oracle"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QueryAllOracleResponse) Descriptor

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

func (*QueryAllOracleResponse) GetOracle

func (m *QueryAllOracleResponse) GetOracle() []Oracle

func (*QueryAllOracleResponse) GetPagination

func (m *QueryAllOracleResponse) GetPagination() *query.PageResponse

func (*QueryAllOracleResponse) Marshal

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

func (*QueryAllOracleResponse) MarshalTo

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

func (*QueryAllOracleResponse) MarshalToSizedBuffer

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

func (*QueryAllOracleResponse) ProtoMessage

func (*QueryAllOracleResponse) ProtoMessage()

func (*QueryAllOracleResponse) Reset

func (m *QueryAllOracleResponse) Reset()

func (*QueryAllOracleResponse) Size

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

func (*QueryAllOracleResponse) String

func (m *QueryAllOracleResponse) String() string

func (*QueryAllOracleResponse) Unmarshal

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

func (*QueryAllOracleResponse) XXX_DiscardUnknown

func (m *QueryAllOracleResponse) XXX_DiscardUnknown()

func (*QueryAllOracleResponse) XXX_Marshal

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

func (*QueryAllOracleResponse) XXX_Merge

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

func (*QueryAllOracleResponse) XXX_Size

func (m *QueryAllOracleResponse) XXX_Size() int

func (*QueryAllOracleResponse) XXX_Unmarshal

func (m *QueryAllOracleResponse) 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)
	// Queries a Join by id.
	Join(ctx context.Context, in *QueryGetJoinRequest, opts ...grpc.CallOption) (*QueryGetJoinResponse, error)
	// Queries a list of Join items.
	JoinAll(ctx context.Context, in *QueryAllJoinRequest, opts ...grpc.CallOption) (*QueryAllJoinResponse, error)
	// Queries an Oracle by operator_address.
	Oracle(ctx context.Context, in *QueryGetOracleRequest, opts ...grpc.CallOption) (*QueryGetOracleResponse, error)
	// Queries a list of Oracle items.
	OracleAll(ctx context.Context, in *QueryAllOracleRequest, opts ...grpc.CallOption) (*QueryAllOracleResponse, error)
	// Queries an oracle pubkey
	OraclePubKey(ctx context.Context, in *QueryGetOraclePubKeyRequest, opts ...grpc.CallOption) (*QueryGetOraclePubKeyResponse, 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 QueryGetJoinRequest

type QueryGetJoinRequest struct {
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}

func (*QueryGetJoinRequest) Descriptor

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

func (*QueryGetJoinRequest) GetId

func (m *QueryGetJoinRequest) GetId() uint64

func (*QueryGetJoinRequest) Marshal

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

func (*QueryGetJoinRequest) MarshalTo

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

func (*QueryGetJoinRequest) MarshalToSizedBuffer

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

func (*QueryGetJoinRequest) ProtoMessage

func (*QueryGetJoinRequest) ProtoMessage()

func (*QueryGetJoinRequest) Reset

func (m *QueryGetJoinRequest) Reset()

func (*QueryGetJoinRequest) Size

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

func (*QueryGetJoinRequest) String

func (m *QueryGetJoinRequest) String() string

func (*QueryGetJoinRequest) Unmarshal

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

func (*QueryGetJoinRequest) XXX_DiscardUnknown

func (m *QueryGetJoinRequest) XXX_DiscardUnknown()

func (*QueryGetJoinRequest) XXX_Marshal

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

func (*QueryGetJoinRequest) XXX_Merge

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

func (*QueryGetJoinRequest) XXX_Size

func (m *QueryGetJoinRequest) XXX_Size() int

func (*QueryGetJoinRequest) XXX_Unmarshal

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

type QueryGetJoinResponse

type QueryGetJoinResponse struct {
	Join Join `protobuf:"bytes,1,opt,name=join,proto3" json:"join"`
}

func (*QueryGetJoinResponse) Descriptor

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

func (*QueryGetJoinResponse) GetJoin

func (m *QueryGetJoinResponse) GetJoin() Join

func (*QueryGetJoinResponse) Marshal

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

func (*QueryGetJoinResponse) MarshalTo

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

func (*QueryGetJoinResponse) MarshalToSizedBuffer

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

func (*QueryGetJoinResponse) ProtoMessage

func (*QueryGetJoinResponse) ProtoMessage()

func (*QueryGetJoinResponse) Reset

func (m *QueryGetJoinResponse) Reset()

func (*QueryGetJoinResponse) Size

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

func (*QueryGetJoinResponse) String

func (m *QueryGetJoinResponse) String() string

func (*QueryGetJoinResponse) Unmarshal

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

func (*QueryGetJoinResponse) XXX_DiscardUnknown

func (m *QueryGetJoinResponse) XXX_DiscardUnknown()

func (*QueryGetJoinResponse) XXX_Marshal

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

func (*QueryGetJoinResponse) XXX_Merge

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

func (*QueryGetJoinResponse) XXX_Size

func (m *QueryGetJoinResponse) XXX_Size() int

func (*QueryGetJoinResponse) XXX_Unmarshal

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

type QueryGetOraclePubKeyRequest

type QueryGetOraclePubKeyRequest struct {
}

func (*QueryGetOraclePubKeyRequest) Descriptor

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

func (*QueryGetOraclePubKeyRequest) Marshal

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

func (*QueryGetOraclePubKeyRequest) MarshalTo

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

func (*QueryGetOraclePubKeyRequest) MarshalToSizedBuffer

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

func (*QueryGetOraclePubKeyRequest) ProtoMessage

func (*QueryGetOraclePubKeyRequest) ProtoMessage()

func (*QueryGetOraclePubKeyRequest) Reset

func (m *QueryGetOraclePubKeyRequest) Reset()

func (*QueryGetOraclePubKeyRequest) Size

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

func (*QueryGetOraclePubKeyRequest) String

func (m *QueryGetOraclePubKeyRequest) String() string

func (*QueryGetOraclePubKeyRequest) Unmarshal

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

func (*QueryGetOraclePubKeyRequest) XXX_DiscardUnknown

func (m *QueryGetOraclePubKeyRequest) XXX_DiscardUnknown()

func (*QueryGetOraclePubKeyRequest) XXX_Marshal

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

func (*QueryGetOraclePubKeyRequest) XXX_Merge

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

func (*QueryGetOraclePubKeyRequest) XXX_Size

func (m *QueryGetOraclePubKeyRequest) XXX_Size() int

func (*QueryGetOraclePubKeyRequest) XXX_Unmarshal

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

type QueryGetOraclePubKeyResponse

type QueryGetOraclePubKeyResponse struct {
	PubKey OraclePubKey `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key"`
}

func (*QueryGetOraclePubKeyResponse) Descriptor

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

func (*QueryGetOraclePubKeyResponse) GetPubKey

func (*QueryGetOraclePubKeyResponse) Marshal

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

func (*QueryGetOraclePubKeyResponse) MarshalTo

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

func (*QueryGetOraclePubKeyResponse) MarshalToSizedBuffer

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

func (*QueryGetOraclePubKeyResponse) ProtoMessage

func (*QueryGetOraclePubKeyResponse) ProtoMessage()

func (*QueryGetOraclePubKeyResponse) Reset

func (m *QueryGetOraclePubKeyResponse) Reset()

func (*QueryGetOraclePubKeyResponse) Size

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

func (*QueryGetOraclePubKeyResponse) String

func (*QueryGetOraclePubKeyResponse) Unmarshal

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

func (*QueryGetOraclePubKeyResponse) XXX_DiscardUnknown

func (m *QueryGetOraclePubKeyResponse) XXX_DiscardUnknown()

func (*QueryGetOraclePubKeyResponse) XXX_Marshal

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

func (*QueryGetOraclePubKeyResponse) XXX_Merge

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

func (*QueryGetOraclePubKeyResponse) XXX_Size

func (m *QueryGetOraclePubKeyResponse) XXX_Size() int

func (*QueryGetOraclePubKeyResponse) XXX_Unmarshal

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

type QueryGetOracleRequest

type QueryGetOracleRequest struct {
	OperatorAddress string `protobuf:"bytes,1,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty"`
}

func (*QueryGetOracleRequest) Descriptor

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

func (*QueryGetOracleRequest) GetOperatorAddress

func (m *QueryGetOracleRequest) GetOperatorAddress() string

func (*QueryGetOracleRequest) Marshal

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

func (*QueryGetOracleRequest) MarshalTo

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

func (*QueryGetOracleRequest) MarshalToSizedBuffer

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

func (*QueryGetOracleRequest) ProtoMessage

func (*QueryGetOracleRequest) ProtoMessage()

func (*QueryGetOracleRequest) Reset

func (m *QueryGetOracleRequest) Reset()

func (*QueryGetOracleRequest) Size

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

func (*QueryGetOracleRequest) String

func (m *QueryGetOracleRequest) String() string

func (*QueryGetOracleRequest) Unmarshal

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

func (*QueryGetOracleRequest) XXX_DiscardUnknown

func (m *QueryGetOracleRequest) XXX_DiscardUnknown()

func (*QueryGetOracleRequest) XXX_Marshal

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

func (*QueryGetOracleRequest) XXX_Merge

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

func (*QueryGetOracleRequest) XXX_Size

func (m *QueryGetOracleRequest) XXX_Size() int

func (*QueryGetOracleRequest) XXX_Unmarshal

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

type QueryGetOracleResponse

type QueryGetOracleResponse struct {
	Oracle Oracle `protobuf:"bytes,1,opt,name=oracle,proto3" json:"oracle"`
}

func (*QueryGetOracleResponse) Descriptor

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

func (*QueryGetOracleResponse) GetOracle

func (m *QueryGetOracleResponse) GetOracle() Oracle

func (*QueryGetOracleResponse) Marshal

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

func (*QueryGetOracleResponse) MarshalTo

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

func (*QueryGetOracleResponse) MarshalToSizedBuffer

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

func (*QueryGetOracleResponse) ProtoMessage

func (*QueryGetOracleResponse) ProtoMessage()

func (*QueryGetOracleResponse) Reset

func (m *QueryGetOracleResponse) Reset()

func (*QueryGetOracleResponse) Size

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

func (*QueryGetOracleResponse) String

func (m *QueryGetOracleResponse) String() string

func (*QueryGetOracleResponse) Unmarshal

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

func (*QueryGetOracleResponse) XXX_DiscardUnknown

func (m *QueryGetOracleResponse) XXX_DiscardUnknown()

func (*QueryGetOracleResponse) XXX_Marshal

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

func (*QueryGetOracleResponse) XXX_Merge

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

func (*QueryGetOracleResponse) XXX_Size

func (m *QueryGetOracleResponse) XXX_Size() int

func (*QueryGetOracleResponse) XXX_Unmarshal

func (m *QueryGetOracleResponse) 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)
	// Queries a Join by id.
	Join(context.Context, *QueryGetJoinRequest) (*QueryGetJoinResponse, error)
	// Queries a list of Join items.
	JoinAll(context.Context, *QueryAllJoinRequest) (*QueryAllJoinResponse, error)
	// Queries an Oracle by operator_address.
	Oracle(context.Context, *QueryGetOracleRequest) (*QueryGetOracleResponse, error)
	// Queries a list of Oracle items.
	OracleAll(context.Context, *QueryAllOracleRequest) (*QueryAllOracleResponse, error)
	// Queries an oracle pubkey
	OraclePubKey(context.Context, *QueryGetOraclePubKeyRequest) (*QueryGetOraclePubKeyResponse, error)
}

QueryServer is the server API for Query service.

type TallyResult

type TallyResult struct {
	Yes      github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=yes,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"yes"`
	YesValue string                                 `protobuf:"bytes,2,opt,name=yesValue,proto3" json:"yesValue,omitempty"`
	No       github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=no,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"no"`
}

func DefaultTallyResult

func DefaultTallyResult() TallyResult

func (*TallyResult) Descriptor

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

func (*TallyResult) GetYesValue

func (m *TallyResult) GetYesValue() string

func (*TallyResult) Marshal

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

func (*TallyResult) MarshalTo

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

func (*TallyResult) MarshalToSizedBuffer

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

func (*TallyResult) ProtoMessage

func (*TallyResult) ProtoMessage()

func (*TallyResult) Reset

func (m *TallyResult) Reset()

func (*TallyResult) Size

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

func (*TallyResult) String

func (m *TallyResult) String() string

func (*TallyResult) Unmarshal

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

func (*TallyResult) XXX_DiscardUnknown

func (m *TallyResult) XXX_DiscardUnknown()

func (*TallyResult) XXX_Marshal

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

func (*TallyResult) XXX_Merge

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

func (*TallyResult) XXX_Size

func (m *TallyResult) XXX_Size() int

func (*TallyResult) XXX_Unmarshal

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) Init

func (*UnimplementedMsgServer) Join

func (*UnimplementedMsgServer) VoteForJoin

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Join

func (*UnimplementedQueryServer) JoinAll

func (*UnimplementedQueryServer) Oracle

func (*UnimplementedQueryServer) OracleAll

func (*UnimplementedQueryServer) OraclePubKey

func (*UnimplementedQueryServer) Params

type VoteForJoin

type VoteForJoin struct {
	JoinID                    uint64     `protobuf:"varint,1,opt,name=join_id,json=joinId,proto3" json:"join_id,omitempty"`
	Option                    VoteOption `protobuf:"varint,2,opt,name=option,proto3,enum=dhub.oracle.VoteOption" json:"option,omitempty"`
	EncryptedOraclePrivKeyB64 string     `` /* 142-byte string literal not displayed */
	Voter                     string     `protobuf:"bytes,4,opt,name=voter,proto3" json:"voter,omitempty"`
}

func (*VoteForJoin) Descriptor

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

func (*VoteForJoin) GetEncryptedOraclePrivKeyB64

func (m *VoteForJoin) GetEncryptedOraclePrivKeyB64() string

func (*VoteForJoin) GetJoinID

func (m *VoteForJoin) GetJoinID() uint64

func (*VoteForJoin) GetOption

func (m *VoteForJoin) GetOption() VoteOption

func (*VoteForJoin) GetVoter

func (m *VoteForJoin) GetVoter() string

func (*VoteForJoin) Marshal

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

func (*VoteForJoin) MarshalTo

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

func (*VoteForJoin) MarshalToSizedBuffer

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

func (*VoteForJoin) ProtoMessage

func (*VoteForJoin) ProtoMessage()

func (*VoteForJoin) Reset

func (m *VoteForJoin) Reset()

func (*VoteForJoin) Size

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

func (*VoteForJoin) String

func (m *VoteForJoin) String() string

func (*VoteForJoin) Unmarshal

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

func (*VoteForJoin) XXX_DiscardUnknown

func (m *VoteForJoin) XXX_DiscardUnknown()

func (*VoteForJoin) XXX_Marshal

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

func (*VoteForJoin) XXX_Merge

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

func (*VoteForJoin) XXX_Size

func (m *VoteForJoin) XXX_Size() int

func (*VoteForJoin) XXX_Unmarshal

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

type VoteOption

type VoteOption int32
const (
	OptionYes VoteOption = 0
	OptionNo  VoteOption = 1
)

func (VoteOption) EnumDescriptor

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

func (VoteOption) String

func (x VoteOption) String() string

Jump to

Keyboard shortcuts

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