Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func CalcWork(header *bbn.BTCHeaderBytes) sdkmath.Uint
- func CumulativeWork(childWork sdkmath.Uint, parentWork sdkmath.Uint) sdkmath.Uint
- func HeadersObjectHeightKey(hash *bbn.BTCHeaderHashBytes) []byte
- func HeadersObjectKey(height uint64, hash *bbn.BTCHeaderHashBytes) []byte
- func HeadersObjectWorkKey(hash *bbn.BTCHeaderHashBytes) []byte
- func KeyPrefix(p string) []byte
- func RegisterCodec(cdc *codec.LegacyAmino)
- func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- func TipKey() []byte
- type AccountKeeper
- type BTCHeaderInfo
- func (*BTCHeaderInfo) Descriptor() ([]byte, []int)
- func (m *BTCHeaderInfo) Eq(other *BTCHeaderInfo) bool
- func (m *BTCHeaderInfo) GetHeight() uint64
- func (m *BTCHeaderInfo) HasParent(parent *BTCHeaderInfo) bool
- func (m *BTCHeaderInfo) Marshal() (dAtA []byte, err error)
- func (m *BTCHeaderInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *BTCHeaderInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BTCHeaderInfo) ProtoMessage()
- func (m *BTCHeaderInfo) Reset()
- func (m *BTCHeaderInfo) Size() (n int)
- func (m *BTCHeaderInfo) String() string
- func (m *BTCHeaderInfo) Unmarshal(dAtA []byte) error
- func (m BTCHeaderInfo) Validate() error
- func (m *BTCHeaderInfo) XXX_DiscardUnknown()
- func (m *BTCHeaderInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BTCHeaderInfo) XXX_Merge(src proto.Message)
- func (m *BTCHeaderInfo) XXX_Size() int
- func (m *BTCHeaderInfo) XXX_Unmarshal(b []byte) error
- type BTCLightClientHooks
- type BankKeeper
- type EventBTCHeaderInserted
- func (*EventBTCHeaderInserted) Descriptor() ([]byte, []int)
- func (m *EventBTCHeaderInserted) GetHeader() *BTCHeaderInfo
- func (m *EventBTCHeaderInserted) Marshal() (dAtA []byte, err error)
- func (m *EventBTCHeaderInserted) MarshalTo(dAtA []byte) (int, error)
- func (m *EventBTCHeaderInserted) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EventBTCHeaderInserted) ProtoMessage()
- func (m *EventBTCHeaderInserted) Reset()
- func (m *EventBTCHeaderInserted) Size() (n int)
- func (m *EventBTCHeaderInserted) String() string
- func (m *EventBTCHeaderInserted) Unmarshal(dAtA []byte) error
- func (m *EventBTCHeaderInserted) XXX_DiscardUnknown()
- func (m *EventBTCHeaderInserted) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EventBTCHeaderInserted) XXX_Merge(src proto.Message)
- func (m *EventBTCHeaderInserted) XXX_Size() int
- func (m *EventBTCHeaderInserted) XXX_Unmarshal(b []byte) error
- type EventBTCRollBack
- func (*EventBTCRollBack) Descriptor() ([]byte, []int)
- func (m *EventBTCRollBack) GetHeader() *BTCHeaderInfo
- func (m *EventBTCRollBack) Marshal() (dAtA []byte, err error)
- func (m *EventBTCRollBack) MarshalTo(dAtA []byte) (int, error)
- func (m *EventBTCRollBack) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EventBTCRollBack) ProtoMessage()
- func (m *EventBTCRollBack) Reset()
- func (m *EventBTCRollBack) Size() (n int)
- func (m *EventBTCRollBack) String() string
- func (m *EventBTCRollBack) Unmarshal(dAtA []byte) error
- func (m *EventBTCRollBack) XXX_DiscardUnknown()
- func (m *EventBTCRollBack) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EventBTCRollBack) XXX_Merge(src proto.Message)
- func (m *EventBTCRollBack) XXX_Size() int
- func (m *EventBTCRollBack) XXX_Unmarshal(b []byte) error
- type EventBTCRollForward
- func (*EventBTCRollForward) Descriptor() ([]byte, []int)
- func (m *EventBTCRollForward) GetHeader() *BTCHeaderInfo
- func (m *EventBTCRollForward) Marshal() (dAtA []byte, err error)
- func (m *EventBTCRollForward) MarshalTo(dAtA []byte) (int, error)
- func (m *EventBTCRollForward) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EventBTCRollForward) ProtoMessage()
- func (m *EventBTCRollForward) Reset()
- func (m *EventBTCRollForward) Size() (n int)
- func (m *EventBTCRollForward) String() string
- func (m *EventBTCRollForward) Unmarshal(dAtA []byte) error
- func (m *EventBTCRollForward) XXX_DiscardUnknown()
- func (m *EventBTCRollForward) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EventBTCRollForward) XXX_Merge(src proto.Message)
- func (m *EventBTCRollForward) XXX_Size() int
- func (m *EventBTCRollForward) XXX_Unmarshal(b []byte) error
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetBaseBtcHeader() BTCHeaderInfo
- 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) Validate() error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgInsertHeader
- func (*MsgInsertHeader) Descriptor() ([]byte, []int)
- func (m *MsgInsertHeader) GetSigner() string
- func (msg *MsgInsertHeader) GetSigners() []sdk.AccAddress
- func (m *MsgInsertHeader) Marshal() (dAtA []byte, err error)
- func (m *MsgInsertHeader) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgInsertHeader) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgInsertHeader) ProtoMessage()
- func (m *MsgInsertHeader) Reset()
- func (m *MsgInsertHeader) Size() (n int)
- func (m *MsgInsertHeader) String() string
- func (m *MsgInsertHeader) Unmarshal(dAtA []byte) error
- func (msg *MsgInsertHeader) ValidateBasic() error
- func (msg *MsgInsertHeader) ValidateHeader(powLimit *big.Int) error
- func (m *MsgInsertHeader) XXX_DiscardUnknown()
- func (m *MsgInsertHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgInsertHeader) XXX_Merge(src proto.Message)
- func (m *MsgInsertHeader) XXX_Size() int
- func (m *MsgInsertHeader) XXX_Unmarshal(b []byte) error
- type MsgInsertHeaderResponse
- func (*MsgInsertHeaderResponse) Descriptor() ([]byte, []int)
- func (m *MsgInsertHeaderResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgInsertHeaderResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgInsertHeaderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgInsertHeaderResponse) ProtoMessage()
- func (m *MsgInsertHeaderResponse) Reset()
- func (m *MsgInsertHeaderResponse) Size() (n int)
- func (m *MsgInsertHeaderResponse) String() string
- func (m *MsgInsertHeaderResponse) Unmarshal(dAtA []byte) error
- func (m *MsgInsertHeaderResponse) XXX_DiscardUnknown()
- func (m *MsgInsertHeaderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgInsertHeaderResponse) XXX_Merge(src proto.Message)
- func (m *MsgInsertHeaderResponse) XXX_Size() int
- func (m *MsgInsertHeaderResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type MultiBTCLightClientHooks
- type QueryBaseHeaderRequest
- func (*QueryBaseHeaderRequest) Descriptor() ([]byte, []int)
- func (m *QueryBaseHeaderRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryBaseHeaderRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryBaseHeaderRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryBaseHeaderRequest) ProtoMessage()
- func (m *QueryBaseHeaderRequest) Reset()
- func (m *QueryBaseHeaderRequest) Size() (n int)
- func (m *QueryBaseHeaderRequest) String() string
- func (m *QueryBaseHeaderRequest) Unmarshal(dAtA []byte) error
- func (m *QueryBaseHeaderRequest) XXX_DiscardUnknown()
- func (m *QueryBaseHeaderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryBaseHeaderRequest) XXX_Merge(src proto.Message)
- func (m *QueryBaseHeaderRequest) XXX_Size() int
- func (m *QueryBaseHeaderRequest) XXX_Unmarshal(b []byte) error
- type QueryBaseHeaderResponse
- func (*QueryBaseHeaderResponse) Descriptor() ([]byte, []int)
- func (m *QueryBaseHeaderResponse) GetHeader() *BTCHeaderInfo
- func (m *QueryBaseHeaderResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryBaseHeaderResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryBaseHeaderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryBaseHeaderResponse) ProtoMessage()
- func (m *QueryBaseHeaderResponse) Reset()
- func (m *QueryBaseHeaderResponse) Size() (n int)
- func (m *QueryBaseHeaderResponse) String() string
- func (m *QueryBaseHeaderResponse) Unmarshal(dAtA []byte) error
- func (m *QueryBaseHeaderResponse) XXX_DiscardUnknown()
- func (m *QueryBaseHeaderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryBaseHeaderResponse) XXX_Merge(src proto.Message)
- func (m *QueryBaseHeaderResponse) XXX_Size() int
- func (m *QueryBaseHeaderResponse) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryContainsBytesRequest
- func (*QueryContainsBytesRequest) Descriptor() ([]byte, []int)
- func (m *QueryContainsBytesRequest) GetHash() []byte
- func (m *QueryContainsBytesRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryContainsBytesRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryContainsBytesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryContainsBytesRequest) ProtoMessage()
- func (m *QueryContainsBytesRequest) Reset()
- func (m *QueryContainsBytesRequest) Size() (n int)
- func (m *QueryContainsBytesRequest) String() string
- func (m *QueryContainsBytesRequest) Unmarshal(dAtA []byte) error
- func (m *QueryContainsBytesRequest) XXX_DiscardUnknown()
- func (m *QueryContainsBytesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryContainsBytesRequest) XXX_Merge(src proto.Message)
- func (m *QueryContainsBytesRequest) XXX_Size() int
- func (m *QueryContainsBytesRequest) XXX_Unmarshal(b []byte) error
- type QueryContainsBytesResponse
- func (*QueryContainsBytesResponse) Descriptor() ([]byte, []int)
- func (m *QueryContainsBytesResponse) GetContains() bool
- func (m *QueryContainsBytesResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryContainsBytesResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryContainsBytesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryContainsBytesResponse) ProtoMessage()
- func (m *QueryContainsBytesResponse) Reset()
- func (m *QueryContainsBytesResponse) Size() (n int)
- func (m *QueryContainsBytesResponse) String() string
- func (m *QueryContainsBytesResponse) Unmarshal(dAtA []byte) error
- func (m *QueryContainsBytesResponse) XXX_DiscardUnknown()
- func (m *QueryContainsBytesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryContainsBytesResponse) XXX_Merge(src proto.Message)
- func (m *QueryContainsBytesResponse) XXX_Size() int
- func (m *QueryContainsBytesResponse) XXX_Unmarshal(b []byte) error
- type QueryContainsRequest
- func (*QueryContainsRequest) Descriptor() ([]byte, []int)
- func (m *QueryContainsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryContainsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryContainsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryContainsRequest) ProtoMessage()
- func (m *QueryContainsRequest) Reset()
- func (m *QueryContainsRequest) Size() (n int)
- func (m *QueryContainsRequest) String() string
- func (m *QueryContainsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryContainsRequest) XXX_DiscardUnknown()
- func (m *QueryContainsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryContainsRequest) XXX_Merge(src proto.Message)
- func (m *QueryContainsRequest) XXX_Size() int
- func (m *QueryContainsRequest) XXX_Unmarshal(b []byte) error
- type QueryContainsResponse
- func (*QueryContainsResponse) Descriptor() ([]byte, []int)
- func (m *QueryContainsResponse) GetContains() bool
- func (m *QueryContainsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryContainsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryContainsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryContainsResponse) ProtoMessage()
- func (m *QueryContainsResponse) Reset()
- func (m *QueryContainsResponse) Size() (n int)
- func (m *QueryContainsResponse) String() string
- func (m *QueryContainsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryContainsResponse) XXX_DiscardUnknown()
- func (m *QueryContainsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryContainsResponse) XXX_Merge(src proto.Message)
- func (m *QueryContainsResponse) XXX_Size() int
- func (m *QueryContainsResponse) XXX_Unmarshal(b []byte) error
- type QueryHashesRequest
- func (*QueryHashesRequest) Descriptor() ([]byte, []int)
- func (m *QueryHashesRequest) GetPagination() *query.PageRequest
- func (m *QueryHashesRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryHashesRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryHashesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryHashesRequest) ProtoMessage()
- func (m *QueryHashesRequest) Reset()
- func (m *QueryHashesRequest) Size() (n int)
- func (m *QueryHashesRequest) String() string
- func (m *QueryHashesRequest) Unmarshal(dAtA []byte) error
- func (m *QueryHashesRequest) XXX_DiscardUnknown()
- func (m *QueryHashesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryHashesRequest) XXX_Merge(src proto.Message)
- func (m *QueryHashesRequest) XXX_Size() int
- func (m *QueryHashesRequest) XXX_Unmarshal(b []byte) error
- type QueryHashesResponse
- func (*QueryHashesResponse) Descriptor() ([]byte, []int)
- func (m *QueryHashesResponse) GetPagination() *query.PageResponse
- func (m *QueryHashesResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryHashesResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryHashesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryHashesResponse) ProtoMessage()
- func (m *QueryHashesResponse) Reset()
- func (m *QueryHashesResponse) Size() (n int)
- func (m *QueryHashesResponse) String() string
- func (m *QueryHashesResponse) Unmarshal(dAtA []byte) error
- func (m *QueryHashesResponse) XXX_DiscardUnknown()
- func (m *QueryHashesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryHashesResponse) XXX_Merge(src proto.Message)
- func (m *QueryHashesResponse) XXX_Size() int
- func (m *QueryHashesResponse) XXX_Unmarshal(b []byte) error
- type QueryMainChainRequest
- func (*QueryMainChainRequest) Descriptor() ([]byte, []int)
- func (m *QueryMainChainRequest) GetPagination() *query.PageRequest
- func (m *QueryMainChainRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryMainChainRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryMainChainRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryMainChainRequest) ProtoMessage()
- func (m *QueryMainChainRequest) Reset()
- func (m *QueryMainChainRequest) Size() (n int)
- func (m *QueryMainChainRequest) String() string
- func (m *QueryMainChainRequest) Unmarshal(dAtA []byte) error
- func (m *QueryMainChainRequest) XXX_DiscardUnknown()
- func (m *QueryMainChainRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryMainChainRequest) XXX_Merge(src proto.Message)
- func (m *QueryMainChainRequest) XXX_Size() int
- func (m *QueryMainChainRequest) XXX_Unmarshal(b []byte) error
- type QueryMainChainResponse
- func (*QueryMainChainResponse) Descriptor() ([]byte, []int)
- func (m *QueryMainChainResponse) GetHeaders() []*BTCHeaderInfo
- func (m *QueryMainChainResponse) GetPagination() *query.PageResponse
- func (m *QueryMainChainResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryMainChainResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryMainChainResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryMainChainResponse) ProtoMessage()
- func (m *QueryMainChainResponse) Reset()
- func (m *QueryMainChainResponse) Size() (n int)
- func (m *QueryMainChainResponse) String() string
- func (m *QueryMainChainResponse) Unmarshal(dAtA []byte) error
- func (m *QueryMainChainResponse) XXX_DiscardUnknown()
- func (m *QueryMainChainResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryMainChainResponse) XXX_Merge(src proto.Message)
- func (m *QueryMainChainResponse) XXX_Size() int
- func (m *QueryMainChainResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type QueryTipRequest
- func (*QueryTipRequest) Descriptor() ([]byte, []int)
- func (m *QueryTipRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryTipRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryTipRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryTipRequest) ProtoMessage()
- func (m *QueryTipRequest) Reset()
- func (m *QueryTipRequest) Size() (n int)
- func (m *QueryTipRequest) String() string
- func (m *QueryTipRequest) Unmarshal(dAtA []byte) error
- func (m *QueryTipRequest) XXX_DiscardUnknown()
- func (m *QueryTipRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryTipRequest) XXX_Merge(src proto.Message)
- func (m *QueryTipRequest) XXX_Size() int
- func (m *QueryTipRequest) XXX_Unmarshal(b []byte) error
- type QueryTipResponse
- func (*QueryTipResponse) Descriptor() ([]byte, []int)
- func (m *QueryTipResponse) GetHeader() *BTCHeaderInfo
- func (m *QueryTipResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryTipResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryTipResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryTipResponse) ProtoMessage()
- func (m *QueryTipResponse) Reset()
- func (m *QueryTipResponse) Size() (n int)
- func (m *QueryTipResponse) String() string
- func (m *QueryTipResponse) Unmarshal(dAtA []byte) error
- func (m *QueryTipResponse) XXX_DiscardUnknown()
- func (m *QueryTipResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryTipResponse) XXX_Merge(src proto.Message)
- func (m *QueryTipResponse) XXX_Size() int
- func (m *QueryTipResponse) XXX_Unmarshal(b []byte) error
- type UnimplementedMsgServer
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) BaseHeader(ctx context.Context, req *QueryBaseHeaderRequest) (*QueryBaseHeaderResponse, error)
- func (*UnimplementedQueryServer) Contains(ctx context.Context, req *QueryContainsRequest) (*QueryContainsResponse, error)
- func (*UnimplementedQueryServer) ContainsBytes(ctx context.Context, req *QueryContainsBytesRequest) (*QueryContainsBytesResponse, error)
- func (*UnimplementedQueryServer) Hashes(ctx context.Context, req *QueryHashesRequest) (*QueryHashesResponse, error)
- func (*UnimplementedQueryServer) MainChain(ctx context.Context, req *QueryMainChainRequest) (*QueryMainChainResponse, error)
- func (*UnimplementedQueryServer) Tip(ctx context.Context, req *QueryTipRequest) (*QueryTipResponse, error)
Constants ¶
const ( // ModuleName defines the module name ModuleName = "btclightclient" // StoreKey defines the primary module store key StoreKey = ModuleName // RouterKey is the message route for slashing RouterKey = ModuleName // QuerierRoute defines the module's query routing key QuerierRoute = ModuleName // MemStoreKey defines the in-memory store key MemStoreKey = "mem_btclightclient" )
Variables ¶
var ( ErrInvalidLengthBtclightclient = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowBtclightclient = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupBtclightclient = fmt.Errorf("proto: unexpected end of group") )
var ( Amino = codec.NewLegacyAmino() ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) )
var ( ErrHeaderDoesNotExist = errorsmod.Register(ModuleName, 1100, "header does not exist") ErrDuplicateHeader = errorsmod.Register(ModuleName, 1101, "header with provided hash already exists") ErrHeaderParentDoesNotExist = errorsmod.Register(ModuleName, 1102, "parent for provided hash is not maintained") ErrInvalidDifficulty = errorsmod.Register(ModuleName, 1103, "invalid difficulty bits") ErrEmptyMessage = errorsmod.Register(ModuleName, 1104, "empty message provided") ErrInvalidProofOfWOrk = errorsmod.Register(ModuleName, 1105, "provided header has invalid proof of work") )
x/btclightclient module sentinel errors
var ( ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowEvent = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupEvent = 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 ( HeadersPrefix = []byte{0x0} // reserve this namespace for headers HeadersObjectPrefix = append(HeadersPrefix, 0x0) // where we save the concrete header bytes HashToHeightPrefix = append(HeadersPrefix, 0x1) // where we map hash to height HashToWorkPrefix = append(HeadersPrefix, 0x2) // where we map hash to height TipPrefix = append(HeadersPrefix, 0x3) // where we store the tip )
Functions ¶
func CumulativeWork ¶
func HeadersObjectHeightKey ¶
func HeadersObjectHeightKey(hash *bbn.BTCHeaderHashBytes) []byte
func HeadersObjectKey ¶
func HeadersObjectKey(height uint64, hash *bbn.BTCHeaderHashBytes) []byte
func HeadersObjectWorkKey ¶
func HeadersObjectWorkKey(hash *bbn.BTCHeaderHashBytes) []byte
func RegisterCodec ¶
func RegisterCodec(cdc *codec.LegacyAmino)
func RegisterInterfaces ¶
func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
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 AccountKeeper ¶
AccountKeeper defines the expected account keeper used for simulations (noalias)
type BTCHeaderInfo ¶
type BTCHeaderInfo struct { Header *github_com_babylonchain_babylon_types.BTCHeaderBytes `` /* 129-byte string literal not displayed */ Hash *github_com_babylonchain_babylon_types.BTCHeaderHashBytes `` /* 129-byte string literal not displayed */ Height uint64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` Work *github_com_cosmos_cosmos_sdk_types.Uint `protobuf:"bytes,4,opt,name=work,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Uint" json:"work,omitempty"` }
BTCHeaderInfo is a structure that contains all relevant information about a BTC header
- Full header bytes
- Header hash for easy retrieval
- Height of the header in the BTC chain
- Total work spent on the header. This is the sum of the work corresponding to the header Bits field and the total work of the header.
func NewBTCHeaderInfo ¶
func NewBTCHeaderInfo(header *bbn.BTCHeaderBytes, headerHash *bbn.BTCHeaderHashBytes, height uint64, work *sdkmath.Uint) *BTCHeaderInfo
func (*BTCHeaderInfo) Descriptor ¶
func (*BTCHeaderInfo) Descriptor() ([]byte, []int)
func (*BTCHeaderInfo) Eq ¶
func (m *BTCHeaderInfo) Eq(other *BTCHeaderInfo) bool
func (*BTCHeaderInfo) GetHeight ¶
func (m *BTCHeaderInfo) GetHeight() uint64
func (*BTCHeaderInfo) HasParent ¶
func (m *BTCHeaderInfo) HasParent(parent *BTCHeaderInfo) bool
func (*BTCHeaderInfo) Marshal ¶
func (m *BTCHeaderInfo) Marshal() (dAtA []byte, err error)
func (*BTCHeaderInfo) MarshalToSizedBuffer ¶
func (m *BTCHeaderInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*BTCHeaderInfo) ProtoMessage ¶
func (*BTCHeaderInfo) ProtoMessage()
func (*BTCHeaderInfo) Reset ¶
func (m *BTCHeaderInfo) Reset()
func (*BTCHeaderInfo) Size ¶
func (m *BTCHeaderInfo) Size() (n int)
func (*BTCHeaderInfo) String ¶
func (m *BTCHeaderInfo) String() string
func (*BTCHeaderInfo) Unmarshal ¶
func (m *BTCHeaderInfo) Unmarshal(dAtA []byte) error
func (BTCHeaderInfo) Validate ¶
func (m BTCHeaderInfo) Validate() error
func (*BTCHeaderInfo) XXX_DiscardUnknown ¶
func (m *BTCHeaderInfo) XXX_DiscardUnknown()
func (*BTCHeaderInfo) XXX_Marshal ¶
func (m *BTCHeaderInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BTCHeaderInfo) XXX_Merge ¶
func (m *BTCHeaderInfo) XXX_Merge(src proto.Message)
func (*BTCHeaderInfo) XXX_Size ¶
func (m *BTCHeaderInfo) XXX_Size() int
func (*BTCHeaderInfo) XXX_Unmarshal ¶
func (m *BTCHeaderInfo) XXX_Unmarshal(b []byte) error
type BTCLightClientHooks ¶
type BTCLightClientHooks interface { AfterBTCRollBack(ctx sdk.Context, headerInfo *BTCHeaderInfo) // Must be called after the chain is rolled back AfterBTCRollForward(ctx sdk.Context, headerInfo *BTCHeaderInfo) // Must be called after the chain is rolled forward AfterBTCHeaderInserted(ctx sdk.Context, headerInfo *BTCHeaderInfo) // Must be called after a header is inserted }
type BankKeeper ¶
BankKeeper defines the expected interface needed to retrieve account balances.
type EventBTCHeaderInserted ¶
type EventBTCHeaderInserted struct {
Header *BTCHeaderInfo `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
}
EventBTCHeaderInserted is emitted on Msg/InsertHeader The header included in the event is the one that was added to the on chain BTC storage.
func (*EventBTCHeaderInserted) Descriptor ¶
func (*EventBTCHeaderInserted) Descriptor() ([]byte, []int)
func (*EventBTCHeaderInserted) GetHeader ¶
func (m *EventBTCHeaderInserted) GetHeader() *BTCHeaderInfo
func (*EventBTCHeaderInserted) Marshal ¶
func (m *EventBTCHeaderInserted) Marshal() (dAtA []byte, err error)
func (*EventBTCHeaderInserted) MarshalTo ¶
func (m *EventBTCHeaderInserted) MarshalTo(dAtA []byte) (int, error)
func (*EventBTCHeaderInserted) MarshalToSizedBuffer ¶
func (m *EventBTCHeaderInserted) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*EventBTCHeaderInserted) ProtoMessage ¶
func (*EventBTCHeaderInserted) ProtoMessage()
func (*EventBTCHeaderInserted) Reset ¶
func (m *EventBTCHeaderInserted) Reset()
func (*EventBTCHeaderInserted) Size ¶
func (m *EventBTCHeaderInserted) Size() (n int)
func (*EventBTCHeaderInserted) String ¶
func (m *EventBTCHeaderInserted) String() string
func (*EventBTCHeaderInserted) Unmarshal ¶
func (m *EventBTCHeaderInserted) Unmarshal(dAtA []byte) error
func (*EventBTCHeaderInserted) XXX_DiscardUnknown ¶
func (m *EventBTCHeaderInserted) XXX_DiscardUnknown()
func (*EventBTCHeaderInserted) XXX_Marshal ¶
func (m *EventBTCHeaderInserted) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EventBTCHeaderInserted) XXX_Merge ¶
func (m *EventBTCHeaderInserted) XXX_Merge(src proto.Message)
func (*EventBTCHeaderInserted) XXX_Size ¶
func (m *EventBTCHeaderInserted) XXX_Size() int
func (*EventBTCHeaderInserted) XXX_Unmarshal ¶
func (m *EventBTCHeaderInserted) XXX_Unmarshal(b []byte) error
type EventBTCRollBack ¶
type EventBTCRollBack struct {
Header *BTCHeaderInfo `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
}
The header included in the event is the block in the history of the current mainchain to which we are rolling back to. In other words, there is one rollback event emitted per re-org, to the greatest common ancestor of the old and the new fork.
func (*EventBTCRollBack) Descriptor ¶
func (*EventBTCRollBack) Descriptor() ([]byte, []int)
func (*EventBTCRollBack) GetHeader ¶
func (m *EventBTCRollBack) GetHeader() *BTCHeaderInfo
func (*EventBTCRollBack) Marshal ¶
func (m *EventBTCRollBack) Marshal() (dAtA []byte, err error)
func (*EventBTCRollBack) MarshalToSizedBuffer ¶
func (m *EventBTCRollBack) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*EventBTCRollBack) ProtoMessage ¶
func (*EventBTCRollBack) ProtoMessage()
func (*EventBTCRollBack) Reset ¶
func (m *EventBTCRollBack) Reset()
func (*EventBTCRollBack) Size ¶
func (m *EventBTCRollBack) Size() (n int)
func (*EventBTCRollBack) String ¶
func (m *EventBTCRollBack) String() string
func (*EventBTCRollBack) Unmarshal ¶
func (m *EventBTCRollBack) Unmarshal(dAtA []byte) error
func (*EventBTCRollBack) XXX_DiscardUnknown ¶
func (m *EventBTCRollBack) XXX_DiscardUnknown()
func (*EventBTCRollBack) XXX_Marshal ¶
func (m *EventBTCRollBack) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EventBTCRollBack) XXX_Merge ¶
func (m *EventBTCRollBack) XXX_Merge(src proto.Message)
func (*EventBTCRollBack) XXX_Size ¶
func (m *EventBTCRollBack) XXX_Size() int
func (*EventBTCRollBack) XXX_Unmarshal ¶
func (m *EventBTCRollBack) XXX_Unmarshal(b []byte) error
type EventBTCRollForward ¶
type EventBTCRollForward struct {
Header *BTCHeaderInfo `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
}
EventBTCRollForward is emitted on Msg/InsertHeader The header included in the event is the one the main chain is extended with. In the event of a reorg, each block on the new fork that comes after the greatest common ancestor will have a corresponding roll forward event.
func (*EventBTCRollForward) Descriptor ¶
func (*EventBTCRollForward) Descriptor() ([]byte, []int)
func (*EventBTCRollForward) GetHeader ¶
func (m *EventBTCRollForward) GetHeader() *BTCHeaderInfo
func (*EventBTCRollForward) Marshal ¶
func (m *EventBTCRollForward) Marshal() (dAtA []byte, err error)
func (*EventBTCRollForward) MarshalTo ¶
func (m *EventBTCRollForward) MarshalTo(dAtA []byte) (int, error)
func (*EventBTCRollForward) MarshalToSizedBuffer ¶
func (m *EventBTCRollForward) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*EventBTCRollForward) ProtoMessage ¶
func (*EventBTCRollForward) ProtoMessage()
func (*EventBTCRollForward) Reset ¶
func (m *EventBTCRollForward) Reset()
func (*EventBTCRollForward) Size ¶
func (m *EventBTCRollForward) Size() (n int)
func (*EventBTCRollForward) String ¶
func (m *EventBTCRollForward) String() string
func (*EventBTCRollForward) Unmarshal ¶
func (m *EventBTCRollForward) Unmarshal(dAtA []byte) error
func (*EventBTCRollForward) XXX_DiscardUnknown ¶
func (m *EventBTCRollForward) XXX_DiscardUnknown()
func (*EventBTCRollForward) XXX_Marshal ¶
func (m *EventBTCRollForward) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EventBTCRollForward) XXX_Merge ¶
func (m *EventBTCRollForward) XXX_Merge(src proto.Message)
func (*EventBTCRollForward) XXX_Size ¶
func (m *EventBTCRollForward) XXX_Size() int
func (*EventBTCRollForward) XXX_Unmarshal ¶
func (m *EventBTCRollForward) XXX_Unmarshal(b []byte) error
type GenesisState ¶
type GenesisState struct {
BaseBtcHeader BTCHeaderInfo `protobuf:"bytes,1,opt,name=base_btc_header,json=baseBtcHeader,proto3" json:"base_btc_header"`
}
GenesisState defines the btclightclient module's genesis state.
func DefaultGenesis ¶
func DefaultGenesis() *GenesisState
DefaultGenesis returns the default Capability genesis state
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetBaseBtcHeader ¶
func (m *GenesisState) GetBaseBtcHeader() BTCHeaderInfo
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) Validate ¶
func (gs GenesisState) Validate() error
Validate performs basic genesis state validation returning an error upon any failure.
func (*GenesisState) XXX_DiscardUnknown ¶
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶
func (m *GenesisState) XXX_Unmarshal(b []byte) error
type MsgClient ¶
type MsgClient interface { // InsertHeader adds a header to the BTC light client chain maintained by // Babylon. InsertHeader(ctx context.Context, in *MsgInsertHeader, opts ...grpc.CallOption) (*MsgInsertHeaderResponse, 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 MsgInsertHeader ¶
type MsgInsertHeader struct { Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` Header *github_com_babylonchain_babylon_types.BTCHeaderBytes `` /* 129-byte string literal not displayed */ }
MsgInsertHeader defines the message for incoming header bytes
func NewMsgInsertHeader ¶
func NewMsgInsertHeader(signer sdk.AccAddress, headerHex string) (*MsgInsertHeader, error)
func (*MsgInsertHeader) Descriptor ¶
func (*MsgInsertHeader) Descriptor() ([]byte, []int)
func (*MsgInsertHeader) GetSigner ¶
func (m *MsgInsertHeader) GetSigner() string
func (*MsgInsertHeader) GetSigners ¶
func (msg *MsgInsertHeader) GetSigners() []sdk.AccAddress
func (*MsgInsertHeader) Marshal ¶
func (m *MsgInsertHeader) Marshal() (dAtA []byte, err error)
func (*MsgInsertHeader) MarshalToSizedBuffer ¶
func (m *MsgInsertHeader) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgInsertHeader) ProtoMessage ¶
func (*MsgInsertHeader) ProtoMessage()
func (*MsgInsertHeader) Reset ¶
func (m *MsgInsertHeader) Reset()
func (*MsgInsertHeader) Size ¶
func (m *MsgInsertHeader) Size() (n int)
func (*MsgInsertHeader) String ¶
func (m *MsgInsertHeader) String() string
func (*MsgInsertHeader) Unmarshal ¶
func (m *MsgInsertHeader) Unmarshal(dAtA []byte) error
func (*MsgInsertHeader) ValidateBasic ¶
func (msg *MsgInsertHeader) ValidateBasic() error
func (*MsgInsertHeader) ValidateHeader ¶
func (msg *MsgInsertHeader) ValidateHeader(powLimit *big.Int) error
func (*MsgInsertHeader) XXX_DiscardUnknown ¶
func (m *MsgInsertHeader) XXX_DiscardUnknown()
func (*MsgInsertHeader) XXX_Marshal ¶
func (m *MsgInsertHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgInsertHeader) XXX_Merge ¶
func (m *MsgInsertHeader) XXX_Merge(src proto.Message)
func (*MsgInsertHeader) XXX_Size ¶
func (m *MsgInsertHeader) XXX_Size() int
func (*MsgInsertHeader) XXX_Unmarshal ¶
func (m *MsgInsertHeader) XXX_Unmarshal(b []byte) error
type MsgInsertHeaderResponse ¶
type MsgInsertHeaderResponse struct { }
MsgInsertHeaderResponse defines the response for the InsertHeader transaction
func (*MsgInsertHeaderResponse) Descriptor ¶
func (*MsgInsertHeaderResponse) Descriptor() ([]byte, []int)
func (*MsgInsertHeaderResponse) Marshal ¶
func (m *MsgInsertHeaderResponse) Marshal() (dAtA []byte, err error)
func (*MsgInsertHeaderResponse) MarshalTo ¶
func (m *MsgInsertHeaderResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgInsertHeaderResponse) MarshalToSizedBuffer ¶
func (m *MsgInsertHeaderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgInsertHeaderResponse) ProtoMessage ¶
func (*MsgInsertHeaderResponse) ProtoMessage()
func (*MsgInsertHeaderResponse) Reset ¶
func (m *MsgInsertHeaderResponse) Reset()
func (*MsgInsertHeaderResponse) Size ¶
func (m *MsgInsertHeaderResponse) Size() (n int)
func (*MsgInsertHeaderResponse) String ¶
func (m *MsgInsertHeaderResponse) String() string
func (*MsgInsertHeaderResponse) Unmarshal ¶
func (m *MsgInsertHeaderResponse) Unmarshal(dAtA []byte) error
func (*MsgInsertHeaderResponse) XXX_DiscardUnknown ¶
func (m *MsgInsertHeaderResponse) XXX_DiscardUnknown()
func (*MsgInsertHeaderResponse) XXX_Marshal ¶
func (m *MsgInsertHeaderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgInsertHeaderResponse) XXX_Merge ¶
func (m *MsgInsertHeaderResponse) XXX_Merge(src proto.Message)
func (*MsgInsertHeaderResponse) XXX_Size ¶
func (m *MsgInsertHeaderResponse) XXX_Size() int
func (*MsgInsertHeaderResponse) XXX_Unmarshal ¶
func (m *MsgInsertHeaderResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface { // InsertHeader adds a header to the BTC light client chain maintained by // Babylon. InsertHeader(context.Context, *MsgInsertHeader) (*MsgInsertHeaderResponse, error) }
MsgServer is the server API for Msg service.
type MultiBTCLightClientHooks ¶
type MultiBTCLightClientHooks []BTCLightClientHooks
func NewMultiBTCLightClientHooks ¶
func NewMultiBTCLightClientHooks(hooks ...BTCLightClientHooks) MultiBTCLightClientHooks
func (MultiBTCLightClientHooks) AfterBTCHeaderInserted ¶
func (h MultiBTCLightClientHooks) AfterBTCHeaderInserted(ctx sdk.Context, headerInfo *BTCHeaderInfo)
func (MultiBTCLightClientHooks) AfterBTCRollBack ¶
func (h MultiBTCLightClientHooks) AfterBTCRollBack(ctx sdk.Context, headerInfo *BTCHeaderInfo)
func (MultiBTCLightClientHooks) AfterBTCRollForward ¶
func (h MultiBTCLightClientHooks) AfterBTCRollForward(ctx sdk.Context, headerInfo *BTCHeaderInfo)
type QueryBaseHeaderRequest ¶
type QueryBaseHeaderRequest struct { }
QueryBaseHeaderRequest is the request type for the Query/BaseHeader RPC method.
func NewQueryBaseHeaderRequest ¶
func NewQueryBaseHeaderRequest() *QueryBaseHeaderRequest
func (*QueryBaseHeaderRequest) Descriptor ¶
func (*QueryBaseHeaderRequest) Descriptor() ([]byte, []int)
func (*QueryBaseHeaderRequest) Marshal ¶
func (m *QueryBaseHeaderRequest) Marshal() (dAtA []byte, err error)
func (*QueryBaseHeaderRequest) MarshalTo ¶
func (m *QueryBaseHeaderRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryBaseHeaderRequest) MarshalToSizedBuffer ¶
func (m *QueryBaseHeaderRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryBaseHeaderRequest) ProtoMessage ¶
func (*QueryBaseHeaderRequest) ProtoMessage()
func (*QueryBaseHeaderRequest) Reset ¶
func (m *QueryBaseHeaderRequest) Reset()
func (*QueryBaseHeaderRequest) Size ¶
func (m *QueryBaseHeaderRequest) Size() (n int)
func (*QueryBaseHeaderRequest) String ¶
func (m *QueryBaseHeaderRequest) String() string
func (*QueryBaseHeaderRequest) Unmarshal ¶
func (m *QueryBaseHeaderRequest) Unmarshal(dAtA []byte) error
func (*QueryBaseHeaderRequest) XXX_DiscardUnknown ¶
func (m *QueryBaseHeaderRequest) XXX_DiscardUnknown()
func (*QueryBaseHeaderRequest) XXX_Marshal ¶
func (m *QueryBaseHeaderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryBaseHeaderRequest) XXX_Merge ¶
func (m *QueryBaseHeaderRequest) XXX_Merge(src proto.Message)
func (*QueryBaseHeaderRequest) XXX_Size ¶
func (m *QueryBaseHeaderRequest) XXX_Size() int
func (*QueryBaseHeaderRequest) XXX_Unmarshal ¶
func (m *QueryBaseHeaderRequest) XXX_Unmarshal(b []byte) error
type QueryBaseHeaderResponse ¶
type QueryBaseHeaderResponse struct {
Header *BTCHeaderInfo `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
}
QueryBaseHeaderResponse is the response type for the Query/BaseHeader RPC method.
func (*QueryBaseHeaderResponse) Descriptor ¶
func (*QueryBaseHeaderResponse) Descriptor() ([]byte, []int)
func (*QueryBaseHeaderResponse) GetHeader ¶
func (m *QueryBaseHeaderResponse) GetHeader() *BTCHeaderInfo
func (*QueryBaseHeaderResponse) Marshal ¶
func (m *QueryBaseHeaderResponse) Marshal() (dAtA []byte, err error)
func (*QueryBaseHeaderResponse) MarshalTo ¶
func (m *QueryBaseHeaderResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryBaseHeaderResponse) MarshalToSizedBuffer ¶
func (m *QueryBaseHeaderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryBaseHeaderResponse) ProtoMessage ¶
func (*QueryBaseHeaderResponse) ProtoMessage()
func (*QueryBaseHeaderResponse) Reset ¶
func (m *QueryBaseHeaderResponse) Reset()
func (*QueryBaseHeaderResponse) Size ¶
func (m *QueryBaseHeaderResponse) Size() (n int)
func (*QueryBaseHeaderResponse) String ¶
func (m *QueryBaseHeaderResponse) String() string
func (*QueryBaseHeaderResponse) Unmarshal ¶
func (m *QueryBaseHeaderResponse) Unmarshal(dAtA []byte) error
func (*QueryBaseHeaderResponse) XXX_DiscardUnknown ¶
func (m *QueryBaseHeaderResponse) XXX_DiscardUnknown()
func (*QueryBaseHeaderResponse) XXX_Marshal ¶
func (m *QueryBaseHeaderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryBaseHeaderResponse) XXX_Merge ¶
func (m *QueryBaseHeaderResponse) XXX_Merge(src proto.Message)
func (*QueryBaseHeaderResponse) XXX_Size ¶
func (m *QueryBaseHeaderResponse) XXX_Size() int
func (*QueryBaseHeaderResponse) XXX_Unmarshal ¶
func (m *QueryBaseHeaderResponse) XXX_Unmarshal(b []byte) error
type QueryClient ¶
type QueryClient interface { // Hashes retrieves the hashes maintained by the module. Hashes(ctx context.Context, in *QueryHashesRequest, opts ...grpc.CallOption) (*QueryHashesResponse, error) // Contains checks whether a hash is maintained by the module. Contains(ctx context.Context, in *QueryContainsRequest, opts ...grpc.CallOption) (*QueryContainsResponse, error) // ContainsBytes is a temporary method that // checks whether a hash is maintained by the module. // See discussion at https://github.com/babylonchain/babylon/pull/132 // for more details. ContainsBytes(ctx context.Context, in *QueryContainsBytesRequest, opts ...grpc.CallOption) (*QueryContainsBytesResponse, error) // MainChain returns the canonical chain MainChain(ctx context.Context, in *QueryMainChainRequest, opts ...grpc.CallOption) (*QueryMainChainResponse, error) // Tip return best header on canonical chain Tip(ctx context.Context, in *QueryTipRequest, opts ...grpc.CallOption) (*QueryTipResponse, error) // BaseHeader returns the base BTC header of the chain. This header is defined // on genesis. BaseHeader(ctx context.Context, in *QueryBaseHeaderRequest, opts ...grpc.CallOption) (*QueryBaseHeaderResponse, 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 QueryContainsBytesRequest ¶
type QueryContainsBytesRequest struct {
Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
}
QueryContainsRequest is request type for the temporary Query/ContainsBytes RPC method. It involves checking whether a hash is maintained by the module.
func (*QueryContainsBytesRequest) Descriptor ¶
func (*QueryContainsBytesRequest) Descriptor() ([]byte, []int)
func (*QueryContainsBytesRequest) GetHash ¶
func (m *QueryContainsBytesRequest) GetHash() []byte
func (*QueryContainsBytesRequest) Marshal ¶
func (m *QueryContainsBytesRequest) Marshal() (dAtA []byte, err error)
func (*QueryContainsBytesRequest) MarshalTo ¶
func (m *QueryContainsBytesRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryContainsBytesRequest) MarshalToSizedBuffer ¶
func (m *QueryContainsBytesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryContainsBytesRequest) ProtoMessage ¶
func (*QueryContainsBytesRequest) ProtoMessage()
func (*QueryContainsBytesRequest) Reset ¶
func (m *QueryContainsBytesRequest) Reset()
func (*QueryContainsBytesRequest) Size ¶
func (m *QueryContainsBytesRequest) Size() (n int)
func (*QueryContainsBytesRequest) String ¶
func (m *QueryContainsBytesRequest) String() string
func (*QueryContainsBytesRequest) Unmarshal ¶
func (m *QueryContainsBytesRequest) Unmarshal(dAtA []byte) error
func (*QueryContainsBytesRequest) XXX_DiscardUnknown ¶
func (m *QueryContainsBytesRequest) XXX_DiscardUnknown()
func (*QueryContainsBytesRequest) XXX_Marshal ¶
func (m *QueryContainsBytesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryContainsBytesRequest) XXX_Merge ¶
func (m *QueryContainsBytesRequest) XXX_Merge(src proto.Message)
func (*QueryContainsBytesRequest) XXX_Size ¶
func (m *QueryContainsBytesRequest) XXX_Size() int
func (*QueryContainsBytesRequest) XXX_Unmarshal ¶
func (m *QueryContainsBytesRequest) XXX_Unmarshal(b []byte) error
type QueryContainsBytesResponse ¶
type QueryContainsBytesResponse struct {
Contains bool `protobuf:"varint,1,opt,name=contains,proto3" json:"contains,omitempty"`
}
QueryContainsResponse is response type for the temporary Query/ContainsBytes RPC method.
func (*QueryContainsBytesResponse) Descriptor ¶
func (*QueryContainsBytesResponse) Descriptor() ([]byte, []int)
func (*QueryContainsBytesResponse) GetContains ¶
func (m *QueryContainsBytesResponse) GetContains() bool
func (*QueryContainsBytesResponse) Marshal ¶
func (m *QueryContainsBytesResponse) Marshal() (dAtA []byte, err error)
func (*QueryContainsBytesResponse) MarshalTo ¶
func (m *QueryContainsBytesResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryContainsBytesResponse) MarshalToSizedBuffer ¶
func (m *QueryContainsBytesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryContainsBytesResponse) ProtoMessage ¶
func (*QueryContainsBytesResponse) ProtoMessage()
func (*QueryContainsBytesResponse) Reset ¶
func (m *QueryContainsBytesResponse) Reset()
func (*QueryContainsBytesResponse) Size ¶
func (m *QueryContainsBytesResponse) Size() (n int)
func (*QueryContainsBytesResponse) String ¶
func (m *QueryContainsBytesResponse) String() string
func (*QueryContainsBytesResponse) Unmarshal ¶
func (m *QueryContainsBytesResponse) Unmarshal(dAtA []byte) error
func (*QueryContainsBytesResponse) XXX_DiscardUnknown ¶
func (m *QueryContainsBytesResponse) XXX_DiscardUnknown()
func (*QueryContainsBytesResponse) XXX_Marshal ¶
func (m *QueryContainsBytesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryContainsBytesResponse) XXX_Merge ¶
func (m *QueryContainsBytesResponse) XXX_Merge(src proto.Message)
func (*QueryContainsBytesResponse) XXX_Size ¶
func (m *QueryContainsBytesResponse) XXX_Size() int
func (*QueryContainsBytesResponse) XXX_Unmarshal ¶
func (m *QueryContainsBytesResponse) XXX_Unmarshal(b []byte) error
type QueryContainsRequest ¶
type QueryContainsRequest struct {
Hash *github_com_babylonchain_babylon_types.BTCHeaderHashBytes `` /* 129-byte string literal not displayed */
}
QueryContainsRequest is request type for the Query/Contains RPC method. It involves checking whether a hash is maintained by the module.
func NewQueryContainsRequest ¶
func NewQueryContainsRequest(hash string) (*QueryContainsRequest, error)
NewQueryContainsRequest creates a new instance of QueryContainsRequest.
func (*QueryContainsRequest) Descriptor ¶
func (*QueryContainsRequest) Descriptor() ([]byte, []int)
func (*QueryContainsRequest) Marshal ¶
func (m *QueryContainsRequest) Marshal() (dAtA []byte, err error)
func (*QueryContainsRequest) MarshalTo ¶
func (m *QueryContainsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryContainsRequest) MarshalToSizedBuffer ¶
func (m *QueryContainsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryContainsRequest) ProtoMessage ¶
func (*QueryContainsRequest) ProtoMessage()
func (*QueryContainsRequest) Reset ¶
func (m *QueryContainsRequest) Reset()
func (*QueryContainsRequest) Size ¶
func (m *QueryContainsRequest) Size() (n int)
func (*QueryContainsRequest) String ¶
func (m *QueryContainsRequest) String() string
func (*QueryContainsRequest) Unmarshal ¶
func (m *QueryContainsRequest) Unmarshal(dAtA []byte) error
func (*QueryContainsRequest) XXX_DiscardUnknown ¶
func (m *QueryContainsRequest) XXX_DiscardUnknown()
func (*QueryContainsRequest) XXX_Marshal ¶
func (m *QueryContainsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryContainsRequest) XXX_Merge ¶
func (m *QueryContainsRequest) XXX_Merge(src proto.Message)
func (*QueryContainsRequest) XXX_Size ¶
func (m *QueryContainsRequest) XXX_Size() int
func (*QueryContainsRequest) XXX_Unmarshal ¶
func (m *QueryContainsRequest) XXX_Unmarshal(b []byte) error
type QueryContainsResponse ¶
type QueryContainsResponse struct {
Contains bool `protobuf:"varint,1,opt,name=contains,proto3" json:"contains,omitempty"`
}
QueryContainsResponse is response type for the Query/Contains RPC method.
func (*QueryContainsResponse) Descriptor ¶
func (*QueryContainsResponse) Descriptor() ([]byte, []int)
func (*QueryContainsResponse) GetContains ¶
func (m *QueryContainsResponse) GetContains() bool
func (*QueryContainsResponse) Marshal ¶
func (m *QueryContainsResponse) Marshal() (dAtA []byte, err error)
func (*QueryContainsResponse) MarshalTo ¶
func (m *QueryContainsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryContainsResponse) MarshalToSizedBuffer ¶
func (m *QueryContainsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryContainsResponse) ProtoMessage ¶
func (*QueryContainsResponse) ProtoMessage()
func (*QueryContainsResponse) Reset ¶
func (m *QueryContainsResponse) Reset()
func (*QueryContainsResponse) Size ¶
func (m *QueryContainsResponse) Size() (n int)
func (*QueryContainsResponse) String ¶
func (m *QueryContainsResponse) String() string
func (*QueryContainsResponse) Unmarshal ¶
func (m *QueryContainsResponse) Unmarshal(dAtA []byte) error
func (*QueryContainsResponse) XXX_DiscardUnknown ¶
func (m *QueryContainsResponse) XXX_DiscardUnknown()
func (*QueryContainsResponse) XXX_Marshal ¶
func (m *QueryContainsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryContainsResponse) XXX_Merge ¶
func (m *QueryContainsResponse) XXX_Merge(src proto.Message)
func (*QueryContainsResponse) XXX_Size ¶
func (m *QueryContainsResponse) XXX_Size() int
func (*QueryContainsResponse) XXX_Unmarshal ¶
func (m *QueryContainsResponse) XXX_Unmarshal(b []byte) error
type QueryHashesRequest ¶
type QueryHashesRequest struct {
Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}
QueryHashesRequest is request type for the Query/Hashes RPC method. It involves retrieving all hashes that are maintained by the module.
func NewQueryHashesRequest ¶
func NewQueryHashesRequest(req *query.PageRequest) *QueryHashesRequest
NewQueryHashesRequest creates a new instance of QueryHashesRequest.
func (*QueryHashesRequest) Descriptor ¶
func (*QueryHashesRequest) Descriptor() ([]byte, []int)
func (*QueryHashesRequest) GetPagination ¶
func (m *QueryHashesRequest) GetPagination() *query.PageRequest
func (*QueryHashesRequest) Marshal ¶
func (m *QueryHashesRequest) Marshal() (dAtA []byte, err error)
func (*QueryHashesRequest) MarshalTo ¶
func (m *QueryHashesRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryHashesRequest) MarshalToSizedBuffer ¶
func (m *QueryHashesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryHashesRequest) ProtoMessage ¶
func (*QueryHashesRequest) ProtoMessage()
func (*QueryHashesRequest) Reset ¶
func (m *QueryHashesRequest) Reset()
func (*QueryHashesRequest) Size ¶
func (m *QueryHashesRequest) Size() (n int)
func (*QueryHashesRequest) String ¶
func (m *QueryHashesRequest) String() string
func (*QueryHashesRequest) Unmarshal ¶
func (m *QueryHashesRequest) Unmarshal(dAtA []byte) error
func (*QueryHashesRequest) XXX_DiscardUnknown ¶
func (m *QueryHashesRequest) XXX_DiscardUnknown()
func (*QueryHashesRequest) XXX_Marshal ¶
func (m *QueryHashesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryHashesRequest) XXX_Merge ¶
func (m *QueryHashesRequest) XXX_Merge(src proto.Message)
func (*QueryHashesRequest) XXX_Size ¶
func (m *QueryHashesRequest) XXX_Size() int
func (*QueryHashesRequest) XXX_Unmarshal ¶
func (m *QueryHashesRequest) XXX_Unmarshal(b []byte) error
type QueryHashesResponse ¶
type QueryHashesResponse struct { Hashes []github_com_babylonchain_babylon_types.BTCHeaderHashBytes `` /* 133-byte string literal not displayed */ Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryHashesResponse is response type for the Query/Hashes RPC method.
func (*QueryHashesResponse) Descriptor ¶
func (*QueryHashesResponse) Descriptor() ([]byte, []int)
func (*QueryHashesResponse) GetPagination ¶
func (m *QueryHashesResponse) GetPagination() *query.PageResponse
func (*QueryHashesResponse) Marshal ¶
func (m *QueryHashesResponse) Marshal() (dAtA []byte, err error)
func (*QueryHashesResponse) MarshalTo ¶
func (m *QueryHashesResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryHashesResponse) MarshalToSizedBuffer ¶
func (m *QueryHashesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryHashesResponse) ProtoMessage ¶
func (*QueryHashesResponse) ProtoMessage()
func (*QueryHashesResponse) Reset ¶
func (m *QueryHashesResponse) Reset()
func (*QueryHashesResponse) Size ¶
func (m *QueryHashesResponse) Size() (n int)
func (*QueryHashesResponse) String ¶
func (m *QueryHashesResponse) String() string
func (*QueryHashesResponse) Unmarshal ¶
func (m *QueryHashesResponse) Unmarshal(dAtA []byte) error
func (*QueryHashesResponse) XXX_DiscardUnknown ¶
func (m *QueryHashesResponse) XXX_DiscardUnknown()
func (*QueryHashesResponse) XXX_Marshal ¶
func (m *QueryHashesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryHashesResponse) XXX_Merge ¶
func (m *QueryHashesResponse) XXX_Merge(src proto.Message)
func (*QueryHashesResponse) XXX_Size ¶
func (m *QueryHashesResponse) XXX_Size() int
func (*QueryHashesResponse) XXX_Unmarshal ¶
func (m *QueryHashesResponse) XXX_Unmarshal(b []byte) error
type QueryMainChainRequest ¶
type QueryMainChainRequest struct {
Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}
QueryMainChainRequest is request type for the Query/MainChain RPC method. It involves retrieving the canonical chain maintained by the module.
func NewQueryMainChainRequest ¶
func NewQueryMainChainRequest(req *query.PageRequest) *QueryMainChainRequest
func (*QueryMainChainRequest) Descriptor ¶
func (*QueryMainChainRequest) Descriptor() ([]byte, []int)
func (*QueryMainChainRequest) GetPagination ¶
func (m *QueryMainChainRequest) GetPagination() *query.PageRequest
func (*QueryMainChainRequest) Marshal ¶
func (m *QueryMainChainRequest) Marshal() (dAtA []byte, err error)
func (*QueryMainChainRequest) MarshalTo ¶
func (m *QueryMainChainRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryMainChainRequest) MarshalToSizedBuffer ¶
func (m *QueryMainChainRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryMainChainRequest) ProtoMessage ¶
func (*QueryMainChainRequest) ProtoMessage()
func (*QueryMainChainRequest) Reset ¶
func (m *QueryMainChainRequest) Reset()
func (*QueryMainChainRequest) Size ¶
func (m *QueryMainChainRequest) Size() (n int)
func (*QueryMainChainRequest) String ¶
func (m *QueryMainChainRequest) String() string
func (*QueryMainChainRequest) Unmarshal ¶
func (m *QueryMainChainRequest) Unmarshal(dAtA []byte) error
func (*QueryMainChainRequest) XXX_DiscardUnknown ¶
func (m *QueryMainChainRequest) XXX_DiscardUnknown()
func (*QueryMainChainRequest) XXX_Marshal ¶
func (m *QueryMainChainRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryMainChainRequest) XXX_Merge ¶
func (m *QueryMainChainRequest) XXX_Merge(src proto.Message)
func (*QueryMainChainRequest) XXX_Size ¶
func (m *QueryMainChainRequest) XXX_Size() int
func (*QueryMainChainRequest) XXX_Unmarshal ¶
func (m *QueryMainChainRequest) XXX_Unmarshal(b []byte) error
type QueryMainChainResponse ¶
type QueryMainChainResponse struct { Headers []*BTCHeaderInfo `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryMainChainResponse is response type for the Query/MainChain RPC method.
func (*QueryMainChainResponse) Descriptor ¶
func (*QueryMainChainResponse) Descriptor() ([]byte, []int)
func (*QueryMainChainResponse) GetHeaders ¶
func (m *QueryMainChainResponse) GetHeaders() []*BTCHeaderInfo
func (*QueryMainChainResponse) GetPagination ¶
func (m *QueryMainChainResponse) GetPagination() *query.PageResponse
func (*QueryMainChainResponse) Marshal ¶
func (m *QueryMainChainResponse) Marshal() (dAtA []byte, err error)
func (*QueryMainChainResponse) MarshalTo ¶
func (m *QueryMainChainResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryMainChainResponse) MarshalToSizedBuffer ¶
func (m *QueryMainChainResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryMainChainResponse) ProtoMessage ¶
func (*QueryMainChainResponse) ProtoMessage()
func (*QueryMainChainResponse) Reset ¶
func (m *QueryMainChainResponse) Reset()
func (*QueryMainChainResponse) Size ¶
func (m *QueryMainChainResponse) Size() (n int)
func (*QueryMainChainResponse) String ¶
func (m *QueryMainChainResponse) String() string
func (*QueryMainChainResponse) Unmarshal ¶
func (m *QueryMainChainResponse) Unmarshal(dAtA []byte) error
func (*QueryMainChainResponse) XXX_DiscardUnknown ¶
func (m *QueryMainChainResponse) XXX_DiscardUnknown()
func (*QueryMainChainResponse) XXX_Marshal ¶
func (m *QueryMainChainResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryMainChainResponse) XXX_Merge ¶
func (m *QueryMainChainResponse) XXX_Merge(src proto.Message)
func (*QueryMainChainResponse) XXX_Size ¶
func (m *QueryMainChainResponse) XXX_Size() int
func (*QueryMainChainResponse) XXX_Unmarshal ¶
func (m *QueryMainChainResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { // Hashes retrieves the hashes maintained by the module. Hashes(context.Context, *QueryHashesRequest) (*QueryHashesResponse, error) // Contains checks whether a hash is maintained by the module. Contains(context.Context, *QueryContainsRequest) (*QueryContainsResponse, error) // ContainsBytes is a temporary method that // checks whether a hash is maintained by the module. // See discussion at https://github.com/babylonchain/babylon/pull/132 // for more details. ContainsBytes(context.Context, *QueryContainsBytesRequest) (*QueryContainsBytesResponse, error) // MainChain returns the canonical chain MainChain(context.Context, *QueryMainChainRequest) (*QueryMainChainResponse, error) // Tip return best header on canonical chain Tip(context.Context, *QueryTipRequest) (*QueryTipResponse, error) // BaseHeader returns the base BTC header of the chain. This header is defined // on genesis. BaseHeader(context.Context, *QueryBaseHeaderRequest) (*QueryBaseHeaderResponse, error) }
QueryServer is the server API for Query service.
type QueryTipRequest ¶
type QueryTipRequest struct { }
QueryTipRequest is the request type for the Query/Tip RPC method.
func NewQueryTipRequest ¶
func NewQueryTipRequest() *QueryTipRequest
func (*QueryTipRequest) Descriptor ¶
func (*QueryTipRequest) Descriptor() ([]byte, []int)
func (*QueryTipRequest) Marshal ¶
func (m *QueryTipRequest) Marshal() (dAtA []byte, err error)
func (*QueryTipRequest) MarshalToSizedBuffer ¶
func (m *QueryTipRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryTipRequest) ProtoMessage ¶
func (*QueryTipRequest) ProtoMessage()
func (*QueryTipRequest) Reset ¶
func (m *QueryTipRequest) Reset()
func (*QueryTipRequest) Size ¶
func (m *QueryTipRequest) Size() (n int)
func (*QueryTipRequest) String ¶
func (m *QueryTipRequest) String() string
func (*QueryTipRequest) Unmarshal ¶
func (m *QueryTipRequest) Unmarshal(dAtA []byte) error
func (*QueryTipRequest) XXX_DiscardUnknown ¶
func (m *QueryTipRequest) XXX_DiscardUnknown()
func (*QueryTipRequest) XXX_Marshal ¶
func (m *QueryTipRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryTipRequest) XXX_Merge ¶
func (m *QueryTipRequest) XXX_Merge(src proto.Message)
func (*QueryTipRequest) XXX_Size ¶
func (m *QueryTipRequest) XXX_Size() int
func (*QueryTipRequest) XXX_Unmarshal ¶
func (m *QueryTipRequest) XXX_Unmarshal(b []byte) error
type QueryTipResponse ¶
type QueryTipResponse struct {
Header *BTCHeaderInfo `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
}
QueryTipResponse is the response type for the Query/Tip RPC method.
func (*QueryTipResponse) Descriptor ¶
func (*QueryTipResponse) Descriptor() ([]byte, []int)
func (*QueryTipResponse) GetHeader ¶
func (m *QueryTipResponse) GetHeader() *BTCHeaderInfo
func (*QueryTipResponse) Marshal ¶
func (m *QueryTipResponse) Marshal() (dAtA []byte, err error)
func (*QueryTipResponse) MarshalToSizedBuffer ¶
func (m *QueryTipResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryTipResponse) ProtoMessage ¶
func (*QueryTipResponse) ProtoMessage()
func (*QueryTipResponse) Reset ¶
func (m *QueryTipResponse) Reset()
func (*QueryTipResponse) Size ¶
func (m *QueryTipResponse) Size() (n int)
func (*QueryTipResponse) String ¶
func (m *QueryTipResponse) String() string
func (*QueryTipResponse) Unmarshal ¶
func (m *QueryTipResponse) Unmarshal(dAtA []byte) error
func (*QueryTipResponse) XXX_DiscardUnknown ¶
func (m *QueryTipResponse) XXX_DiscardUnknown()
func (*QueryTipResponse) XXX_Marshal ¶
func (m *QueryTipResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryTipResponse) XXX_Merge ¶
func (m *QueryTipResponse) XXX_Merge(src proto.Message)
func (*QueryTipResponse) XXX_Size ¶
func (m *QueryTipResponse) XXX_Size() int
func (*QueryTipResponse) XXX_Unmarshal ¶
func (m *QueryTipResponse) XXX_Unmarshal(b []byte) error
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) InsertHeader ¶
func (*UnimplementedMsgServer) InsertHeader(ctx context.Context, req *MsgInsertHeader) (*MsgInsertHeaderResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) BaseHeader ¶
func (*UnimplementedQueryServer) BaseHeader(ctx context.Context, req *QueryBaseHeaderRequest) (*QueryBaseHeaderResponse, error)
func (*UnimplementedQueryServer) Contains ¶
func (*UnimplementedQueryServer) Contains(ctx context.Context, req *QueryContainsRequest) (*QueryContainsResponse, error)
func (*UnimplementedQueryServer) ContainsBytes ¶
func (*UnimplementedQueryServer) ContainsBytes(ctx context.Context, req *QueryContainsBytesRequest) (*QueryContainsBytesResponse, error)
func (*UnimplementedQueryServer) Hashes ¶
func (*UnimplementedQueryServer) Hashes(ctx context.Context, req *QueryHashesRequest) (*QueryHashesResponse, error)
func (*UnimplementedQueryServer) MainChain ¶
func (*UnimplementedQueryServer) MainChain(ctx context.Context, req *QueryMainChainRequest) (*QueryMainChainResponse, error)
func (*UnimplementedQueryServer) Tip ¶
func (*UnimplementedQueryServer) Tip(ctx context.Context, req *QueryTipRequest) (*QueryTipResponse, error)