types

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2022 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	ModuleName   = "oracle"
	StoreKey     = ModuleName
	RouterKey    = ModuleName
	QuerierRoute = ModuleName
)

Variables

View Source
var (
	ErrNoSupportChain    = sdkerrors.Register(ModuleName, 0, "this chain is not supported")
	ErrInvalidOperator   = sdkerrors.Register(ModuleName, 1, "invalid operator address")
	ErrUnknown           = sdkerrors.Register(ModuleName, 2, "unknown error")
	ErrNotFoundZoneInfo  = sdkerrors.Register(ModuleName, 3, "not found zone info")
	ErrInvalidKeyManager = sdkerrors.Register(ModuleName, 4, "invalid key manager address")
)
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 (
	KeyOracleVersion    = []byte{0x00}
	KeyOracleAddr       = []byte{0x01}
	KeyOracleChainState = []byte{0x02}
)
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 (
	ErrInvalidLengthStore        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowStore          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupStore = 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 (
	KeyOracleManager = []byte("OracleKeyManagerAddress")
)
View Source
var (
	ModuleCdc = codec.NewAminoCodec(amino)
)

Functions

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

func RegisterInterfaces

func RegisterInterfaces(registry types.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 to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type ChainInfo

type ChainInfo struct {
	// coin refers to the sum of owned, staked and claimable quantity of the coin
	Coin types.Coin `protobuf:"bytes,1,opt,name=coin,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coin"`
	// operator_address is an oracle operator's address
	OperatorAddress string `protobuf:"bytes,2,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty"`
	// last_block_height is the block height observed by the operator on the host chain.
	LastBlockHeight int64 `protobuf:"varint,3,opt,name=last_block_height,json=lastBlockHeight,proto3" json:"last_block_height,omitempty"`
	// app_hash of the block fetched by oracle from host chain
	AppHash []byte `protobuf:"bytes,4,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"`
	// chain_id of the host chain
	ZoneId string `protobuf:"bytes,5,opt,name=zone_id,json=zoneId,proto3" json:"zone_id,omitempty"`
}

ChainInfo refers to the state of the counterpart chain to be stored on the Oracle module. Status includes the amount of coins delegated to Zone, AppHash, and block height.

func (*ChainInfo) Descriptor

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

func (*ChainInfo) GetAppHash

func (m *ChainInfo) GetAppHash() []byte

func (*ChainInfo) GetCoin

func (m *ChainInfo) GetCoin() types.Coin

func (*ChainInfo) GetLastBlockHeight

func (m *ChainInfo) GetLastBlockHeight() int64

func (*ChainInfo) GetOperatorAddress

func (m *ChainInfo) GetOperatorAddress() string

func (*ChainInfo) GetZoneId added in v0.6.2

func (m *ChainInfo) GetZoneId() string

func (*ChainInfo) Marshal

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

func (*ChainInfo) MarshalTo

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

func (*ChainInfo) MarshalToSizedBuffer

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

func (*ChainInfo) ProtoMessage

func (*ChainInfo) ProtoMessage()

func (*ChainInfo) Reset

func (m *ChainInfo) Reset()

func (*ChainInfo) Size

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

func (*ChainInfo) String

func (m *ChainInfo) String() string

func (*ChainInfo) Unmarshal

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

func (*ChainInfo) XXX_DiscardUnknown

func (m *ChainInfo) XXX_DiscardUnknown()

func (*ChainInfo) XXX_Marshal

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

func (*ChainInfo) XXX_Merge

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

func (*ChainInfo) XXX_Size

func (m *ChainInfo) XXX_Size() int

func (*ChainInfo) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	// params defines all the parameters of module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	// states is an amount of coins on the host chain.
	States            []ChainInfo         `protobuf:"bytes,2,rep,name=states,proto3" json:"states"`
	OracleAddressInfo []OracleAddressInfo `protobuf:"bytes,3,rep,name=oracle_address_info,json=oracleAddressInfo,proto3" json:"oracle_address_info"`
}

func DefaultGenesis

func DefaultGenesis() *GenesisState

func NewGenesisState

func NewGenesisState(params Params, chainInfos []ChainInfo) *GenesisState

func (*GenesisState) Descriptor

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

func (*GenesisState) GetOracleAddressInfo added in v0.6.2

func (m *GenesisState) GetOracleAddressInfo() []OracleAddressInfo

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetStates

func (m *GenesisState) GetStates() []ChainInfo

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

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 IBCTrace

type IBCTrace struct {
	Version uint64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	Height  uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
}

func (*IBCTrace) Descriptor

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

func (*IBCTrace) GetHeight

func (m *IBCTrace) GetHeight() uint64

func (*IBCTrace) GetVersion

func (m *IBCTrace) GetVersion() uint64

func (*IBCTrace) Marshal

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

func (*IBCTrace) MarshalTo

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

func (*IBCTrace) MarshalToSizedBuffer

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

func (*IBCTrace) ProtoMessage

func (*IBCTrace) ProtoMessage()

func (*IBCTrace) Reset

func (m *IBCTrace) Reset()

func (*IBCTrace) Size

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

func (*IBCTrace) String

func (m *IBCTrace) String() string

func (*IBCTrace) Unmarshal

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

func (*IBCTrace) XXX_DiscardUnknown

func (m *IBCTrace) XXX_DiscardUnknown()

func (*IBCTrace) XXX_Marshal

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

func (*IBCTrace) XXX_Merge

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

func (*IBCTrace) XXX_Size

func (m *IBCTrace) XXX_Size() int

func (*IBCTrace) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	UpdateChainState(ctx context.Context, in *MsgUpdateChainState, opts ...grpc.CallOption) (*MsgUpdateChainStateResponse, error)
	RegisterOracleAddress(ctx context.Context, in *MsgRegisterOracleAddr, opts ...grpc.CallOption) (*MsgRegisterOracleAddrResponse, 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 MsgRegisterOracleAddr added in v0.6.2

type MsgRegisterOracleAddr struct {
	ZoneId        string `protobuf:"bytes,1,opt,name=zone_id,json=zoneId,proto3" json:"zone_id,omitempty"`
	OracleAddress string `protobuf:"bytes,2,opt,name=oracle_address,json=oracleAddress,proto3" json:"oracle_address,omitempty"`
	FromAddress   string `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"`
}

func NewMsgRegisterOracleAddr added in v0.6.2

func NewMsgRegisterOracleAddr(zoneId string, oracleAddr, fromAddr sdk.AccAddress) *MsgRegisterOracleAddr

func (*MsgRegisterOracleAddr) Descriptor added in v0.6.2

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

func (*MsgRegisterOracleAddr) GetFromAddress added in v0.6.2

func (m *MsgRegisterOracleAddr) GetFromAddress() string

func (*MsgRegisterOracleAddr) GetOracleAddress added in v0.6.2

func (m *MsgRegisterOracleAddr) GetOracleAddress() string

func (MsgRegisterOracleAddr) GetSigners added in v0.6.2

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

func (*MsgRegisterOracleAddr) GetZoneId added in v0.6.2

func (m *MsgRegisterOracleAddr) GetZoneId() string

func (*MsgRegisterOracleAddr) Marshal added in v0.6.2

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

func (*MsgRegisterOracleAddr) MarshalTo added in v0.6.2

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

func (*MsgRegisterOracleAddr) MarshalToSizedBuffer added in v0.6.2

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

func (*MsgRegisterOracleAddr) ProtoMessage added in v0.6.2

func (*MsgRegisterOracleAddr) ProtoMessage()

func (*MsgRegisterOracleAddr) Reset added in v0.6.2

func (m *MsgRegisterOracleAddr) Reset()

func (*MsgRegisterOracleAddr) Size added in v0.6.2

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

func (*MsgRegisterOracleAddr) String added in v0.6.2

func (m *MsgRegisterOracleAddr) String() string

func (*MsgRegisterOracleAddr) Unmarshal added in v0.6.2

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

func (MsgRegisterOracleAddr) ValidateBasic added in v0.6.2

func (msg MsgRegisterOracleAddr) ValidateBasic() error

func (*MsgRegisterOracleAddr) XXX_DiscardUnknown added in v0.6.2

func (m *MsgRegisterOracleAddr) XXX_DiscardUnknown()

func (*MsgRegisterOracleAddr) XXX_Marshal added in v0.6.2

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

func (*MsgRegisterOracleAddr) XXX_Merge added in v0.6.2

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

func (*MsgRegisterOracleAddr) XXX_Size added in v0.6.2

func (m *MsgRegisterOracleAddr) XXX_Size() int

func (*MsgRegisterOracleAddr) XXX_Unmarshal added in v0.6.2

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

type MsgRegisterOracleAddrResponse added in v0.6.2

type MsgRegisterOracleAddrResponse struct {
}

func (*MsgRegisterOracleAddrResponse) Descriptor added in v0.6.2

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

func (*MsgRegisterOracleAddrResponse) Marshal added in v0.6.2

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

func (*MsgRegisterOracleAddrResponse) MarshalTo added in v0.6.2

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

func (*MsgRegisterOracleAddrResponse) MarshalToSizedBuffer added in v0.6.2

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

func (*MsgRegisterOracleAddrResponse) ProtoMessage added in v0.6.2

func (*MsgRegisterOracleAddrResponse) ProtoMessage()

func (*MsgRegisterOracleAddrResponse) Reset added in v0.6.2

func (m *MsgRegisterOracleAddrResponse) Reset()

func (*MsgRegisterOracleAddrResponse) Size added in v0.6.2

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

func (*MsgRegisterOracleAddrResponse) String added in v0.6.2

func (*MsgRegisterOracleAddrResponse) Unmarshal added in v0.6.2

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

func (*MsgRegisterOracleAddrResponse) XXX_DiscardUnknown added in v0.6.2

func (m *MsgRegisterOracleAddrResponse) XXX_DiscardUnknown()

func (*MsgRegisterOracleAddrResponse) XXX_Marshal added in v0.6.2

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

func (*MsgRegisterOracleAddrResponse) XXX_Merge added in v0.6.2

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

func (*MsgRegisterOracleAddrResponse) XXX_Size added in v0.6.2

func (m *MsgRegisterOracleAddrResponse) XXX_Size() int

func (*MsgRegisterOracleAddrResponse) XXX_Unmarshal added in v0.6.2

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

type MsgServer

type MsgServer interface {
	UpdateChainState(context.Context, *MsgUpdateChainState) (*MsgUpdateChainStateResponse, error)
	RegisterOracleAddress(context.Context, *MsgRegisterOracleAddr) (*MsgRegisterOracleAddrResponse, error)
}

MsgServer is the server API for Msg service.

type MsgUpdateChainState

type MsgUpdateChainState struct {
	// coin refers to the sum of owned, staked and claimable quantity of the coin
	Coin types.Coin `protobuf:"bytes,1,opt,name=coin,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coin"`
	// address of the oracle
	Operator string `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"`
	// block_height of the block fetched by oracle from host_chain
	BlockHeight int64 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
	// app_hash of the block fetched by oracle from host chain
	AppHash []byte `protobuf:"bytes,4,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"`
	// zone_id of the host chain
	ZoneId string `protobuf:"bytes,5,opt,name=zone_id,json=zoneId,proto3" json:"zone_id,omitempty"`
}

MsgUpdateChainState is the message used to update the status of the zone stored in Oracle.

func NewMsgUpdateChainState

func NewMsgUpdateChainState(signer sdk.AccAddress, chainId string, coin sdk.Coin, blockHeight int64, appHash []byte) *MsgUpdateChainState

func (*MsgUpdateChainState) Descriptor

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

func (*MsgUpdateChainState) GetAppHash

func (m *MsgUpdateChainState) GetAppHash() []byte

func (*MsgUpdateChainState) GetBlockHeight

func (m *MsgUpdateChainState) GetBlockHeight() int64

func (*MsgUpdateChainState) GetCoin

func (m *MsgUpdateChainState) GetCoin() types.Coin

func (*MsgUpdateChainState) GetOperator

func (m *MsgUpdateChainState) GetOperator() string

func (MsgUpdateChainState) GetSigners

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

func (*MsgUpdateChainState) GetZoneId added in v0.6.2

func (m *MsgUpdateChainState) GetZoneId() string

func (*MsgUpdateChainState) Marshal

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

func (*MsgUpdateChainState) MarshalTo

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

func (*MsgUpdateChainState) MarshalToSizedBuffer

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

func (*MsgUpdateChainState) ProtoMessage

func (*MsgUpdateChainState) ProtoMessage()

func (*MsgUpdateChainState) Reset

func (m *MsgUpdateChainState) Reset()

func (*MsgUpdateChainState) Size

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

func (*MsgUpdateChainState) String

func (m *MsgUpdateChainState) String() string

func (*MsgUpdateChainState) Unmarshal

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

func (MsgUpdateChainState) ValidateBasic

func (msg MsgUpdateChainState) ValidateBasic() error

func (*MsgUpdateChainState) XXX_DiscardUnknown

func (m *MsgUpdateChainState) XXX_DiscardUnknown()

func (*MsgUpdateChainState) XXX_Marshal

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

func (*MsgUpdateChainState) XXX_Merge

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

func (*MsgUpdateChainState) XXX_Size

func (m *MsgUpdateChainState) XXX_Size() int

func (*MsgUpdateChainState) XXX_Unmarshal

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

type MsgUpdateChainStateResponse

type MsgUpdateChainStateResponse struct {
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
}

MsgUpdateChainStateResponse is a response message for MsgUpdateChainState. If updating is success, the value of success is true.

func (*MsgUpdateChainStateResponse) Descriptor

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

func (*MsgUpdateChainStateResponse) GetSuccess

func (m *MsgUpdateChainStateResponse) GetSuccess() bool

func (*MsgUpdateChainStateResponse) Marshal

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

func (*MsgUpdateChainStateResponse) MarshalTo

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

func (*MsgUpdateChainStateResponse) MarshalToSizedBuffer

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

func (*MsgUpdateChainStateResponse) ProtoMessage

func (*MsgUpdateChainStateResponse) ProtoMessage()

func (*MsgUpdateChainStateResponse) Reset

func (m *MsgUpdateChainStateResponse) Reset()

func (*MsgUpdateChainStateResponse) Size

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

func (*MsgUpdateChainStateResponse) String

func (m *MsgUpdateChainStateResponse) String() string

func (*MsgUpdateChainStateResponse) Unmarshal

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

func (*MsgUpdateChainStateResponse) XXX_DiscardUnknown

func (m *MsgUpdateChainStateResponse) XXX_DiscardUnknown()

func (*MsgUpdateChainStateResponse) XXX_Marshal

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

func (*MsgUpdateChainStateResponse) XXX_Merge

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

func (*MsgUpdateChainStateResponse) XXX_Size

func (m *MsgUpdateChainStateResponse) XXX_Size() int

func (*MsgUpdateChainStateResponse) XXX_Unmarshal

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

type OracleAddressInfo added in v0.6.2

type OracleAddressInfo struct {
	ZoneId        string   `protobuf:"bytes,1,opt,name=zone_id,json=zoneId,proto3" json:"zone_id,omitempty"`
	OracleAddress []string `protobuf:"bytes,2,rep,name=oracle_address,json=oracleAddress,proto3" json:"oracle_address,omitempty"`
}

func (*OracleAddressInfo) Descriptor added in v0.6.2

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

func (*OracleAddressInfo) GetOracleAddress added in v0.6.2

func (m *OracleAddressInfo) GetOracleAddress() []string

func (*OracleAddressInfo) GetZoneId added in v0.6.2

func (m *OracleAddressInfo) GetZoneId() string

func (*OracleAddressInfo) Marshal added in v0.6.2

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

func (*OracleAddressInfo) MarshalTo added in v0.6.2

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

func (*OracleAddressInfo) MarshalToSizedBuffer added in v0.6.2

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

func (*OracleAddressInfo) ProtoMessage added in v0.6.2

func (*OracleAddressInfo) ProtoMessage()

func (*OracleAddressInfo) Reset added in v0.6.2

func (m *OracleAddressInfo) Reset()

func (*OracleAddressInfo) Size added in v0.6.2

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

func (*OracleAddressInfo) String added in v0.6.2

func (m *OracleAddressInfo) String() string

func (*OracleAddressInfo) Unmarshal added in v0.6.2

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

func (*OracleAddressInfo) XXX_DiscardUnknown added in v0.6.2

func (m *OracleAddressInfo) XXX_DiscardUnknown()

func (*OracleAddressInfo) XXX_Marshal added in v0.6.2

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

func (*OracleAddressInfo) XXX_Merge added in v0.6.2

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

func (*OracleAddressInfo) XXX_Size added in v0.6.2

func (m *OracleAddressInfo) XXX_Size() int

func (*OracleAddressInfo) XXX_Unmarshal added in v0.6.2

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

type Params

type Params struct {
	// oracle operator's address.
	OracleKeyManager []string `protobuf:"bytes,1,rep,name=oracle_key_manager,json=oracleKeyManager,proto3" json:"oracle_key_manager,omitempty"`
}

func DefaultParams

func DefaultParams() Params

func NewParams

func NewParams(operators []string) Params

func (*Params) Descriptor

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

func (*Params) GetOracleKeyManager added in v0.6.2

func (m *Params) GetOracleKeyManager() []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

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

func (*Params) Unmarshal

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

func (*Params) Validate

func (p *Params) Validate() error

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 {
	// Params returns the total set of minting parameters.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	State(ctx context.Context, in *QueryStateRequest, opts ...grpc.CallOption) (*QueryStateResponse, error)
	OracleVersion(ctx context.Context, in *QueryOracleVersionRequest, opts ...grpc.CallOption) (*QueryOracleVersionResponse, 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 QueryOracleVersionRequest

type QueryOracleVersionRequest struct {
	ZoneId string `protobuf:"bytes,1,opt,name=zone_id,json=zoneId,proto3" json:"zone_id,omitempty"`
}

func NewQueryOracleVersionRequest added in v0.6.1

func NewQueryOracleVersionRequest(zoneId string) *QueryOracleVersionRequest

func (*QueryOracleVersionRequest) Descriptor

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

func (*QueryOracleVersionRequest) GetZoneId

func (m *QueryOracleVersionRequest) GetZoneId() string

func (*QueryOracleVersionRequest) Marshal

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

func (*QueryOracleVersionRequest) MarshalTo

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

func (*QueryOracleVersionRequest) MarshalToSizedBuffer

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

func (*QueryOracleVersionRequest) ProtoMessage

func (*QueryOracleVersionRequest) ProtoMessage()

func (*QueryOracleVersionRequest) Reset

func (m *QueryOracleVersionRequest) Reset()

func (*QueryOracleVersionRequest) Size

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

func (*QueryOracleVersionRequest) String

func (m *QueryOracleVersionRequest) String() string

func (*QueryOracleVersionRequest) Unmarshal

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

func (*QueryOracleVersionRequest) XXX_DiscardUnknown

func (m *QueryOracleVersionRequest) XXX_DiscardUnknown()

func (*QueryOracleVersionRequest) XXX_Marshal

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

func (*QueryOracleVersionRequest) XXX_Merge

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

func (*QueryOracleVersionRequest) XXX_Size

func (m *QueryOracleVersionRequest) XXX_Size() int

func (*QueryOracleVersionRequest) XXX_Unmarshal

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

type QueryOracleVersionResponse

type QueryOracleVersionResponse struct {
	Version uint64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	Height  uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
}

func (*QueryOracleVersionResponse) Descriptor

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

func (*QueryOracleVersionResponse) GetHeight

func (m *QueryOracleVersionResponse) GetHeight() uint64

func (*QueryOracleVersionResponse) GetVersion

func (m *QueryOracleVersionResponse) GetVersion() uint64

func (*QueryOracleVersionResponse) Marshal

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

func (*QueryOracleVersionResponse) MarshalTo

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

func (*QueryOracleVersionResponse) MarshalToSizedBuffer

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

func (*QueryOracleVersionResponse) ProtoMessage

func (*QueryOracleVersionResponse) ProtoMessage()

func (*QueryOracleVersionResponse) Reset

func (m *QueryOracleVersionResponse) Reset()

func (*QueryOracleVersionResponse) Size

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

func (*QueryOracleVersionResponse) String

func (m *QueryOracleVersionResponse) String() string

func (*QueryOracleVersionResponse) Unmarshal

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

func (*QueryOracleVersionResponse) XXX_DiscardUnknown

func (m *QueryOracleVersionResponse) XXX_DiscardUnknown()

func (*QueryOracleVersionResponse) XXX_Marshal

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

func (*QueryOracleVersionResponse) XXX_Merge

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

func (*QueryOracleVersionResponse) XXX_Size

func (m *QueryOracleVersionResponse) XXX_Size() int

func (*QueryOracleVersionResponse) XXX_Unmarshal

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

type QueryParamsRequest

type QueryParamsRequest struct {
}

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 defines the parameters of the module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

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 {
	// Params returns the total set of minting parameters.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	State(context.Context, *QueryStateRequest) (*QueryStateResponse, error)
	OracleVersion(context.Context, *QueryOracleVersionRequest) (*QueryOracleVersionResponse, error)
}

QueryServer is the server API for Query service.

type QueryStateRequest

type QueryStateRequest struct {
	ChainDenom string `protobuf:"bytes,1,opt,name=chain_denom,json=chainDenom,proto3" json:"chain_denom,omitempty"`
}

func NewQueryChainStateRequest

func NewQueryChainStateRequest(chainDenom string) *QueryStateRequest

func (*QueryStateRequest) Descriptor

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

func (*QueryStateRequest) GetChainDenom

func (m *QueryStateRequest) GetChainDenom() string

func (*QueryStateRequest) Marshal

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

func (*QueryStateRequest) MarshalTo

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

func (*QueryStateRequest) MarshalToSizedBuffer

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

func (*QueryStateRequest) ProtoMessage

func (*QueryStateRequest) ProtoMessage()

func (*QueryStateRequest) Reset

func (m *QueryStateRequest) Reset()

func (*QueryStateRequest) Size

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

func (*QueryStateRequest) String

func (m *QueryStateRequest) String() string

func (*QueryStateRequest) Unmarshal

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

func (*QueryStateRequest) XXX_DiscardUnknown

func (m *QueryStateRequest) XXX_DiscardUnknown()

func (*QueryStateRequest) XXX_Marshal

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

func (*QueryStateRequest) XXX_Merge

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

func (*QueryStateRequest) XXX_Size

func (m *QueryStateRequest) XXX_Size() int

func (*QueryStateRequest) XXX_Unmarshal

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

type QueryStateResponse

type QueryStateResponse struct {
	Coin            types.Coin `protobuf:"bytes,1,opt,name=coin,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coin"`
	Operator        string     `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"`
	LastBlockHeight int64      `protobuf:"varint,3,opt,name=last_block_height,json=lastBlockHeight,proto3" json:"last_block_height,omitempty"`
	AppHash         []byte     `protobuf:"bytes,4,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"`
	ZoneId          string     `protobuf:"bytes,5,opt,name=zone_id,json=zoneId,proto3" json:"zone_id,omitempty"`
}

func (*QueryStateResponse) Descriptor

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

func (*QueryStateResponse) GetAppHash

func (m *QueryStateResponse) GetAppHash() []byte

func (*QueryStateResponse) GetCoin

func (m *QueryStateResponse) GetCoin() types.Coin

func (*QueryStateResponse) GetLastBlockHeight

func (m *QueryStateResponse) GetLastBlockHeight() int64

func (*QueryStateResponse) GetOperator

func (m *QueryStateResponse) GetOperator() string

func (*QueryStateResponse) GetZoneId added in v0.6.2

func (m *QueryStateResponse) GetZoneId() string

func (*QueryStateResponse) Marshal

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

func (*QueryStateResponse) MarshalTo

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

func (*QueryStateResponse) MarshalToSizedBuffer

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

func (*QueryStateResponse) ProtoMessage

func (*QueryStateResponse) ProtoMessage()

func (*QueryStateResponse) Reset

func (m *QueryStateResponse) Reset()

func (*QueryStateResponse) Size

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

func (*QueryStateResponse) String

func (m *QueryStateResponse) String() string

func (*QueryStateResponse) Unmarshal

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

func (*QueryStateResponse) XXX_DiscardUnknown

func (m *QueryStateResponse) XXX_DiscardUnknown()

func (*QueryStateResponse) XXX_Marshal

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

func (*QueryStateResponse) XXX_Merge

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

func (*QueryStateResponse) XXX_Size

func (m *QueryStateResponse) XXX_Size() int

func (*QueryStateResponse) XXX_Unmarshal

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) RegisterOracleAddress added in v0.6.2

func (*UnimplementedMsgServer) UpdateChainState

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) OracleVersion

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) State

Jump to

Keyboard shortcuts

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