api_v1

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Direction_name = map[int32]string{
		0: "Ascending",
		1: "Descending",
	}
	Direction_value = map[string]int32{
		"Ascending":  0,
		"Descending": 1,
	}
)

Enum value maps for Direction.

View Source
var File_api_v1_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type BlockData

type BlockData struct {

	// Block header hash.
	Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	// Block header if requested.
	Header []byte `protobuf:"bytes,2,opt,name=header,proto3" json:"header,omitempty"` // optional
	// Block body if requested.
	Body [][]byte `protobuf:"bytes,3,rep,name=body,proto3" json:"body,omitempty"` // optional
	// Block receipt if requested.
	Receipt []byte `protobuf:"bytes,4,opt,name=receipt,proto3" json:"receipt,omitempty"` // optional
	// Block message queue if requested.
	MessageQueue []byte `protobuf:"bytes,5,opt,name=message_queue,json=messageQueue,proto3" json:"message_queue,omitempty"` // optional
	// Justification if requested.
	Justification []byte `protobuf:"bytes,6,opt,name=justification,proto3" json:"justification,omitempty"` // optional
	// True if justification should be treated as present but empty.
	// This hack is unfortunately necessary because shortcomings in the protobuf format otherwise
	// doesn't make in possible to differentiate between a lack of justification and an empty
	// justification.
	IsEmptyJustification bool `protobuf:"varint,7,opt,name=is_empty_justification,json=isEmptyJustification,proto3" json:"is_empty_justification,omitempty"` // optional, false if absent
	// contains filtered or unexported fields
}

Block data sent in the response.

func (*BlockData) Descriptor deprecated

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

Deprecated: Use BlockData.ProtoReflect.Descriptor instead.

func (*BlockData) GetBody

func (x *BlockData) GetBody() [][]byte

func (*BlockData) GetHash

func (x *BlockData) GetHash() []byte

func (*BlockData) GetHeader

func (x *BlockData) GetHeader() []byte

func (*BlockData) GetIsEmptyJustification

func (x *BlockData) GetIsEmptyJustification() bool

func (*BlockData) GetJustification

func (x *BlockData) GetJustification() []byte

func (*BlockData) GetMessageQueue

func (x *BlockData) GetMessageQueue() []byte

func (*BlockData) GetReceipt

func (x *BlockData) GetReceipt() []byte

func (*BlockData) ProtoMessage

func (*BlockData) ProtoMessage()

func (*BlockData) ProtoReflect

func (x *BlockData) ProtoReflect() protoreflect.Message

func (*BlockData) Reset

func (x *BlockData) Reset()

func (*BlockData) String

func (x *BlockData) String() string

type BlockRequest

type BlockRequest struct {

	// Bits of block data to request.
	Fields uint32 `protobuf:"varint,1,opt,name=fields,proto3" json:"fields,omitempty"`
	// Start from this block.
	//
	// Types that are assignable to FromBlock:
	//	*BlockRequest_Hash
	//	*BlockRequest_Number
	FromBlock isBlockRequest_FromBlock `protobuf_oneof:"from_block"`
	// End at this block. An implementation defined maximum is used when unspecified.
	ToBlock []byte `protobuf:"bytes,4,opt,name=to_block,json=toBlock,proto3" json:"to_block,omitempty"` // optional
	// Sequence direction.
	Direction Direction `protobuf:"varint,5,opt,name=direction,proto3,enum=api.v1.Direction" json:"direction,omitempty"`
	// Maximum number of blocks to return. An implementation defined maximum is used when unspecified.
	MaxBlocks uint32 `protobuf:"varint,6,opt,name=max_blocks,json=maxBlocks,proto3" json:"max_blocks,omitempty"` // optional
	// contains filtered or unexported fields
}

Request block data from a peer.

func (*BlockRequest) Descriptor deprecated

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

Deprecated: Use BlockRequest.ProtoReflect.Descriptor instead.

func (*BlockRequest) GetDirection

func (x *BlockRequest) GetDirection() Direction

func (*BlockRequest) GetFields

func (x *BlockRequest) GetFields() uint32

func (*BlockRequest) GetFromBlock

func (m *BlockRequest) GetFromBlock() isBlockRequest_FromBlock

func (*BlockRequest) GetHash

func (x *BlockRequest) GetHash() []byte

func (*BlockRequest) GetMaxBlocks

func (x *BlockRequest) GetMaxBlocks() uint32

func (*BlockRequest) GetNumber

func (x *BlockRequest) GetNumber() []byte

func (*BlockRequest) GetToBlock

func (x *BlockRequest) GetToBlock() []byte

func (*BlockRequest) ProtoMessage

func (*BlockRequest) ProtoMessage()

func (*BlockRequest) ProtoReflect

func (x *BlockRequest) ProtoReflect() protoreflect.Message

func (*BlockRequest) Reset

func (x *BlockRequest) Reset()

func (*BlockRequest) String

func (x *BlockRequest) String() string

type BlockRequest_Hash

type BlockRequest_Hash struct {
	// Start with given hash.
	Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3,oneof"`
}

type BlockRequest_Number

type BlockRequest_Number struct {
	// Start with given block number.
	Number []byte `protobuf:"bytes,3,opt,name=number,proto3,oneof"`
}

type BlockResponse

type BlockResponse struct {

	// Block data for the requested sequence.
	Blocks []*BlockData `protobuf:"bytes,1,rep,name=blocks,proto3" json:"blocks,omitempty"`
	// contains filtered or unexported fields
}

Response to `BlockRequest`

func (*BlockResponse) Descriptor deprecated

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

Deprecated: Use BlockResponse.ProtoReflect.Descriptor instead.

func (*BlockResponse) GetBlocks

func (x *BlockResponse) GetBlocks() []*BlockData

func (*BlockResponse) ProtoMessage

func (*BlockResponse) ProtoMessage()

func (*BlockResponse) ProtoReflect

func (x *BlockResponse) ProtoReflect() protoreflect.Message

func (*BlockResponse) Reset

func (x *BlockResponse) Reset()

func (*BlockResponse) String

func (x *BlockResponse) String() string

type Direction

type Direction int32

Block enumeration direction.

const (
	// Enumerate in ascending order (from child to parent).
	Direction_Ascending Direction = 0
	// Enumerate in descending order (from parent to canonical child).
	Direction_Descending Direction = 1
)

func (Direction) Descriptor

func (Direction) Descriptor() protoreflect.EnumDescriptor

func (Direction) Enum

func (x Direction) Enum() *Direction

func (Direction) EnumDescriptor deprecated

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

Deprecated: Use Direction.Descriptor instead.

func (Direction) Number

func (x Direction) Number() protoreflect.EnumNumber

func (Direction) String

func (x Direction) String() string

func (Direction) Type

Jump to

Keyboard shortcuts

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