Documentation
¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func ProvideMsgAlertGetSigners() signing.CustomGetSigner
- func RegisterInterfaces(registry codectypes.InterfaceRegistry)
- func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- type Alert
- func (*Alert) Descriptor() ([]byte, []int)
- func (m *Alert) GetCurrencyPair() types.CurrencyPair
- func (m *Alert) GetHeight() uint64
- func (m *Alert) GetSigner() string
- func (m *Alert) Marshal() (dAtA []byte, err error)
- func (m *Alert) MarshalTo(dAtA []byte) (int, error)
- func (m *Alert) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Alert) ProtoMessage()
- func (m *Alert) Reset()
- func (m *Alert) Size() (n int)
- func (m *Alert) String() string
- func (a Alert) UID() []byte
- func (m *Alert) Unmarshal(dAtA []byte) error
- func (a Alert) ValidateBasic() error
- func (m *Alert) XXX_DiscardUnknown()
- func (m *Alert) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Alert) XXX_Merge(src proto.Message)
- func (m *Alert) XXX_Size() int
- func (m *Alert) XXX_Unmarshal(b []byte) error
- type AlertParams
- func (*AlertParams) Descriptor() ([]byte, []int)
- func (m *AlertParams) GetBondAmount() types.Coin
- func (m *AlertParams) GetEnabled() bool
- func (m *AlertParams) GetMaxBlockAge() uint64
- func (m *AlertParams) Marshal() (dAtA []byte, err error)
- func (m *AlertParams) MarshalTo(dAtA []byte) (int, error)
- func (m *AlertParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AlertParams) ProtoMessage()
- func (m *AlertParams) Reset()
- func (m *AlertParams) Size() (n int)
- func (m *AlertParams) String() string
- func (m *AlertParams) Unmarshal(dAtA []byte) error
- func (ap AlertParams) Validate() error
- func (m *AlertParams) XXX_DiscardUnknown()
- func (m *AlertParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AlertParams) XXX_Merge(src proto.Message)
- func (m *AlertParams) XXX_Size() int
- func (m *AlertParams) XXX_Unmarshal(b []byte) error
- type AlertStatus
- func (*AlertStatus) Descriptor() ([]byte, []int)
- func (m *AlertStatus) GetConclusionStatus() uint64
- func (m *AlertStatus) GetPurgeHeight() uint64
- func (m *AlertStatus) GetSubmissionHeight() uint64
- func (m *AlertStatus) GetSubmissionTimestamp() uint64
- func (m *AlertStatus) Marshal() (dAtA []byte, err error)
- func (m *AlertStatus) MarshalTo(dAtA []byte) (int, error)
- func (m *AlertStatus) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AlertStatus) ProtoMessage()
- func (m *AlertStatus) Reset()
- func (m *AlertStatus) Size() (n int)
- func (m *AlertStatus) String() string
- func (m *AlertStatus) Unmarshal(dAtA []byte) error
- func (a AlertStatus) ValidateBasic() error
- func (m *AlertStatus) XXX_DiscardUnknown()
- func (m *AlertStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AlertStatus) XXX_Merge(src proto.Message)
- func (m *AlertStatus) XXX_Size() int
- func (m *AlertStatus) XXX_Unmarshal(b []byte) error
- type AlertStatusID
- type AlertWithStatus
- func (*AlertWithStatus) Descriptor() ([]byte, []int)
- func (m *AlertWithStatus) GetAlert() Alert
- func (m *AlertWithStatus) GetStatus() AlertStatus
- func (m *AlertWithStatus) Marshal() (dAtA []byte, err error)
- func (m *AlertWithStatus) MarshalTo(dAtA []byte) (int, error)
- func (m *AlertWithStatus) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AlertWithStatus) ProtoMessage()
- func (m *AlertWithStatus) Reset()
- func (m *AlertWithStatus) Size() (n int)
- func (m *AlertWithStatus) String() string
- func (m *AlertWithStatus) Unmarshal(dAtA []byte) error
- func (aws AlertWithStatus) ValidateBasic() error
- func (m *AlertWithStatus) XXX_DiscardUnknown()
- func (m *AlertWithStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AlertWithStatus) XXX_Merge(src proto.Message)
- func (m *AlertWithStatus) XXX_Size() int
- func (m *AlertWithStatus) XXX_Unmarshal(b []byte) error
- type AlertsRequest
- func (*AlertsRequest) Descriptor() ([]byte, []int)
- func (m *AlertsRequest) GetStatus() AlertStatusID
- func (m *AlertsRequest) Marshal() (dAtA []byte, err error)
- func (m *AlertsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *AlertsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AlertsRequest) ProtoMessage()
- func (m *AlertsRequest) Reset()
- func (m *AlertsRequest) Size() (n int)
- func (m *AlertsRequest) String() string
- func (m *AlertsRequest) Unmarshal(dAtA []byte) error
- func (m *AlertsRequest) XXX_DiscardUnknown()
- func (m *AlertsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AlertsRequest) XXX_Merge(src proto.Message)
- func (m *AlertsRequest) XXX_Size() int
- func (m *AlertsRequest) XXX_Unmarshal(b []byte) error
- type AlertsResponse
- func (*AlertsResponse) Descriptor() ([]byte, []int)
- func (m *AlertsResponse) GetAlerts() []Alert
- func (m *AlertsResponse) Marshal() (dAtA []byte, err error)
- func (m *AlertsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *AlertsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AlertsResponse) ProtoMessage()
- func (m *AlertsResponse) Reset()
- func (m *AlertsResponse) Size() (n int)
- func (m *AlertsResponse) String() string
- func (m *AlertsResponse) Unmarshal(dAtA []byte) error
- func (m *AlertsResponse) XXX_DiscardUnknown()
- func (m *AlertsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AlertsResponse) XXX_Merge(src proto.Message)
- func (m *AlertsResponse) XXX_Size() int
- func (m *AlertsResponse) XXX_Unmarshal(b []byte) error
- type BankKeeper
- type Conclusion
- type ConclusionStatus
- type ConclusionVerificationParams
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetAlerts() []AlertWithStatus
- func (m *GenesisState) GetParams() Params
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (gs GenesisState) ValidateBasic() error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type IncentiveKeeper
- type MsgAlert
- func (*MsgAlert) Descriptor() ([]byte, []int)
- func (m *MsgAlert) GetAlert() Alert
- func (msg MsgAlert) GetSigners() []sdk.AccAddress
- func (m *MsgAlert) Marshal() (dAtA []byte, err error)
- func (m *MsgAlert) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgAlert) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgAlert) ProtoMessage()
- func (m *MsgAlert) Reset()
- func (m *MsgAlert) Size() (n int)
- func (m *MsgAlert) String() string
- func (m *MsgAlert) Unmarshal(dAtA []byte) error
- func (msg MsgAlert) ValidateBasic() error
- func (m *MsgAlert) XXX_DiscardUnknown()
- func (m *MsgAlert) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgAlert) XXX_Merge(src proto.Message)
- func (m *MsgAlert) XXX_Size() int
- func (m *MsgAlert) XXX_Unmarshal(b []byte) error
- type MsgAlertResponse
- func (*MsgAlertResponse) Descriptor() ([]byte, []int)
- func (m *MsgAlertResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgAlertResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgAlertResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgAlertResponse) ProtoMessage()
- func (m *MsgAlertResponse) Reset()
- func (m *MsgAlertResponse) Size() (n int)
- func (m *MsgAlertResponse) String() string
- func (m *MsgAlertResponse) Unmarshal(dAtA []byte) error
- func (m *MsgAlertResponse) XXX_DiscardUnknown()
- func (m *MsgAlertResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgAlertResponse) XXX_Merge(src proto.Message)
- func (m *MsgAlertResponse) XXX_Size() int
- func (m *MsgAlertResponse) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgConclusion
- func (*MsgConclusion) Descriptor() ([]byte, []int)
- func (m *MsgConclusion) GetConclusion() *types.Any
- func (m *MsgConclusion) GetSigner() string
- func (msg MsgConclusion) GetSigners() []sdk.AccAddress
- func (m *MsgConclusion) Marshal() (dAtA []byte, err error)
- func (m *MsgConclusion) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgConclusion) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgConclusion) ProtoMessage()
- func (m *MsgConclusion) Reset()
- func (m *MsgConclusion) Size() (n int)
- func (m *MsgConclusion) String() string
- func (m *MsgConclusion) Unmarshal(dAtA []byte) error
- func (msg MsgConclusion) ValidateBasic() error
- func (m *MsgConclusion) XXX_DiscardUnknown()
- func (m *MsgConclusion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgConclusion) XXX_Merge(src proto.Message)
- func (m *MsgConclusion) XXX_Size() int
- func (m *MsgConclusion) XXX_Unmarshal(b []byte) error
- type MsgConclusionResponse
- func (*MsgConclusionResponse) Descriptor() ([]byte, []int)
- func (m *MsgConclusionResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgConclusionResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgConclusionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgConclusionResponse) ProtoMessage()
- func (m *MsgConclusionResponse) Reset()
- func (m *MsgConclusionResponse) Size() (n int)
- func (m *MsgConclusionResponse) String() string
- func (m *MsgConclusionResponse) Unmarshal(dAtA []byte) error
- func (m *MsgConclusionResponse) XXX_DiscardUnknown()
- func (m *MsgConclusionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgConclusionResponse) XXX_Merge(src proto.Message)
- func (m *MsgConclusionResponse) XXX_Size() int
- func (m *MsgConclusionResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type MsgUpdateParams
- func (*MsgUpdateParams) Descriptor() ([]byte, []int)
- func (m *MsgUpdateParams) GetAuthority() string
- func (m *MsgUpdateParams) GetParams() Params
- func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateParams) ProtoMessage()
- func (m *MsgUpdateParams) Reset()
- func (m *MsgUpdateParams) Size() (n int)
- func (m *MsgUpdateParams) String() string
- func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error
- func (m MsgUpdateParams) ValidateBasic() error
- func (m *MsgUpdateParams) XXX_DiscardUnknown()
- func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateParams) XXX_Merge(src proto.Message)
- func (m *MsgUpdateParams) XXX_Size() int
- func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error
- type MsgUpdateParamsResponse
- func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int)
- func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateParamsResponse) ProtoMessage()
- func (m *MsgUpdateParamsResponse) Reset()
- func (m *MsgUpdateParamsResponse) Size() (n int)
- func (m *MsgUpdateParamsResponse) String() string
- func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error
- func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()
- func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message)
- func (m *MsgUpdateParamsResponse) XXX_Size() int
- func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error
- type MultiSigConclusion
- func (*MultiSigConclusion) Descriptor() ([]byte, []int)
- func (m *MultiSigConclusion) GetAlert() Alert
- func (m *MultiSigConclusion) GetCurrencyPairID() uint64
- func (m *MultiSigConclusion) GetExtendedCommitInfo() types1.ExtendedCommitInfo
- func (m *MultiSigConclusion) GetPriceBound() PriceBound
- func (m *MultiSigConclusion) GetSignatures() []Signature
- func (m *MultiSigConclusion) GetStatus() bool
- func (m *MultiSigConclusion) Marshal() (dAtA []byte, err error)
- func (m *MultiSigConclusion) MarshalTo(dAtA []byte) (int, error)
- func (m *MultiSigConclusion) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MultiSigConclusion) ProtoMessage()
- func (m *MultiSigConclusion) Reset()
- func (c MultiSigConclusion) SignBytes() ([]byte, error)
- func (m *MultiSigConclusion) Size() (n int)
- func (m *MultiSigConclusion) String() string
- func (m *MultiSigConclusion) Unmarshal(dAtA []byte) error
- func (c MultiSigConclusion) ValidateBasic() error
- func (c MultiSigConclusion) Verify(params ConclusionVerificationParams) error
- func (m *MultiSigConclusion) XXX_DiscardUnknown()
- func (m *MultiSigConclusion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MultiSigConclusion) XXX_Merge(src proto.Message)
- func (m *MultiSigConclusion) XXX_Size() int
- func (m *MultiSigConclusion) XXX_Unmarshal(b []byte) error
- type MultiSigConclusionVerificationParams
- func (*MultiSigConclusionVerificationParams) Descriptor() ([]byte, []int)
- func (m *MultiSigConclusionVerificationParams) GetSigners() []*types2.Any
- func (m *MultiSigConclusionVerificationParams) Marshal() (dAtA []byte, err error)
- func (m *MultiSigConclusionVerificationParams) MarshalTo(dAtA []byte) (int, error)
- func (m *MultiSigConclusionVerificationParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MultiSigConclusionVerificationParams) ProtoMessage()
- func (m *MultiSigConclusionVerificationParams) Reset()
- func (m *MultiSigConclusionVerificationParams) Size() (n int)
- func (m *MultiSigConclusionVerificationParams) String() string
- func (m *MultiSigConclusionVerificationParams) Unmarshal(dAtA []byte) error
- func (params MultiSigConclusionVerificationParams) ValidateBasic() error
- func (m *MultiSigConclusionVerificationParams) XXX_DiscardUnknown()
- func (m *MultiSigConclusionVerificationParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MultiSigConclusionVerificationParams) XXX_Merge(src proto.Message)
- func (m *MultiSigConclusionVerificationParams) XXX_Size() int
- func (m *MultiSigConclusionVerificationParams) XXX_Unmarshal(b []byte) error
- type OracleKeeper
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) GetAlertParams() AlertParams
- func (m *Params) GetConclusionVerificationParams() *types1.Any
- func (m *Params) GetPruningParams() PruningParams
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (m *Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (p Params) Validate() error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type ParamsRequest
- func (*ParamsRequest) Descriptor() ([]byte, []int)
- func (m *ParamsRequest) Marshal() (dAtA []byte, err error)
- func (m *ParamsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *ParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ParamsRequest) ProtoMessage()
- func (m *ParamsRequest) Reset()
- func (m *ParamsRequest) Size() (n int)
- func (m *ParamsRequest) String() string
- func (m *ParamsRequest) Unmarshal(dAtA []byte) error
- func (m *ParamsRequest) XXX_DiscardUnknown()
- func (m *ParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ParamsRequest) XXX_Merge(src proto.Message)
- func (m *ParamsRequest) XXX_Size() int
- func (m *ParamsRequest) XXX_Unmarshal(b []byte) error
- type ParamsResponse
- func (*ParamsResponse) Descriptor() ([]byte, []int)
- func (m *ParamsResponse) GetParams() Params
- func (m *ParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *ParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *ParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ParamsResponse) ProtoMessage()
- func (m *ParamsResponse) Reset()
- func (m *ParamsResponse) Size() (n int)
- func (m *ParamsResponse) String() string
- func (m *ParamsResponse) Unmarshal(dAtA []byte) error
- func (m *ParamsResponse) XXX_DiscardUnknown()
- func (m *ParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ParamsResponse) XXX_Merge(src proto.Message)
- func (m *ParamsResponse) XXX_Size() int
- func (m *ParamsResponse) XXX_Unmarshal(b []byte) error
- type PriceBound
- func (*PriceBound) Descriptor() ([]byte, []int)
- func (m *PriceBound) GetHigh() string
- func (pb PriceBound) GetHighInt() (*big.Int, error)
- func (m *PriceBound) GetLow() string
- func (pb PriceBound) GetLowInt() (*big.Int, error)
- func (m *PriceBound) Marshal() (dAtA []byte, err error)
- func (m *PriceBound) MarshalTo(dAtA []byte) (int, error)
- func (m *PriceBound) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PriceBound) ProtoMessage()
- func (m *PriceBound) Reset()
- func (m *PriceBound) Size() (n int)
- func (m *PriceBound) String() string
- func (m *PriceBound) Unmarshal(dAtA []byte) error
- func (pb PriceBound) ValidateBasic() error
- func (m *PriceBound) XXX_DiscardUnknown()
- func (m *PriceBound) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PriceBound) XXX_Merge(src proto.Message)
- func (m *PriceBound) XXX_Size() int
- func (m *PriceBound) XXX_Unmarshal(b []byte) error
- type PruningParams
- func (*PruningParams) Descriptor() ([]byte, []int)
- func (m *PruningParams) GetBlocksToPrune() uint64
- func (m *PruningParams) GetEnabled() bool
- func (m *PruningParams) Marshal() (dAtA []byte, err error)
- func (m *PruningParams) MarshalTo(dAtA []byte) (int, error)
- func (m *PruningParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PruningParams) ProtoMessage()
- func (m *PruningParams) Reset()
- func (m *PruningParams) Size() (n int)
- func (m *PruningParams) String() string
- func (m *PruningParams) Unmarshal(dAtA []byte) error
- func (pp PruningParams) Validate() error
- func (m *PruningParams) XXX_DiscardUnknown()
- func (m *PruningParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PruningParams) XXX_Merge(src proto.Message)
- func (m *PruningParams) XXX_Size() int
- func (m *PruningParams) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryServer
- type Signature
- func (*Signature) Descriptor() ([]byte, []int)
- func (m *Signature) GetSignature() []byte
- func (m *Signature) GetSigner() string
- func (m *Signature) Marshal() (dAtA []byte, err error)
- func (m *Signature) MarshalTo(dAtA []byte) (int, error)
- func (m *Signature) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Signature) ProtoMessage()
- func (m *Signature) Reset()
- func (m *Signature) Size() (n int)
- func (m *Signature) String() string
- func (m *Signature) Unmarshal(dAtA []byte) error
- func (m *Signature) XXX_DiscardUnknown()
- func (m *Signature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Signature) XXX_Merge(src proto.Message)
- func (m *Signature) XXX_Size() int
- func (m *Signature) XXX_Unmarshal(b []byte) error
- type StakingKeeper
- type UnimplementedMsgServer
- func (*UnimplementedMsgServer) Alert(ctx context.Context, req *MsgAlert) (*MsgAlertResponse, error)
- func (*UnimplementedMsgServer) Conclusion(ctx context.Context, req *MsgConclusion) (*MsgConclusionResponse, error)
- func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
- type UnimplementedQueryServer
Constants ¶
const ( // ModuleName is the name of the module ModuleName = "alerts" // StoreKey is the default store key for alerts StoreKey = ModuleName )
const ( Secp256k1Type = "secp256k1" Secp256r1Type = "secp256r1" Ed25519Type = "ed25519" )
const AlertUIDLen = 20
Variables ¶
var ( ErrInvalidLengthAlerts = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowAlerts = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupAlerts = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( // AlertStoreKeyPrefix is the prefix for the alert store key AlertStoreKeyPrefix = collections.NewPrefix(0) // ParamsStoreKeyPrefix is the prefix for the params store key ParamsStoreKeyPrefix = collections.NewPrefix(1) )
var ( // DefaultEnabled is the default value for the enabled flag DefaultEnabled = true // DefaultPruningEnabled is the default value for the pruning enabled flag DefaultPruningEnabled = true // DefaultBondAmount is the default value for the bond amount DefaultBondAmount = math.NewInt(1000000) // DefaultAlertExpiry is the maximum age of an alert DefaultAlertExpiry = uint64(10000) // DefaultBlocksToPrune is the default number of blocks an alert is kept in state // until it is pruned DefaultBlocksToPrune = uint64(1000) )
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") )
var AlertStatusID_name = map[int32]string{
0: "CONCLUSION_STATUS_UNSPECIFIED",
1: "CONCLUSION_STATUS_UNCONCLUDED",
2: "CONCLUSION_STATUS_CONCLUDED",
}
var AlertStatusID_value = map[string]int32{
"CONCLUSION_STATUS_UNSPECIFIED": 0,
"CONCLUSION_STATUS_UNCONCLUDED": 1,
"CONCLUSION_STATUS_CONCLUDED": 2,
}
Functions ¶
func ProvideMsgAlertGetSigners ¶
func ProvideMsgAlertGetSigners() signing.CustomGetSigner
ProvideMsgAlertGetSigners provides the CustomGetSigners method for the MsgAlert.
func RegisterInterfaces ¶
func RegisterInterfaces(registry codectypes.InterfaceRegistry)
RegisterInterfaces registers the x/alerts messages + message service w/ the InterfaceRegistry (registry).
This method will also update the internal package's codec so that any subsequent attempts in the package to unmarshal anys will reference the registry passed here.
func RegisterLegacyAminoCodec ¶
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
RegisterLegacyAminoCodec registers the necessary x/authz interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization.
func RegisterMsgServer ¶
func RegisterQueryHandler ¶
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 Alert ¶
type Alert struct { // height represents the height for which the alert is filed. Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` // signer is the signer of this alert, this is the address that will receive the reward // in the case of a positive conclusion, or whose bond will get slashed in the event of a negative conclusion. Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` // currency_pair is the currency-pair that this claim asserts is deviating from the price off-chain. CurrencyPair types.CurrencyPair `protobuf:"bytes,3,opt,name=currency_pair,json=currencyPair,proto3" json:"currency_pair"` }
Alert defines the basic meta-data necessary for the alerts module to resolve a claim that the price of a CurrencyPair on-chain is deviating from the price off-chain.
func NewAlert ¶
func NewAlert(height uint64, signer sdk.AccAddress, cp oracledata.CurrencyPair) Alert
NewAlert returns a new Alert.
func (*Alert) Descriptor ¶
func (*Alert) GetCurrencyPair ¶
func (m *Alert) GetCurrencyPair() types.CurrencyPair
func (*Alert) ProtoMessage ¶
func (*Alert) ProtoMessage()
func (Alert) UID ¶
UID returns the Unique Identifier of this Claim, this is how the BondAddress is defined and this will be used to derive the key under which this Claim will be stored. This method appends the Height, signer, currency-pair strings into a byte-array, and returns the first 20-bytes of the hash of that array.
func (Alert) ValidateBasic ¶
ValidateBasic performs stateless validation on the Claim, i.e checks that the signer and the currency-pair are valid.
func (*Alert) XXX_DiscardUnknown ¶
func (m *Alert) XXX_DiscardUnknown()
func (*Alert) XXX_Marshal ¶
func (*Alert) XXX_Unmarshal ¶
type AlertParams ¶
type AlertParams struct { // Enabled is a boolean defining whether or not Alerts can be submitted // to the module Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` // BondAmount is the minimum amount of bond required to submit an // Alert BondAmount types.Coin `protobuf:"bytes,2,opt,name=bond_amount,json=bondAmount,proto3" json:"bond_amount"` // MaxBlockAge defines the maximum age of an Alert before it is pruned, notice this is defined wrt. // the height that the Alert references, i.e Alerts are only relevant until Alert.Height + MaxBlockAge // is reached. MaxBlockAge uint64 `protobuf:"varint,3,opt,name=max_block_age,json=maxBlockAge,proto3" json:"max_block_age,omitempty"` }
AlertParams is the set of parameters for the x/Alerts module's Alerting. It defines whether or not Alerts can be submitted, and if so, the minimum bond amount required to submit an Alert.
func (*AlertParams) Descriptor ¶
func (*AlertParams) Descriptor() ([]byte, []int)
func (*AlertParams) GetBondAmount ¶
func (m *AlertParams) GetBondAmount() types.Coin
func (*AlertParams) GetEnabled ¶
func (m *AlertParams) GetEnabled() bool
func (*AlertParams) GetMaxBlockAge ¶
func (m *AlertParams) GetMaxBlockAge() uint64
func (*AlertParams) Marshal ¶
func (m *AlertParams) Marshal() (dAtA []byte, err error)
func (*AlertParams) MarshalToSizedBuffer ¶
func (m *AlertParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*AlertParams) ProtoMessage ¶
func (*AlertParams) ProtoMessage()
func (*AlertParams) Reset ¶
func (m *AlertParams) Reset()
func (*AlertParams) Size ¶
func (m *AlertParams) Size() (n int)
func (*AlertParams) String ¶
func (m *AlertParams) String() string
func (*AlertParams) Unmarshal ¶
func (m *AlertParams) Unmarshal(dAtA []byte) error
func (AlertParams) Validate ¶
func (ap AlertParams) Validate() error
Validate performs a basic validation of the AlertParams, i.e if Alerts are enabled, that the bond amount is non-zero, and that the MaxBlockAge is non-zero.
func (*AlertParams) XXX_DiscardUnknown ¶
func (m *AlertParams) XXX_DiscardUnknown()
func (*AlertParams) XXX_Marshal ¶
func (m *AlertParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AlertParams) XXX_Merge ¶
func (m *AlertParams) XXX_Merge(src proto.Message)
func (*AlertParams) XXX_Size ¶
func (m *AlertParams) XXX_Size() int
func (*AlertParams) XXX_Unmarshal ¶
func (m *AlertParams) XXX_Unmarshal(b []byte) error
type AlertStatus ¶
type AlertStatus struct { // ConclusionStatus determines whether the alert has been concluded. ConclusionStatus uint64 `protobuf:"varint,1,opt,name=conclusion_status,json=conclusionStatus,proto3" json:"conclusion_status,omitempty"` // SubmissionHeight is the height that the alert was submitted in. SubmissionHeight uint64 `protobuf:"varint,2,opt,name=submission_height,json=submissionHeight,proto3" json:"submission_height,omitempty"` // SubmissionTimestamp is the block-timestamp of the block that the alert was submitted in (as a UTC value in Unix time). SubmissionTimestamp uint64 `protobuf:"varint,3,opt,name=submission_timestamp,json=submissionTimestamp,proto3" json:"submission_timestamp,omitempty"` // PurgeHeight is the height at which the alert should be purged. PurgeHeight uint64 `protobuf:"varint,4,opt,name=purge_height,json=purgeHeight,proto3" json:"purge_height,omitempty"` }
AlertStatus contains the module specific state for an alert: Has the alert been concluded? What height was the alert submitted, what height should the alert be purged?
func NewAlertStatus ¶
func NewAlertStatus(submissionHeight uint64, purgeHeight uint64, blockTimestamp time.Time, status ConclusionStatus) AlertStatus
NewAlertStatus returns a new AlertStatus.
func (*AlertStatus) Descriptor ¶
func (*AlertStatus) Descriptor() ([]byte, []int)
func (*AlertStatus) GetConclusionStatus ¶
func (m *AlertStatus) GetConclusionStatus() uint64
func (*AlertStatus) GetPurgeHeight ¶
func (m *AlertStatus) GetPurgeHeight() uint64
func (*AlertStatus) GetSubmissionHeight ¶
func (m *AlertStatus) GetSubmissionHeight() uint64
func (*AlertStatus) GetSubmissionTimestamp ¶
func (m *AlertStatus) GetSubmissionTimestamp() uint64
func (*AlertStatus) Marshal ¶
func (m *AlertStatus) Marshal() (dAtA []byte, err error)
func (*AlertStatus) MarshalToSizedBuffer ¶
func (m *AlertStatus) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*AlertStatus) ProtoMessage ¶
func (*AlertStatus) ProtoMessage()
func (*AlertStatus) Reset ¶
func (m *AlertStatus) Reset()
func (*AlertStatus) Size ¶
func (m *AlertStatus) Size() (n int)
func (*AlertStatus) String ¶
func (m *AlertStatus) String() string
func (*AlertStatus) Unmarshal ¶
func (m *AlertStatus) Unmarshal(dAtA []byte) error
func (AlertStatus) ValidateBasic ¶
func (a AlertStatus) ValidateBasic() error
ValidateBasic performs a basic validation of the ConclusionStatus, i.e that the submissionHeight is before the purgeHeight, and that the status is either Unconcluded or Concluded.
func (*AlertStatus) XXX_DiscardUnknown ¶
func (m *AlertStatus) XXX_DiscardUnknown()
func (*AlertStatus) XXX_Marshal ¶
func (m *AlertStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AlertStatus) XXX_Merge ¶
func (m *AlertStatus) XXX_Merge(src proto.Message)
func (*AlertStatus) XXX_Size ¶
func (m *AlertStatus) XXX_Size() int
func (*AlertStatus) XXX_Unmarshal ¶
func (m *AlertStatus) XXX_Unmarshal(b []byte) error
type AlertStatusID ¶
type AlertStatusID int32
AlertStatus is the type for the status of an Alert, it can be Unconcluded or Concluded.
const ( AlertStatusID_CONCLUSION_STATUS_UNSPECIFIED AlertStatusID = 0 AlertStatusID_CONCLUSION_STATUS_UNCONCLUDED AlertStatusID = 1 AlertStatusID_CONCLUSION_STATUS_CONCLUDED AlertStatusID = 2 )
func (AlertStatusID) EnumDescriptor ¶
func (AlertStatusID) EnumDescriptor() ([]byte, []int)
func (AlertStatusID) String ¶
func (x AlertStatusID) String() string
type AlertWithStatus ¶
type AlertWithStatus struct { // alert is the alert that this status corresponds to. Alert Alert `protobuf:"bytes,1,opt,name=alert,proto3" json:"alert"` // status is the status of the alert. Status AlertStatus `protobuf:"bytes,2,opt,name=status,proto3" json:"status"` }
AlertWithStatus represents a wrapper around the Alert and AlertStatus objects, this is so that the module specific information about Alerts can be packaged together.
func NewAlertWithStatus ¶
func NewAlertWithStatus(alert Alert, status AlertStatus) AlertWithStatus
NewAlertWithStatus returns a new AlertWithStatus.
func (*AlertWithStatus) Descriptor ¶
func (*AlertWithStatus) Descriptor() ([]byte, []int)
func (*AlertWithStatus) GetAlert ¶
func (m *AlertWithStatus) GetAlert() Alert
func (*AlertWithStatus) GetStatus ¶
func (m *AlertWithStatus) GetStatus() AlertStatus
func (*AlertWithStatus) Marshal ¶
func (m *AlertWithStatus) Marshal() (dAtA []byte, err error)
func (*AlertWithStatus) MarshalToSizedBuffer ¶
func (m *AlertWithStatus) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*AlertWithStatus) ProtoMessage ¶
func (*AlertWithStatus) ProtoMessage()
func (*AlertWithStatus) Reset ¶
func (m *AlertWithStatus) Reset()
func (*AlertWithStatus) Size ¶
func (m *AlertWithStatus) Size() (n int)
func (*AlertWithStatus) String ¶
func (m *AlertWithStatus) String() string
func (*AlertWithStatus) Unmarshal ¶
func (m *AlertWithStatus) Unmarshal(dAtA []byte) error
func (AlertWithStatus) ValidateBasic ¶
func (aws AlertWithStatus) ValidateBasic() error
ValidateBasic validates that both the alert status and the alert are valid.
func (*AlertWithStatus) XXX_DiscardUnknown ¶
func (m *AlertWithStatus) XXX_DiscardUnknown()
func (*AlertWithStatus) XXX_Marshal ¶
func (m *AlertWithStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AlertWithStatus) XXX_Merge ¶
func (m *AlertWithStatus) XXX_Merge(src proto.Message)
func (*AlertWithStatus) XXX_Size ¶
func (m *AlertWithStatus) XXX_Size() int
func (*AlertWithStatus) XXX_Unmarshal ¶
func (m *AlertWithStatus) XXX_Unmarshal(b []byte) error
type AlertsRequest ¶
type AlertsRequest struct {
Status AlertStatusID `protobuf:"varint,1,opt,name=status,proto3,enum=slinky.alerts.v1.AlertStatusID" json:"status,omitempty"`
}
AlertsRequest is the request type for the Query.Alerts RPC method, the status field indicates whether the request should return only Unconcluded / Concluded Alerts, or all Alerts.
func (*AlertsRequest) Descriptor ¶
func (*AlertsRequest) Descriptor() ([]byte, []int)
func (*AlertsRequest) GetStatus ¶
func (m *AlertsRequest) GetStatus() AlertStatusID
func (*AlertsRequest) Marshal ¶
func (m *AlertsRequest) Marshal() (dAtA []byte, err error)
func (*AlertsRequest) MarshalToSizedBuffer ¶
func (m *AlertsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*AlertsRequest) ProtoMessage ¶
func (*AlertsRequest) ProtoMessage()
func (*AlertsRequest) Reset ¶
func (m *AlertsRequest) Reset()
func (*AlertsRequest) Size ¶
func (m *AlertsRequest) Size() (n int)
func (*AlertsRequest) String ¶
func (m *AlertsRequest) String() string
func (*AlertsRequest) Unmarshal ¶
func (m *AlertsRequest) Unmarshal(dAtA []byte) error
func (*AlertsRequest) XXX_DiscardUnknown ¶
func (m *AlertsRequest) XXX_DiscardUnknown()
func (*AlertsRequest) XXX_Marshal ¶
func (m *AlertsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AlertsRequest) XXX_Merge ¶
func (m *AlertsRequest) XXX_Merge(src proto.Message)
func (*AlertsRequest) XXX_Size ¶
func (m *AlertsRequest) XXX_Size() int
func (*AlertsRequest) XXX_Unmarshal ¶
func (m *AlertsRequest) XXX_Unmarshal(b []byte) error
type AlertsResponse ¶
type AlertsResponse struct {
Alerts []Alert `protobuf:"bytes,1,rep,name=alerts,proto3" json:"alerts"`
}
AlertsResponse is the response type for the Query.Alerts RPC method, it contains the list of Alerts that are being tracked by the alerts module.
func (*AlertsResponse) Descriptor ¶
func (*AlertsResponse) Descriptor() ([]byte, []int)
func (*AlertsResponse) GetAlerts ¶
func (m *AlertsResponse) GetAlerts() []Alert
func (*AlertsResponse) Marshal ¶
func (m *AlertsResponse) Marshal() (dAtA []byte, err error)
func (*AlertsResponse) MarshalToSizedBuffer ¶
func (m *AlertsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*AlertsResponse) ProtoMessage ¶
func (*AlertsResponse) ProtoMessage()
func (*AlertsResponse) Reset ¶
func (m *AlertsResponse) Reset()
func (*AlertsResponse) Size ¶
func (m *AlertsResponse) Size() (n int)
func (*AlertsResponse) String ¶
func (m *AlertsResponse) String() string
func (*AlertsResponse) Unmarshal ¶
func (m *AlertsResponse) Unmarshal(dAtA []byte) error
func (*AlertsResponse) XXX_DiscardUnknown ¶
func (m *AlertsResponse) XXX_DiscardUnknown()
func (*AlertsResponse) XXX_Marshal ¶
func (m *AlertsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AlertsResponse) XXX_Merge ¶
func (m *AlertsResponse) XXX_Merge(src proto.Message)
func (*AlertsResponse) XXX_Size ¶
func (m *AlertsResponse) XXX_Size() int
func (*AlertsResponse) XXX_Unmarshal ¶
func (m *AlertsResponse) XXX_Unmarshal(b []byte) error
type BankKeeper ¶
type BankKeeper interface { SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error MintCoins(ctx context.Context, moduleName string, amt sdk.Coins) error BurnCoins(ctx context.Context, moduleName string, amounts sdk.Coins) error }
BankKeeper defines the expected interface that the bank-keeper dependency must implement.
type Conclusion ¶
type Conclusion interface { proto.Message // performs stateless validation on the Claim ValidateBasic() error // Marshal the Claim to bytes (this is what will be stored in state) Marshal() ([]byte, error) // Unmarshal unmarshals the claim bytes into the receiver Unmarshal([]byte) error // Verify verifies the conclusion, given a ConclusionVerificationParams Verify(ConclusionVerificationParams) error // GetExtendedCommitInfo returns the ExtendedCommitInfo referenced in the conclusion. GetExtendedCommitInfo() cmtabci.ExtendedCommitInfo // Alert returns the Alert that the Conclusion corresponds to. GetAlert() Alert // Status returns the status of the conclusion. GetStatus() bool // PriceBounds returns the price-bounds of the conclusion. GetPriceBound() PriceBound // GetCurrencyPairID returns the ID of the CurrencyPair for which the alert is filed GetCurrencyPairID() uint64 }
Conclusion defines the basic meta-data necessary for the alerts module to resolve an alert. At a minimum, this message must contain the OracleData referenced in the conclusion, the Alert that the Conclusion corresponds to, metadata necessary for verification (i.e signatures), and the status of the conclusion itself.
type ConclusionStatus ¶
type ConclusionStatus uint64
ConclusionStatus wraps the status of an alert
const ( // Unconcluded is the default status of an alert (no conclusion has been submitted for it yet) Unconcluded ConclusionStatus = iota // Concluded is the status of an alert that has been concluded Concluded )
func (ConclusionStatus) String ¶
func (cs ConclusionStatus) String() string
String implements fmt.Stringer
type ConclusionVerificationParams ¶
type ConclusionVerificationParams interface { proto.Message // performs stateless validation on the Claim ValidateBasic() error // Marshal the Claim to bytes (this is what will be stored in state) Marshal() ([]byte, error) // Unmarshal unmarshals the claim bytes into the receiver Unmarshal([]byte) error }
ConclusionVerificationParams defines the parameters necessary to verify a conclusion.
func NewMultiSigVerificationParams ¶
func NewMultiSigVerificationParams(pks []cryptotypes.PubKey) (ConclusionVerificationParams, error)
NewMultiSigConclusion creates the parameters necessary for verification of a MultiSigConclusion. This method will derive the addresses corresponding to the provided public-keys, and will store the address -> public key mapping, this method will fail if no public-keys are given, or if duplicates are provided.
type GenesisState ¶
type GenesisState struct { // Params is the set of x/Alerts parameters Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` // Alerts is the set of Alerts that have been submitted to the module Alerts []AlertWithStatus `protobuf:"bytes,2,rep,name=alerts,proto3" json:"alerts"` }
GenesisState is the state that must be provided at genesis. It contains params for the module, and the set initial Alerts.
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
DefaultGenesisState returns a default genesis state, with default params
func NewGenesisState ¶
func NewGenesisState(params Params, alerts []AlertWithStatus) GenesisState
NewGenesisState creates a new GenesisState object given the params for the module.
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetAlerts ¶
func (m *GenesisState) GetAlerts() []AlertWithStatus
func (*GenesisState) GetParams ¶
func (m *GenesisState) GetParams() Params
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err 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) ValidateBasic ¶
func (gs GenesisState) ValidateBasic() error
ValidateBasic performs stateless validation on the GenesisState, specifically it validates that the Params are valid, and that each of the alerts is also valid.
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 IncentiveKeeper ¶
type IncentiveKeeper interface {
AddIncentives(ctx sdk.Context, incentives []incentivetypes.Incentive) error
}
IncentiveKeeper defines the expected interface that the incentive-keeper dependency must implement.
type MsgAlert ¶
type MsgAlert struct { // alert is the alert to be filed Alert Alert `protobuf:"bytes,1,opt,name=alert,proto3" json:"alert"` }
MsgAlert defines a message to create an alert.
func NewMsgAlert ¶
NewMsgAlert creates a new MsgAlert, given the alert details
func (*MsgAlert) Descriptor ¶
func (MsgAlert) GetSigners ¶
func (msg MsgAlert) GetSigners() []sdk.AccAddress
GetSigners gets the expected signers for the MsgAlert, i.e the signer of the underlying alert.
func (*MsgAlert) MarshalToSizedBuffer ¶
func (*MsgAlert) ProtoMessage ¶
func (*MsgAlert) ProtoMessage()
func (MsgAlert) ValidateBasic ¶
ValidateBasic performs basic validation of the MsgAlert fields, i.e on the underlying Alert
func (*MsgAlert) XXX_DiscardUnknown ¶
func (m *MsgAlert) XXX_DiscardUnknown()
func (*MsgAlert) XXX_Marshal ¶
func (*MsgAlert) XXX_Unmarshal ¶
type MsgAlertResponse ¶
type MsgAlertResponse struct { }
func (*MsgAlertResponse) Descriptor ¶
func (*MsgAlertResponse) Descriptor() ([]byte, []int)
func (*MsgAlertResponse) Marshal ¶
func (m *MsgAlertResponse) Marshal() (dAtA []byte, err error)
func (*MsgAlertResponse) MarshalToSizedBuffer ¶
func (m *MsgAlertResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgAlertResponse) ProtoMessage ¶
func (*MsgAlertResponse) ProtoMessage()
func (*MsgAlertResponse) Reset ¶
func (m *MsgAlertResponse) Reset()
func (*MsgAlertResponse) Size ¶
func (m *MsgAlertResponse) Size() (n int)
func (*MsgAlertResponse) String ¶
func (m *MsgAlertResponse) String() string
func (*MsgAlertResponse) Unmarshal ¶
func (m *MsgAlertResponse) Unmarshal(dAtA []byte) error
func (*MsgAlertResponse) XXX_DiscardUnknown ¶
func (m *MsgAlertResponse) XXX_DiscardUnknown()
func (*MsgAlertResponse) XXX_Marshal ¶
func (m *MsgAlertResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgAlertResponse) XXX_Merge ¶
func (m *MsgAlertResponse) XXX_Merge(src proto.Message)
func (*MsgAlertResponse) XXX_Size ¶
func (m *MsgAlertResponse) XXX_Size() int
func (*MsgAlertResponse) XXX_Unmarshal ¶
func (m *MsgAlertResponse) XXX_Unmarshal(b []byte) error
type MsgClient ¶
type MsgClient interface { // Alert creates a new alert. On alert creation (if valid), the alert will be saved to state, // and its bond will be escrowed until a corresponding Conclusion is filed to close the alert. Alert(ctx context.Context, in *MsgAlert, opts ...grpc.CallOption) (*MsgAlertResponse, error) // Conclusion closes an alert. On alert conclusion (if valid), the alert will be marked as // Concluded, the bond for the alert will either be burned or returned, and a set of incentives // will be issued to the validators deemed malicious by the conclusion. Conclusion(ctx context.Context, in *MsgConclusion, opts ...grpc.CallOption) (*MsgConclusionResponse, error) // UpdateParams updates the parameters of the alerts module. Specifically, the only address that // is capable of submitting this Msg is the module-authority, in general, the x/gov module-account. // The process for executing this message will be via governance proposal UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, 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 MsgConclusion ¶
type MsgConclusion struct { // signer is the signer of this transaction (notice, this may not always be a node from the SecondTier) Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` // conclusion is the conclusion to be filed Conclusion *types.Any `protobuf:"bytes,2,opt,name=conclusion,proto3" json:"conclusion,omitempty"` }
MsgConclusion defines a message carrying a Conclusion made by the SecondTier, which will be used to close an alert. And trigger any ramifications of the conclusion.
func NewMsgConclusion ¶
func NewMsgConclusion(c Conclusion, signer sdk.AccAddress) *MsgConclusion
NewMsgConclusion creates a new MsgConclusion, given the conclusion, and the conclusion signer.
func (*MsgConclusion) Descriptor ¶
func (*MsgConclusion) Descriptor() ([]byte, []int)
func (*MsgConclusion) GetConclusion ¶
func (m *MsgConclusion) GetConclusion() *types.Any
func (*MsgConclusion) GetSigner ¶
func (m *MsgConclusion) GetSigner() string
func (MsgConclusion) GetSigners ¶
func (msg MsgConclusion) GetSigners() []sdk.AccAddress
GetSigners gets the expected signers for the MsgConclusion
func (*MsgConclusion) Marshal ¶
func (m *MsgConclusion) Marshal() (dAtA []byte, err error)
func (*MsgConclusion) MarshalToSizedBuffer ¶
func (m *MsgConclusion) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgConclusion) ProtoMessage ¶
func (*MsgConclusion) ProtoMessage()
func (*MsgConclusion) Reset ¶
func (m *MsgConclusion) Reset()
func (*MsgConclusion) Size ¶
func (m *MsgConclusion) Size() (n int)
func (*MsgConclusion) String ¶
func (m *MsgConclusion) String() string
func (*MsgConclusion) Unmarshal ¶
func (m *MsgConclusion) Unmarshal(dAtA []byte) error
func (MsgConclusion) ValidateBasic ¶
func (msg MsgConclusion) ValidateBasic() error
ValidateBasic performs basic validation of the MsgConclusion fields, i.e that the signer address is valid, and the alert is non-nil
func (*MsgConclusion) XXX_DiscardUnknown ¶
func (m *MsgConclusion) XXX_DiscardUnknown()
func (*MsgConclusion) XXX_Marshal ¶
func (m *MsgConclusion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgConclusion) XXX_Merge ¶
func (m *MsgConclusion) XXX_Merge(src proto.Message)
func (*MsgConclusion) XXX_Size ¶
func (m *MsgConclusion) XXX_Size() int
func (*MsgConclusion) XXX_Unmarshal ¶
func (m *MsgConclusion) XXX_Unmarshal(b []byte) error
type MsgConclusionResponse ¶
type MsgConclusionResponse struct { }
func (*MsgConclusionResponse) Descriptor ¶
func (*MsgConclusionResponse) Descriptor() ([]byte, []int)
func (*MsgConclusionResponse) Marshal ¶
func (m *MsgConclusionResponse) Marshal() (dAtA []byte, err error)
func (*MsgConclusionResponse) MarshalTo ¶
func (m *MsgConclusionResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgConclusionResponse) MarshalToSizedBuffer ¶
func (m *MsgConclusionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgConclusionResponse) ProtoMessage ¶
func (*MsgConclusionResponse) ProtoMessage()
func (*MsgConclusionResponse) Reset ¶
func (m *MsgConclusionResponse) Reset()
func (*MsgConclusionResponse) Size ¶
func (m *MsgConclusionResponse) Size() (n int)
func (*MsgConclusionResponse) String ¶
func (m *MsgConclusionResponse) String() string
func (*MsgConclusionResponse) Unmarshal ¶
func (m *MsgConclusionResponse) Unmarshal(dAtA []byte) error
func (*MsgConclusionResponse) XXX_DiscardUnknown ¶
func (m *MsgConclusionResponse) XXX_DiscardUnknown()
func (*MsgConclusionResponse) XXX_Marshal ¶
func (m *MsgConclusionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgConclusionResponse) XXX_Merge ¶
func (m *MsgConclusionResponse) XXX_Merge(src proto.Message)
func (*MsgConclusionResponse) XXX_Size ¶
func (m *MsgConclusionResponse) XXX_Size() int
func (*MsgConclusionResponse) XXX_Unmarshal ¶
func (m *MsgConclusionResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface { // Alert creates a new alert. On alert creation (if valid), the alert will be saved to state, // and its bond will be escrowed until a corresponding Conclusion is filed to close the alert. Alert(context.Context, *MsgAlert) (*MsgAlertResponse, error) // Conclusion closes an alert. On alert conclusion (if valid), the alert will be marked as // Concluded, the bond for the alert will either be burned or returned, and a set of incentives // will be issued to the validators deemed malicious by the conclusion. Conclusion(context.Context, *MsgConclusion) (*MsgConclusionResponse, error) // UpdateParams updates the parameters of the alerts module. Specifically, the only address that // is capable of submitting this Msg is the module-authority, in general, the x/gov module-account. // The process for executing this message will be via governance proposal UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) }
MsgServer is the server API for Msg service.
type MsgUpdateParams ¶
type MsgUpdateParams struct { // authority is the address of the authority that is submitting the update Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // params is the new set of parameters for the x/alerts module Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` }
MsgUpdateParams defines the message type expected by the UpdateParams rpc. It contains an authority address, and the new Params for the x/alerts module.
func NewMsgUpdateParams ¶
func NewMsgUpdateParams(params Params, authority sdk.AccAddress) *MsgUpdateParams
NewMsgUpdateParams creates a new MsgUpdateParams, given the new params, and the authority address that is allowed to update the params.
func (*MsgUpdateParams) Descriptor ¶
func (*MsgUpdateParams) Descriptor() ([]byte, []int)
func (*MsgUpdateParams) GetAuthority ¶
func (m *MsgUpdateParams) GetAuthority() string
func (*MsgUpdateParams) GetParams ¶
func (m *MsgUpdateParams) GetParams() Params
func (*MsgUpdateParams) Marshal ¶
func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error)
func (*MsgUpdateParams) MarshalToSizedBuffer ¶
func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateParams) ProtoMessage ¶
func (*MsgUpdateParams) ProtoMessage()
func (*MsgUpdateParams) Reset ¶
func (m *MsgUpdateParams) Reset()
func (*MsgUpdateParams) Size ¶
func (m *MsgUpdateParams) Size() (n int)
func (*MsgUpdateParams) String ¶
func (m *MsgUpdateParams) String() string
func (*MsgUpdateParams) Unmarshal ¶
func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error
func (MsgUpdateParams) ValidateBasic ¶
func (m MsgUpdateParams) ValidateBasic() error
ValidateBasic checks that the params in the msg are valid, and that the authority address is valid if either check fails the method will error
func (*MsgUpdateParams) XXX_DiscardUnknown ¶
func (m *MsgUpdateParams) XXX_DiscardUnknown()
func (*MsgUpdateParams) XXX_Marshal ¶
func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateParams) XXX_Merge ¶
func (m *MsgUpdateParams) XXX_Merge(src proto.Message)
func (*MsgUpdateParams) XXX_Size ¶
func (m *MsgUpdateParams) XXX_Size() int
func (*MsgUpdateParams) XXX_Unmarshal ¶
func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error
type MsgUpdateParamsResponse ¶
type MsgUpdateParamsResponse struct { }
func (*MsgUpdateParamsResponse) Descriptor ¶
func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int)
func (*MsgUpdateParamsResponse) Marshal ¶
func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error)
func (*MsgUpdateParamsResponse) MarshalTo ¶
func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateParamsResponse) MarshalToSizedBuffer ¶
func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateParamsResponse) ProtoMessage ¶
func (*MsgUpdateParamsResponse) ProtoMessage()
func (*MsgUpdateParamsResponse) Reset ¶
func (m *MsgUpdateParamsResponse) Reset()
func (*MsgUpdateParamsResponse) Size ¶
func (m *MsgUpdateParamsResponse) Size() (n int)
func (*MsgUpdateParamsResponse) String ¶
func (m *MsgUpdateParamsResponse) String() string
func (*MsgUpdateParamsResponse) Unmarshal ¶
func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error
func (*MsgUpdateParamsResponse) XXX_DiscardUnknown ¶
func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()
func (*MsgUpdateParamsResponse) XXX_Marshal ¶
func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateParamsResponse) XXX_Merge ¶
func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message)
func (*MsgUpdateParamsResponse) XXX_Size ¶
func (m *MsgUpdateParamsResponse) XXX_Size() int
func (*MsgUpdateParamsResponse) XXX_Unmarshal ¶
func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error
type MultiSigConclusion ¶
type MultiSigConclusion struct { // alert is the alert that this conclusion corresponds to. Alert Alert `protobuf:"bytes,1,opt,name=alert,proto3" json:"alert"` // oracle_data is the oracle data that this conclusion references. ExtendedCommitInfo types1.ExtendedCommitInfo `protobuf:"bytes,2,opt,name=extended_commit_info,json=extendedCommitInfo,proto3" json:"extended_commit_info"` // signatures is a map of signer -> signature. Where the signature is over Alert.UID, PriceBound, the marshalled ExtendedCommitInfo, and status. Signatures []Signature `protobuf:"bytes,3,rep,name=signatures,proto3" json:"signatures"` // price-bound is the price bound of the currency-pair off-chain for the designated time-range. PriceBound PriceBound `protobuf:"bytes,4,opt,name=price_bound,json=priceBound,proto3" json:"price_bound"` // status is the status of the conclusion. Status bool `protobuf:"varint,5,opt,name=status,proto3" json:"status,omitempty"` // CurrencyPairID is the ID of the currency-pair that this conclusion corresponds to. CurrencyPairID uint64 `protobuf:"varint,6,opt,name=currency_pair_i_d,json=currencyPairID,proto3" json:"currency_pair_i_d,omitempty"` }
MultiSigConcluson defines a conclusion that is accompanied by a set of signatures. The signature is defined over the alert UID, status, OracleData, and PriceBound. The signatures are used to verify that the conclusion is valid.
func (*MultiSigConclusion) Descriptor ¶
func (*MultiSigConclusion) Descriptor() ([]byte, []int)
func (*MultiSigConclusion) GetAlert ¶
func (m *MultiSigConclusion) GetAlert() Alert
func (*MultiSigConclusion) GetCurrencyPairID ¶
func (m *MultiSigConclusion) GetCurrencyPairID() uint64
func (*MultiSigConclusion) GetExtendedCommitInfo ¶
func (m *MultiSigConclusion) GetExtendedCommitInfo() types1.ExtendedCommitInfo
func (*MultiSigConclusion) GetPriceBound ¶
func (m *MultiSigConclusion) GetPriceBound() PriceBound
func (*MultiSigConclusion) GetSignatures ¶
func (m *MultiSigConclusion) GetSignatures() []Signature
func (*MultiSigConclusion) GetStatus ¶
func (m *MultiSigConclusion) GetStatus() bool
func (*MultiSigConclusion) Marshal ¶
func (m *MultiSigConclusion) Marshal() (dAtA []byte, err error)
func (*MultiSigConclusion) MarshalTo ¶
func (m *MultiSigConclusion) MarshalTo(dAtA []byte) (int, error)
func (*MultiSigConclusion) MarshalToSizedBuffer ¶
func (m *MultiSigConclusion) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MultiSigConclusion) ProtoMessage ¶
func (*MultiSigConclusion) ProtoMessage()
func (*MultiSigConclusion) Reset ¶
func (m *MultiSigConclusion) Reset()
func (MultiSigConclusion) SignBytes ¶
func (c MultiSigConclusion) SignBytes() ([]byte, error)
SignBytes returns the bytes that should be signed by the signers. I.e the 20-byte truncated hash of the marshalled oracle-data, the alert UID, the price-bound, and the status.
func (*MultiSigConclusion) Size ¶
func (m *MultiSigConclusion) Size() (n int)
func (*MultiSigConclusion) String ¶
func (m *MultiSigConclusion) String() string
func (*MultiSigConclusion) Unmarshal ¶
func (m *MultiSigConclusion) Unmarshal(dAtA []byte) error
func (MultiSigConclusion) ValidateBasic ¶
func (c MultiSigConclusion) ValidateBasic() error
ValidateBasic validates the Conclusion. Specifically, it validates that the signers are valid bech32 addresses, and that the sub-fields are non-nil.
func (MultiSigConclusion) Verify ¶
func (c MultiSigConclusion) Verify(params ConclusionVerificationParams) error
Verify verifies the conclusion. Specifically, it verifies that the signatures are valid, and that the oracle-data is valid.
func (*MultiSigConclusion) XXX_DiscardUnknown ¶
func (m *MultiSigConclusion) XXX_DiscardUnknown()
func (*MultiSigConclusion) XXX_Marshal ¶
func (m *MultiSigConclusion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MultiSigConclusion) XXX_Merge ¶
func (m *MultiSigConclusion) XXX_Merge(src proto.Message)
func (*MultiSigConclusion) XXX_Size ¶
func (m *MultiSigConclusion) XXX_Size() int
func (*MultiSigConclusion) XXX_Unmarshal ¶
func (m *MultiSigConclusion) XXX_Unmarshal(b []byte) error
type MultiSigConclusionVerificationParams ¶
type MultiSigConclusionVerificationParams struct { // signers is a map of signer -> public key. Signers []*types2.Any `protobuf:"bytes,1,rep,name=signers,proto3" json:"signers,omitempty"` }
MultiSigConclusionVerificationParams defines the parameters necessary to verify a MultiSigConclusion. It contains a map between signer and public key. Notice, the public-key (value) are the base-64 encoded bytes of the public key. And the signer (key) is the bech32 encoded address of the signer. Notice, all public keys must be secp256 keys.
func (*MultiSigConclusionVerificationParams) Descriptor ¶
func (*MultiSigConclusionVerificationParams) Descriptor() ([]byte, []int)
func (*MultiSigConclusionVerificationParams) GetSigners ¶
func (m *MultiSigConclusionVerificationParams) GetSigners() []*types2.Any
func (*MultiSigConclusionVerificationParams) Marshal ¶
func (m *MultiSigConclusionVerificationParams) Marshal() (dAtA []byte, err error)
func (*MultiSigConclusionVerificationParams) MarshalTo ¶
func (m *MultiSigConclusionVerificationParams) MarshalTo(dAtA []byte) (int, error)
func (*MultiSigConclusionVerificationParams) MarshalToSizedBuffer ¶
func (m *MultiSigConclusionVerificationParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MultiSigConclusionVerificationParams) ProtoMessage ¶
func (*MultiSigConclusionVerificationParams) ProtoMessage()
func (*MultiSigConclusionVerificationParams) Reset ¶
func (m *MultiSigConclusionVerificationParams) Reset()
func (*MultiSigConclusionVerificationParams) Size ¶
func (m *MultiSigConclusionVerificationParams) Size() (n int)
func (*MultiSigConclusionVerificationParams) String ¶
func (m *MultiSigConclusionVerificationParams) String() string
func (*MultiSigConclusionVerificationParams) Unmarshal ¶
func (m *MultiSigConclusionVerificationParams) Unmarshal(dAtA []byte) error
func (MultiSigConclusionVerificationParams) ValidateBasic ¶
func (params MultiSigConclusionVerificationParams) ValidateBasic() error
ValidateBasic checks that all signers correspond to their pubkeys, and that the signer addresses are valid bech32 addresses. It also checks that there is at least 1 signer. This method also validates that the signers are not duplicated.
NOTICE: the public-keys given must be of type secp2561k1, secp256r1, or ed25519.
func (*MultiSigConclusionVerificationParams) XXX_DiscardUnknown ¶
func (m *MultiSigConclusionVerificationParams) XXX_DiscardUnknown()
func (*MultiSigConclusionVerificationParams) XXX_Marshal ¶
func (m *MultiSigConclusionVerificationParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MultiSigConclusionVerificationParams) XXX_Merge ¶
func (m *MultiSigConclusionVerificationParams) XXX_Merge(src proto.Message)
func (*MultiSigConclusionVerificationParams) XXX_Size ¶
func (m *MultiSigConclusionVerificationParams) XXX_Size() int
func (*MultiSigConclusionVerificationParams) XXX_Unmarshal ¶
func (m *MultiSigConclusionVerificationParams) XXX_Unmarshal(b []byte) error
type OracleKeeper ¶
type OracleKeeper interface {
HasCurrencyPair(ctx sdk.Context, cp oracletypes.CurrencyPair) bool
}
OracleKeeper defines the expected interface that the oracle-keeper dependency must implement.
type Params ¶
type Params struct { // AlertParams is the set of parameters for the x/Alerts module's Alerting. AlertParams AlertParams `protobuf:"bytes,1,opt,name=alert_params,json=alertParams,proto3" json:"alert_params"` // ConclusionVerificationParams is the set of parameters for the x/Alerts module's conclusion verification. ConclusionVerificationParams *types1.Any `` /* 147-byte string literal not displayed */ // PruningParams is the set of parameters for the x/Alerts module's pruning. PruningParams PruningParams `protobuf:"bytes,3,opt,name=pruning_params,json=pruningParams,proto3" json:"pruning_params"` }
Params is the set of parameters for the x/Alerts module.
func DefaultParams ¶
func DefaultParams(denom string, cvp ConclusionVerificationParams) Params
DefaultParams returns a default set of parameters. I.e BondAmount is set to DefaultBondAmount.
func NewParams ¶
func NewParams(ap AlertParams, cvp ConclusionVerificationParams, pp PruningParams) Params
NewParams creates a new Params object, this method will panic if the provided ConclusionVerificationParams cannot be encoded to an Any.
NOTICE: The MaxBlockAge + BlocksToPrune < UnbondingPeriod. This inequality is required to ensure that any infracting validator cannot unbond to avoid being slashed.
func (*Params) Descriptor ¶
func (*Params) GetAlertParams ¶
func (m *Params) GetAlertParams() AlertParams
func (*Params) GetConclusionVerificationParams ¶
func (*Params) GetPruningParams ¶
func (m *Params) GetPruningParams() PruningParams
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (Params) Validate ¶
Validate performs a basic validation of the Params, i.e that the AlertParams are valid, and the ConclusionVerificationParams are valid (if present).
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type ParamsRequest ¶
type ParamsRequest struct { }
ParamsRequest is the request type for the Query.Params RPC method.
func (*ParamsRequest) Descriptor ¶
func (*ParamsRequest) Descriptor() ([]byte, []int)
func (*ParamsRequest) Marshal ¶
func (m *ParamsRequest) Marshal() (dAtA []byte, err error)
func (*ParamsRequest) MarshalToSizedBuffer ¶
func (m *ParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ParamsRequest) ProtoMessage ¶
func (*ParamsRequest) ProtoMessage()
func (*ParamsRequest) Reset ¶
func (m *ParamsRequest) Reset()
func (*ParamsRequest) Size ¶
func (m *ParamsRequest) Size() (n int)
func (*ParamsRequest) String ¶
func (m *ParamsRequest) String() string
func (*ParamsRequest) Unmarshal ¶
func (m *ParamsRequest) Unmarshal(dAtA []byte) error
func (*ParamsRequest) XXX_DiscardUnknown ¶
func (m *ParamsRequest) XXX_DiscardUnknown()
func (*ParamsRequest) XXX_Marshal ¶
func (m *ParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ParamsRequest) XXX_Merge ¶
func (m *ParamsRequest) XXX_Merge(src proto.Message)
func (*ParamsRequest) XXX_Size ¶
func (m *ParamsRequest) XXX_Size() int
func (*ParamsRequest) XXX_Unmarshal ¶
func (m *ParamsRequest) XXX_Unmarshal(b []byte) error
type ParamsResponse ¶
type ParamsResponse struct {
Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}
ParamsResponse is the response type for the Query.Params RPC method, it contains the Params of the module.
func (*ParamsResponse) Descriptor ¶
func (*ParamsResponse) Descriptor() ([]byte, []int)
func (*ParamsResponse) GetParams ¶
func (m *ParamsResponse) GetParams() Params
func (*ParamsResponse) Marshal ¶
func (m *ParamsResponse) Marshal() (dAtA []byte, err error)
func (*ParamsResponse) MarshalToSizedBuffer ¶
func (m *ParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ParamsResponse) ProtoMessage ¶
func (*ParamsResponse) ProtoMessage()
func (*ParamsResponse) Reset ¶
func (m *ParamsResponse) Reset()
func (*ParamsResponse) Size ¶
func (m *ParamsResponse) Size() (n int)
func (*ParamsResponse) String ¶
func (m *ParamsResponse) String() string
func (*ParamsResponse) Unmarshal ¶
func (m *ParamsResponse) Unmarshal(dAtA []byte) error
func (*ParamsResponse) XXX_DiscardUnknown ¶
func (m *ParamsResponse) XXX_DiscardUnknown()
func (*ParamsResponse) XXX_Marshal ¶
func (m *ParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ParamsResponse) XXX_Merge ¶
func (m *ParamsResponse) XXX_Merge(src proto.Message)
func (*ParamsResponse) XXX_Size ¶
func (m *ParamsResponse) XXX_Size() int
func (*ParamsResponse) XXX_Unmarshal ¶
func (m *ParamsResponse) XXX_Unmarshal(b []byte) error
type PriceBound ¶
type PriceBound struct { High string `protobuf:"bytes,1,opt,name=high,proto3" json:"high,omitempty"` Low string `protobuf:"bytes,2,opt,name=low,proto3" json:"low,omitempty"` }
PriceBound represents the bounds of the price of a currency-pair off chain for a designated time-range
func (*PriceBound) Descriptor ¶
func (*PriceBound) Descriptor() ([]byte, []int)
func (*PriceBound) GetHigh ¶
func (m *PriceBound) GetHigh() string
func (PriceBound) GetHighInt ¶
func (pb PriceBound) GetHighInt() (*big.Int, error)
GetHighInt returns the high price-bound as a big.Int.
func (*PriceBound) GetLow ¶
func (m *PriceBound) GetLow() string
func (PriceBound) GetLowInt ¶
func (pb PriceBound) GetLowInt() (*big.Int, error)
GetLowInt returns the low price-bound as a big.Int.
func (*PriceBound) Marshal ¶
func (m *PriceBound) Marshal() (dAtA []byte, err error)
func (*PriceBound) MarshalToSizedBuffer ¶
func (m *PriceBound) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PriceBound) ProtoMessage ¶
func (*PriceBound) ProtoMessage()
func (*PriceBound) Reset ¶
func (m *PriceBound) Reset()
func (*PriceBound) Size ¶
func (m *PriceBound) Size() (n int)
func (*PriceBound) String ¶
func (m *PriceBound) String() string
func (*PriceBound) Unmarshal ¶
func (m *PriceBound) Unmarshal(dAtA []byte) error
func (PriceBound) ValidateBasic ¶
func (pb PriceBound) ValidateBasic() error
ValidateBasic validates the PriceBound, specifically that the high price-bound is greater than the low price-bound, and that the high / low price-bounds are valid big.Int values.
func (*PriceBound) XXX_DiscardUnknown ¶
func (m *PriceBound) XXX_DiscardUnknown()
func (*PriceBound) XXX_Marshal ¶
func (m *PriceBound) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PriceBound) XXX_Merge ¶
func (m *PriceBound) XXX_Merge(src proto.Message)
func (*PriceBound) XXX_Size ¶
func (m *PriceBound) XXX_Size() int
func (*PriceBound) XXX_Unmarshal ¶
func (m *PriceBound) XXX_Unmarshal(b []byte) error
type PruningParams ¶
type PruningParams struct { // Enabled defines whether Alerts are to be pruned Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` // BlocksToPrune defines the number of blocks until an Alert will be pruned from state, notice this is // defined wrt. the current block height, i.e Alerts will be stored in state until current_height + BlocksToPrune // is reached. BlocksToPrune uint64 `protobuf:"varint,2,opt,name=blocks_to_prune,json=blocksToPrune,proto3" json:"blocks_to_prune,omitempty"` }
PruningParams defines the criterion for pruning Alerts from the state.
func (*PruningParams) Descriptor ¶
func (*PruningParams) Descriptor() ([]byte, []int)
func (*PruningParams) GetBlocksToPrune ¶
func (m *PruningParams) GetBlocksToPrune() uint64
func (*PruningParams) GetEnabled ¶
func (m *PruningParams) GetEnabled() bool
func (*PruningParams) Marshal ¶
func (m *PruningParams) Marshal() (dAtA []byte, err error)
func (*PruningParams) MarshalToSizedBuffer ¶
func (m *PruningParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PruningParams) ProtoMessage ¶
func (*PruningParams) ProtoMessage()
func (*PruningParams) Reset ¶
func (m *PruningParams) Reset()
func (*PruningParams) Size ¶
func (m *PruningParams) Size() (n int)
func (*PruningParams) String ¶
func (m *PruningParams) String() string
func (*PruningParams) Unmarshal ¶
func (m *PruningParams) Unmarshal(dAtA []byte) error
func (PruningParams) Validate ¶
func (pp PruningParams) Validate() error
Validate performs basic validation of the Pruning Params, specifically, that the BlocksToPrune is non zero if pruning is enabled, and zero if disabled.
func (*PruningParams) XXX_DiscardUnknown ¶
func (m *PruningParams) XXX_DiscardUnknown()
func (*PruningParams) XXX_Marshal ¶
func (m *PruningParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PruningParams) XXX_Merge ¶
func (m *PruningParams) XXX_Merge(src proto.Message)
func (*PruningParams) XXX_Size ¶
func (m *PruningParams) XXX_Size() int
func (*PruningParams) XXX_Unmarshal ¶
func (m *PruningParams) XXX_Unmarshal(b []byte) error
type QueryClient ¶
type QueryClient interface { // Alerts gets all alerts in state under the given status. If no status is given, all // Alerts are returned Alerts(ctx context.Context, in *AlertsRequest, opts ...grpc.CallOption) (*AlertsResponse, error) Params(ctx context.Context, in *ParamsRequest, opts ...grpc.CallOption) (*ParamsResponse, 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 QueryServer ¶
type QueryServer interface { // Alerts gets all alerts in state under the given status. If no status is given, all // Alerts are returned Alerts(context.Context, *AlertsRequest) (*AlertsResponse, error) Params(context.Context, *ParamsRequest) (*ParamsResponse, error) }
QueryServer is the server API for Query service.
type Signature ¶
type Signature struct { Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` }
Signature is a container for a signer address mapped to a signature.
func (*Signature) Descriptor ¶
func (*Signature) GetSignature ¶
func (*Signature) MarshalToSizedBuffer ¶
func (*Signature) ProtoMessage ¶
func (*Signature) ProtoMessage()
func (*Signature) XXX_DiscardUnknown ¶
func (m *Signature) XXX_DiscardUnknown()
func (*Signature) XXX_Marshal ¶
func (*Signature) XXX_Unmarshal ¶
type StakingKeeper ¶
type StakingKeeper interface { Slash(ctx context.Context, consAddr sdk.ConsAddress, infractionHeight, power int64, slashFactor math.LegacyDec) (math.Int, error) GetValidatorByConsAddr(ctx context.Context, consAddr sdk.ConsAddress) (validator stakingtypes.Validator, err error) BondDenom(ctx context.Context) (string, error) }
StakingKeeper defines the expected interface that the staking-keeper dependency must implement.
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) Alert ¶
func (*UnimplementedMsgServer) Alert(ctx context.Context, req *MsgAlert) (*MsgAlertResponse, error)
func (*UnimplementedMsgServer) Conclusion ¶
func (*UnimplementedMsgServer) Conclusion(ctx context.Context, req *MsgConclusion) (*MsgConclusionResponse, error)
func (*UnimplementedMsgServer) UpdateParams ¶
func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Alerts ¶
func (*UnimplementedQueryServer) Alerts(ctx context.Context, req *AlertsRequest) (*AlertsResponse, error)
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *ParamsRequest) (*ParamsResponse, error)