From b528da3a4b8f5ce6b534250d4a3ad437c3d52072 Mon Sep 17 00:00:00 2001 From: Silas Davis <silas@monax.io> Date: Wed, 13 Jun 2018 20:10:50 +0100 Subject: [PATCH] Amino actually seems nice, we add option Signed-off-by: Silas Davis <silas@monax.io> --- core/kernel.go | 15 +- rpc/burrow/burrow.pb.go | 4858 --------------------------------------- txs/amino_codec.go | 42 + txs/amino_codec_test.go | 65 + txs/json_codec_test.go | 4 +- 5 files changed, 117 insertions(+), 4867 deletions(-) delete mode 100644 rpc/burrow/burrow.pb.go create mode 100644 txs/amino_codec.go create mode 100644 txs/amino_codec_test.go diff --git a/core/kernel.go b/core/kernel.go index 40d0b809..cd1cf3fd 100644 --- a/core/kernel.go +++ b/core/kernel.go @@ -94,17 +94,17 @@ func NewKernel(ctx context.Context, keyClient keys.KeyClient, privValidator tm_t state, err = execution.MakeGenesisState(stateDB, genesisDoc) } + txCodec := txs.NewAminoCodec() tmGenesisDoc := tendermint.DeriveGenesisDoc(genesisDoc) checker := execution.NewBatchChecker(state, blockchain.Tip, logger) emitter := event.NewEmitter(logger) committer := execution.NewBatchCommitter(state, blockchain.Tip, emitter, logger, exeOptions...) - tmNode, err := tendermint.NewNode(tmConf, privValidator, tmGenesisDoc, blockchain, checker, committer, tmLogger) - + tmNode, err := tendermint.NewNode(tmConf, privValidator, tmGenesisDoc, blockchain, checker, committer, txCodec, + tmLogger) if err != nil { return nil, err } - txCodec := txs.NewJSONCodec() transactor := execution.NewTransactor(blockchain.Tip, emitter, tmNode.MempoolReactor().BroadcastTx, txCodec, logger) @@ -130,7 +130,8 @@ func NewKernel(ctx context.Context, keyClient keys.KeyClient, privValidator tm_t }, }, { - Name: "Database", + Name: "Database", + Enabled: true, Launch: func() (process.Process, error) { // Just close database return process.ShutdownFunc(func(ctx context.Context) error { @@ -157,6 +158,8 @@ func NewKernel(ctx context.Context, keyClient keys.KeyClient, privValidator tm_t } return process.ShutdownFunc(func(ctx context.Context) error { err := tmNode.Stop() + // Close tendermint database connections using our wrapper + defer tmNode.Close() if err != nil { return err } @@ -165,8 +168,6 @@ func NewKernel(ctx context.Context, keyClient keys.KeyClient, privValidator tm_t return ctx.Err() case <-tmNode.Quit(): logger.InfoMsg("Tendermint Node has quit, closing DB connections...") - // Close tendermint database connections using our wrapper - tmNode.Close() return nil } return err @@ -226,7 +227,7 @@ func NewKernel(ctx context.Context, keyClient keys.KeyClient, privValidator tm_t pbkeys.RegisterKeysServer(grpcServer, &ks) } - burrow.RegisterTransactionServer(grpcServer, burrow.NewTransactionServer(service)) + burrow.RegisterTransactionServer(grpcServer, burrow.NewTransactionServer(service, state, txCodec)) go grpcServer.Serve(listen) diff --git a/rpc/burrow/burrow.pb.go b/rpc/burrow/burrow.pb.go deleted file mode 100644 index f4a81059..00000000 --- a/rpc/burrow/burrow.pb.go +++ /dev/null @@ -1,4858 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: burrow.proto - -package burrow - -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 - -// #BEGIN(common) -// Common Messages -type Empty struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Empty) Reset() { *m = Empty{} } -func (m *Empty) String() string { return proto.CompactTextString(m) } -func (*Empty) ProtoMessage() {} -func (*Empty) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{0} -} -func (m *Empty) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Empty.Unmarshal(m, b) -} -func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Empty.Marshal(b, m, deterministic) -} -func (dst *Empty) XXX_Merge(src proto.Message) { - xxx_messageInfo_Empty.Merge(dst, src) -} -func (m *Empty) XXX_Size() int { - return xxx_messageInfo_Empty.Size(m) -} -func (m *Empty) XXX_DiscardUnknown() { - xxx_messageInfo_Empty.DiscardUnknown(m) -} - -var xxx_messageInfo_Empty proto.InternalMessageInfo - -type InputAccount struct { - PrivateKey []byte `protobuf:"bytes,1,opt,name=privateKey,proto3" json:"privateKey,omitempty"` - Address []byte `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *InputAccount) Reset() { *m = InputAccount{} } -func (m *InputAccount) String() string { return proto.CompactTextString(m) } -func (*InputAccount) ProtoMessage() {} -func (*InputAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{1} -} -func (m *InputAccount) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_InputAccount.Unmarshal(m, b) -} -func (m *InputAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_InputAccount.Marshal(b, m, deterministic) -} -func (dst *InputAccount) XXX_Merge(src proto.Message) { - xxx_messageInfo_InputAccount.Merge(dst, src) -} -func (m *InputAccount) XXX_Size() int { - return xxx_messageInfo_InputAccount.Size(m) -} -func (m *InputAccount) XXX_DiscardUnknown() { - xxx_messageInfo_InputAccount.DiscardUnknown(m) -} - -var xxx_messageInfo_InputAccount proto.InternalMessageInfo - -func (m *InputAccount) GetPrivateKey() []byte { - if m != nil { - return m.PrivateKey - } - return nil -} - -func (m *InputAccount) GetAddress() []byte { - if m != nil { - return m.Address - } - return nil -} - -type FilterData struct { - Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` - Op string `protobuf:"bytes,2,opt,name=op,proto3" json:"op,omitempty"` - Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FilterData) Reset() { *m = FilterData{} } -func (m *FilterData) String() string { return proto.CompactTextString(m) } -func (*FilterData) ProtoMessage() {} -func (*FilterData) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{2} -} -func (m *FilterData) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FilterData.Unmarshal(m, b) -} -func (m *FilterData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FilterData.Marshal(b, m, deterministic) -} -func (dst *FilterData) XXX_Merge(src proto.Message) { - xxx_messageInfo_FilterData.Merge(dst, src) -} -func (m *FilterData) XXX_Size() int { - return xxx_messageInfo_FilterData.Size(m) -} -func (m *FilterData) XXX_DiscardUnknown() { - xxx_messageInfo_FilterData.DiscardUnknown(m) -} - -var xxx_messageInfo_FilterData proto.InternalMessageInfo - -func (m *FilterData) GetField() string { - if m != nil { - return m.Field - } - return "" -} - -func (m *FilterData) GetOp() string { - if m != nil { - return m.Op - } - return "" -} - -func (m *FilterData) GetValue() string { - if m != nil { - return m.Value - } - return "" -} - -type FilterListParam struct { - Filters []*FilterData `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FilterListParam) Reset() { *m = FilterListParam{} } -func (m *FilterListParam) String() string { return proto.CompactTextString(m) } -func (*FilterListParam) ProtoMessage() {} -func (*FilterListParam) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{3} -} -func (m *FilterListParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FilterListParam.Unmarshal(m, b) -} -func (m *FilterListParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FilterListParam.Marshal(b, m, deterministic) -} -func (dst *FilterListParam) XXX_Merge(src proto.Message) { - xxx_messageInfo_FilterListParam.Merge(dst, src) -} -func (m *FilterListParam) XXX_Size() int { - return xxx_messageInfo_FilterListParam.Size(m) -} -func (m *FilterListParam) XXX_DiscardUnknown() { - xxx_messageInfo_FilterListParam.DiscardUnknown(m) -} - -var xxx_messageInfo_FilterListParam proto.InternalMessageInfo - -func (m *FilterListParam) GetFilters() []*FilterData { - if m != nil { - return m.Filters - } - return nil -} - -// This is here because it is required by both transactions and namereg -// This situation can be remedied multiple ways -type TxReceipt struct { - TxHash []byte `protobuf:"bytes,1,opt,name=TxHash,proto3" json:"TxHash,omitempty"` - CreatesContract bool `protobuf:"varint,2,opt,name=CreatesContract,proto3" json:"CreatesContract,omitempty"` - ContractAddress []byte `protobuf:"bytes,3,opt,name=ContractAddress,proto3" json:"ContractAddress,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TxReceipt) Reset() { *m = TxReceipt{} } -func (m *TxReceipt) String() string { return proto.CompactTextString(m) } -func (*TxReceipt) ProtoMessage() {} -func (*TxReceipt) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{4} -} -func (m *TxReceipt) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TxReceipt.Unmarshal(m, b) -} -func (m *TxReceipt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TxReceipt.Marshal(b, m, deterministic) -} -func (dst *TxReceipt) XXX_Merge(src proto.Message) { - xxx_messageInfo_TxReceipt.Merge(dst, src) -} -func (m *TxReceipt) XXX_Size() int { - return xxx_messageInfo_TxReceipt.Size(m) -} -func (m *TxReceipt) XXX_DiscardUnknown() { - xxx_messageInfo_TxReceipt.DiscardUnknown(m) -} - -var xxx_messageInfo_TxReceipt proto.InternalMessageInfo - -func (m *TxReceipt) GetTxHash() []byte { - if m != nil { - return m.TxHash - } - return nil -} - -func (m *TxReceipt) GetCreatesContract() bool { - if m != nil { - return m.CreatesContract - } - return false -} - -func (m *TxReceipt) GetContractAddress() []byte { - if m != nil { - return m.ContractAddress - } - return nil -} - -// This is here because it is used in both the Account Service (GenPrivAccount) -// And in the transaction service (SignTx) -type PrivateAccount struct { - Address []byte `protobuf:"bytes,1,opt,name=Address,proto3" json:"Address,omitempty"` - PublicKey []byte `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"` - PrivateKey []byte `protobuf:"bytes,3,opt,name=PrivateKey,proto3" json:"PrivateKey,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PrivateAccount) Reset() { *m = PrivateAccount{} } -func (m *PrivateAccount) String() string { return proto.CompactTextString(m) } -func (*PrivateAccount) ProtoMessage() {} -func (*PrivateAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{5} -} -func (m *PrivateAccount) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PrivateAccount.Unmarshal(m, b) -} -func (m *PrivateAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PrivateAccount.Marshal(b, m, deterministic) -} -func (dst *PrivateAccount) XXX_Merge(src proto.Message) { - xxx_messageInfo_PrivateAccount.Merge(dst, src) -} -func (m *PrivateAccount) XXX_Size() int { - return xxx_messageInfo_PrivateAccount.Size(m) -} -func (m *PrivateAccount) XXX_DiscardUnknown() { - xxx_messageInfo_PrivateAccount.DiscardUnknown(m) -} - -var xxx_messageInfo_PrivateAccount proto.InternalMessageInfo - -func (m *PrivateAccount) GetAddress() []byte { - if m != nil { - return m.Address - } - return nil -} - -func (m *PrivateAccount) GetPublicKey() []byte { - if m != nil { - return m.PublicKey - } - return nil -} - -func (m *PrivateAccount) GetPrivateKey() []byte { - if m != nil { - return m.PrivateKey - } - return nil -} - -// This is hear because it is used by both the Events service (Poll) and the -// Transaction service (TransactAndHold) -type EventDataCall struct { - CallData *CallData `protobuf:"bytes,1,opt,name=CallData,proto3" json:"CallData,omitempty"` - Origin []byte `protobuf:"bytes,2,opt,name=Origin,proto3" json:"Origin,omitempty"` - TxHash []byte `protobuf:"bytes,3,opt,name=TxHash,proto3" json:"TxHash,omitempty"` - StackDepth int64 `protobuf:"varint,4,opt,name=StackDepth,proto3" json:"StackDepth,omitempty"` - Return []byte `protobuf:"bytes,5,opt,name=Return,proto3" json:"Return,omitempty"` - Exception string `protobuf:"bytes,6,opt,name=Exception,proto3" json:"Exception,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *EventDataCall) Reset() { *m = EventDataCall{} } -func (m *EventDataCall) String() string { return proto.CompactTextString(m) } -func (*EventDataCall) ProtoMessage() {} -func (*EventDataCall) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{6} -} -func (m *EventDataCall) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EventDataCall.Unmarshal(m, b) -} -func (m *EventDataCall) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EventDataCall.Marshal(b, m, deterministic) -} -func (dst *EventDataCall) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventDataCall.Merge(dst, src) -} -func (m *EventDataCall) XXX_Size() int { - return xxx_messageInfo_EventDataCall.Size(m) -} -func (m *EventDataCall) XXX_DiscardUnknown() { - xxx_messageInfo_EventDataCall.DiscardUnknown(m) -} - -var xxx_messageInfo_EventDataCall proto.InternalMessageInfo - -func (m *EventDataCall) GetCallData() *CallData { - if m != nil { - return m.CallData - } - return nil -} - -func (m *EventDataCall) GetOrigin() []byte { - if m != nil { - return m.Origin - } - return nil -} - -func (m *EventDataCall) GetTxHash() []byte { - if m != nil { - return m.TxHash - } - return nil -} - -func (m *EventDataCall) GetStackDepth() int64 { - if m != nil { - return m.StackDepth - } - return 0 -} - -func (m *EventDataCall) GetReturn() []byte { - if m != nil { - return m.Return - } - return nil -} - -func (m *EventDataCall) GetException() string { - if m != nil { - return m.Exception - } - return "" -} - -type CallData struct { - Caller []byte `protobuf:"bytes,1,opt,name=Caller,proto3" json:"Caller,omitempty"` - Callee []byte `protobuf:"bytes,2,opt,name=Callee,proto3" json:"Callee,omitempty"` - Data []byte `protobuf:"bytes,3,opt,name=Data,proto3" json:"Data,omitempty"` - Value uint64 `protobuf:"varint,4,opt,name=Value,proto3" json:"Value,omitempty"` - Gas uint64 `protobuf:"varint,5,opt,name=Gas,proto3" json:"Gas,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CallData) Reset() { *m = CallData{} } -func (m *CallData) String() string { return proto.CompactTextString(m) } -func (*CallData) ProtoMessage() {} -func (*CallData) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{7} -} -func (m *CallData) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CallData.Unmarshal(m, b) -} -func (m *CallData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CallData.Marshal(b, m, deterministic) -} -func (dst *CallData) XXX_Merge(src proto.Message) { - xxx_messageInfo_CallData.Merge(dst, src) -} -func (m *CallData) XXX_Size() int { - return xxx_messageInfo_CallData.Size(m) -} -func (m *CallData) XXX_DiscardUnknown() { - xxx_messageInfo_CallData.DiscardUnknown(m) -} - -var xxx_messageInfo_CallData proto.InternalMessageInfo - -func (m *CallData) GetCaller() []byte { - if m != nil { - return m.Caller - } - return nil -} - -func (m *CallData) GetCallee() []byte { - if m != nil { - return m.Callee - } - return nil -} - -func (m *CallData) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -func (m *CallData) GetValue() uint64 { - if m != nil { - return m.Value - } - return 0 -} - -func (m *CallData) GetGas() uint64 { - if m != nil { - return m.Gas - } - return 0 -} - -// Params -type AddressParam struct { - Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AddressParam) Reset() { *m = AddressParam{} } -func (m *AddressParam) String() string { return proto.CompactTextString(m) } -func (*AddressParam) ProtoMessage() {} -func (*AddressParam) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{8} -} -func (m *AddressParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AddressParam.Unmarshal(m, b) -} -func (m *AddressParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AddressParam.Marshal(b, m, deterministic) -} -func (dst *AddressParam) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddressParam.Merge(dst, src) -} -func (m *AddressParam) XXX_Size() int { - return xxx_messageInfo_AddressParam.Size(m) -} -func (m *AddressParam) XXX_DiscardUnknown() { - xxx_messageInfo_AddressParam.DiscardUnknown(m) -} - -var xxx_messageInfo_AddressParam proto.InternalMessageInfo - -func (m *AddressParam) GetAddress() []byte { - if m != nil { - return m.Address - } - return nil -} - -type PrivateKeyParam struct { - PrivateKey []byte `protobuf:"bytes,1,opt,name=privateKey,proto3" json:"privateKey,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PrivateKeyParam) Reset() { *m = PrivateKeyParam{} } -func (m *PrivateKeyParam) String() string { return proto.CompactTextString(m) } -func (*PrivateKeyParam) ProtoMessage() {} -func (*PrivateKeyParam) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{9} -} -func (m *PrivateKeyParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PrivateKeyParam.Unmarshal(m, b) -} -func (m *PrivateKeyParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PrivateKeyParam.Marshal(b, m, deterministic) -} -func (dst *PrivateKeyParam) XXX_Merge(src proto.Message) { - xxx_messageInfo_PrivateKeyParam.Merge(dst, src) -} -func (m *PrivateKeyParam) XXX_Size() int { - return xxx_messageInfo_PrivateKeyParam.Size(m) -} -func (m *PrivateKeyParam) XXX_DiscardUnknown() { - xxx_messageInfo_PrivateKeyParam.DiscardUnknown(m) -} - -var xxx_messageInfo_PrivateKeyParam proto.InternalMessageInfo - -func (m *PrivateKeyParam) GetPrivateKey() []byte { - if m != nil { - return m.PrivateKey - } - return nil -} - -type StorageAtParam struct { - Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *StorageAtParam) Reset() { *m = StorageAtParam{} } -func (m *StorageAtParam) String() string { return proto.CompactTextString(m) } -func (*StorageAtParam) ProtoMessage() {} -func (*StorageAtParam) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{10} -} -func (m *StorageAtParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StorageAtParam.Unmarshal(m, b) -} -func (m *StorageAtParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StorageAtParam.Marshal(b, m, deterministic) -} -func (dst *StorageAtParam) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageAtParam.Merge(dst, src) -} -func (m *StorageAtParam) XXX_Size() int { - return xxx_messageInfo_StorageAtParam.Size(m) -} -func (m *StorageAtParam) XXX_DiscardUnknown() { - xxx_messageInfo_StorageAtParam.DiscardUnknown(m) -} - -var xxx_messageInfo_StorageAtParam proto.InternalMessageInfo - -func (m *StorageAtParam) GetAddress() []byte { - if m != nil { - return m.Address - } - return nil -} - -func (m *StorageAtParam) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -type BasePermissions struct { - Perms uint64 `protobuf:"varint,1,opt,name=Perms,proto3" json:"Perms,omitempty"` - SetBit uint64 `protobuf:"varint,2,opt,name=SetBit,proto3" json:"SetBit,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BasePermissions) Reset() { *m = BasePermissions{} } -func (m *BasePermissions) String() string { return proto.CompactTextString(m) } -func (*BasePermissions) ProtoMessage() {} -func (*BasePermissions) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{11} -} -func (m *BasePermissions) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BasePermissions.Unmarshal(m, b) -} -func (m *BasePermissions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BasePermissions.Marshal(b, m, deterministic) -} -func (dst *BasePermissions) XXX_Merge(src proto.Message) { - xxx_messageInfo_BasePermissions.Merge(dst, src) -} -func (m *BasePermissions) XXX_Size() int { - return xxx_messageInfo_BasePermissions.Size(m) -} -func (m *BasePermissions) XXX_DiscardUnknown() { - xxx_messageInfo_BasePermissions.DiscardUnknown(m) -} - -var xxx_messageInfo_BasePermissions proto.InternalMessageInfo - -func (m *BasePermissions) GetPerms() uint64 { - if m != nil { - return m.Perms - } - return 0 -} - -func (m *BasePermissions) GetSetBit() uint64 { - if m != nil { - return m.SetBit - } - return 0 -} - -type AccountPermissions struct { - Base *BasePermissions `protobuf:"bytes,1,opt,name=Base,proto3" json:"Base,omitempty"` - Roles []string `protobuf:"bytes,2,rep,name=Roles,proto3" json:"Roles,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AccountPermissions) Reset() { *m = AccountPermissions{} } -func (m *AccountPermissions) String() string { return proto.CompactTextString(m) } -func (*AccountPermissions) ProtoMessage() {} -func (*AccountPermissions) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{12} -} -func (m *AccountPermissions) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AccountPermissions.Unmarshal(m, b) -} -func (m *AccountPermissions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AccountPermissions.Marshal(b, m, deterministic) -} -func (dst *AccountPermissions) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountPermissions.Merge(dst, src) -} -func (m *AccountPermissions) XXX_Size() int { - return xxx_messageInfo_AccountPermissions.Size(m) -} -func (m *AccountPermissions) XXX_DiscardUnknown() { - xxx_messageInfo_AccountPermissions.DiscardUnknown(m) -} - -var xxx_messageInfo_AccountPermissions proto.InternalMessageInfo - -func (m *AccountPermissions) GetBase() *BasePermissions { - if m != nil { - return m.Base - } - return nil -} - -func (m *AccountPermissions) GetRoles() []string { - if m != nil { - return m.Roles - } - return nil -} - -type Account struct { - Address []byte `protobuf:"bytes,1,opt,name=Address,proto3" json:"Address,omitempty"` - PublicKey []byte `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"` - Sequence uint64 `protobuf:"varint,3,opt,name=Sequence,proto3" json:"Sequence,omitempty"` - Balance uint64 `protobuf:"varint,4,opt,name=Balance,proto3" json:"Balance,omitempty"` - Code []byte `protobuf:"bytes,5,opt,name=Code,proto3" json:"Code,omitempty"` - StorageRoot []byte `protobuf:"bytes,6,opt,name=StorageRoot,proto3" json:"StorageRoot,omitempty"` - Permissions *AccountPermissions `protobuf:"bytes,7,opt,name=Permissions,proto3" json:"Permissions,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Account) Reset() { *m = Account{} } -func (m *Account) String() string { return proto.CompactTextString(m) } -func (*Account) ProtoMessage() {} -func (*Account) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{13} -} -func (m *Account) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Account.Unmarshal(m, b) -} -func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Account.Marshal(b, m, deterministic) -} -func (dst *Account) XXX_Merge(src proto.Message) { - xxx_messageInfo_Account.Merge(dst, src) -} -func (m *Account) XXX_Size() int { - return xxx_messageInfo_Account.Size(m) -} -func (m *Account) XXX_DiscardUnknown() { - xxx_messageInfo_Account.DiscardUnknown(m) -} - -var xxx_messageInfo_Account proto.InternalMessageInfo - -func (m *Account) GetAddress() []byte { - if m != nil { - return m.Address - } - return nil -} - -func (m *Account) GetPublicKey() []byte { - if m != nil { - return m.PublicKey - } - return nil -} - -func (m *Account) GetSequence() uint64 { - if m != nil { - return m.Sequence - } - return 0 -} - -func (m *Account) GetBalance() uint64 { - if m != nil { - return m.Balance - } - return 0 -} - -func (m *Account) GetCode() []byte { - if m != nil { - return m.Code - } - return nil -} - -func (m *Account) GetStorageRoot() []byte { - if m != nil { - return m.StorageRoot - } - return nil -} - -func (m *Account) GetPermissions() *AccountPermissions { - if m != nil { - return m.Permissions - } - return nil -} - -type AccountList struct { - BlockHeight uint64 `protobuf:"varint,1,opt,name=BlockHeight,proto3" json:"BlockHeight,omitempty"` - Accounts []*Account `protobuf:"bytes,2,rep,name=Accounts,proto3" json:"Accounts,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AccountList) Reset() { *m = AccountList{} } -func (m *AccountList) String() string { return proto.CompactTextString(m) } -func (*AccountList) ProtoMessage() {} -func (*AccountList) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{14} -} -func (m *AccountList) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AccountList.Unmarshal(m, b) -} -func (m *AccountList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AccountList.Marshal(b, m, deterministic) -} -func (dst *AccountList) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountList.Merge(dst, src) -} -func (m *AccountList) XXX_Size() int { - return xxx_messageInfo_AccountList.Size(m) -} -func (m *AccountList) XXX_DiscardUnknown() { - xxx_messageInfo_AccountList.DiscardUnknown(m) -} - -var xxx_messageInfo_AccountList proto.InternalMessageInfo - -func (m *AccountList) GetBlockHeight() uint64 { - if m != nil { - return m.BlockHeight - } - return 0 -} - -func (m *AccountList) GetAccounts() []*Account { - if m != nil { - return m.Accounts - } - return nil -} - -type Validator struct { - Address []byte `protobuf:"bytes,1,opt,name=Address,proto3" json:"Address,omitempty"` - PublicKey []byte `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"` - Power uint64 `protobuf:"varint,3,opt,name=Power,proto3" json:"Power,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Validator) Reset() { *m = Validator{} } -func (m *Validator) String() string { return proto.CompactTextString(m) } -func (*Validator) ProtoMessage() {} -func (*Validator) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{15} -} -func (m *Validator) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Validator.Unmarshal(m, b) -} -func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Validator.Marshal(b, m, deterministic) -} -func (dst *Validator) XXX_Merge(src proto.Message) { - xxx_messageInfo_Validator.Merge(dst, src) -} -func (m *Validator) XXX_Size() int { - return xxx_messageInfo_Validator.Size(m) -} -func (m *Validator) XXX_DiscardUnknown() { - xxx_messageInfo_Validator.DiscardUnknown(m) -} - -var xxx_messageInfo_Validator proto.InternalMessageInfo - -func (m *Validator) GetAddress() []byte { - if m != nil { - return m.Address - } - return nil -} - -func (m *Validator) GetPublicKey() []byte { - if m != nil { - return m.PublicKey - } - return nil -} - -func (m *Validator) GetPower() uint64 { - if m != nil { - return m.Power - } - return 0 -} - -type ValidatorList struct { - BlockHeight uint64 `protobuf:"varint,1,opt,name=BlockHeight,proto3" json:"BlockHeight,omitempty"` - BondedValidators []*Validator `protobuf:"bytes,2,rep,name=BondedValidators,proto3" json:"BondedValidators,omitempty"` - UnbondingValidators []*Validator `protobuf:"bytes,3,rep,name=UnbondingValidators,proto3" json:"UnbondingValidators,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ValidatorList) Reset() { *m = ValidatorList{} } -func (m *ValidatorList) String() string { return proto.CompactTextString(m) } -func (*ValidatorList) ProtoMessage() {} -func (*ValidatorList) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{16} -} -func (m *ValidatorList) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ValidatorList.Unmarshal(m, b) -} -func (m *ValidatorList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ValidatorList.Marshal(b, m, deterministic) -} -func (dst *ValidatorList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorList.Merge(dst, src) -} -func (m *ValidatorList) XXX_Size() int { - return xxx_messageInfo_ValidatorList.Size(m) -} -func (m *ValidatorList) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorList.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorList proto.InternalMessageInfo - -func (m *ValidatorList) GetBlockHeight() uint64 { - if m != nil { - return m.BlockHeight - } - return 0 -} - -func (m *ValidatorList) GetBondedValidators() []*Validator { - if m != nil { - return m.BondedValidators - } - return nil -} - -func (m *ValidatorList) GetUnbondingValidators() []*Validator { - if m != nil { - return m.UnbondingValidators - } - return nil -} - -type StorageItem struct { - Key []byte `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=Value,proto3" json:"Value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *StorageItem) Reset() { *m = StorageItem{} } -func (m *StorageItem) String() string { return proto.CompactTextString(m) } -func (*StorageItem) ProtoMessage() {} -func (*StorageItem) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{17} -} -func (m *StorageItem) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StorageItem.Unmarshal(m, b) -} -func (m *StorageItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StorageItem.Marshal(b, m, deterministic) -} -func (dst *StorageItem) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageItem.Merge(dst, src) -} -func (m *StorageItem) XXX_Size() int { - return xxx_messageInfo_StorageItem.Size(m) -} -func (m *StorageItem) XXX_DiscardUnknown() { - xxx_messageInfo_StorageItem.DiscardUnknown(m) -} - -var xxx_messageInfo_StorageItem proto.InternalMessageInfo - -func (m *StorageItem) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *StorageItem) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -type StorageDump struct { - StorageRoot []byte `protobuf:"bytes,1,opt,name=StorageRoot,proto3" json:"StorageRoot,omitempty"` - StorageItems []*StorageItem `protobuf:"bytes,2,rep,name=StorageItems,proto3" json:"StorageItems,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *StorageDump) Reset() { *m = StorageDump{} } -func (m *StorageDump) String() string { return proto.CompactTextString(m) } -func (*StorageDump) ProtoMessage() {} -func (*StorageDump) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{18} -} -func (m *StorageDump) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StorageDump.Unmarshal(m, b) -} -func (m *StorageDump) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StorageDump.Marshal(b, m, deterministic) -} -func (dst *StorageDump) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageDump.Merge(dst, src) -} -func (m *StorageDump) XXX_Size() int { - return xxx_messageInfo_StorageDump.Size(m) -} -func (m *StorageDump) XXX_DiscardUnknown() { - xxx_messageInfo_StorageDump.DiscardUnknown(m) -} - -var xxx_messageInfo_StorageDump proto.InternalMessageInfo - -func (m *StorageDump) GetStorageRoot() []byte { - if m != nil { - return m.StorageRoot - } - return nil -} - -func (m *StorageDump) GetStorageItems() []*StorageItem { - if m != nil { - return m.StorageItems - } - return nil -} - -// Params -type HeightParam struct { - Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *HeightParam) Reset() { *m = HeightParam{} } -func (m *HeightParam) String() string { return proto.CompactTextString(m) } -func (*HeightParam) ProtoMessage() {} -func (*HeightParam) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{19} -} -func (m *HeightParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HeightParam.Unmarshal(m, b) -} -func (m *HeightParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HeightParam.Marshal(b, m, deterministic) -} -func (dst *HeightParam) XXX_Merge(src proto.Message) { - xxx_messageInfo_HeightParam.Merge(dst, src) -} -func (m *HeightParam) XXX_Size() int { - return xxx_messageInfo_HeightParam.Size(m) -} -func (m *HeightParam) XXX_DiscardUnknown() { - xxx_messageInfo_HeightParam.DiscardUnknown(m) -} - -var xxx_messageInfo_HeightParam proto.InternalMessageInfo - -func (m *HeightParam) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -type BlocksParam struct { - MinHeight uint64 `protobuf:"varint,1,opt,name=minHeight,proto3" json:"minHeight,omitempty"` - MaxHeight uint64 `protobuf:"varint,2,opt,name=maxHeight,proto3" json:"maxHeight,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BlocksParam) Reset() { *m = BlocksParam{} } -func (m *BlocksParam) String() string { return proto.CompactTextString(m) } -func (*BlocksParam) ProtoMessage() {} -func (*BlocksParam) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{20} -} -func (m *BlocksParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BlocksParam.Unmarshal(m, b) -} -func (m *BlocksParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BlocksParam.Marshal(b, m, deterministic) -} -func (dst *BlocksParam) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlocksParam.Merge(dst, src) -} -func (m *BlocksParam) XXX_Size() int { - return xxx_messageInfo_BlocksParam.Size(m) -} -func (m *BlocksParam) XXX_DiscardUnknown() { - xxx_messageInfo_BlocksParam.DiscardUnknown(m) -} - -var xxx_messageInfo_BlocksParam proto.InternalMessageInfo - -func (m *BlocksParam) GetMinHeight() uint64 { - if m != nil { - return m.MinHeight - } - return 0 -} - -func (m *BlocksParam) GetMaxHeight() uint64 { - if m != nil { - return m.MaxHeight - } - return 0 -} - -// Results -type Header struct { - ChainID string `protobuf:"bytes,1,opt,name=ChainID,proto3" json:"ChainID,omitempty"` - Height int64 `protobuf:"varint,2,opt,name=Height,proto3" json:"Height,omitempty"` - Time int64 `protobuf:"varint,3,opt,name=Time,proto3" json:"Time,omitempty"` - NumTxs int64 `protobuf:"varint,4,opt,name=NumTxs,proto3" json:"NumTxs,omitempty"` - LastBlockID []byte `protobuf:"bytes,5,opt,name=LastBlockID,proto3" json:"LastBlockID,omitempty"` - LastCommitHash []byte `protobuf:"bytes,6,opt,name=LastCommitHash,proto3" json:"LastCommitHash,omitempty"` - DataHash []byte `protobuf:"bytes,7,opt,name=DataHash,proto3" json:"DataHash,omitempty"` - ValidatorsHash []byte `protobuf:"bytes,8,opt,name=ValidatorsHash,proto3" json:"ValidatorsHash,omitempty"` - AppHash []byte `protobuf:"bytes,9,opt,name=AppHash,proto3" json:"AppHash,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Header) Reset() { *m = Header{} } -func (m *Header) String() string { return proto.CompactTextString(m) } -func (*Header) ProtoMessage() {} -func (*Header) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{21} -} -func (m *Header) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Header.Unmarshal(m, b) -} -func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Header.Marshal(b, m, deterministic) -} -func (dst *Header) XXX_Merge(src proto.Message) { - xxx_messageInfo_Header.Merge(dst, src) -} -func (m *Header) XXX_Size() int { - return xxx_messageInfo_Header.Size(m) -} -func (m *Header) XXX_DiscardUnknown() { - xxx_messageInfo_Header.DiscardUnknown(m) -} - -var xxx_messageInfo_Header proto.InternalMessageInfo - -func (m *Header) GetChainID() string { - if m != nil { - return m.ChainID - } - return "" -} - -func (m *Header) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *Header) GetTime() int64 { - if m != nil { - return m.Time - } - return 0 -} - -func (m *Header) GetNumTxs() int64 { - if m != nil { - return m.NumTxs - } - return 0 -} - -func (m *Header) GetLastBlockID() []byte { - if m != nil { - return m.LastBlockID - } - return nil -} - -func (m *Header) GetLastCommitHash() []byte { - if m != nil { - return m.LastCommitHash - } - return nil -} - -func (m *Header) GetDataHash() []byte { - if m != nil { - return m.DataHash - } - return nil -} - -func (m *Header) GetValidatorsHash() []byte { - if m != nil { - return m.ValidatorsHash - } - return nil -} - -func (m *Header) GetAppHash() []byte { - if m != nil { - return m.AppHash - } - return nil -} - -type Data struct { - Txs [][]byte `protobuf:"bytes,1,rep,name=Txs,proto3" json:"Txs,omitempty"` - Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Data) Reset() { *m = Data{} } -func (m *Data) String() string { return proto.CompactTextString(m) } -func (*Data) ProtoMessage() {} -func (*Data) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{22} -} -func (m *Data) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Data.Unmarshal(m, b) -} -func (m *Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Data.Marshal(b, m, deterministic) -} -func (dst *Data) XXX_Merge(src proto.Message) { - xxx_messageInfo_Data.Merge(dst, src) -} -func (m *Data) XXX_Size() int { - return xxx_messageInfo_Data.Size(m) -} -func (m *Data) XXX_DiscardUnknown() { - xxx_messageInfo_Data.DiscardUnknown(m) -} - -var xxx_messageInfo_Data proto.InternalMessageInfo - -func (m *Data) GetTxs() [][]byte { - if m != nil { - return m.Txs - } - return nil -} - -func (m *Data) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -type Block struct { - BlockID []byte `protobuf:"bytes,1,opt,name=BlockID,proto3" json:"BlockID,omitempty"` - Header *Header `protobuf:"bytes,2,opt,name=Header,proto3" json:"Header,omitempty"` - Data *Data `protobuf:"bytes,3,opt,name=Data,proto3" json:"Data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Block) Reset() { *m = Block{} } -func (m *Block) String() string { return proto.CompactTextString(m) } -func (*Block) ProtoMessage() {} -func (*Block) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{23} -} -func (m *Block) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Block.Unmarshal(m, b) -} -func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Block.Marshal(b, m, deterministic) -} -func (dst *Block) XXX_Merge(src proto.Message) { - xxx_messageInfo_Block.Merge(dst, src) -} -func (m *Block) XXX_Size() int { - return xxx_messageInfo_Block.Size(m) -} -func (m *Block) XXX_DiscardUnknown() { - xxx_messageInfo_Block.DiscardUnknown(m) -} - -var xxx_messageInfo_Block proto.InternalMessageInfo - -func (m *Block) GetBlockID() []byte { - if m != nil { - return m.BlockID - } - return nil -} - -func (m *Block) GetHeader() *Header { - if m != nil { - return m.Header - } - return nil -} - -func (m *Block) GetData() *Data { - if m != nil { - return m.Data - } - return nil -} - -type BlockMeta struct { - BlockID []byte `protobuf:"bytes,1,opt,name=BlockID,proto3" json:"BlockID,omitempty"` - Header *Header `protobuf:"bytes,2,opt,name=Header,proto3" json:"Header,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BlockMeta) Reset() { *m = BlockMeta{} } -func (m *BlockMeta) String() string { return proto.CompactTextString(m) } -func (*BlockMeta) ProtoMessage() {} -func (*BlockMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{24} -} -func (m *BlockMeta) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BlockMeta.Unmarshal(m, b) -} -func (m *BlockMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BlockMeta.Marshal(b, m, deterministic) -} -func (dst *BlockMeta) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockMeta.Merge(dst, src) -} -func (m *BlockMeta) XXX_Size() int { - return xxx_messageInfo_BlockMeta.Size(m) -} -func (m *BlockMeta) XXX_DiscardUnknown() { - xxx_messageInfo_BlockMeta.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockMeta proto.InternalMessageInfo - -func (m *BlockMeta) GetBlockID() []byte { - if m != nil { - return m.BlockID - } - return nil -} - -func (m *BlockMeta) GetHeader() *Header { - if m != nil { - return m.Header - } - return nil -} - -type BlockList struct { - LastHeight uint64 `protobuf:"varint,1,opt,name=LastHeight,proto3" json:"LastHeight,omitempty"` - BlockMetas []*BlockMeta `protobuf:"bytes,2,rep,name=BlockMetas,proto3" json:"BlockMetas,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BlockList) Reset() { *m = BlockList{} } -func (m *BlockList) String() string { return proto.CompactTextString(m) } -func (*BlockList) ProtoMessage() {} -func (*BlockList) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{25} -} -func (m *BlockList) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BlockList.Unmarshal(m, b) -} -func (m *BlockList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BlockList.Marshal(b, m, deterministic) -} -func (dst *BlockList) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockList.Merge(dst, src) -} -func (m *BlockList) XXX_Size() int { - return xxx_messageInfo_BlockList.Size(m) -} -func (m *BlockList) XXX_DiscardUnknown() { - xxx_messageInfo_BlockList.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockList proto.InternalMessageInfo - -func (m *BlockList) GetLastHeight() uint64 { - if m != nil { - return m.LastHeight - } - return 0 -} - -func (m *BlockList) GetBlockMetas() []*BlockMeta { - if m != nil { - return m.BlockMetas - } - return nil -} - -type ChainId struct { - ChainName string `protobuf:"bytes,1,opt,name=ChainName,proto3" json:"ChainName,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=ChainId,proto3" json:"ChainId,omitempty"` - GenesisHash []byte `protobuf:"bytes,3,opt,name=GenesisHash,proto3" json:"GenesisHash,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ChainId) Reset() { *m = ChainId{} } -func (m *ChainId) String() string { return proto.CompactTextString(m) } -func (*ChainId) ProtoMessage() {} -func (*ChainId) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{26} -} -func (m *ChainId) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ChainId.Unmarshal(m, b) -} -func (m *ChainId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ChainId.Marshal(b, m, deterministic) -} -func (dst *ChainId) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChainId.Merge(dst, src) -} -func (m *ChainId) XXX_Size() int { - return xxx_messageInfo_ChainId.Size(m) -} -func (m *ChainId) XXX_DiscardUnknown() { - xxx_messageInfo_ChainId.DiscardUnknown(m) -} - -var xxx_messageInfo_ChainId proto.InternalMessageInfo - -func (m *ChainId) GetChainName() string { - if m != nil { - return m.ChainName - } - return "" -} - -func (m *ChainId) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -func (m *ChainId) GetGenesisHash() []byte { - if m != nil { - return m.GenesisHash - } - return nil -} - -type GenesisDoc struct { - GenesisTime uint64 `protobuf:"varint,1,opt,name=GenesisTime,proto3" json:"GenesisTime,omitempty"` - ChainName string `protobuf:"bytes,2,opt,name=ChainName,proto3" json:"ChainName,omitempty"` - Salt []byte `protobuf:"bytes,3,opt,name=Salt,proto3" json:"Salt,omitempty"` - GlobalPermissions uint64 `protobuf:"varint,4,opt,name=GlobalPermissions,proto3" json:"GlobalPermissions,omitempty"` - Accounts []*GenesisDoc_GenesisAccount `protobuf:"bytes,5,rep,name=Accounts,proto3" json:"Accounts,omitempty"` - Validators []*GenesisDoc_GenesisValidator `protobuf:"bytes,6,rep,name=Validators,proto3" json:"Validators,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GenesisDoc) Reset() { *m = GenesisDoc{} } -func (m *GenesisDoc) String() string { return proto.CompactTextString(m) } -func (*GenesisDoc) ProtoMessage() {} -func (*GenesisDoc) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{27} -} -func (m *GenesisDoc) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GenesisDoc.Unmarshal(m, b) -} -func (m *GenesisDoc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GenesisDoc.Marshal(b, m, deterministic) -} -func (dst *GenesisDoc) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisDoc.Merge(dst, src) -} -func (m *GenesisDoc) XXX_Size() int { - return xxx_messageInfo_GenesisDoc.Size(m) -} -func (m *GenesisDoc) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisDoc.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisDoc proto.InternalMessageInfo - -func (m *GenesisDoc) GetGenesisTime() uint64 { - if m != nil { - return m.GenesisTime - } - return 0 -} - -func (m *GenesisDoc) GetChainName() string { - if m != nil { - return m.ChainName - } - return "" -} - -func (m *GenesisDoc) GetSalt() []byte { - if m != nil { - return m.Salt - } - return nil -} - -func (m *GenesisDoc) GetGlobalPermissions() uint64 { - if m != nil { - return m.GlobalPermissions - } - return 0 -} - -func (m *GenesisDoc) GetAccounts() []*GenesisDoc_GenesisAccount { - if m != nil { - return m.Accounts - } - return nil -} - -func (m *GenesisDoc) GetValidators() []*GenesisDoc_GenesisValidator { - if m != nil { - return m.Validators - } - return nil -} - -type GenesisDoc_GenesisAccount struct { - Address []byte `protobuf:"bytes,1,opt,name=Address,proto3" json:"Address,omitempty"` - PublicKey []byte `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"` - Amount uint64 `protobuf:"varint,3,opt,name=Amount,proto3" json:"Amount,omitempty"` - Name string `protobuf:"bytes,4,opt,name=Name,proto3" json:"Name,omitempty"` - Permissions *AccountPermissions `protobuf:"bytes,5,opt,name=Permissions,proto3" json:"Permissions,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GenesisDoc_GenesisAccount) Reset() { *m = GenesisDoc_GenesisAccount{} } -func (m *GenesisDoc_GenesisAccount) String() string { return proto.CompactTextString(m) } -func (*GenesisDoc_GenesisAccount) ProtoMessage() {} -func (*GenesisDoc_GenesisAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{27, 0} -} -func (m *GenesisDoc_GenesisAccount) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GenesisDoc_GenesisAccount.Unmarshal(m, b) -} -func (m *GenesisDoc_GenesisAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GenesisDoc_GenesisAccount.Marshal(b, m, deterministic) -} -func (dst *GenesisDoc_GenesisAccount) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisDoc_GenesisAccount.Merge(dst, src) -} -func (m *GenesisDoc_GenesisAccount) XXX_Size() int { - return xxx_messageInfo_GenesisDoc_GenesisAccount.Size(m) -} -func (m *GenesisDoc_GenesisAccount) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisDoc_GenesisAccount.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisDoc_GenesisAccount proto.InternalMessageInfo - -func (m *GenesisDoc_GenesisAccount) GetAddress() []byte { - if m != nil { - return m.Address - } - return nil -} - -func (m *GenesisDoc_GenesisAccount) GetPublicKey() []byte { - if m != nil { - return m.PublicKey - } - return nil -} - -func (m *GenesisDoc_GenesisAccount) GetAmount() uint64 { - if m != nil { - return m.Amount - } - return 0 -} - -func (m *GenesisDoc_GenesisAccount) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *GenesisDoc_GenesisAccount) GetPermissions() *AccountPermissions { - if m != nil { - return m.Permissions - } - return nil -} - -type GenesisDoc_GenesisValidator struct { - Address []byte `protobuf:"bytes,1,opt,name=Address,proto3" json:"Address,omitempty"` - PublicKey []byte `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"` - Amount uint64 `protobuf:"varint,3,opt,name=Amount,proto3" json:"Amount,omitempty"` - Name string `protobuf:"bytes,4,opt,name=Name,proto3" json:"Name,omitempty"` - UnbondTo [][]byte `protobuf:"bytes,5,rep,name=UnbondTo,proto3" json:"UnbondTo,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GenesisDoc_GenesisValidator) Reset() { *m = GenesisDoc_GenesisValidator{} } -func (m *GenesisDoc_GenesisValidator) String() string { return proto.CompactTextString(m) } -func (*GenesisDoc_GenesisValidator) ProtoMessage() {} -func (*GenesisDoc_GenesisValidator) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{27, 1} -} -func (m *GenesisDoc_GenesisValidator) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GenesisDoc_GenesisValidator.Unmarshal(m, b) -} -func (m *GenesisDoc_GenesisValidator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GenesisDoc_GenesisValidator.Marshal(b, m, deterministic) -} -func (dst *GenesisDoc_GenesisValidator) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisDoc_GenesisValidator.Merge(dst, src) -} -func (m *GenesisDoc_GenesisValidator) XXX_Size() int { - return xxx_messageInfo_GenesisDoc_GenesisValidator.Size(m) -} -func (m *GenesisDoc_GenesisValidator) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisDoc_GenesisValidator.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisDoc_GenesisValidator proto.InternalMessageInfo - -func (m *GenesisDoc_GenesisValidator) GetAddress() []byte { - if m != nil { - return m.Address - } - return nil -} - -func (m *GenesisDoc_GenesisValidator) GetPublicKey() []byte { - if m != nil { - return m.PublicKey - } - return nil -} - -func (m *GenesisDoc_GenesisValidator) GetAmount() uint64 { - if m != nil { - return m.Amount - } - return 0 -} - -func (m *GenesisDoc_GenesisValidator) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *GenesisDoc_GenesisValidator) GetUnbondTo() [][]byte { - if m != nil { - return m.UnbondTo - } - return nil -} - -type UnconfirmedTxList struct { - NumTxs uint64 `protobuf:"varint,1,opt,name=NumTxs,proto3" json:"NumTxs,omitempty"` - Txs [][]byte `protobuf:"bytes,2,rep,name=Txs,proto3" json:"Txs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UnconfirmedTxList) Reset() { *m = UnconfirmedTxList{} } -func (m *UnconfirmedTxList) String() string { return proto.CompactTextString(m) } -func (*UnconfirmedTxList) ProtoMessage() {} -func (*UnconfirmedTxList) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{28} -} -func (m *UnconfirmedTxList) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UnconfirmedTxList.Unmarshal(m, b) -} -func (m *UnconfirmedTxList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UnconfirmedTxList.Marshal(b, m, deterministic) -} -func (dst *UnconfirmedTxList) XXX_Merge(src proto.Message) { - xxx_messageInfo_UnconfirmedTxList.Merge(dst, src) -} -func (m *UnconfirmedTxList) XXX_Size() int { - return xxx_messageInfo_UnconfirmedTxList.Size(m) -} -func (m *UnconfirmedTxList) XXX_DiscardUnknown() { - xxx_messageInfo_UnconfirmedTxList.DiscardUnknown(m) -} - -var xxx_messageInfo_UnconfirmedTxList proto.InternalMessageInfo - -func (m *UnconfirmedTxList) GetNumTxs() uint64 { - if m != nil { - return m.NumTxs - } - return 0 -} - -func (m *UnconfirmedTxList) GetTxs() [][]byte { - if m != nil { - return m.Txs - } - return nil -} - -type Status struct { - NodeInfo *NodeInfo `protobuf:"bytes,1,opt,name=NodeInfo,proto3" json:"NodeInfo,omitempty"` - GenesisHash []byte `protobuf:"bytes,2,opt,name=GenesisHash,proto3" json:"GenesisHash,omitempty"` - PublicKey []byte `protobuf:"bytes,3,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"` - LatestBlockHash []byte `protobuf:"bytes,4,opt,name=LatestBlockHash,proto3" json:"LatestBlockHash,omitempty"` - LatestBlockHeight uint64 `protobuf:"varint,5,opt,name=LatestBlockHeight,proto3" json:"LatestBlockHeight,omitempty"` - LatestBlockTime int64 `protobuf:"varint,6,opt,name=LatestBlockTime,proto3" json:"LatestBlockTime,omitempty"` - NodeVersion string `protobuf:"bytes,7,opt,name=NodeVersion,proto3" json:"NodeVersion,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Status) Reset() { *m = Status{} } -func (m *Status) String() string { return proto.CompactTextString(m) } -func (*Status) ProtoMessage() {} -func (*Status) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{29} -} -func (m *Status) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Status.Unmarshal(m, b) -} -func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Status.Marshal(b, m, deterministic) -} -func (dst *Status) XXX_Merge(src proto.Message) { - xxx_messageInfo_Status.Merge(dst, src) -} -func (m *Status) XXX_Size() int { - return xxx_messageInfo_Status.Size(m) -} -func (m *Status) XXX_DiscardUnknown() { - xxx_messageInfo_Status.DiscardUnknown(m) -} - -var xxx_messageInfo_Status proto.InternalMessageInfo - -func (m *Status) GetNodeInfo() *NodeInfo { - if m != nil { - return m.NodeInfo - } - return nil -} - -func (m *Status) GetGenesisHash() []byte { - if m != nil { - return m.GenesisHash - } - return nil -} - -func (m *Status) GetPublicKey() []byte { - if m != nil { - return m.PublicKey - } - return nil -} - -func (m *Status) GetLatestBlockHash() []byte { - if m != nil { - return m.LatestBlockHash - } - return nil -} - -func (m *Status) GetLatestBlockHeight() uint64 { - if m != nil { - return m.LatestBlockHeight - } - return 0 -} - -func (m *Status) GetLatestBlockTime() int64 { - if m != nil { - return m.LatestBlockTime - } - return 0 -} - -func (m *Status) GetNodeVersion() string { - if m != nil { - return m.NodeVersion - } - return "" -} - -// These are used for get consensus state. There is a lot of information that could be included -// We should decided what the minimum we want inccluded is. -type RoundState struct { - Height int64 `protobuf:"varint,1,opt,name=Height,proto3" json:"Height,omitempty"` - Round int64 `protobuf:"varint,2,opt,name=Round,proto3" json:"Round,omitempty"` - Step int64 `protobuf:"varint,3,opt,name=Step,proto3" json:"Step,omitempty"` - StartTime uint64 `protobuf:"varint,4,opt,name=StartTime,proto3" json:"StartTime,omitempty"` - CommitTime uint64 `protobuf:"varint,5,opt,name=CommitTime,proto3" json:"CommitTime,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RoundState) Reset() { *m = RoundState{} } -func (m *RoundState) String() string { return proto.CompactTextString(m) } -func (*RoundState) ProtoMessage() {} -func (*RoundState) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{30} -} -func (m *RoundState) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RoundState.Unmarshal(m, b) -} -func (m *RoundState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RoundState.Marshal(b, m, deterministic) -} -func (dst *RoundState) XXX_Merge(src proto.Message) { - xxx_messageInfo_RoundState.Merge(dst, src) -} -func (m *RoundState) XXX_Size() int { - return xxx_messageInfo_RoundState.Size(m) -} -func (m *RoundState) XXX_DiscardUnknown() { - xxx_messageInfo_RoundState.DiscardUnknown(m) -} - -var xxx_messageInfo_RoundState proto.InternalMessageInfo - -func (m *RoundState) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *RoundState) GetRound() int64 { - if m != nil { - return m.Round - } - return 0 -} - -func (m *RoundState) GetStep() int64 { - if m != nil { - return m.Step - } - return 0 -} - -func (m *RoundState) GetStartTime() uint64 { - if m != nil { - return m.StartTime - } - return 0 -} - -func (m *RoundState) GetCommitTime() uint64 { - if m != nil { - return m.CommitTime - } - return 0 -} - -type PeerRoundState struct { - Height int64 `protobuf:"varint,1,opt,name=Height,proto3" json:"Height,omitempty"` - Round int64 `protobuf:"varint,2,opt,name=Round,proto3" json:"Round,omitempty"` - Step int64 `protobuf:"varint,3,opt,name=Step,proto3" json:"Step,omitempty"` - StartTime uint64 `protobuf:"varint,4,opt,name=StartTime,proto3" json:"StartTime,omitempty"` - Proposal bool `protobuf:"varint,5,opt,name=Proposal,proto3" json:"Proposal,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PeerRoundState) Reset() { *m = PeerRoundState{} } -func (m *PeerRoundState) String() string { return proto.CompactTextString(m) } -func (*PeerRoundState) ProtoMessage() {} -func (*PeerRoundState) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{31} -} -func (m *PeerRoundState) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PeerRoundState.Unmarshal(m, b) -} -func (m *PeerRoundState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PeerRoundState.Marshal(b, m, deterministic) -} -func (dst *PeerRoundState) XXX_Merge(src proto.Message) { - xxx_messageInfo_PeerRoundState.Merge(dst, src) -} -func (m *PeerRoundState) XXX_Size() int { - return xxx_messageInfo_PeerRoundState.Size(m) -} -func (m *PeerRoundState) XXX_DiscardUnknown() { - xxx_messageInfo_PeerRoundState.DiscardUnknown(m) -} - -var xxx_messageInfo_PeerRoundState proto.InternalMessageInfo - -func (m *PeerRoundState) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *PeerRoundState) GetRound() int64 { - if m != nil { - return m.Round - } - return 0 -} - -func (m *PeerRoundState) GetStep() int64 { - if m != nil { - return m.Step - } - return 0 -} - -func (m *PeerRoundState) GetStartTime() uint64 { - if m != nil { - return m.StartTime - } - return 0 -} - -func (m *PeerRoundState) GetProposal() bool { - if m != nil { - return m.Proposal - } - return false -} - -type ConsensusState struct { - RoundState *RoundState `protobuf:"bytes,1,opt,name=RoundState,proto3" json:"RoundState,omitempty"` - PeerRoundStates []*PeerRoundState `protobuf:"bytes,2,rep,name=PeerRoundStates,proto3" json:"PeerRoundStates,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ConsensusState) Reset() { *m = ConsensusState{} } -func (m *ConsensusState) String() string { return proto.CompactTextString(m) } -func (*ConsensusState) ProtoMessage() {} -func (*ConsensusState) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{32} -} -func (m *ConsensusState) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ConsensusState.Unmarshal(m, b) -} -func (m *ConsensusState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ConsensusState.Marshal(b, m, deterministic) -} -func (dst *ConsensusState) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConsensusState.Merge(dst, src) -} -func (m *ConsensusState) XXX_Size() int { - return xxx_messageInfo_ConsensusState.Size(m) -} -func (m *ConsensusState) XXX_DiscardUnknown() { - xxx_messageInfo_ConsensusState.DiscardUnknown(m) -} - -var xxx_messageInfo_ConsensusState proto.InternalMessageInfo - -func (m *ConsensusState) GetRoundState() *RoundState { - if m != nil { - return m.RoundState - } - return nil -} - -func (m *ConsensusState) GetPeerRoundStates() []*PeerRoundState { - if m != nil { - return m.PeerRoundStates - } - return nil -} - -// Params -type EventIdParam struct { - EventId string `protobuf:"bytes,1,opt,name=eventId,proto3" json:"eventId,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *EventIdParam) Reset() { *m = EventIdParam{} } -func (m *EventIdParam) String() string { return proto.CompactTextString(m) } -func (*EventIdParam) ProtoMessage() {} -func (*EventIdParam) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{33} -} -func (m *EventIdParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EventIdParam.Unmarshal(m, b) -} -func (m *EventIdParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EventIdParam.Marshal(b, m, deterministic) -} -func (dst *EventIdParam) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventIdParam.Merge(dst, src) -} -func (m *EventIdParam) XXX_Size() int { - return xxx_messageInfo_EventIdParam.Size(m) -} -func (m *EventIdParam) XXX_DiscardUnknown() { - xxx_messageInfo_EventIdParam.DiscardUnknown(m) -} - -var xxx_messageInfo_EventIdParam proto.InternalMessageInfo - -func (m *EventIdParam) GetEventId() string { - if m != nil { - return m.EventId - } - return "" -} - -type SubIdParam struct { - SubId string `protobuf:"bytes,1,opt,name=subId,proto3" json:"subId,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SubIdParam) Reset() { *m = SubIdParam{} } -func (m *SubIdParam) String() string { return proto.CompactTextString(m) } -func (*SubIdParam) ProtoMessage() {} -func (*SubIdParam) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{34} -} -func (m *SubIdParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SubIdParam.Unmarshal(m, b) -} -func (m *SubIdParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SubIdParam.Marshal(b, m, deterministic) -} -func (dst *SubIdParam) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubIdParam.Merge(dst, src) -} -func (m *SubIdParam) XXX_Size() int { - return xxx_messageInfo_SubIdParam.Size(m) -} -func (m *SubIdParam) XXX_DiscardUnknown() { - xxx_messageInfo_SubIdParam.DiscardUnknown(m) -} - -var xxx_messageInfo_SubIdParam proto.InternalMessageInfo - -func (m *SubIdParam) GetSubId() string { - if m != nil { - return m.SubId - } - return "" -} - -// Results -type EventUnSub struct { - Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *EventUnSub) Reset() { *m = EventUnSub{} } -func (m *EventUnSub) String() string { return proto.CompactTextString(m) } -func (*EventUnSub) ProtoMessage() {} -func (*EventUnSub) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{35} -} -func (m *EventUnSub) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EventUnSub.Unmarshal(m, b) -} -func (m *EventUnSub) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EventUnSub.Marshal(b, m, deterministic) -} -func (dst *EventUnSub) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventUnSub.Merge(dst, src) -} -func (m *EventUnSub) XXX_Size() int { - return xxx_messageInfo_EventUnSub.Size(m) -} -func (m *EventUnSub) XXX_DiscardUnknown() { - xxx_messageInfo_EventUnSub.DiscardUnknown(m) -} - -var xxx_messageInfo_EventUnSub proto.InternalMessageInfo - -func (m *EventUnSub) GetResult() bool { - if m != nil { - return m.Result - } - return false -} - -type EventDataLog struct { - Address []byte `protobuf:"bytes,1,opt,name=Address,proto3" json:"Address,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=Data,proto3" json:"Data,omitempty"` - Height uint64 `protobuf:"varint,3,opt,name=Height,proto3" json:"Height,omitempty"` - Topics []string `protobuf:"bytes,4,rep,name=Topics,proto3" json:"Topics,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *EventDataLog) Reset() { *m = EventDataLog{} } -func (m *EventDataLog) String() string { return proto.CompactTextString(m) } -func (*EventDataLog) ProtoMessage() {} -func (*EventDataLog) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{36} -} -func (m *EventDataLog) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EventDataLog.Unmarshal(m, b) -} -func (m *EventDataLog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EventDataLog.Marshal(b, m, deterministic) -} -func (dst *EventDataLog) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventDataLog.Merge(dst, src) -} -func (m *EventDataLog) XXX_Size() int { - return xxx_messageInfo_EventDataLog.Size(m) -} -func (m *EventDataLog) XXX_DiscardUnknown() { - xxx_messageInfo_EventDataLog.DiscardUnknown(m) -} - -var xxx_messageInfo_EventDataLog proto.InternalMessageInfo - -func (m *EventDataLog) GetAddress() []byte { - if m != nil { - return m.Address - } - return nil -} - -func (m *EventDataLog) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -func (m *EventDataLog) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *EventDataLog) GetTopics() []string { - if m != nil { - return m.Topics - } - return nil -} - -type EventDataTx struct { - Tx []byte `protobuf:"bytes,1,opt,name=Tx,proto3" json:"Tx,omitempty"` - Return []byte `protobuf:"bytes,2,opt,name=Return,proto3" json:"Return,omitempty"` - Exception string `protobuf:"bytes,3,opt,name=Exception,proto3" json:"Exception,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *EventDataTx) Reset() { *m = EventDataTx{} } -func (m *EventDataTx) String() string { return proto.CompactTextString(m) } -func (*EventDataTx) ProtoMessage() {} -func (*EventDataTx) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{37} -} -func (m *EventDataTx) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EventDataTx.Unmarshal(m, b) -} -func (m *EventDataTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EventDataTx.Marshal(b, m, deterministic) -} -func (dst *EventDataTx) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventDataTx.Merge(dst, src) -} -func (m *EventDataTx) XXX_Size() int { - return xxx_messageInfo_EventDataTx.Size(m) -} -func (m *EventDataTx) XXX_DiscardUnknown() { - xxx_messageInfo_EventDataTx.DiscardUnknown(m) -} - -var xxx_messageInfo_EventDataTx proto.InternalMessageInfo - -func (m *EventDataTx) GetTx() []byte { - if m != nil { - return m.Tx - } - return nil -} - -func (m *EventDataTx) GetReturn() []byte { - if m != nil { - return m.Return - } - return nil -} - -func (m *EventDataTx) GetException() string { - if m != nil { - return m.Exception - } - return "" -} - -type Event struct { - Event string `protobuf:"bytes,1,opt,name=Event,proto3" json:"Event,omitempty"` - EventDataTx *EventDataTx `protobuf:"bytes,2,opt,name=EventDataTx,proto3" json:"EventDataTx,omitempty"` - EventDataCall *EventDataCall `protobuf:"bytes,3,opt,name=EventDataCall,proto3" json:"EventDataCall,omitempty"` - EventDataLog *EventDataLog `protobuf:"bytes,4,opt,name=EventDataLog,proto3" json:"EventDataLog,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Event) Reset() { *m = Event{} } -func (m *Event) String() string { return proto.CompactTextString(m) } -func (*Event) ProtoMessage() {} -func (*Event) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{38} -} -func (m *Event) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Event.Unmarshal(m, b) -} -func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Event.Marshal(b, m, deterministic) -} -func (dst *Event) XXX_Merge(src proto.Message) { - xxx_messageInfo_Event.Merge(dst, src) -} -func (m *Event) XXX_Size() int { - return xxx_messageInfo_Event.Size(m) -} -func (m *Event) XXX_DiscardUnknown() { - xxx_messageInfo_Event.DiscardUnknown(m) -} - -var xxx_messageInfo_Event proto.InternalMessageInfo - -func (m *Event) GetEvent() string { - if m != nil { - return m.Event - } - return "" -} - -func (m *Event) GetEventDataTx() *EventDataTx { - if m != nil { - return m.EventDataTx - } - return nil -} - -func (m *Event) GetEventDataCall() *EventDataCall { - if m != nil { - return m.EventDataCall - } - return nil -} - -func (m *Event) GetEventDataLog() *EventDataLog { - if m != nil { - return m.EventDataLog - } - return nil -} - -type PollResponse struct { - Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PollResponse) Reset() { *m = PollResponse{} } -func (m *PollResponse) String() string { return proto.CompactTextString(m) } -func (*PollResponse) ProtoMessage() {} -func (*PollResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{39} -} -func (m *PollResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PollResponse.Unmarshal(m, b) -} -func (m *PollResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PollResponse.Marshal(b, m, deterministic) -} -func (dst *PollResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PollResponse.Merge(dst, src) -} -func (m *PollResponse) XXX_Size() int { - return xxx_messageInfo_PollResponse.Size(m) -} -func (m *PollResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PollResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_PollResponse proto.InternalMessageInfo - -func (m *PollResponse) GetEvents() []*Event { - if m != nil { - return m.Events - } - return nil -} - -// Params -type NameRegEntryParam struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *NameRegEntryParam) Reset() { *m = NameRegEntryParam{} } -func (m *NameRegEntryParam) String() string { return proto.CompactTextString(m) } -func (*NameRegEntryParam) ProtoMessage() {} -func (*NameRegEntryParam) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{40} -} -func (m *NameRegEntryParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NameRegEntryParam.Unmarshal(m, b) -} -func (m *NameRegEntryParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NameRegEntryParam.Marshal(b, m, deterministic) -} -func (dst *NameRegEntryParam) XXX_Merge(src proto.Message) { - xxx_messageInfo_NameRegEntryParam.Merge(dst, src) -} -func (m *NameRegEntryParam) XXX_Size() int { - return xxx_messageInfo_NameRegEntryParam.Size(m) -} -func (m *NameRegEntryParam) XXX_DiscardUnknown() { - xxx_messageInfo_NameRegEntryParam.DiscardUnknown(m) -} - -var xxx_messageInfo_NameRegEntryParam proto.InternalMessageInfo - -func (m *NameRegEntryParam) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -type TransactNameRegParam struct { - InputAccount *InputAccount `protobuf:"bytes,1,opt,name=inputAccount,proto3" json:"inputAccount,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` - Fee uint64 `protobuf:"varint,4,opt,name=fee,proto3" json:"fee,omitempty"` - Amount uint64 `protobuf:"varint,5,opt,name=amount,proto3" json:"amount,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TransactNameRegParam) Reset() { *m = TransactNameRegParam{} } -func (m *TransactNameRegParam) String() string { return proto.CompactTextString(m) } -func (*TransactNameRegParam) ProtoMessage() {} -func (*TransactNameRegParam) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{41} -} -func (m *TransactNameRegParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TransactNameRegParam.Unmarshal(m, b) -} -func (m *TransactNameRegParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TransactNameRegParam.Marshal(b, m, deterministic) -} -func (dst *TransactNameRegParam) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactNameRegParam.Merge(dst, src) -} -func (m *TransactNameRegParam) XXX_Size() int { - return xxx_messageInfo_TransactNameRegParam.Size(m) -} -func (m *TransactNameRegParam) XXX_DiscardUnknown() { - xxx_messageInfo_TransactNameRegParam.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactNameRegParam proto.InternalMessageInfo - -func (m *TransactNameRegParam) GetInputAccount() *InputAccount { - if m != nil { - return m.InputAccount - } - return nil -} - -func (m *TransactNameRegParam) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *TransactNameRegParam) GetData() string { - if m != nil { - return m.Data - } - return "" -} - -func (m *TransactNameRegParam) GetFee() uint64 { - if m != nil { - return m.Fee - } - return 0 -} - -func (m *TransactNameRegParam) GetAmount() uint64 { - if m != nil { - return m.Amount - } - return 0 -} - -// Results -type NameRegEntry struct { - // registered name for the entry - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` - Owner []byte `protobuf:"bytes,2,opt,name=Owner,proto3" json:"Owner,omitempty"` - Data string `protobuf:"bytes,3,opt,name=Data,proto3" json:"Data,omitempty"` - Expires uint64 `protobuf:"varint,4,opt,name=Expires,proto3" json:"Expires,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *NameRegEntry) Reset() { *m = NameRegEntry{} } -func (m *NameRegEntry) String() string { return proto.CompactTextString(m) } -func (*NameRegEntry) ProtoMessage() {} -func (*NameRegEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{42} -} -func (m *NameRegEntry) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NameRegEntry.Unmarshal(m, b) -} -func (m *NameRegEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NameRegEntry.Marshal(b, m, deterministic) -} -func (dst *NameRegEntry) XXX_Merge(src proto.Message) { - xxx_messageInfo_NameRegEntry.Merge(dst, src) -} -func (m *NameRegEntry) XXX_Size() int { - return xxx_messageInfo_NameRegEntry.Size(m) -} -func (m *NameRegEntry) XXX_DiscardUnknown() { - xxx_messageInfo_NameRegEntry.DiscardUnknown(m) -} - -var xxx_messageInfo_NameRegEntry proto.InternalMessageInfo - -func (m *NameRegEntry) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *NameRegEntry) GetOwner() []byte { - if m != nil { - return m.Owner - } - return nil -} - -func (m *NameRegEntry) GetData() string { - if m != nil { - return m.Data - } - return "" -} - -func (m *NameRegEntry) GetExpires() uint64 { - if m != nil { - return m.Expires - } - return 0 -} - -type NameRegEntryList struct { - BlockHeight uint64 `protobuf:"varint,1,opt,name=BlockHeight,proto3" json:"BlockHeight,omitempty"` - Names []*NameRegEntry `protobuf:"bytes,2,rep,name=Names,proto3" json:"Names,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *NameRegEntryList) Reset() { *m = NameRegEntryList{} } -func (m *NameRegEntryList) String() string { return proto.CompactTextString(m) } -func (*NameRegEntryList) ProtoMessage() {} -func (*NameRegEntryList) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{43} -} -func (m *NameRegEntryList) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NameRegEntryList.Unmarshal(m, b) -} -func (m *NameRegEntryList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NameRegEntryList.Marshal(b, m, deterministic) -} -func (dst *NameRegEntryList) XXX_Merge(src proto.Message) { - xxx_messageInfo_NameRegEntryList.Merge(dst, src) -} -func (m *NameRegEntryList) XXX_Size() int { - return xxx_messageInfo_NameRegEntryList.Size(m) -} -func (m *NameRegEntryList) XXX_DiscardUnknown() { - xxx_messageInfo_NameRegEntryList.DiscardUnknown(m) -} - -var xxx_messageInfo_NameRegEntryList proto.InternalMessageInfo - -func (m *NameRegEntryList) GetBlockHeight() uint64 { - if m != nil { - return m.BlockHeight - } - return 0 -} - -func (m *NameRegEntryList) GetNames() []*NameRegEntry { - if m != nil { - return m.Names - } - return nil -} - -// Params -type PeerParam struct { - Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PeerParam) Reset() { *m = PeerParam{} } -func (m *PeerParam) String() string { return proto.CompactTextString(m) } -func (*PeerParam) ProtoMessage() {} -func (*PeerParam) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{44} -} -func (m *PeerParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PeerParam.Unmarshal(m, b) -} -func (m *PeerParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PeerParam.Marshal(b, m, deterministic) -} -func (dst *PeerParam) XXX_Merge(src proto.Message) { - xxx_messageInfo_PeerParam.Merge(dst, src) -} -func (m *PeerParam) XXX_Size() int { - return xxx_messageInfo_PeerParam.Size(m) -} -func (m *PeerParam) XXX_DiscardUnknown() { - xxx_messageInfo_PeerParam.DiscardUnknown(m) -} - -var xxx_messageInfo_PeerParam proto.InternalMessageInfo - -func (m *PeerParam) GetAddress() []byte { - if m != nil { - return m.Address - } - return nil -} - -// Results -type ClientVersion struct { - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ClientVersion) Reset() { *m = ClientVersion{} } -func (m *ClientVersion) String() string { return proto.CompactTextString(m) } -func (*ClientVersion) ProtoMessage() {} -func (*ClientVersion) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{45} -} -func (m *ClientVersion) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ClientVersion.Unmarshal(m, b) -} -func (m *ClientVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ClientVersion.Marshal(b, m, deterministic) -} -func (dst *ClientVersion) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClientVersion.Merge(dst, src) -} -func (m *ClientVersion) XXX_Size() int { - return xxx_messageInfo_ClientVersion.Size(m) -} -func (m *ClientVersion) XXX_DiscardUnknown() { - xxx_messageInfo_ClientVersion.DiscardUnknown(m) -} - -var xxx_messageInfo_ClientVersion proto.InternalMessageInfo - -func (m *ClientVersion) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -type NodeID struct { - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` - PublicKey []byte `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *NodeID) Reset() { *m = NodeID{} } -func (m *NodeID) String() string { return proto.CompactTextString(m) } -func (*NodeID) ProtoMessage() {} -func (*NodeID) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{46} -} -func (m *NodeID) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NodeID.Unmarshal(m, b) -} -func (m *NodeID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NodeID.Marshal(b, m, deterministic) -} -func (dst *NodeID) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeID.Merge(dst, src) -} -func (m *NodeID) XXX_Size() int { - return xxx_messageInfo_NodeID.Size(m) -} -func (m *NodeID) XXX_DiscardUnknown() { - xxx_messageInfo_NodeID.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeID proto.InternalMessageInfo - -func (m *NodeID) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *NodeID) GetPublicKey() []byte { - if m != nil { - return m.PublicKey - } - return nil -} - -type NodeInfo struct { - ID *NodeID `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` - ListenAddr string `protobuf:"bytes,2,opt,name=ListenAddr,proto3" json:"ListenAddr,omitempty"` - Network string `protobuf:"bytes,3,opt,name=Network,proto3" json:"Network,omitempty"` - Version string `protobuf:"bytes,4,opt,name=Version,proto3" json:"Version,omitempty"` - Channels []byte `protobuf:"bytes,5,opt,name=Channels,proto3" json:"Channels,omitempty"` - Moniker string `protobuf:"bytes,6,opt,name=Moniker,proto3" json:"Moniker,omitempty"` - Other []string `protobuf:"bytes,7,rep,name=Other,proto3" json:"Other,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *NodeInfo) Reset() { *m = NodeInfo{} } -func (m *NodeInfo) String() string { return proto.CompactTextString(m) } -func (*NodeInfo) ProtoMessage() {} -func (*NodeInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{47} -} -func (m *NodeInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NodeInfo.Unmarshal(m, b) -} -func (m *NodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NodeInfo.Marshal(b, m, deterministic) -} -func (dst *NodeInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeInfo.Merge(dst, src) -} -func (m *NodeInfo) XXX_Size() int { - return xxx_messageInfo_NodeInfo.Size(m) -} -func (m *NodeInfo) XXX_DiscardUnknown() { - xxx_messageInfo_NodeInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeInfo proto.InternalMessageInfo - -func (m *NodeInfo) GetID() *NodeID { - if m != nil { - return m.ID - } - return nil -} - -func (m *NodeInfo) GetListenAddr() string { - if m != nil { - return m.ListenAddr - } - return "" -} - -func (m *NodeInfo) GetNetwork() string { - if m != nil { - return m.Network - } - return "" -} - -func (m *NodeInfo) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -func (m *NodeInfo) GetChannels() []byte { - if m != nil { - return m.Channels - } - return nil -} - -func (m *NodeInfo) GetMoniker() string { - if m != nil { - return m.Moniker - } - return "" -} - -func (m *NodeInfo) GetOther() []string { - if m != nil { - return m.Other - } - return nil -} - -type NetworkInfo struct { - Listening bool `protobuf:"varint,1,opt,name=Listening,proto3" json:"Listening,omitempty"` - Listeners []string `protobuf:"bytes,2,rep,name=Listeners,proto3" json:"Listeners,omitempty"` - Peers []*Peer `protobuf:"bytes,3,rep,name=Peers,proto3" json:"Peers,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *NetworkInfo) Reset() { *m = NetworkInfo{} } -func (m *NetworkInfo) String() string { return proto.CompactTextString(m) } -func (*NetworkInfo) ProtoMessage() {} -func (*NetworkInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{48} -} -func (m *NetworkInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NetworkInfo.Unmarshal(m, b) -} -func (m *NetworkInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NetworkInfo.Marshal(b, m, deterministic) -} -func (dst *NetworkInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkInfo.Merge(dst, src) -} -func (m *NetworkInfo) XXX_Size() int { - return xxx_messageInfo_NetworkInfo.Size(m) -} -func (m *NetworkInfo) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_NetworkInfo proto.InternalMessageInfo - -func (m *NetworkInfo) GetListening() bool { - if m != nil { - return m.Listening - } - return false -} - -func (m *NetworkInfo) GetListeners() []string { - if m != nil { - return m.Listeners - } - return nil -} - -func (m *NetworkInfo) GetPeers() []*Peer { - if m != nil { - return m.Peers - } - return nil -} - -type Peer struct { - NodeInfo *NodeInfo `protobuf:"bytes,1,opt,name=NodeInfo,proto3" json:"NodeInfo,omitempty"` - IsOutbound bool `protobuf:"varint,2,opt,name=IsOutbound,proto3" json:"IsOutbound,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Peer) Reset() { *m = Peer{} } -func (m *Peer) String() string { return proto.CompactTextString(m) } -func (*Peer) ProtoMessage() {} -func (*Peer) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{49} -} -func (m *Peer) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Peer.Unmarshal(m, b) -} -func (m *Peer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Peer.Marshal(b, m, deterministic) -} -func (dst *Peer) XXX_Merge(src proto.Message) { - xxx_messageInfo_Peer.Merge(dst, src) -} -func (m *Peer) XXX_Size() int { - return xxx_messageInfo_Peer.Size(m) -} -func (m *Peer) XXX_DiscardUnknown() { - xxx_messageInfo_Peer.DiscardUnknown(m) -} - -var xxx_messageInfo_Peer proto.InternalMessageInfo - -func (m *Peer) GetNodeInfo() *NodeInfo { - if m != nil { - return m.NodeInfo - } - return nil -} - -func (m *Peer) GetIsOutbound() bool { - if m != nil { - return m.IsOutbound - } - return false -} - -type PeerList struct { - Peers []*Peer `protobuf:"bytes,1,rep,name=Peers,proto3" json:"Peers,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PeerList) Reset() { *m = PeerList{} } -func (m *PeerList) String() string { return proto.CompactTextString(m) } -func (*PeerList) ProtoMessage() {} -func (*PeerList) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{50} -} -func (m *PeerList) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PeerList.Unmarshal(m, b) -} -func (m *PeerList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PeerList.Marshal(b, m, deterministic) -} -func (dst *PeerList) XXX_Merge(src proto.Message) { - xxx_messageInfo_PeerList.Merge(dst, src) -} -func (m *PeerList) XXX_Size() int { - return xxx_messageInfo_PeerList.Size(m) -} -func (m *PeerList) XXX_DiscardUnknown() { - xxx_messageInfo_PeerList.DiscardUnknown(m) -} - -var xxx_messageInfo_PeerList proto.InternalMessageInfo - -func (m *PeerList) GetPeers() []*Peer { - if m != nil { - return m.Peers - } - return nil -} - -// Params -type CallParam struct { - From []byte `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` - Address []byte `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CallParam) Reset() { *m = CallParam{} } -func (m *CallParam) String() string { return proto.CompactTextString(m) } -func (*CallParam) ProtoMessage() {} -func (*CallParam) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{51} -} -func (m *CallParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CallParam.Unmarshal(m, b) -} -func (m *CallParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CallParam.Marshal(b, m, deterministic) -} -func (dst *CallParam) XXX_Merge(src proto.Message) { - xxx_messageInfo_CallParam.Merge(dst, src) -} -func (m *CallParam) XXX_Size() int { - return xxx_messageInfo_CallParam.Size(m) -} -func (m *CallParam) XXX_DiscardUnknown() { - xxx_messageInfo_CallParam.DiscardUnknown(m) -} - -var xxx_messageInfo_CallParam proto.InternalMessageInfo - -func (m *CallParam) GetFrom() []byte { - if m != nil { - return m.From - } - return nil -} - -func (m *CallParam) GetAddress() []byte { - if m != nil { - return m.Address - } - return nil -} - -func (m *CallParam) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -type CallCodeParam struct { - From []byte `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` - Code []byte `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` - Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CallCodeParam) Reset() { *m = CallCodeParam{} } -func (m *CallCodeParam) String() string { return proto.CompactTextString(m) } -func (*CallCodeParam) ProtoMessage() {} -func (*CallCodeParam) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{52} -} -func (m *CallCodeParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CallCodeParam.Unmarshal(m, b) -} -func (m *CallCodeParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CallCodeParam.Marshal(b, m, deterministic) -} -func (dst *CallCodeParam) XXX_Merge(src proto.Message) { - xxx_messageInfo_CallCodeParam.Merge(dst, src) -} -func (m *CallCodeParam) XXX_Size() int { - return xxx_messageInfo_CallCodeParam.Size(m) -} -func (m *CallCodeParam) XXX_DiscardUnknown() { - xxx_messageInfo_CallCodeParam.DiscardUnknown(m) -} - -var xxx_messageInfo_CallCodeParam proto.InternalMessageInfo - -func (m *CallCodeParam) GetFrom() []byte { - if m != nil { - return m.From - } - return nil -} - -func (m *CallCodeParam) GetCode() []byte { - if m != nil { - return m.Code - } - return nil -} - -func (m *CallCodeParam) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -type TransactParam struct { - InputAccount *InputAccount `protobuf:"bytes,1,opt,name=inputAccount,proto3" json:"inputAccount,omitempty"` - Address []byte `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` - GasLimit uint64 `protobuf:"varint,4,opt,name=gasLimit,proto3" json:"gasLimit,omitempty"` - Fee uint64 `protobuf:"varint,5,opt,name=fee,proto3" json:"fee,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TransactParam) Reset() { *m = TransactParam{} } -func (m *TransactParam) String() string { return proto.CompactTextString(m) } -func (*TransactParam) ProtoMessage() {} -func (*TransactParam) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{53} -} -func (m *TransactParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TransactParam.Unmarshal(m, b) -} -func (m *TransactParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TransactParam.Marshal(b, m, deterministic) -} -func (dst *TransactParam) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactParam.Merge(dst, src) -} -func (m *TransactParam) XXX_Size() int { - return xxx_messageInfo_TransactParam.Size(m) -} -func (m *TransactParam) XXX_DiscardUnknown() { - xxx_messageInfo_TransactParam.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactParam proto.InternalMessageInfo - -func (m *TransactParam) GetInputAccount() *InputAccount { - if m != nil { - return m.InputAccount - } - return nil -} - -func (m *TransactParam) GetAddress() []byte { - if m != nil { - return m.Address - } - return nil -} - -func (m *TransactParam) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -func (m *TransactParam) GetGasLimit() uint64 { - if m != nil { - return m.GasLimit - } - return 0 -} - -func (m *TransactParam) GetFee() uint64 { - if m != nil { - return m.Fee - } - return 0 -} - -type SendParam struct { - InputAccount *InputAccount `protobuf:"bytes,1,opt,name=inputAccount,proto3" json:"inputAccount,omitempty"` - ToAddress []byte `protobuf:"bytes,2,opt,name=toAddress,proto3" json:"toAddress,omitempty"` - Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SendParam) Reset() { *m = SendParam{} } -func (m *SendParam) String() string { return proto.CompactTextString(m) } -func (*SendParam) ProtoMessage() {} -func (*SendParam) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{54} -} -func (m *SendParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SendParam.Unmarshal(m, b) -} -func (m *SendParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SendParam.Marshal(b, m, deterministic) -} -func (dst *SendParam) XXX_Merge(src proto.Message) { - xxx_messageInfo_SendParam.Merge(dst, src) -} -func (m *SendParam) XXX_Size() int { - return xxx_messageInfo_SendParam.Size(m) -} -func (m *SendParam) XXX_DiscardUnknown() { - xxx_messageInfo_SendParam.DiscardUnknown(m) -} - -var xxx_messageInfo_SendParam proto.InternalMessageInfo - -func (m *SendParam) GetInputAccount() *InputAccount { - if m != nil { - return m.InputAccount - } - return nil -} - -func (m *SendParam) GetToAddress() []byte { - if m != nil { - return m.ToAddress - } - return nil -} - -func (m *SendParam) GetAmount() uint64 { - if m != nil { - return m.Amount - } - return 0 -} - -type TxParam struct { - Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TxParam) Reset() { *m = TxParam{} } -func (m *TxParam) String() string { return proto.CompactTextString(m) } -func (*TxParam) ProtoMessage() {} -func (*TxParam) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{55} -} -func (m *TxParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TxParam.Unmarshal(m, b) -} -func (m *TxParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TxParam.Marshal(b, m, deterministic) -} -func (dst *TxParam) XXX_Merge(src proto.Message) { - xxx_messageInfo_TxParam.Merge(dst, src) -} -func (m *TxParam) XXX_Size() int { - return xxx_messageInfo_TxParam.Size(m) -} -func (m *TxParam) XXX_DiscardUnknown() { - xxx_messageInfo_TxParam.DiscardUnknown(m) -} - -var xxx_messageInfo_TxParam proto.InternalMessageInfo - -func (m *TxParam) GetTx() []byte { - if m != nil { - return m.Tx - } - return nil -} - -type SignTxParam struct { - Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` - PrivateAccounts []*PrivateAccount `protobuf:"bytes,2,rep,name=privateAccounts,proto3" json:"privateAccounts,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SignTxParam) Reset() { *m = SignTxParam{} } -func (m *SignTxParam) String() string { return proto.CompactTextString(m) } -func (*SignTxParam) ProtoMessage() {} -func (*SignTxParam) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{56} -} -func (m *SignTxParam) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SignTxParam.Unmarshal(m, b) -} -func (m *SignTxParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SignTxParam.Marshal(b, m, deterministic) -} -func (dst *SignTxParam) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignTxParam.Merge(dst, src) -} -func (m *SignTxParam) XXX_Size() int { - return xxx_messageInfo_SignTxParam.Size(m) -} -func (m *SignTxParam) XXX_DiscardUnknown() { - xxx_messageInfo_SignTxParam.DiscardUnknown(m) -} - -var xxx_messageInfo_SignTxParam proto.InternalMessageInfo - -func (m *SignTxParam) GetTx() []byte { - if m != nil { - return m.Tx - } - return nil -} - -func (m *SignTxParam) GetPrivateAccounts() []*PrivateAccount { - if m != nil { - return m.PrivateAccounts - } - return nil -} - -// Results -type SignedTx struct { - Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SignedTx) Reset() { *m = SignedTx{} } -func (m *SignedTx) String() string { return proto.CompactTextString(m) } -func (*SignedTx) ProtoMessage() {} -func (*SignedTx) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{57} -} -func (m *SignedTx) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SignedTx.Unmarshal(m, b) -} -func (m *SignedTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SignedTx.Marshal(b, m, deterministic) -} -func (dst *SignedTx) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedTx.Merge(dst, src) -} -func (m *SignedTx) XXX_Size() int { - return xxx_messageInfo_SignedTx.Size(m) -} -func (m *SignedTx) XXX_DiscardUnknown() { - xxx_messageInfo_SignedTx.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedTx proto.InternalMessageInfo - -func (m *SignedTx) GetTx() []byte { - if m != nil { - return m.Tx - } - return nil -} - -type CallResult struct { - Return []byte `protobuf:"bytes,1,opt,name=Return,proto3" json:"Return,omitempty"` - GasUsed uint64 `protobuf:"varint,2,opt,name=GasUsed,proto3" json:"GasUsed,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CallResult) Reset() { *m = CallResult{} } -func (m *CallResult) String() string { return proto.CompactTextString(m) } -func (*CallResult) ProtoMessage() {} -func (*CallResult) Descriptor() ([]byte, []int) { - return fileDescriptor_burrow_864e11a4a412859d, []int{58} -} -func (m *CallResult) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CallResult.Unmarshal(m, b) -} -func (m *CallResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CallResult.Marshal(b, m, deterministic) -} -func (dst *CallResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_CallResult.Merge(dst, src) -} -func (m *CallResult) XXX_Size() int { - return xxx_messageInfo_CallResult.Size(m) -} -func (m *CallResult) XXX_DiscardUnknown() { - xxx_messageInfo_CallResult.DiscardUnknown(m) -} - -var xxx_messageInfo_CallResult proto.InternalMessageInfo - -func (m *CallResult) GetReturn() []byte { - if m != nil { - return m.Return - } - return nil -} - -func (m *CallResult) GetGasUsed() uint64 { - if m != nil { - return m.GasUsed - } - return 0 -} - -func init() { - proto.RegisterType((*Empty)(nil), "Empty") - proto.RegisterType((*InputAccount)(nil), "InputAccount") - proto.RegisterType((*FilterData)(nil), "FilterData") - proto.RegisterType((*FilterListParam)(nil), "FilterListParam") - proto.RegisterType((*TxReceipt)(nil), "TxReceipt") - proto.RegisterType((*PrivateAccount)(nil), "PrivateAccount") - proto.RegisterType((*EventDataCall)(nil), "EventDataCall") - proto.RegisterType((*CallData)(nil), "CallData") - proto.RegisterType((*AddressParam)(nil), "AddressParam") - proto.RegisterType((*PrivateKeyParam)(nil), "PrivateKeyParam") - proto.RegisterType((*StorageAtParam)(nil), "StorageAtParam") - proto.RegisterType((*BasePermissions)(nil), "BasePermissions") - proto.RegisterType((*AccountPermissions)(nil), "AccountPermissions") - proto.RegisterType((*Account)(nil), "Account") - proto.RegisterType((*AccountList)(nil), "AccountList") - proto.RegisterType((*Validator)(nil), "Validator") - proto.RegisterType((*ValidatorList)(nil), "ValidatorList") - proto.RegisterType((*StorageItem)(nil), "StorageItem") - proto.RegisterType((*StorageDump)(nil), "StorageDump") - proto.RegisterType((*HeightParam)(nil), "HeightParam") - proto.RegisterType((*BlocksParam)(nil), "BlocksParam") - proto.RegisterType((*Header)(nil), "Header") - proto.RegisterType((*Data)(nil), "Data") - proto.RegisterType((*Block)(nil), "Block") - proto.RegisterType((*BlockMeta)(nil), "BlockMeta") - proto.RegisterType((*BlockList)(nil), "BlockList") - proto.RegisterType((*ChainId)(nil), "ChainId") - proto.RegisterType((*GenesisDoc)(nil), "GenesisDoc") - proto.RegisterType((*GenesisDoc_GenesisAccount)(nil), "GenesisDoc.GenesisAccount") - proto.RegisterType((*GenesisDoc_GenesisValidator)(nil), "GenesisDoc.GenesisValidator") - proto.RegisterType((*UnconfirmedTxList)(nil), "UnconfirmedTxList") - proto.RegisterType((*Status)(nil), "Status") - proto.RegisterType((*RoundState)(nil), "RoundState") - proto.RegisterType((*PeerRoundState)(nil), "PeerRoundState") - proto.RegisterType((*ConsensusState)(nil), "ConsensusState") - proto.RegisterType((*EventIdParam)(nil), "EventIdParam") - proto.RegisterType((*SubIdParam)(nil), "SubIdParam") - proto.RegisterType((*EventUnSub)(nil), "EventUnSub") - proto.RegisterType((*EventDataLog)(nil), "EventDataLog") - proto.RegisterType((*EventDataTx)(nil), "EventDataTx") - proto.RegisterType((*Event)(nil), "Event") - proto.RegisterType((*PollResponse)(nil), "PollResponse") - proto.RegisterType((*NameRegEntryParam)(nil), "NameRegEntryParam") - proto.RegisterType((*TransactNameRegParam)(nil), "TransactNameRegParam") - proto.RegisterType((*NameRegEntry)(nil), "NameRegEntry") - proto.RegisterType((*NameRegEntryList)(nil), "NameRegEntryList") - proto.RegisterType((*PeerParam)(nil), "PeerParam") - proto.RegisterType((*ClientVersion)(nil), "ClientVersion") - proto.RegisterType((*NodeID)(nil), "NodeID") - proto.RegisterType((*NodeInfo)(nil), "NodeInfo") - proto.RegisterType((*NetworkInfo)(nil), "NetworkInfo") - proto.RegisterType((*Peer)(nil), "Peer") - proto.RegisterType((*PeerList)(nil), "PeerList") - proto.RegisterType((*CallParam)(nil), "CallParam") - proto.RegisterType((*CallCodeParam)(nil), "CallCodeParam") - proto.RegisterType((*TransactParam)(nil), "TransactParam") - proto.RegisterType((*SendParam)(nil), "SendParam") - proto.RegisterType((*TxParam)(nil), "TxParam") - proto.RegisterType((*SignTxParam)(nil), "SignTxParam") - proto.RegisterType((*SignedTx)(nil), "SignedTx") - proto.RegisterType((*CallResult)(nil), "CallResult") -} - -// 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 - -// AccountsClient is the client API for Accounts service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type AccountsClient interface { - GenPrivAccount(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PrivateAccount, error) - GenPrivAccountFromKey(ctx context.Context, in *PrivateKeyParam, opts ...grpc.CallOption) (*PrivateAccount, error) - GetAccount(ctx context.Context, in *AddressParam, opts ...grpc.CallOption) (*Account, error) - GetAccounts(ctx context.Context, in *FilterListParam, opts ...grpc.CallOption) (*AccountList, error) - GetValidators(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ValidatorList, error) - GetStorage(ctx context.Context, in *AddressParam, opts ...grpc.CallOption) (*StorageDump, error) - GetStorageAt(ctx context.Context, in *StorageAtParam, opts ...grpc.CallOption) (*StorageItem, error) -} - -type accountsClient struct { - cc *grpc.ClientConn -} - -func NewAccountsClient(cc *grpc.ClientConn) AccountsClient { - return &accountsClient{cc} -} - -func (c *accountsClient) GenPrivAccount(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PrivateAccount, error) { - out := new(PrivateAccount) - err := c.cc.Invoke(ctx, "/Accounts/GenPrivAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsClient) GenPrivAccountFromKey(ctx context.Context, in *PrivateKeyParam, opts ...grpc.CallOption) (*PrivateAccount, error) { - out := new(PrivateAccount) - err := c.cc.Invoke(ctx, "/Accounts/GenPrivAccountFromKey", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsClient) GetAccount(ctx context.Context, in *AddressParam, opts ...grpc.CallOption) (*Account, error) { - out := new(Account) - err := c.cc.Invoke(ctx, "/Accounts/GetAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsClient) GetAccounts(ctx context.Context, in *FilterListParam, opts ...grpc.CallOption) (*AccountList, error) { - out := new(AccountList) - err := c.cc.Invoke(ctx, "/Accounts/GetAccounts", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsClient) GetValidators(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ValidatorList, error) { - out := new(ValidatorList) - err := c.cc.Invoke(ctx, "/Accounts/GetValidators", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsClient) GetStorage(ctx context.Context, in *AddressParam, opts ...grpc.CallOption) (*StorageDump, error) { - out := new(StorageDump) - err := c.cc.Invoke(ctx, "/Accounts/GetStorage", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsClient) GetStorageAt(ctx context.Context, in *StorageAtParam, opts ...grpc.CallOption) (*StorageItem, error) { - out := new(StorageItem) - err := c.cc.Invoke(ctx, "/Accounts/GetStorageAt", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// AccountsServer is the server API for Accounts service. -type AccountsServer interface { - GenPrivAccount(context.Context, *Empty) (*PrivateAccount, error) - GenPrivAccountFromKey(context.Context, *PrivateKeyParam) (*PrivateAccount, error) - GetAccount(context.Context, *AddressParam) (*Account, error) - GetAccounts(context.Context, *FilterListParam) (*AccountList, error) - GetValidators(context.Context, *Empty) (*ValidatorList, error) - GetStorage(context.Context, *AddressParam) (*StorageDump, error) - GetStorageAt(context.Context, *StorageAtParam) (*StorageItem, error) -} - -func RegisterAccountsServer(s *grpc.Server, srv AccountsServer) { - s.RegisterService(&_Accounts_serviceDesc, srv) -} - -func _Accounts_GenPrivAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).GenPrivAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Accounts/GenPrivAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).GenPrivAccount(ctx, req.(*Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _Accounts_GenPrivAccountFromKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PrivateKeyParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).GenPrivAccountFromKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Accounts/GenPrivAccountFromKey", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).GenPrivAccountFromKey(ctx, req.(*PrivateKeyParam)) - } - return interceptor(ctx, in, info, handler) -} - -func _Accounts_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddressParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).GetAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Accounts/GetAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).GetAccount(ctx, req.(*AddressParam)) - } - return interceptor(ctx, in, info, handler) -} - -func _Accounts_GetAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FilterListParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).GetAccounts(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Accounts/GetAccounts", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).GetAccounts(ctx, req.(*FilterListParam)) - } - return interceptor(ctx, in, info, handler) -} - -func _Accounts_GetValidators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).GetValidators(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Accounts/GetValidators", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).GetValidators(ctx, req.(*Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _Accounts_GetStorage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddressParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).GetStorage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Accounts/GetStorage", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).GetStorage(ctx, req.(*AddressParam)) - } - return interceptor(ctx, in, info, handler) -} - -func _Accounts_GetStorageAt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StorageAtParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).GetStorageAt(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Accounts/GetStorageAt", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).GetStorageAt(ctx, req.(*StorageAtParam)) - } - return interceptor(ctx, in, info, handler) -} - -var _Accounts_serviceDesc = grpc.ServiceDesc{ - ServiceName: "Accounts", - HandlerType: (*AccountsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GenPrivAccount", - Handler: _Accounts_GenPrivAccount_Handler, - }, - { - MethodName: "GenPrivAccountFromKey", - Handler: _Accounts_GenPrivAccountFromKey_Handler, - }, - { - MethodName: "GetAccount", - Handler: _Accounts_GetAccount_Handler, - }, - { - MethodName: "GetAccounts", - Handler: _Accounts_GetAccounts_Handler, - }, - { - MethodName: "GetValidators", - Handler: _Accounts_GetValidators_Handler, - }, - { - MethodName: "GetStorage", - Handler: _Accounts_GetStorage_Handler, - }, - { - MethodName: "GetStorageAt", - Handler: _Accounts_GetStorageAt_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "burrow.proto", -} - -// BlockchainClient is the client API for Blockchain service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type BlockchainClient interface { - GetBlock(ctx context.Context, in *HeightParam, opts ...grpc.CallOption) (*Block, error) - GetBlocks(ctx context.Context, in *BlocksParam, opts ...grpc.CallOption) (*BlockList, error) - GetBlockchainInfo(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Status, error) - GetChainId(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ChainId, error) - GetGenesis(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GenesisDoc, error) - GetLatestBlock(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Block, error) - GetUnconfirmedTxs(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*UnconfirmedTxList, error) - GetConsensusState(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ConsensusState, error) -} - -type blockchainClient struct { - cc *grpc.ClientConn -} - -func NewBlockchainClient(cc *grpc.ClientConn) BlockchainClient { - return &blockchainClient{cc} -} - -func (c *blockchainClient) GetBlock(ctx context.Context, in *HeightParam, opts ...grpc.CallOption) (*Block, error) { - out := new(Block) - err := c.cc.Invoke(ctx, "/Blockchain/GetBlock", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *blockchainClient) GetBlocks(ctx context.Context, in *BlocksParam, opts ...grpc.CallOption) (*BlockList, error) { - out := new(BlockList) - err := c.cc.Invoke(ctx, "/Blockchain/GetBlocks", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *blockchainClient) GetBlockchainInfo(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Status, error) { - out := new(Status) - err := c.cc.Invoke(ctx, "/Blockchain/GetBlockchainInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *blockchainClient) GetChainId(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ChainId, error) { - out := new(ChainId) - err := c.cc.Invoke(ctx, "/Blockchain/GetChainId", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *blockchainClient) GetGenesis(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GenesisDoc, error) { - out := new(GenesisDoc) - err := c.cc.Invoke(ctx, "/Blockchain/GetGenesis", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *blockchainClient) GetLatestBlock(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Block, error) { - out := new(Block) - err := c.cc.Invoke(ctx, "/Blockchain/GetLatestBlock", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *blockchainClient) GetUnconfirmedTxs(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*UnconfirmedTxList, error) { - out := new(UnconfirmedTxList) - err := c.cc.Invoke(ctx, "/Blockchain/GetUnconfirmedTxs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *blockchainClient) GetConsensusState(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ConsensusState, error) { - out := new(ConsensusState) - err := c.cc.Invoke(ctx, "/Blockchain/GetConsensusState", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// BlockchainServer is the server API for Blockchain service. -type BlockchainServer interface { - GetBlock(context.Context, *HeightParam) (*Block, error) - GetBlocks(context.Context, *BlocksParam) (*BlockList, error) - GetBlockchainInfo(context.Context, *Empty) (*Status, error) - GetChainId(context.Context, *Empty) (*ChainId, error) - GetGenesis(context.Context, *Empty) (*GenesisDoc, error) - GetLatestBlock(context.Context, *Empty) (*Block, error) - GetUnconfirmedTxs(context.Context, *Empty) (*UnconfirmedTxList, error) - GetConsensusState(context.Context, *Empty) (*ConsensusState, error) -} - -func RegisterBlockchainServer(s *grpc.Server, srv BlockchainServer) { - s.RegisterService(&_Blockchain_serviceDesc, srv) -} - -func _Blockchain_GetBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(HeightParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BlockchainServer).GetBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Blockchain/GetBlock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BlockchainServer).GetBlock(ctx, req.(*HeightParam)) - } - return interceptor(ctx, in, info, handler) -} - -func _Blockchain_GetBlocks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BlocksParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BlockchainServer).GetBlocks(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Blockchain/GetBlocks", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BlockchainServer).GetBlocks(ctx, req.(*BlocksParam)) - } - return interceptor(ctx, in, info, handler) -} - -func _Blockchain_GetBlockchainInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BlockchainServer).GetBlockchainInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Blockchain/GetBlockchainInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BlockchainServer).GetBlockchainInfo(ctx, req.(*Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _Blockchain_GetChainId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BlockchainServer).GetChainId(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Blockchain/GetChainId", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BlockchainServer).GetChainId(ctx, req.(*Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _Blockchain_GetGenesis_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BlockchainServer).GetGenesis(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Blockchain/GetGenesis", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BlockchainServer).GetGenesis(ctx, req.(*Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _Blockchain_GetLatestBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BlockchainServer).GetLatestBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Blockchain/GetLatestBlock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BlockchainServer).GetLatestBlock(ctx, req.(*Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _Blockchain_GetUnconfirmedTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BlockchainServer).GetUnconfirmedTxs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Blockchain/GetUnconfirmedTxs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BlockchainServer).GetUnconfirmedTxs(ctx, req.(*Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _Blockchain_GetConsensusState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BlockchainServer).GetConsensusState(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Blockchain/GetConsensusState", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BlockchainServer).GetConsensusState(ctx, req.(*Empty)) - } - return interceptor(ctx, in, info, handler) -} - -var _Blockchain_serviceDesc = grpc.ServiceDesc{ - ServiceName: "Blockchain", - HandlerType: (*BlockchainServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetBlock", - Handler: _Blockchain_GetBlock_Handler, - }, - { - MethodName: "GetBlocks", - Handler: _Blockchain_GetBlocks_Handler, - }, - { - MethodName: "GetBlockchainInfo", - Handler: _Blockchain_GetBlockchainInfo_Handler, - }, - { - MethodName: "GetChainId", - Handler: _Blockchain_GetChainId_Handler, - }, - { - MethodName: "GetGenesis", - Handler: _Blockchain_GetGenesis_Handler, - }, - { - MethodName: "GetLatestBlock", - Handler: _Blockchain_GetLatestBlock_Handler, - }, - { - MethodName: "GetUnconfirmedTxs", - Handler: _Blockchain_GetUnconfirmedTxs_Handler, - }, - { - MethodName: "GetConsensusState", - Handler: _Blockchain_GetConsensusState_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "burrow.proto", -} - -// EventsClient is the client API for Events service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type EventsClient interface { - EventPoll(ctx context.Context, in *SubIdParam, opts ...grpc.CallOption) (*PollResponse, error) - EventSubscribe(ctx context.Context, in *EventIdParam, opts ...grpc.CallOption) (*SubIdParam, error) - EventUnsubscribe(ctx context.Context, in *SubIdParam, opts ...grpc.CallOption) (*EventUnSub, error) -} - -type eventsClient struct { - cc *grpc.ClientConn -} - -func NewEventsClient(cc *grpc.ClientConn) EventsClient { - return &eventsClient{cc} -} - -func (c *eventsClient) EventPoll(ctx context.Context, in *SubIdParam, opts ...grpc.CallOption) (*PollResponse, error) { - out := new(PollResponse) - err := c.cc.Invoke(ctx, "/Events/EventPoll", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *eventsClient) EventSubscribe(ctx context.Context, in *EventIdParam, opts ...grpc.CallOption) (*SubIdParam, error) { - out := new(SubIdParam) - err := c.cc.Invoke(ctx, "/Events/EventSubscribe", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *eventsClient) EventUnsubscribe(ctx context.Context, in *SubIdParam, opts ...grpc.CallOption) (*EventUnSub, error) { - out := new(EventUnSub) - err := c.cc.Invoke(ctx, "/Events/EventUnsubscribe", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// EventsServer is the server API for Events service. -type EventsServer interface { - EventPoll(context.Context, *SubIdParam) (*PollResponse, error) - EventSubscribe(context.Context, *EventIdParam) (*SubIdParam, error) - EventUnsubscribe(context.Context, *SubIdParam) (*EventUnSub, error) -} - -func RegisterEventsServer(s *grpc.Server, srv EventsServer) { - s.RegisterService(&_Events_serviceDesc, srv) -} - -func _Events_EventPoll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SubIdParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EventsServer).EventPoll(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Events/EventPoll", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EventsServer).EventPoll(ctx, req.(*SubIdParam)) - } - return interceptor(ctx, in, info, handler) -} - -func _Events_EventSubscribe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EventIdParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EventsServer).EventSubscribe(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Events/EventSubscribe", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EventsServer).EventSubscribe(ctx, req.(*EventIdParam)) - } - return interceptor(ctx, in, info, handler) -} - -func _Events_EventUnsubscribe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SubIdParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EventsServer).EventUnsubscribe(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Events/EventUnsubscribe", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EventsServer).EventUnsubscribe(ctx, req.(*SubIdParam)) - } - return interceptor(ctx, in, info, handler) -} - -var _Events_serviceDesc = grpc.ServiceDesc{ - ServiceName: "Events", - HandlerType: (*EventsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "EventPoll", - Handler: _Events_EventPoll_Handler, - }, - { - MethodName: "EventSubscribe", - Handler: _Events_EventSubscribe_Handler, - }, - { - MethodName: "EventUnsubscribe", - Handler: _Events_EventUnsubscribe_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "burrow.proto", -} - -// NameRegClient is the client API for NameReg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type NameRegClient interface { - GetEntry(ctx context.Context, in *NameRegEntryParam, opts ...grpc.CallOption) (*NameRegEntry, error) - GetEntries(ctx context.Context, in *FilterListParam, opts ...grpc.CallOption) (*NameRegEntryList, error) - TransactNameReg(ctx context.Context, in *TransactNameRegParam, opts ...grpc.CallOption) (*TxReceipt, error) - TransactNameRegAndHold(ctx context.Context, in *TransactNameRegParam, opts ...grpc.CallOption) (*NameRegEntry, error) -} - -type nameRegClient struct { - cc *grpc.ClientConn -} - -func NewNameRegClient(cc *grpc.ClientConn) NameRegClient { - return &nameRegClient{cc} -} - -func (c *nameRegClient) GetEntry(ctx context.Context, in *NameRegEntryParam, opts ...grpc.CallOption) (*NameRegEntry, error) { - out := new(NameRegEntry) - err := c.cc.Invoke(ctx, "/NameReg/GetEntry", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *nameRegClient) GetEntries(ctx context.Context, in *FilterListParam, opts ...grpc.CallOption) (*NameRegEntryList, error) { - out := new(NameRegEntryList) - err := c.cc.Invoke(ctx, "/NameReg/GetEntries", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *nameRegClient) TransactNameReg(ctx context.Context, in *TransactNameRegParam, opts ...grpc.CallOption) (*TxReceipt, error) { - out := new(TxReceipt) - err := c.cc.Invoke(ctx, "/NameReg/TransactNameReg", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *nameRegClient) TransactNameRegAndHold(ctx context.Context, in *TransactNameRegParam, opts ...grpc.CallOption) (*NameRegEntry, error) { - out := new(NameRegEntry) - err := c.cc.Invoke(ctx, "/NameReg/TransactNameRegAndHold", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// NameRegServer is the server API for NameReg service. -type NameRegServer interface { - GetEntry(context.Context, *NameRegEntryParam) (*NameRegEntry, error) - GetEntries(context.Context, *FilterListParam) (*NameRegEntryList, error) - TransactNameReg(context.Context, *TransactNameRegParam) (*TxReceipt, error) - TransactNameRegAndHold(context.Context, *TransactNameRegParam) (*NameRegEntry, error) -} - -func RegisterNameRegServer(s *grpc.Server, srv NameRegServer) { - s.RegisterService(&_NameReg_serviceDesc, srv) -} - -func _NameReg_GetEntry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NameRegEntryParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NameRegServer).GetEntry(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/NameReg/GetEntry", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NameRegServer).GetEntry(ctx, req.(*NameRegEntryParam)) - } - return interceptor(ctx, in, info, handler) -} - -func _NameReg_GetEntries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FilterListParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NameRegServer).GetEntries(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/NameReg/GetEntries", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NameRegServer).GetEntries(ctx, req.(*FilterListParam)) - } - return interceptor(ctx, in, info, handler) -} - -func _NameReg_TransactNameReg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TransactNameRegParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NameRegServer).TransactNameReg(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/NameReg/TransactNameReg", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NameRegServer).TransactNameReg(ctx, req.(*TransactNameRegParam)) - } - return interceptor(ctx, in, info, handler) -} - -func _NameReg_TransactNameRegAndHold_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TransactNameRegParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NameRegServer).TransactNameRegAndHold(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/NameReg/TransactNameRegAndHold", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NameRegServer).TransactNameRegAndHold(ctx, req.(*TransactNameRegParam)) - } - return interceptor(ctx, in, info, handler) -} - -var _NameReg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "NameReg", - HandlerType: (*NameRegServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetEntry", - Handler: _NameReg_GetEntry_Handler, - }, - { - MethodName: "GetEntries", - Handler: _NameReg_GetEntries_Handler, - }, - { - MethodName: "TransactNameReg", - Handler: _NameReg_TransactNameReg_Handler, - }, - { - MethodName: "TransactNameRegAndHold", - Handler: _NameReg_TransactNameRegAndHold_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "burrow.proto", -} - -// NetworkClient is the client API for Network service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type NetworkClient interface { - GetClientVersion(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ClientVersion, error) - GetNetworkInfo(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*NetworkInfo, error) - GetNodeInfo(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*NodeInfo, error) - GetPeer(ctx context.Context, in *PeerParam, opts ...grpc.CallOption) (*Peer, error) - GetPeers(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PeerList, error) -} - -type networkClient struct { - cc *grpc.ClientConn -} - -func NewNetworkClient(cc *grpc.ClientConn) NetworkClient { - return &networkClient{cc} -} - -func (c *networkClient) GetClientVersion(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ClientVersion, error) { - out := new(ClientVersion) - err := c.cc.Invoke(ctx, "/Network/GetClientVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *networkClient) GetNetworkInfo(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*NetworkInfo, error) { - out := new(NetworkInfo) - err := c.cc.Invoke(ctx, "/Network/GetNetworkInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *networkClient) GetNodeInfo(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*NodeInfo, error) { - out := new(NodeInfo) - err := c.cc.Invoke(ctx, "/Network/GetNodeInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *networkClient) GetPeer(ctx context.Context, in *PeerParam, opts ...grpc.CallOption) (*Peer, error) { - out := new(Peer) - err := c.cc.Invoke(ctx, "/Network/GetPeer", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *networkClient) GetPeers(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PeerList, error) { - out := new(PeerList) - err := c.cc.Invoke(ctx, "/Network/GetPeers", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// NetworkServer is the server API for Network service. -type NetworkServer interface { - GetClientVersion(context.Context, *Empty) (*ClientVersion, error) - GetNetworkInfo(context.Context, *Empty) (*NetworkInfo, error) - GetNodeInfo(context.Context, *Empty) (*NodeInfo, error) - GetPeer(context.Context, *PeerParam) (*Peer, error) - GetPeers(context.Context, *Empty) (*PeerList, error) -} - -func RegisterNetworkServer(s *grpc.Server, srv NetworkServer) { - s.RegisterService(&_Network_serviceDesc, srv) -} - -func _Network_GetClientVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NetworkServer).GetClientVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Network/GetClientVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NetworkServer).GetClientVersion(ctx, req.(*Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _Network_GetNetworkInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NetworkServer).GetNetworkInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Network/GetNetworkInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NetworkServer).GetNetworkInfo(ctx, req.(*Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _Network_GetNodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NetworkServer).GetNodeInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Network/GetNodeInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NetworkServer).GetNodeInfo(ctx, req.(*Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _Network_GetPeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PeerParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NetworkServer).GetPeer(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Network/GetPeer", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NetworkServer).GetPeer(ctx, req.(*PeerParam)) - } - return interceptor(ctx, in, info, handler) -} - -func _Network_GetPeers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NetworkServer).GetPeers(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Network/GetPeers", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NetworkServer).GetPeers(ctx, req.(*Empty)) - } - return interceptor(ctx, in, info, handler) -} - -var _Network_serviceDesc = grpc.ServiceDesc{ - ServiceName: "Network", - HandlerType: (*NetworkServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetClientVersion", - Handler: _Network_GetClientVersion_Handler, - }, - { - MethodName: "GetNetworkInfo", - Handler: _Network_GetNetworkInfo_Handler, - }, - { - MethodName: "GetNodeInfo", - Handler: _Network_GetNodeInfo_Handler, - }, - { - MethodName: "GetPeer", - Handler: _Network_GetPeer_Handler, - }, - { - MethodName: "GetPeers", - Handler: _Network_GetPeers_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "burrow.proto", -} - -// TransactionClient is the client API for Transaction service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type TransactionClient interface { - BroadcastTx(ctx context.Context, in *TxParam, opts ...grpc.CallOption) (*TxReceipt, error) - Call(ctx context.Context, in *CallParam, opts ...grpc.CallOption) (*CallResult, error) - CallCode(ctx context.Context, in *CallCodeParam, opts ...grpc.CallOption) (*CallResult, error) - Transact(ctx context.Context, in *TransactParam, opts ...grpc.CallOption) (*TxReceipt, error) - TransactAndHold(ctx context.Context, in *TransactParam, opts ...grpc.CallOption) (*EventDataCall, error) - Send(ctx context.Context, in *SendParam, opts ...grpc.CallOption) (*TxReceipt, error) - SendAndHold(ctx context.Context, in *SendParam, opts ...grpc.CallOption) (*TxReceipt, error) - SignTx(ctx context.Context, in *SignTxParam, opts ...grpc.CallOption) (*SignedTx, error) -} - -type transactionClient struct { - cc *grpc.ClientConn -} - -func NewTransactionClient(cc *grpc.ClientConn) TransactionClient { - return &transactionClient{cc} -} - -func (c *transactionClient) BroadcastTx(ctx context.Context, in *TxParam, opts ...grpc.CallOption) (*TxReceipt, error) { - out := new(TxReceipt) - err := c.cc.Invoke(ctx, "/Transaction/BroadcastTx", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *transactionClient) Call(ctx context.Context, in *CallParam, opts ...grpc.CallOption) (*CallResult, error) { - out := new(CallResult) - err := c.cc.Invoke(ctx, "/Transaction/Call", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *transactionClient) CallCode(ctx context.Context, in *CallCodeParam, opts ...grpc.CallOption) (*CallResult, error) { - out := new(CallResult) - err := c.cc.Invoke(ctx, "/Transaction/CallCode", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *transactionClient) Transact(ctx context.Context, in *TransactParam, opts ...grpc.CallOption) (*TxReceipt, error) { - out := new(TxReceipt) - err := c.cc.Invoke(ctx, "/Transaction/Transact", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *transactionClient) TransactAndHold(ctx context.Context, in *TransactParam, opts ...grpc.CallOption) (*EventDataCall, error) { - out := new(EventDataCall) - err := c.cc.Invoke(ctx, "/Transaction/TransactAndHold", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *transactionClient) Send(ctx context.Context, in *SendParam, opts ...grpc.CallOption) (*TxReceipt, error) { - out := new(TxReceipt) - err := c.cc.Invoke(ctx, "/Transaction/Send", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *transactionClient) SendAndHold(ctx context.Context, in *SendParam, opts ...grpc.CallOption) (*TxReceipt, error) { - out := new(TxReceipt) - err := c.cc.Invoke(ctx, "/Transaction/SendAndHold", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *transactionClient) SignTx(ctx context.Context, in *SignTxParam, opts ...grpc.CallOption) (*SignedTx, error) { - out := new(SignedTx) - err := c.cc.Invoke(ctx, "/Transaction/SignTx", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// TransactionServer is the server API for Transaction service. -type TransactionServer interface { - BroadcastTx(context.Context, *TxParam) (*TxReceipt, error) - Call(context.Context, *CallParam) (*CallResult, error) - CallCode(context.Context, *CallCodeParam) (*CallResult, error) - Transact(context.Context, *TransactParam) (*TxReceipt, error) - TransactAndHold(context.Context, *TransactParam) (*EventDataCall, error) - Send(context.Context, *SendParam) (*TxReceipt, error) - SendAndHold(context.Context, *SendParam) (*TxReceipt, error) - SignTx(context.Context, *SignTxParam) (*SignedTx, error) -} - -func RegisterTransactionServer(s *grpc.Server, srv TransactionServer) { - s.RegisterService(&_Transaction_serviceDesc, srv) -} - -func _Transaction_BroadcastTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TxParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TransactionServer).BroadcastTx(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Transaction/BroadcastTx", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TransactionServer).BroadcastTx(ctx, req.(*TxParam)) - } - return interceptor(ctx, in, info, handler) -} - -func _Transaction_Call_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CallParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TransactionServer).Call(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Transaction/Call", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TransactionServer).Call(ctx, req.(*CallParam)) - } - return interceptor(ctx, in, info, handler) -} - -func _Transaction_CallCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CallCodeParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TransactionServer).CallCode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Transaction/CallCode", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TransactionServer).CallCode(ctx, req.(*CallCodeParam)) - } - return interceptor(ctx, in, info, handler) -} - -func _Transaction_Transact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TransactParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TransactionServer).Transact(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Transaction/Transact", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TransactionServer).Transact(ctx, req.(*TransactParam)) - } - return interceptor(ctx, in, info, handler) -} - -func _Transaction_TransactAndHold_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TransactParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TransactionServer).TransactAndHold(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Transaction/TransactAndHold", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TransactionServer).TransactAndHold(ctx, req.(*TransactParam)) - } - return interceptor(ctx, in, info, handler) -} - -func _Transaction_Send_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SendParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TransactionServer).Send(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Transaction/Send", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TransactionServer).Send(ctx, req.(*SendParam)) - } - return interceptor(ctx, in, info, handler) -} - -func _Transaction_SendAndHold_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SendParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TransactionServer).SendAndHold(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Transaction/SendAndHold", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TransactionServer).SendAndHold(ctx, req.(*SendParam)) - } - return interceptor(ctx, in, info, handler) -} - -func _Transaction_SignTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignTxParam) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TransactionServer).SignTx(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/Transaction/SignTx", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TransactionServer).SignTx(ctx, req.(*SignTxParam)) - } - return interceptor(ctx, in, info, handler) -} - -var _Transaction_serviceDesc = grpc.ServiceDesc{ - ServiceName: "Transaction", - HandlerType: (*TransactionServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "BroadcastTx", - Handler: _Transaction_BroadcastTx_Handler, - }, - { - MethodName: "Call", - Handler: _Transaction_Call_Handler, - }, - { - MethodName: "CallCode", - Handler: _Transaction_CallCode_Handler, - }, - { - MethodName: "Transact", - Handler: _Transaction_Transact_Handler, - }, - { - MethodName: "TransactAndHold", - Handler: _Transaction_TransactAndHold_Handler, - }, - { - MethodName: "Send", - Handler: _Transaction_Send_Handler, - }, - { - MethodName: "SendAndHold", - Handler: _Transaction_SendAndHold_Handler, - }, - { - MethodName: "SignTx", - Handler: _Transaction_SignTx_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "burrow.proto", -} - -func init() { proto.RegisterFile("burrow.proto", fileDescriptor_burrow_864e11a4a412859d) } - -var fileDescriptor_burrow_864e11a4a412859d = []byte{ - // 2599 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x19, 0x5d, 0x6f, 0x1b, 0xc7, - 0x11, 0xfc, 0x26, 0x87, 0x14, 0x25, 0x6f, 0x1c, 0x97, 0x61, 0x5d, 0xc5, 0xd9, 0x58, 0xb1, 0x93, - 0x3a, 0xdb, 0x5a, 0x4d, 0x82, 0x36, 0x48, 0x53, 0xc8, 0x92, 0x23, 0x0b, 0x71, 0x1c, 0x61, 0x49, - 0xa7, 0xcd, 0x43, 0x1f, 0x4e, 0xe4, 0x4a, 0x3a, 0x98, 0xbc, 0x63, 0xef, 0x96, 0x36, 0xf3, 0x1f, - 0xda, 0x3e, 0xb4, 0x8f, 0x05, 0xfa, 0xda, 0x87, 0xbe, 0xf7, 0x29, 0x40, 0x51, 0xf4, 0xa1, 0x40, - 0xff, 0x45, 0x81, 0xfe, 0x90, 0x62, 0x66, 0x77, 0xef, 0xf6, 0x8e, 0x52, 0xec, 0x3a, 0x40, 0x9e, - 0x78, 0x33, 0x3b, 0x3b, 0x3b, 0x33, 0x3b, 0x9f, 0x4b, 0xe8, 0x9d, 0x2c, 0x93, 0x24, 0x7e, 0x26, - 0x16, 0x49, 0xac, 0x63, 0xde, 0x82, 0xc6, 0xfd, 0xf9, 0x42, 0x7f, 0xc5, 0x1f, 0x40, 0xef, 0x28, - 0x5a, 0x2c, 0xf5, 0xde, 0x64, 0x12, 0x2f, 0x23, 0xcd, 0xb6, 0x01, 0x16, 0x49, 0xf8, 0x34, 0xd0, - 0xea, 0x53, 0xf5, 0xd5, 0xa0, 0x72, 0xa3, 0x72, 0xbb, 0x27, 0x3d, 0x0c, 0x1b, 0x40, 0x2b, 0x98, - 0x4e, 0x13, 0x95, 0xa6, 0x83, 0x2a, 0x2d, 0x3a, 0x90, 0x3f, 0x00, 0xf8, 0x24, 0x9c, 0x69, 0x95, - 0x1c, 0x04, 0x3a, 0x60, 0x57, 0xa1, 0x71, 0x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, 0x31, 0x10, 0x59, 0xa5, 0x2b, 0xb0, 0xdc, 0x81, 0x2e, - 0x2e, 0x38, 0x76, 0x97, 0x91, 0xbd, 0x01, 0x4d, 0x53, 0x98, 0x58, 0x4f, 0x78, 0x15, 0x6a, 0xd8, - 0x11, 0xae, 0xaa, 0x9c, 0x34, 0xe9, 0x7f, 0xdb, 0x9f, 0xfc, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xa7, - 0x9f, 0xf8, 0x97, 0xc7, 0x1d, 0x00, 0x00, -} diff --git a/txs/amino_codec.go b/txs/amino_codec.go new file mode 100644 index 00000000..9d85480b --- /dev/null +++ b/txs/amino_codec.go @@ -0,0 +1,42 @@ +package txs + +import ( + "fmt" + + "github.com/hyperledger/burrow/txs/payload" + "github.com/tendermint/go-amino" +) + +type aminoCodec struct { + *amino.Codec +} + +func NewAminoCodec() *aminoCodec { + cdc := amino.NewCodec() + cdc.RegisterInterface((*payload.Payload)(nil), nil) + registerTx(cdc, &payload.SendTx{}) + registerTx(cdc, &payload.CallTx{}) + registerTx(cdc, &payload.BondTx{}) + registerTx(cdc, &payload.UnbondTx{}) + registerTx(cdc, &payload.PermissionsTx{}) + registerTx(cdc, &payload.NameTx{}) + registerTx(cdc, &payload.GovernanceTx{}) + return &aminoCodec{cdc} +} + +func (gwc *aminoCodec) EncodeTx(env *Envelope) ([]byte, error) { + return gwc.MarshalBinary(env) +} + +func (gwc *aminoCodec) DecodeTx(txBytes []byte) (*Envelope, error) { + env := new(Envelope) + err := gwc.UnmarshalBinary(txBytes, env) + if err != nil { + return nil, err + } + return env, nil +} + +func registerTx(cdc *amino.Codec, tx payload.Payload) { + cdc.RegisterConcrete(tx, fmt.Sprintf("burrow/txs/payload/%v", tx.Type()), nil) +} diff --git a/txs/amino_codec_test.go b/txs/amino_codec_test.go new file mode 100644 index 00000000..2cc87ad6 --- /dev/null +++ b/txs/amino_codec_test.go @@ -0,0 +1,65 @@ +package txs + +import ( + "testing" + + "github.com/hyperledger/burrow/account" + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/txs/payload" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestAminoEncodeTxDecodeTx(t *testing.T) { + codec := NewAminoCodec() + inputAddress := crypto.Address{1, 2, 3, 4, 5} + outputAddress := crypto.Address{5, 4, 3, 2, 1} + amount := uint64(2) + sequence := uint64(3) + tx := &payload.SendTx{ + Inputs: []*payload.TxInput{{ + Address: inputAddress, + Amount: amount, + Sequence: sequence, + }}, + Outputs: []*payload.TxOutput{{ + Address: outputAddress, + Amount: amount, + }}, + } + txEnv := Enclose(chainID, tx) + txBytes, err := codec.EncodeTx(txEnv) + if err != nil { + t.Fatal(err) + } + txEnvOut, err := codec.DecodeTx(txBytes) + assert.NoError(t, err, "DecodeTx error") + assert.Equal(t, txEnv, txEnvOut) +} + +func TestAminoEncodeTxDecodeTx_CallTx(t *testing.T) { + codec := NewAminoCodec() + inputAccount := account.GeneratePrivateAccountFromSecret("fooo") + amount := uint64(2) + sequence := uint64(3) + tx := &payload.CallTx{ + Input: &payload.TxInput{ + Address: inputAccount.Address(), + Amount: amount, + Sequence: sequence, + }, + GasLimit: 233, + Fee: 2, + Address: nil, + Data: []byte("code"), + } + txEnv := Enclose(chainID, tx) + require.NoError(t, txEnv.Sign(inputAccount)) + txBytes, err := codec.EncodeTx(txEnv) + if err != nil { + t.Fatal(err) + } + txEnvOut, err := codec.DecodeTx(txBytes) + assert.NoError(t, err, "DecodeTx error") + assert.Equal(t, txEnv, txEnvOut) +} diff --git a/txs/json_codec_test.go b/txs/json_codec_test.go index 2aa1d7e3..76c907e0 100644 --- a/txs/json_codec_test.go +++ b/txs/json_codec_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/require" ) -func TestEncodeTxDecodeTx(t *testing.T) { +func TestJSONEncodeTxDecodeTx(t *testing.T) { codec := NewJSONCodec() inputAddress := crypto.Address{1, 2, 3, 4, 5} outputAddress := crypto.Address{5, 4, 3, 2, 1} @@ -37,7 +37,7 @@ func TestEncodeTxDecodeTx(t *testing.T) { assert.Equal(t, txEnv, txEnvOut) } -func TestEncodeTxDecodeTx_CallTx(t *testing.T) { +func TestJSONEncodeTxDecodeTx_CallTx(t *testing.T) { codec := NewJSONCodec() inputAccount := account.GeneratePrivateAccountFromSecret("fooo") amount := uint64(2) -- GitLab