types

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModuleName defines the module name.
	ModuleName = "portal"
)

Variables

View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var Query_serviceDesc = _Query_serviceDesc

Functions

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type BlockRequest

type BlockRequest struct {
	Id     uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Latest bool   `protobuf:"varint,2,opt,name=latest,proto3" json:"latest,omitempty"`
}

func (*BlockRequest) Descriptor

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

func (*BlockRequest) GetId

func (m *BlockRequest) GetId() uint64

func (*BlockRequest) GetLatest

func (m *BlockRequest) GetLatest() bool

func (*BlockRequest) Marshal

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

func (*BlockRequest) MarshalTo

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

func (*BlockRequest) MarshalToSizedBuffer

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

func (*BlockRequest) ProtoMessage

func (*BlockRequest) ProtoMessage()

func (*BlockRequest) Reset

func (m *BlockRequest) Reset()

func (*BlockRequest) Size

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

func (*BlockRequest) String

func (m *BlockRequest) String() string

func (*BlockRequest) Unmarshal

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

func (*BlockRequest) XXX_DiscardUnknown

func (m *BlockRequest) XXX_DiscardUnknown()

func (*BlockRequest) XXX_Marshal

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

func (*BlockRequest) XXX_Merge

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

func (*BlockRequest) XXX_Size

func (m *BlockRequest) XXX_Size() int

func (*BlockRequest) XXX_Unmarshal

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

type BlockResponse

type BlockResponse struct {
	Id            uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	CreatedHeight uint64 `protobuf:"varint,2,opt,name=created_height,json=createdHeight,proto3" json:"created_height,omitempty"`
	Msgs          []Msg  `protobuf:"bytes,3,rep,name=msgs,proto3" json:"msgs"`
}

func (*BlockResponse) Descriptor

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

func (*BlockResponse) GetCreatedHeight

func (m *BlockResponse) GetCreatedHeight() uint64

func (*BlockResponse) GetId

func (m *BlockResponse) GetId() uint64

func (*BlockResponse) GetMsgs

func (m *BlockResponse) GetMsgs() []Msg

func (*BlockResponse) Marshal

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

func (*BlockResponse) MarshalTo

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

func (*BlockResponse) MarshalToSizedBuffer

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

func (*BlockResponse) ProtoMessage

func (*BlockResponse) ProtoMessage()

func (*BlockResponse) Reset

func (m *BlockResponse) Reset()

func (*BlockResponse) Size

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

func (*BlockResponse) String

func (m *BlockResponse) String() string

func (*BlockResponse) Unmarshal

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

func (*BlockResponse) XXX_DiscardUnknown

func (m *BlockResponse) XXX_DiscardUnknown()

func (*BlockResponse) XXX_Marshal

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

func (*BlockResponse) XXX_Merge

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

func (*BlockResponse) XXX_Size

func (m *BlockResponse) XXX_Size() int

func (*BlockResponse) XXX_Unmarshal

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

type EmitPortal

type EmitPortal interface {
	// EmitMsg emits a cross chain message in the current block returning the xblock ID/Height/Offset.
	EmitMsg(ctx sdk.Context, typ MsgType, msgTypeID uint64, destChainID uint64, shardID xchain.ShardID) (uint64, error)
}

EmitPortal provides an interface for modules to emit cross chain messages.

type Msg

type Msg struct {
	Id           uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Type         uint32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"`
	MsgTypeId    uint64 `protobuf:"varint,3,opt,name=msg_type_id,json=msgTypeId,proto3" json:"msg_type_id,omitempty"`
	DestChainId  uint64 `protobuf:"varint,4,opt,name=dest_chain_id,json=destChainId,proto3" json:"dest_chain_id,omitempty"`
	ShardId      uint64 `protobuf:"varint,5,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"`
	StreamOffset uint64 `protobuf:"varint,6,opt,name=stream_offset,json=streamOffset,proto3" json:"stream_offset,omitempty"`
}

func (*Msg) Descriptor

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

func (*Msg) GetDestChainId

func (m *Msg) GetDestChainId() uint64

func (*Msg) GetId

func (m *Msg) GetId() uint64

func (*Msg) GetMsgTypeId

func (m *Msg) GetMsgTypeId() uint64

func (*Msg) GetShardId

func (m *Msg) GetShardId() uint64

func (*Msg) GetStreamOffset

func (m *Msg) GetStreamOffset() uint64

func (*Msg) GetType

func (m *Msg) GetType() uint32

func (*Msg) Marshal

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

func (*Msg) MarshalTo

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

func (*Msg) MarshalToSizedBuffer

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

func (*Msg) MsgType

func (m *Msg) MsgType() MsgType

func (*Msg) ProtoMessage

func (*Msg) ProtoMessage()

func (*Msg) Reset

func (m *Msg) Reset()

func (*Msg) ShardID

func (m *Msg) ShardID() xchain.ShardID

func (*Msg) Size

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

func (*Msg) String

func (m *Msg) String() string

func (*Msg) Unmarshal

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

func (*Msg) XXX_DiscardUnknown

func (m *Msg) XXX_DiscardUnknown()

func (*Msg) XXX_Marshal

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

func (*Msg) XXX_Merge

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

func (*Msg) XXX_Size

func (m *Msg) XXX_Size() int

func (*Msg) XXX_Unmarshal

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

type MsgType

type MsgType uint32
const (
	MsgTypeUnknown MsgType = 0
	MsgTypeValSet  MsgType = 1
	MsgTypeNetwork MsgType = 2
)

func (MsgType) String

func (i MsgType) String() string

func (MsgType) Validate

func (m MsgType) Validate() error

type QueryClient

type QueryClient interface {
	Block(ctx context.Context, in *BlockRequest, opts ...grpc.CallOption) (*BlockResponse, 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 {
	Block(context.Context, *BlockRequest) (*BlockResponse, error)
}

QueryServer is the server API for Query service.

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Block

Jump to

Keyboard shortcuts

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