712 lines
25 KiB
Go
712 lines
25 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// source: compact_formats.proto
|
|
|
|
package proto
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
|
|
import (
|
|
context "golang.org/x/net/context"
|
|
grpc "google.golang.org/grpc"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
// A BlockFilter message contains identifiers to select a block: either a
|
|
// height or a hash.
|
|
type BlockFilter struct {
|
|
BlockHeight uint64 `protobuf:"varint,1,opt,name=blockHeight,proto3" json:"blockHeight,omitempty"`
|
|
BlockHash []byte `protobuf:"bytes,2,opt,name=blockHash,proto3" json:"blockHash,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *BlockFilter) Reset() { *m = BlockFilter{} }
|
|
func (m *BlockFilter) String() string { return proto.CompactTextString(m) }
|
|
func (*BlockFilter) ProtoMessage() {}
|
|
func (*BlockFilter) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_compact_formats_e086cc6bfb553869, []int{0}
|
|
}
|
|
func (m *BlockFilter) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_BlockFilter.Unmarshal(m, b)
|
|
}
|
|
func (m *BlockFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_BlockFilter.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *BlockFilter) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_BlockFilter.Merge(dst, src)
|
|
}
|
|
func (m *BlockFilter) XXX_Size() int {
|
|
return xxx_messageInfo_BlockFilter.Size(m)
|
|
}
|
|
func (m *BlockFilter) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_BlockFilter.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_BlockFilter proto.InternalMessageInfo
|
|
|
|
func (m *BlockFilter) GetBlockHeight() uint64 {
|
|
if m != nil {
|
|
return m.BlockHeight
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *BlockFilter) GetBlockHash() []byte {
|
|
if m != nil {
|
|
return m.BlockHash
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type RangeFilter struct {
|
|
Start *BlockFilter `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"`
|
|
End *BlockFilter `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *RangeFilter) Reset() { *m = RangeFilter{} }
|
|
func (m *RangeFilter) String() string { return proto.CompactTextString(m) }
|
|
func (*RangeFilter) ProtoMessage() {}
|
|
func (*RangeFilter) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_compact_formats_e086cc6bfb553869, []int{1}
|
|
}
|
|
func (m *RangeFilter) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_RangeFilter.Unmarshal(m, b)
|
|
}
|
|
func (m *RangeFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_RangeFilter.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *RangeFilter) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_RangeFilter.Merge(dst, src)
|
|
}
|
|
func (m *RangeFilter) XXX_Size() int {
|
|
return xxx_messageInfo_RangeFilter.Size(m)
|
|
}
|
|
func (m *RangeFilter) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_RangeFilter.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_RangeFilter proto.InternalMessageInfo
|
|
|
|
func (m *RangeFilter) GetStart() *BlockFilter {
|
|
if m != nil {
|
|
return m.Start
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *RangeFilter) GetEnd() *BlockFilter {
|
|
if m != nil {
|
|
return m.End
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// A TxFilter contains the information needed to identify a particular
|
|
// transaction: either a block and an index, or a direct transaction hash.
|
|
type TxFilter struct {
|
|
BlockID *BlockFilter `protobuf:"bytes,1,opt,name=blockID,proto3" json:"blockID,omitempty"`
|
|
TxIndex uint64 `protobuf:"varint,2,opt,name=txIndex,proto3" json:"txIndex,omitempty"`
|
|
TxHash []byte `protobuf:"bytes,3,opt,name=txHash,proto3" json:"txHash,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *TxFilter) Reset() { *m = TxFilter{} }
|
|
func (m *TxFilter) String() string { return proto.CompactTextString(m) }
|
|
func (*TxFilter) ProtoMessage() {}
|
|
func (*TxFilter) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_compact_formats_e086cc6bfb553869, []int{2}
|
|
}
|
|
func (m *TxFilter) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_TxFilter.Unmarshal(m, b)
|
|
}
|
|
func (m *TxFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_TxFilter.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *TxFilter) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_TxFilter.Merge(dst, src)
|
|
}
|
|
func (m *TxFilter) XXX_Size() int {
|
|
return xxx_messageInfo_TxFilter.Size(m)
|
|
}
|
|
func (m *TxFilter) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_TxFilter.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_TxFilter proto.InternalMessageInfo
|
|
|
|
func (m *TxFilter) GetBlockID() *BlockFilter {
|
|
if m != nil {
|
|
return m.BlockID
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *TxFilter) GetTxIndex() uint64 {
|
|
if m != nil {
|
|
return m.TxIndex
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *TxFilter) GetTxHash() []byte {
|
|
if m != nil {
|
|
return m.TxHash
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// CompactBlock is a packaging of ONLY the data from a block that's needed to:
|
|
// 1. Detect a payment to your shielded Sapling address
|
|
// 2. Detect a spend of your shielded Sapling notes
|
|
// 3. Update your witnesses to generate new Sapling spend proofs.
|
|
type CompactBlock struct {
|
|
BlockID *BlockFilter `protobuf:"bytes,1,opt,name=blockID,proto3" json:"blockID,omitempty"`
|
|
Vtx []*CompactTx `protobuf:"bytes,3,rep,name=vtx,proto3" json:"vtx,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *CompactBlock) Reset() { *m = CompactBlock{} }
|
|
func (m *CompactBlock) String() string { return proto.CompactTextString(m) }
|
|
func (*CompactBlock) ProtoMessage() {}
|
|
func (*CompactBlock) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_compact_formats_e086cc6bfb553869, []int{3}
|
|
}
|
|
func (m *CompactBlock) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_CompactBlock.Unmarshal(m, b)
|
|
}
|
|
func (m *CompactBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_CompactBlock.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *CompactBlock) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_CompactBlock.Merge(dst, src)
|
|
}
|
|
func (m *CompactBlock) XXX_Size() int {
|
|
return xxx_messageInfo_CompactBlock.Size(m)
|
|
}
|
|
func (m *CompactBlock) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_CompactBlock.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_CompactBlock proto.InternalMessageInfo
|
|
|
|
func (m *CompactBlock) GetBlockID() *BlockFilter {
|
|
if m != nil {
|
|
return m.BlockID
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *CompactBlock) GetVtx() []*CompactTx {
|
|
if m != nil {
|
|
return m.Vtx
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type CompactTx struct {
|
|
// Index and hash will allow the receiver to call out to chain
|
|
// explorers or other data structures to retrieve more information
|
|
// about this transaction.
|
|
Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
|
|
Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
|
|
Spends []*CompactSpend `protobuf:"bytes,3,rep,name=spends,proto3" json:"spends,omitempty"`
|
|
Outputs []*CompactOutput `protobuf:"bytes,4,rep,name=outputs,proto3" json:"outputs,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *CompactTx) Reset() { *m = CompactTx{} }
|
|
func (m *CompactTx) String() string { return proto.CompactTextString(m) }
|
|
func (*CompactTx) ProtoMessage() {}
|
|
func (*CompactTx) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_compact_formats_e086cc6bfb553869, []int{4}
|
|
}
|
|
func (m *CompactTx) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_CompactTx.Unmarshal(m, b)
|
|
}
|
|
func (m *CompactTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_CompactTx.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *CompactTx) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_CompactTx.Merge(dst, src)
|
|
}
|
|
func (m *CompactTx) XXX_Size() int {
|
|
return xxx_messageInfo_CompactTx.Size(m)
|
|
}
|
|
func (m *CompactTx) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_CompactTx.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_CompactTx proto.InternalMessageInfo
|
|
|
|
func (m *CompactTx) GetIndex() uint64 {
|
|
if m != nil {
|
|
return m.Index
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *CompactTx) GetHash() []byte {
|
|
if m != nil {
|
|
return m.Hash
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *CompactTx) GetSpends() []*CompactSpend {
|
|
if m != nil {
|
|
return m.Spends
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *CompactTx) GetOutputs() []*CompactOutput {
|
|
if m != nil {
|
|
return m.Outputs
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type CompactSpend struct {
|
|
Nf []byte `protobuf:"bytes,1,opt,name=nf,proto3" json:"nf,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *CompactSpend) Reset() { *m = CompactSpend{} }
|
|
func (m *CompactSpend) String() string { return proto.CompactTextString(m) }
|
|
func (*CompactSpend) ProtoMessage() {}
|
|
func (*CompactSpend) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_compact_formats_e086cc6bfb553869, []int{5}
|
|
}
|
|
func (m *CompactSpend) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_CompactSpend.Unmarshal(m, b)
|
|
}
|
|
func (m *CompactSpend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_CompactSpend.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *CompactSpend) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_CompactSpend.Merge(dst, src)
|
|
}
|
|
func (m *CompactSpend) XXX_Size() int {
|
|
return xxx_messageInfo_CompactSpend.Size(m)
|
|
}
|
|
func (m *CompactSpend) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_CompactSpend.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_CompactSpend proto.InternalMessageInfo
|
|
|
|
func (m *CompactSpend) GetNf() []byte {
|
|
if m != nil {
|
|
return m.Nf
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type CompactOutput struct {
|
|
Cmu []byte `protobuf:"bytes,1,opt,name=cmu,proto3" json:"cmu,omitempty"`
|
|
Epk []byte `protobuf:"bytes,2,opt,name=epk,proto3" json:"epk,omitempty"`
|
|
Ciphertext []byte `protobuf:"bytes,3,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *CompactOutput) Reset() { *m = CompactOutput{} }
|
|
func (m *CompactOutput) String() string { return proto.CompactTextString(m) }
|
|
func (*CompactOutput) ProtoMessage() {}
|
|
func (*CompactOutput) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_compact_formats_e086cc6bfb553869, []int{6}
|
|
}
|
|
func (m *CompactOutput) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_CompactOutput.Unmarshal(m, b)
|
|
}
|
|
func (m *CompactOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_CompactOutput.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *CompactOutput) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_CompactOutput.Merge(dst, src)
|
|
}
|
|
func (m *CompactOutput) XXX_Size() int {
|
|
return xxx_messageInfo_CompactOutput.Size(m)
|
|
}
|
|
func (m *CompactOutput) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_CompactOutput.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_CompactOutput proto.InternalMessageInfo
|
|
|
|
func (m *CompactOutput) GetCmu() []byte {
|
|
if m != nil {
|
|
return m.Cmu
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *CompactOutput) GetEpk() []byte {
|
|
if m != nil {
|
|
return m.Epk
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *CompactOutput) GetCiphertext() []byte {
|
|
if m != nil {
|
|
return m.Ciphertext
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// An opaque blob of full transaction data, for fetching anything that is not
|
|
// in the compact format (e.g. the memo field).
|
|
type FullTransaction struct {
|
|
TxID *TxFilter `protobuf:"bytes,1,opt,name=txID,proto3" json:"txID,omitempty"`
|
|
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *FullTransaction) Reset() { *m = FullTransaction{} }
|
|
func (m *FullTransaction) String() string { return proto.CompactTextString(m) }
|
|
func (*FullTransaction) ProtoMessage() {}
|
|
func (*FullTransaction) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_compact_formats_e086cc6bfb553869, []int{7}
|
|
}
|
|
func (m *FullTransaction) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_FullTransaction.Unmarshal(m, b)
|
|
}
|
|
func (m *FullTransaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_FullTransaction.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *FullTransaction) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_FullTransaction.Merge(dst, src)
|
|
}
|
|
func (m *FullTransaction) XXX_Size() int {
|
|
return xxx_messageInfo_FullTransaction.Size(m)
|
|
}
|
|
func (m *FullTransaction) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_FullTransaction.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_FullTransaction proto.InternalMessageInfo
|
|
|
|
func (m *FullTransaction) GetTxID() *TxFilter {
|
|
if m != nil {
|
|
return m.TxID
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *FullTransaction) GetData() []byte {
|
|
if m != nil {
|
|
return m.Data
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// Empty placeholder.
|
|
// Someday we may want to specify e.g. a particular chain fork.
|
|
type ChainSpec struct {
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ChainSpec) Reset() { *m = ChainSpec{} }
|
|
func (m *ChainSpec) String() string { return proto.CompactTextString(m) }
|
|
func (*ChainSpec) ProtoMessage() {}
|
|
func (*ChainSpec) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_compact_formats_e086cc6bfb553869, []int{8}
|
|
}
|
|
func (m *ChainSpec) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_ChainSpec.Unmarshal(m, b)
|
|
}
|
|
func (m *ChainSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_ChainSpec.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *ChainSpec) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ChainSpec.Merge(dst, src)
|
|
}
|
|
func (m *ChainSpec) XXX_Size() int {
|
|
return xxx_messageInfo_ChainSpec.Size(m)
|
|
}
|
|
func (m *ChainSpec) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ChainSpec.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ChainSpec proto.InternalMessageInfo
|
|
|
|
func init() {
|
|
proto.RegisterType((*BlockFilter)(nil), "proto.BlockFilter")
|
|
proto.RegisterType((*RangeFilter)(nil), "proto.RangeFilter")
|
|
proto.RegisterType((*TxFilter)(nil), "proto.TxFilter")
|
|
proto.RegisterType((*CompactBlock)(nil), "proto.CompactBlock")
|
|
proto.RegisterType((*CompactTx)(nil), "proto.CompactTx")
|
|
proto.RegisterType((*CompactSpend)(nil), "proto.CompactSpend")
|
|
proto.RegisterType((*CompactOutput)(nil), "proto.CompactOutput")
|
|
proto.RegisterType((*FullTransaction)(nil), "proto.FullTransaction")
|
|
proto.RegisterType((*ChainSpec)(nil), "proto.ChainSpec")
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConn
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
// CompactTxStreamerClient is the client API for CompactTxStreamer service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
type CompactTxStreamerClient interface {
|
|
GetLatestBlock(ctx context.Context, in *ChainSpec, opts ...grpc.CallOption) (*BlockFilter, error)
|
|
GetBlock(ctx context.Context, in *BlockFilter, opts ...grpc.CallOption) (*CompactBlock, error)
|
|
GetBlockRange(ctx context.Context, in *RangeFilter, opts ...grpc.CallOption) (CompactTxStreamer_GetBlockRangeClient, error)
|
|
GetTransaction(ctx context.Context, in *TxFilter, opts ...grpc.CallOption) (*FullTransaction, error)
|
|
}
|
|
|
|
type compactTxStreamerClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewCompactTxStreamerClient(cc *grpc.ClientConn) CompactTxStreamerClient {
|
|
return &compactTxStreamerClient{cc}
|
|
}
|
|
|
|
func (c *compactTxStreamerClient) GetLatestBlock(ctx context.Context, in *ChainSpec, opts ...grpc.CallOption) (*BlockFilter, error) {
|
|
out := new(BlockFilter)
|
|
err := c.cc.Invoke(ctx, "/proto.CompactTxStreamer/GetLatestBlock", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *compactTxStreamerClient) GetBlock(ctx context.Context, in *BlockFilter, opts ...grpc.CallOption) (*CompactBlock, error) {
|
|
out := new(CompactBlock)
|
|
err := c.cc.Invoke(ctx, "/proto.CompactTxStreamer/GetBlock", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *compactTxStreamerClient) GetBlockRange(ctx context.Context, in *RangeFilter, opts ...grpc.CallOption) (CompactTxStreamer_GetBlockRangeClient, error) {
|
|
stream, err := c.cc.NewStream(ctx, &_CompactTxStreamer_serviceDesc.Streams[0], "/proto.CompactTxStreamer/GetBlockRange", opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &compactTxStreamerGetBlockRangeClient{stream}
|
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if err := x.ClientStream.CloseSend(); err != nil {
|
|
return nil, err
|
|
}
|
|
return x, nil
|
|
}
|
|
|
|
type CompactTxStreamer_GetBlockRangeClient interface {
|
|
Recv() (*CompactBlock, error)
|
|
grpc.ClientStream
|
|
}
|
|
|
|
type compactTxStreamerGetBlockRangeClient struct {
|
|
grpc.ClientStream
|
|
}
|
|
|
|
func (x *compactTxStreamerGetBlockRangeClient) Recv() (*CompactBlock, error) {
|
|
m := new(CompactBlock)
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
func (c *compactTxStreamerClient) GetTransaction(ctx context.Context, in *TxFilter, opts ...grpc.CallOption) (*FullTransaction, error) {
|
|
out := new(FullTransaction)
|
|
err := c.cc.Invoke(ctx, "/proto.CompactTxStreamer/GetTransaction", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// CompactTxStreamerServer is the server API for CompactTxStreamer service.
|
|
type CompactTxStreamerServer interface {
|
|
GetLatestBlock(context.Context, *ChainSpec) (*BlockFilter, error)
|
|
GetBlock(context.Context, *BlockFilter) (*CompactBlock, error)
|
|
GetBlockRange(*RangeFilter, CompactTxStreamer_GetBlockRangeServer) error
|
|
GetTransaction(context.Context, *TxFilter) (*FullTransaction, error)
|
|
}
|
|
|
|
func RegisterCompactTxStreamerServer(s *grpc.Server, srv CompactTxStreamerServer) {
|
|
s.RegisterService(&_CompactTxStreamer_serviceDesc, srv)
|
|
}
|
|
|
|
func _CompactTxStreamer_GetLatestBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ChainSpec)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CompactTxStreamerServer).GetLatestBlock(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/proto.CompactTxStreamer/GetLatestBlock",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CompactTxStreamerServer).GetLatestBlock(ctx, req.(*ChainSpec))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CompactTxStreamer_GetBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(BlockFilter)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CompactTxStreamerServer).GetBlock(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/proto.CompactTxStreamer/GetBlock",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CompactTxStreamerServer).GetBlock(ctx, req.(*BlockFilter))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CompactTxStreamer_GetBlockRange_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
m := new(RangeFilter)
|
|
if err := stream.RecvMsg(m); err != nil {
|
|
return err
|
|
}
|
|
return srv.(CompactTxStreamerServer).GetBlockRange(m, &compactTxStreamerGetBlockRangeServer{stream})
|
|
}
|
|
|
|
type CompactTxStreamer_GetBlockRangeServer interface {
|
|
Send(*CompactBlock) error
|
|
grpc.ServerStream
|
|
}
|
|
|
|
type compactTxStreamerGetBlockRangeServer struct {
|
|
grpc.ServerStream
|
|
}
|
|
|
|
func (x *compactTxStreamerGetBlockRangeServer) Send(m *CompactBlock) error {
|
|
return x.ServerStream.SendMsg(m)
|
|
}
|
|
|
|
func _CompactTxStreamer_GetTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(TxFilter)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CompactTxStreamerServer).GetTransaction(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/proto.CompactTxStreamer/GetTransaction",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(CompactTxStreamerServer).GetTransaction(ctx, req.(*TxFilter))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _CompactTxStreamer_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "proto.CompactTxStreamer",
|
|
HandlerType: (*CompactTxStreamerServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "GetLatestBlock",
|
|
Handler: _CompactTxStreamer_GetLatestBlock_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetBlock",
|
|
Handler: _CompactTxStreamer_GetBlock_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetTransaction",
|
|
Handler: _CompactTxStreamer_GetTransaction_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{
|
|
{
|
|
StreamName: "GetBlockRange",
|
|
Handler: _CompactTxStreamer_GetBlockRange_Handler,
|
|
ServerStreams: true,
|
|
},
|
|
},
|
|
Metadata: "compact_formats.proto",
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterFile("compact_formats.proto", fileDescriptor_compact_formats_e086cc6bfb553869)
|
|
}
|
|
|
|
var fileDescriptor_compact_formats_e086cc6bfb553869 = []byte{
|
|
// 485 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x5d, 0x8b, 0xd3, 0x50,
|
|
0x10, 0x6d, 0x9a, 0xb4, 0xdd, 0x4e, 0xba, 0x1f, 0x8e, 0xeb, 0x12, 0x8a, 0x2c, 0xe5, 0xea, 0x43,
|
|
0x41, 0x29, 0x52, 0x11, 0x04, 0x7d, 0x72, 0x65, 0xd7, 0x15, 0x45, 0xb8, 0xed, 0xab, 0xe8, 0xdd,
|
|
0xf4, 0x76, 0x13, 0xb7, 0x4d, 0x42, 0x32, 0x95, 0xfc, 0x0e, 0xff, 0xb0, 0x92, 0xc9, 0x4d, 0x36,
|
|
0x2d, 0x55, 0xf0, 0x29, 0x33, 0x73, 0xce, 0x9c, 0x99, 0x7b, 0x86, 0xc0, 0x23, 0x3f, 0x5e, 0x27,
|
|
0xca, 0xa7, 0x6f, 0xcb, 0x38, 0x5d, 0x2b, 0xca, 0x26, 0x49, 0x1a, 0x53, 0x8c, 0x1d, 0xfe, 0x88,
|
|
0xcf, 0xe0, 0xbe, 0x5b, 0xc5, 0xfe, 0xdd, 0x65, 0xb8, 0x22, 0x9d, 0xe2, 0x08, 0xdc, 0x9b, 0x22,
|
|
0xfd, 0xa0, 0xc3, 0xdb, 0x80, 0x3c, 0x6b, 0x64, 0x8d, 0x1d, 0xd9, 0x2c, 0xe1,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