github.com/Tri-stone/burrow@v0.25.0/rpc/rpctransact/rpctransact.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: rpctransact.proto
     3  
     4  package rpctransact
     5  
     6  import (
     7  	context "context"
     8  	fmt "fmt"
     9  	io "io"
    10  	math "math"
    11  	time "time"
    12  
    13  	_ "github.com/gogo/protobuf/gogoproto"
    14  	proto "github.com/gogo/protobuf/proto"
    15  	github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
    16  	golang_proto "github.com/golang/protobuf/proto"
    17  	_ "github.com/golang/protobuf/ptypes/duration"
    18  	github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto"
    19  	exec "github.com/hyperledger/burrow/execution/exec"
    20  	github_com_hyperledger_burrow_txs "github.com/hyperledger/burrow/txs"
    21  	txs "github.com/hyperledger/burrow/txs"
    22  	payload "github.com/hyperledger/burrow/txs/payload"
    23  	grpc "google.golang.org/grpc"
    24  )
    25  
    26  // Reference imports to suppress errors if they are not otherwise used.
    27  var _ = proto.Marshal
    28  var _ = golang_proto.Marshal
    29  var _ = fmt.Errorf
    30  var _ = math.Inf
    31  var _ = time.Kitchen
    32  
    33  // This is a compile-time assertion to ensure that this generated file
    34  // is compatible with the proto package it is being compiled against.
    35  // A compilation error at this line likely means your copy of the
    36  // proto package needs to be updated.
    37  const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
    38  
    39  type CallCodeParam struct {
    40  	FromAddress          github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,1,opt,name=FromAddress,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"FromAddress"`
    41  	Code                 []byte                                       `protobuf:"bytes,2,opt,name=Code,proto3" json:"Code,omitempty"`
    42  	Data                 []byte                                       `protobuf:"bytes,3,opt,name=Data,proto3" json:"Data,omitempty"`
    43  	XXX_NoUnkeyedLiteral struct{}                                     `json:"-"`
    44  	XXX_unrecognized     []byte                                       `json:"-"`
    45  	XXX_sizecache        int32                                        `json:"-"`
    46  }
    47  
    48  func (m *CallCodeParam) Reset()         { *m = CallCodeParam{} }
    49  func (m *CallCodeParam) String() string { return proto.CompactTextString(m) }
    50  func (*CallCodeParam) ProtoMessage()    {}
    51  func (*CallCodeParam) Descriptor() ([]byte, []int) {
    52  	return fileDescriptor_039da6ebb58a8dc9, []int{0}
    53  }
    54  func (m *CallCodeParam) XXX_Unmarshal(b []byte) error {
    55  	return m.Unmarshal(b)
    56  }
    57  func (m *CallCodeParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    58  	if deterministic {
    59  		return xxx_messageInfo_CallCodeParam.Marshal(b, m, deterministic)
    60  	} else {
    61  		b = b[:cap(b)]
    62  		n, err := m.MarshalTo(b)
    63  		if err != nil {
    64  			return nil, err
    65  		}
    66  		return b[:n], nil
    67  	}
    68  }
    69  func (m *CallCodeParam) XXX_Merge(src proto.Message) {
    70  	xxx_messageInfo_CallCodeParam.Merge(m, src)
    71  }
    72  func (m *CallCodeParam) XXX_Size() int {
    73  	return m.Size()
    74  }
    75  func (m *CallCodeParam) XXX_DiscardUnknown() {
    76  	xxx_messageInfo_CallCodeParam.DiscardUnknown(m)
    77  }
    78  
    79  var xxx_messageInfo_CallCodeParam proto.InternalMessageInfo
    80  
    81  func (m *CallCodeParam) GetCode() []byte {
    82  	if m != nil {
    83  		return m.Code
    84  	}
    85  	return nil
    86  }
    87  
    88  func (m *CallCodeParam) GetData() []byte {
    89  	if m != nil {
    90  		return m.Data
    91  	}
    92  	return nil
    93  }
    94  
    95  func (*CallCodeParam) XXX_MessageName() string {
    96  	return "rpctransact.CallCodeParam"
    97  }
    98  
    99  type TxEnvelope struct {
   100  	Envelope             *github_com_hyperledger_burrow_txs.Envelope `protobuf:"bytes,1,opt,name=Envelope,proto3,customtype=github.com/hyperledger/burrow/txs.Envelope" json:"Envelope,omitempty"`
   101  	XXX_NoUnkeyedLiteral struct{}                                    `json:"-"`
   102  	XXX_unrecognized     []byte                                      `json:"-"`
   103  	XXX_sizecache        int32                                       `json:"-"`
   104  }
   105  
   106  func (m *TxEnvelope) Reset()         { *m = TxEnvelope{} }
   107  func (m *TxEnvelope) String() string { return proto.CompactTextString(m) }
   108  func (*TxEnvelope) ProtoMessage()    {}
   109  func (*TxEnvelope) Descriptor() ([]byte, []int) {
   110  	return fileDescriptor_039da6ebb58a8dc9, []int{1}
   111  }
   112  func (m *TxEnvelope) XXX_Unmarshal(b []byte) error {
   113  	return m.Unmarshal(b)
   114  }
   115  func (m *TxEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   116  	if deterministic {
   117  		return xxx_messageInfo_TxEnvelope.Marshal(b, m, deterministic)
   118  	} else {
   119  		b = b[:cap(b)]
   120  		n, err := m.MarshalTo(b)
   121  		if err != nil {
   122  			return nil, err
   123  		}
   124  		return b[:n], nil
   125  	}
   126  }
   127  func (m *TxEnvelope) XXX_Merge(src proto.Message) {
   128  	xxx_messageInfo_TxEnvelope.Merge(m, src)
   129  }
   130  func (m *TxEnvelope) XXX_Size() int {
   131  	return m.Size()
   132  }
   133  func (m *TxEnvelope) XXX_DiscardUnknown() {
   134  	xxx_messageInfo_TxEnvelope.DiscardUnknown(m)
   135  }
   136  
   137  var xxx_messageInfo_TxEnvelope proto.InternalMessageInfo
   138  
   139  func (*TxEnvelope) XXX_MessageName() string {
   140  	return "rpctransact.TxEnvelope"
   141  }
   142  
   143  type TxEnvelopeParam struct {
   144  	// An existing Envelope - either signed or unsigned - if the latter will be signed server-side
   145  	Envelope *github_com_hyperledger_burrow_txs.Envelope `protobuf:"bytes,1,opt,name=Envelope,proto3,customtype=github.com/hyperledger/burrow/txs.Envelope" json:"Envelope,omitempty"`
   146  	// If no Envelope provided then one will be generated from the provided payload and signed server-side
   147  	Payload *payload.Any `protobuf:"bytes,2,opt,name=Payload,proto3" json:"Payload,omitempty"`
   148  	// The amount of time to wait for the transaction to be committed and the TxExecution to be returned (server-side).
   149  	// If zero there wait is unbounded. Timed out transactions return SyncInfo state that may be helpful debugging
   150  	// non-committed transactions - this timeout must be less than client timeout to see such information!
   151  	Timeout              time.Duration `protobuf:"bytes,3,opt,name=Timeout,proto3,stdduration" json:"Timeout"`
   152  	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
   153  	XXX_unrecognized     []byte        `json:"-"`
   154  	XXX_sizecache        int32         `json:"-"`
   155  }
   156  
   157  func (m *TxEnvelopeParam) Reset()         { *m = TxEnvelopeParam{} }
   158  func (m *TxEnvelopeParam) String() string { return proto.CompactTextString(m) }
   159  func (*TxEnvelopeParam) ProtoMessage()    {}
   160  func (*TxEnvelopeParam) Descriptor() ([]byte, []int) {
   161  	return fileDescriptor_039da6ebb58a8dc9, []int{2}
   162  }
   163  func (m *TxEnvelopeParam) XXX_Unmarshal(b []byte) error {
   164  	return m.Unmarshal(b)
   165  }
   166  func (m *TxEnvelopeParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   167  	if deterministic {
   168  		return xxx_messageInfo_TxEnvelopeParam.Marshal(b, m, deterministic)
   169  	} else {
   170  		b = b[:cap(b)]
   171  		n, err := m.MarshalTo(b)
   172  		if err != nil {
   173  			return nil, err
   174  		}
   175  		return b[:n], nil
   176  	}
   177  }
   178  func (m *TxEnvelopeParam) XXX_Merge(src proto.Message) {
   179  	xxx_messageInfo_TxEnvelopeParam.Merge(m, src)
   180  }
   181  func (m *TxEnvelopeParam) XXX_Size() int {
   182  	return m.Size()
   183  }
   184  func (m *TxEnvelopeParam) XXX_DiscardUnknown() {
   185  	xxx_messageInfo_TxEnvelopeParam.DiscardUnknown(m)
   186  }
   187  
   188  var xxx_messageInfo_TxEnvelopeParam proto.InternalMessageInfo
   189  
   190  func (m *TxEnvelopeParam) GetPayload() *payload.Any {
   191  	if m != nil {
   192  		return m.Payload
   193  	}
   194  	return nil
   195  }
   196  
   197  func (m *TxEnvelopeParam) GetTimeout() time.Duration {
   198  	if m != nil {
   199  		return m.Timeout
   200  	}
   201  	return 0
   202  }
   203  
   204  func (*TxEnvelopeParam) XXX_MessageName() string {
   205  	return "rpctransact.TxEnvelopeParam"
   206  }
   207  func init() {
   208  	proto.RegisterType((*CallCodeParam)(nil), "rpctransact.CallCodeParam")
   209  	golang_proto.RegisterType((*CallCodeParam)(nil), "rpctransact.CallCodeParam")
   210  	proto.RegisterType((*TxEnvelope)(nil), "rpctransact.TxEnvelope")
   211  	golang_proto.RegisterType((*TxEnvelope)(nil), "rpctransact.TxEnvelope")
   212  	proto.RegisterType((*TxEnvelopeParam)(nil), "rpctransact.TxEnvelopeParam")
   213  	golang_proto.RegisterType((*TxEnvelopeParam)(nil), "rpctransact.TxEnvelopeParam")
   214  }
   215  
   216  func init() { proto.RegisterFile("rpctransact.proto", fileDescriptor_039da6ebb58a8dc9) }
   217  func init() { golang_proto.RegisterFile("rpctransact.proto", fileDescriptor_039da6ebb58a8dc9) }
   218  
   219  var fileDescriptor_039da6ebb58a8dc9 = []byte{
   220  	// 555 bytes of a gzipped FileDescriptorProto
   221  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x53, 0x4d, 0x6f, 0xd3, 0x40,
   222  	0x10, 0xc5, 0x7c, 0xf4, 0x63, 0xdc, 0x2a, 0x74, 0x2f, 0x84, 0x08, 0x39, 0x28, 0x07, 0x84, 0x50,
   223  	0xbb, 0x8e, 0x42, 0x8f, 0x7c, 0x28, 0x4e, 0xdb, 0x23, 0xaa, 0x1c, 0x0b, 0x09, 0x6e, 0x1b, 0x7b,
   224  	0x71, 0x2d, 0xd9, 0x5e, 0x6b, 0xbd, 0x06, 0xe7, 0x57, 0x70, 0xe1, 0xc0, 0xcf, 0xe1, 0x98, 0x23,
   225  	0x12, 0xb7, 0x1e, 0x02, 0x4a, 0xff, 0x08, 0xf2, 0xae, 0xdd, 0xda, 0x49, 0xd3, 0x72, 0xe1, 0x36,
   226  	0xfb, 0x66, 0xdf, 0xdb, 0x79, 0x33, 0xb3, 0xb0, 0xc7, 0x13, 0x57, 0x70, 0x12, 0xa7, 0xc4, 0x15,
   227  	0x38, 0xe1, 0x4c, 0x30, 0xa4, 0xd7, 0xa0, 0xce, 0x81, 0x1f, 0x88, 0xb3, 0x6c, 0x82, 0x5d, 0x16,
   228  	0x99, 0x3e, 0xf3, 0x99, 0x29, 0xef, 0x4c, 0xb2, 0x4f, 0xf2, 0x24, 0x0f, 0x32, 0x52, 0xdc, 0x8e,
   229  	0xe1, 0x33, 0xe6, 0x87, 0xf4, 0xea, 0x96, 0x97, 0x71, 0x22, 0x02, 0x16, 0x97, 0x79, 0xa0, 0x39,
   230  	0x75, 0xcb, 0x78, 0x37, 0x21, 0xd3, 0x90, 0x11, 0xaf, 0x3c, 0x6e, 0x8b, 0x3c, 0x55, 0x61, 0xef,
   231  	0xab, 0x06, 0xbb, 0x23, 0x12, 0x86, 0x23, 0xe6, 0xd1, 0x53, 0xc2, 0x49, 0x84, 0xde, 0x83, 0x7e,
   232  	0xc2, 0x59, 0x34, 0xf4, 0x3c, 0x4e, 0xd3, 0xb4, 0xad, 0x3d, 0xd5, 0x9e, 0xef, 0x58, 0x87, 0xb3,
   233  	0x79, 0xf7, 0xce, 0xf9, 0xbc, 0xbb, 0x5f, 0xab, 0xf1, 0x6c, 0x9a, 0x50, 0x1e, 0x52, 0xcf, 0xa7,
   234  	0xdc, 0x9c, 0x64, 0x9c, 0xb3, 0x2f, 0xa6, 0xcb, 0xa7, 0x89, 0x60, 0xb8, 0xe4, 0xda, 0x75, 0x21,
   235  	0x84, 0xe0, 0x7e, 0xf1, 0x48, 0xfb, 0x6e, 0x21, 0x68, 0xcb, 0xb8, 0xc0, 0x8e, 0x88, 0x20, 0xed,
   236  	0x7b, 0x0a, 0x2b, 0xe2, 0x9e, 0x0f, 0xe0, 0xe4, 0xc7, 0xf1, 0x67, 0x1a, 0xb2, 0x84, 0xa2, 0x0f,
   237  	0xb0, 0x55, 0xc5, 0xb2, 0x14, 0x7d, 0xb0, 0x8b, 0x8b, 0xea, 0x2b, 0xd0, 0xc2, 0xe7, 0xf3, 0xee,
   238  	0x8b, 0x9b, 0xab, 0xaa, 0xdf, 0xb7, 0x2f, 0xe5, 0x7a, 0xbf, 0x34, 0x68, 0x5d, 0xbd, 0xa4, 0xcc,
   239  	0xff, 0xbf, 0xe7, 0xd0, 0x33, 0xd8, 0x3c, 0x55, 0x53, 0x90, 0x2d, 0xd0, 0x07, 0x3b, 0xb8, 0x9a,
   240  	0xca, 0x30, 0x9e, 0xda, 0x55, 0x12, 0xbd, 0x86, 0x4d, 0x27, 0x88, 0x28, 0xcb, 0x84, 0x6c, 0x8b,
   241  	0x3e, 0x78, 0x8c, 0xd5, 0xa4, 0x71, 0x35, 0x69, 0x7c, 0x54, 0x4e, 0xda, 0xda, 0x2a, 0xc6, 0xf2,
   242  	0xfd, 0x77, 0x57, 0xb3, 0x2b, 0xce, 0xe0, 0xdb, 0x03, 0xd8, 0x72, 0xca, 0x95, 0x42, 0x16, 0xb4,
   243  	0x2c, 0xce, 0x88, 0xe7, 0x92, 0x54, 0x38, 0xf9, 0x78, 0x1a, 0xbb, 0xe8, 0x09, 0xae, 0xaf, 0xe1,
   244  	0x92, 0xff, 0xce, 0x1e, 0x96, 0x5b, 0xe3, 0xe4, 0xc7, 0x39, 0x75, 0xb3, 0xe2, 0x0d, 0xf4, 0x06,
   245  	0x1e, 0xd6, 0x34, 0x86, 0xe9, 0xed, 0x22, 0x3b, 0xb2, 0x65, 0x36, 0x75, 0x69, 0x90, 0x08, 0xf4,
   246  	0x16, 0x36, 0xc6, 0x81, 0x1f, 0x3b, 0xf9, 0x2d, 0xac, 0x47, 0x6b, 0xb2, 0xe8, 0x10, 0xf4, 0x13,
   247  	0xc6, 0xa3, 0x2c, 0x24, 0x82, 0x3a, 0x39, 0x6a, 0xb4, 0x6d, 0x3d, 0xab, 0x0f, 0x50, 0xec, 0x75,
   248  	0xe9, 0xba, 0x75, 0x49, 0x52, 0xe0, 0x75, 0x46, 0xf7, 0x41, 0x57, 0x49, 0xe5, 0x71, 0x85, 0xd2,
   249  	0xb4, 0x65, 0xc2, 0x76, 0xa9, 0x1f, 0x44, 0xff, 0x24, 0xff, 0x4a, 0xc9, 0x17, 0x7b, 0x5f, 0x50,
   250  	0x3a, 0x8d, 0xc2, 0x1b, 0x5f, 0xf0, 0x3a, 0x76, 0x1f, 0x60, 0x4c, 0x63, 0x6f, 0xc5, 0x8e, 0x02,
   251  	0xd7, 0xd8, 0x51, 0xc9, 0x65, 0x3b, 0x25, 0xa5, 0x69, 0xa7, 0x0f, 0xf0, 0x8e, 0x44, 0x74, 0x45,
   252  	0x5f, 0x81, 0x6b, 0xf4, 0x55, 0x72, 0x59, 0xbf, 0xa4, 0x34, 0xf4, 0xad, 0xd1, 0x6c, 0x61, 0x68,
   253  	0x3f, 0x17, 0x86, 0xf6, 0x67, 0x61, 0x68, 0x3f, 0x2e, 0x0c, 0x6d, 0x76, 0x61, 0x68, 0x1f, 0x0f,
   254  	0x6e, 0xfe, 0x49, 0x3c, 0x71, 0xcd, 0x5a, 0x97, 0x26, 0x1b, 0xf2, 0x07, 0xbc, 0xfc, 0x1b, 0x00,
   255  	0x00, 0xff, 0xff, 0x70, 0x12, 0x34, 0xbe, 0x4a, 0x05, 0x00, 0x00,
   256  }
   257  
   258  // Reference imports to suppress errors if they are not otherwise used.
   259  var _ context.Context
   260  var _ grpc.ClientConn
   261  
   262  // This is a compile-time assertion to ensure that this generated file
   263  // is compatible with the grpc package it is being compiled against.
   264  const _ = grpc.SupportPackageIsVersion4
   265  
   266  // TransactClient is the client API for Transact service.
   267  //
   268  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   269  type TransactClient interface {
   270  	// Broadcast a transaction to the mempool - if the transaction is not signed signing will be attempted server-side
   271  	// and wait for it to be included in block
   272  	BroadcastTxSync(ctx context.Context, in *TxEnvelopeParam, opts ...grpc.CallOption) (*exec.TxExecution, error)
   273  	// Broadcast a transaction to the mempool - if the transaction is not signed signing will be attempted server-side
   274  	BroadcastTxAsync(ctx context.Context, in *TxEnvelopeParam, opts ...grpc.CallOption) (*txs.Receipt, error)
   275  	// Sign transaction server-side
   276  	SignTx(ctx context.Context, in *TxEnvelopeParam, opts ...grpc.CallOption) (*TxEnvelope, error)
   277  	// Formulate a transaction from a Payload and retrun the envelop with the Tx bytes ready to sign
   278  	FormulateTx(ctx context.Context, in *payload.Any, opts ...grpc.CallOption) (*TxEnvelope, error)
   279  	// Formulate and sign a CallTx transaction signed server-side and wait for it to be included in a block, retrieving response
   280  	CallTxSync(ctx context.Context, in *payload.CallTx, opts ...grpc.CallOption) (*exec.TxExecution, error)
   281  	// Formulate and sign a CallTx transaction signed server-side
   282  	CallTxAsync(ctx context.Context, in *payload.CallTx, opts ...grpc.CallOption) (*txs.Receipt, error)
   283  	// Perform a 'simulated' call of a contract against the current committed EVM state without any changes been saved
   284  	// and wait for the transaction to be included in a block
   285  	CallTxSim(ctx context.Context, in *payload.CallTx, opts ...grpc.CallOption) (*exec.TxExecution, error)
   286  	// Perform a 'simulated' execution of provided code against the current committed EVM state without any changes been saved
   287  	CallCodeSim(ctx context.Context, in *CallCodeParam, opts ...grpc.CallOption) (*exec.TxExecution, error)
   288  	// Formulate a SendTx transaction signed server-side and wait for it to be included in a block, retrieving response
   289  	SendTxSync(ctx context.Context, in *payload.SendTx, opts ...grpc.CallOption) (*exec.TxExecution, error)
   290  	// Formulate and  SendTx transaction signed server-side
   291  	SendTxAsync(ctx context.Context, in *payload.SendTx, opts ...grpc.CallOption) (*txs.Receipt, error)
   292  	// Formualte a NameTx signed server-side and wait for it to be included in a block returning the registered name
   293  	NameTxSync(ctx context.Context, in *payload.NameTx, opts ...grpc.CallOption) (*exec.TxExecution, error)
   294  	// Formulate a NameTx signed server-side
   295  	NameTxAsync(ctx context.Context, in *payload.NameTx, opts ...grpc.CallOption) (*txs.Receipt, error)
   296  }
   297  
   298  type transactClient struct {
   299  	cc *grpc.ClientConn
   300  }
   301  
   302  func NewTransactClient(cc *grpc.ClientConn) TransactClient {
   303  	return &transactClient{cc}
   304  }
   305  
   306  func (c *transactClient) BroadcastTxSync(ctx context.Context, in *TxEnvelopeParam, opts ...grpc.CallOption) (*exec.TxExecution, error) {
   307  	out := new(exec.TxExecution)
   308  	err := c.cc.Invoke(ctx, "/rpctransact.Transact/BroadcastTxSync", in, out, opts...)
   309  	if err != nil {
   310  		return nil, err
   311  	}
   312  	return out, nil
   313  }
   314  
   315  func (c *transactClient) BroadcastTxAsync(ctx context.Context, in *TxEnvelopeParam, opts ...grpc.CallOption) (*txs.Receipt, error) {
   316  	out := new(txs.Receipt)
   317  	err := c.cc.Invoke(ctx, "/rpctransact.Transact/BroadcastTxAsync", in, out, opts...)
   318  	if err != nil {
   319  		return nil, err
   320  	}
   321  	return out, nil
   322  }
   323  
   324  func (c *transactClient) SignTx(ctx context.Context, in *TxEnvelopeParam, opts ...grpc.CallOption) (*TxEnvelope, error) {
   325  	out := new(TxEnvelope)
   326  	err := c.cc.Invoke(ctx, "/rpctransact.Transact/SignTx", in, out, opts...)
   327  	if err != nil {
   328  		return nil, err
   329  	}
   330  	return out, nil
   331  }
   332  
   333  func (c *transactClient) FormulateTx(ctx context.Context, in *payload.Any, opts ...grpc.CallOption) (*TxEnvelope, error) {
   334  	out := new(TxEnvelope)
   335  	err := c.cc.Invoke(ctx, "/rpctransact.Transact/FormulateTx", in, out, opts...)
   336  	if err != nil {
   337  		return nil, err
   338  	}
   339  	return out, nil
   340  }
   341  
   342  func (c *transactClient) CallTxSync(ctx context.Context, in *payload.CallTx, opts ...grpc.CallOption) (*exec.TxExecution, error) {
   343  	out := new(exec.TxExecution)
   344  	err := c.cc.Invoke(ctx, "/rpctransact.Transact/CallTxSync", in, out, opts...)
   345  	if err != nil {
   346  		return nil, err
   347  	}
   348  	return out, nil
   349  }
   350  
   351  func (c *transactClient) CallTxAsync(ctx context.Context, in *payload.CallTx, opts ...grpc.CallOption) (*txs.Receipt, error) {
   352  	out := new(txs.Receipt)
   353  	err := c.cc.Invoke(ctx, "/rpctransact.Transact/CallTxAsync", in, out, opts...)
   354  	if err != nil {
   355  		return nil, err
   356  	}
   357  	return out, nil
   358  }
   359  
   360  func (c *transactClient) CallTxSim(ctx context.Context, in *payload.CallTx, opts ...grpc.CallOption) (*exec.TxExecution, error) {
   361  	out := new(exec.TxExecution)
   362  	err := c.cc.Invoke(ctx, "/rpctransact.Transact/CallTxSim", in, out, opts...)
   363  	if err != nil {
   364  		return nil, err
   365  	}
   366  	return out, nil
   367  }
   368  
   369  func (c *transactClient) CallCodeSim(ctx context.Context, in *CallCodeParam, opts ...grpc.CallOption) (*exec.TxExecution, error) {
   370  	out := new(exec.TxExecution)
   371  	err := c.cc.Invoke(ctx, "/rpctransact.Transact/CallCodeSim", in, out, opts...)
   372  	if err != nil {
   373  		return nil, err
   374  	}
   375  	return out, nil
   376  }
   377  
   378  func (c *transactClient) SendTxSync(ctx context.Context, in *payload.SendTx, opts ...grpc.CallOption) (*exec.TxExecution, error) {
   379  	out := new(exec.TxExecution)
   380  	err := c.cc.Invoke(ctx, "/rpctransact.Transact/SendTxSync", in, out, opts...)
   381  	if err != nil {
   382  		return nil, err
   383  	}
   384  	return out, nil
   385  }
   386  
   387  func (c *transactClient) SendTxAsync(ctx context.Context, in *payload.SendTx, opts ...grpc.CallOption) (*txs.Receipt, error) {
   388  	out := new(txs.Receipt)
   389  	err := c.cc.Invoke(ctx, "/rpctransact.Transact/SendTxAsync", in, out, opts...)
   390  	if err != nil {
   391  		return nil, err
   392  	}
   393  	return out, nil
   394  }
   395  
   396  func (c *transactClient) NameTxSync(ctx context.Context, in *payload.NameTx, opts ...grpc.CallOption) (*exec.TxExecution, error) {
   397  	out := new(exec.TxExecution)
   398  	err := c.cc.Invoke(ctx, "/rpctransact.Transact/NameTxSync", in, out, opts...)
   399  	if err != nil {
   400  		return nil, err
   401  	}
   402  	return out, nil
   403  }
   404  
   405  func (c *transactClient) NameTxAsync(ctx context.Context, in *payload.NameTx, opts ...grpc.CallOption) (*txs.Receipt, error) {
   406  	out := new(txs.Receipt)
   407  	err := c.cc.Invoke(ctx, "/rpctransact.Transact/NameTxAsync", in, out, opts...)
   408  	if err != nil {
   409  		return nil, err
   410  	}
   411  	return out, nil
   412  }
   413  
   414  // TransactServer is the server API for Transact service.
   415  type TransactServer interface {
   416  	// Broadcast a transaction to the mempool - if the transaction is not signed signing will be attempted server-side
   417  	// and wait for it to be included in block
   418  	BroadcastTxSync(context.Context, *TxEnvelopeParam) (*exec.TxExecution, error)
   419  	// Broadcast a transaction to the mempool - if the transaction is not signed signing will be attempted server-side
   420  	BroadcastTxAsync(context.Context, *TxEnvelopeParam) (*txs.Receipt, error)
   421  	// Sign transaction server-side
   422  	SignTx(context.Context, *TxEnvelopeParam) (*TxEnvelope, error)
   423  	// Formulate a transaction from a Payload and retrun the envelop with the Tx bytes ready to sign
   424  	FormulateTx(context.Context, *payload.Any) (*TxEnvelope, error)
   425  	// Formulate and sign a CallTx transaction signed server-side and wait for it to be included in a block, retrieving response
   426  	CallTxSync(context.Context, *payload.CallTx) (*exec.TxExecution, error)
   427  	// Formulate and sign a CallTx transaction signed server-side
   428  	CallTxAsync(context.Context, *payload.CallTx) (*txs.Receipt, error)
   429  	// Perform a 'simulated' call of a contract against the current committed EVM state without any changes been saved
   430  	// and wait for the transaction to be included in a block
   431  	CallTxSim(context.Context, *payload.CallTx) (*exec.TxExecution, error)
   432  	// Perform a 'simulated' execution of provided code against the current committed EVM state without any changes been saved
   433  	CallCodeSim(context.Context, *CallCodeParam) (*exec.TxExecution, error)
   434  	// Formulate a SendTx transaction signed server-side and wait for it to be included in a block, retrieving response
   435  	SendTxSync(context.Context, *payload.SendTx) (*exec.TxExecution, error)
   436  	// Formulate and  SendTx transaction signed server-side
   437  	SendTxAsync(context.Context, *payload.SendTx) (*txs.Receipt, error)
   438  	// Formualte a NameTx signed server-side and wait for it to be included in a block returning the registered name
   439  	NameTxSync(context.Context, *payload.NameTx) (*exec.TxExecution, error)
   440  	// Formulate a NameTx signed server-side
   441  	NameTxAsync(context.Context, *payload.NameTx) (*txs.Receipt, error)
   442  }
   443  
   444  func RegisterTransactServer(s *grpc.Server, srv TransactServer) {
   445  	s.RegisterService(&_Transact_serviceDesc, srv)
   446  }
   447  
   448  func _Transact_BroadcastTxSync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   449  	in := new(TxEnvelopeParam)
   450  	if err := dec(in); err != nil {
   451  		return nil, err
   452  	}
   453  	if interceptor == nil {
   454  		return srv.(TransactServer).BroadcastTxSync(ctx, in)
   455  	}
   456  	info := &grpc.UnaryServerInfo{
   457  		Server:     srv,
   458  		FullMethod: "/rpctransact.Transact/BroadcastTxSync",
   459  	}
   460  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   461  		return srv.(TransactServer).BroadcastTxSync(ctx, req.(*TxEnvelopeParam))
   462  	}
   463  	return interceptor(ctx, in, info, handler)
   464  }
   465  
   466  func _Transact_BroadcastTxAsync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   467  	in := new(TxEnvelopeParam)
   468  	if err := dec(in); err != nil {
   469  		return nil, err
   470  	}
   471  	if interceptor == nil {
   472  		return srv.(TransactServer).BroadcastTxAsync(ctx, in)
   473  	}
   474  	info := &grpc.UnaryServerInfo{
   475  		Server:     srv,
   476  		FullMethod: "/rpctransact.Transact/BroadcastTxAsync",
   477  	}
   478  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   479  		return srv.(TransactServer).BroadcastTxAsync(ctx, req.(*TxEnvelopeParam))
   480  	}
   481  	return interceptor(ctx, in, info, handler)
   482  }
   483  
   484  func _Transact_SignTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   485  	in := new(TxEnvelopeParam)
   486  	if err := dec(in); err != nil {
   487  		return nil, err
   488  	}
   489  	if interceptor == nil {
   490  		return srv.(TransactServer).SignTx(ctx, in)
   491  	}
   492  	info := &grpc.UnaryServerInfo{
   493  		Server:     srv,
   494  		FullMethod: "/rpctransact.Transact/SignTx",
   495  	}
   496  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   497  		return srv.(TransactServer).SignTx(ctx, req.(*TxEnvelopeParam))
   498  	}
   499  	return interceptor(ctx, in, info, handler)
   500  }
   501  
   502  func _Transact_FormulateTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   503  	in := new(payload.Any)
   504  	if err := dec(in); err != nil {
   505  		return nil, err
   506  	}
   507  	if interceptor == nil {
   508  		return srv.(TransactServer).FormulateTx(ctx, in)
   509  	}
   510  	info := &grpc.UnaryServerInfo{
   511  		Server:     srv,
   512  		FullMethod: "/rpctransact.Transact/FormulateTx",
   513  	}
   514  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   515  		return srv.(TransactServer).FormulateTx(ctx, req.(*payload.Any))
   516  	}
   517  	return interceptor(ctx, in, info, handler)
   518  }
   519  
   520  func _Transact_CallTxSync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   521  	in := new(payload.CallTx)
   522  	if err := dec(in); err != nil {
   523  		return nil, err
   524  	}
   525  	if interceptor == nil {
   526  		return srv.(TransactServer).CallTxSync(ctx, in)
   527  	}
   528  	info := &grpc.UnaryServerInfo{
   529  		Server:     srv,
   530  		FullMethod: "/rpctransact.Transact/CallTxSync",
   531  	}
   532  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   533  		return srv.(TransactServer).CallTxSync(ctx, req.(*payload.CallTx))
   534  	}
   535  	return interceptor(ctx, in, info, handler)
   536  }
   537  
   538  func _Transact_CallTxAsync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   539  	in := new(payload.CallTx)
   540  	if err := dec(in); err != nil {
   541  		return nil, err
   542  	}
   543  	if interceptor == nil {
   544  		return srv.(TransactServer).CallTxAsync(ctx, in)
   545  	}
   546  	info := &grpc.UnaryServerInfo{
   547  		Server:     srv,
   548  		FullMethod: "/rpctransact.Transact/CallTxAsync",
   549  	}
   550  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   551  		return srv.(TransactServer).CallTxAsync(ctx, req.(*payload.CallTx))
   552  	}
   553  	return interceptor(ctx, in, info, handler)
   554  }
   555  
   556  func _Transact_CallTxSim_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   557  	in := new(payload.CallTx)
   558  	if err := dec(in); err != nil {
   559  		return nil, err
   560  	}
   561  	if interceptor == nil {
   562  		return srv.(TransactServer).CallTxSim(ctx, in)
   563  	}
   564  	info := &grpc.UnaryServerInfo{
   565  		Server:     srv,
   566  		FullMethod: "/rpctransact.Transact/CallTxSim",
   567  	}
   568  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   569  		return srv.(TransactServer).CallTxSim(ctx, req.(*payload.CallTx))
   570  	}
   571  	return interceptor(ctx, in, info, handler)
   572  }
   573  
   574  func _Transact_CallCodeSim_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   575  	in := new(CallCodeParam)
   576  	if err := dec(in); err != nil {
   577  		return nil, err
   578  	}
   579  	if interceptor == nil {
   580  		return srv.(TransactServer).CallCodeSim(ctx, in)
   581  	}
   582  	info := &grpc.UnaryServerInfo{
   583  		Server:     srv,
   584  		FullMethod: "/rpctransact.Transact/CallCodeSim",
   585  	}
   586  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   587  		return srv.(TransactServer).CallCodeSim(ctx, req.(*CallCodeParam))
   588  	}
   589  	return interceptor(ctx, in, info, handler)
   590  }
   591  
   592  func _Transact_SendTxSync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   593  	in := new(payload.SendTx)
   594  	if err := dec(in); err != nil {
   595  		return nil, err
   596  	}
   597  	if interceptor == nil {
   598  		return srv.(TransactServer).SendTxSync(ctx, in)
   599  	}
   600  	info := &grpc.UnaryServerInfo{
   601  		Server:     srv,
   602  		FullMethod: "/rpctransact.Transact/SendTxSync",
   603  	}
   604  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   605  		return srv.(TransactServer).SendTxSync(ctx, req.(*payload.SendTx))
   606  	}
   607  	return interceptor(ctx, in, info, handler)
   608  }
   609  
   610  func _Transact_SendTxAsync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   611  	in := new(payload.SendTx)
   612  	if err := dec(in); err != nil {
   613  		return nil, err
   614  	}
   615  	if interceptor == nil {
   616  		return srv.(TransactServer).SendTxAsync(ctx, in)
   617  	}
   618  	info := &grpc.UnaryServerInfo{
   619  		Server:     srv,
   620  		FullMethod: "/rpctransact.Transact/SendTxAsync",
   621  	}
   622  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   623  		return srv.(TransactServer).SendTxAsync(ctx, req.(*payload.SendTx))
   624  	}
   625  	return interceptor(ctx, in, info, handler)
   626  }
   627  
   628  func _Transact_NameTxSync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   629  	in := new(payload.NameTx)
   630  	if err := dec(in); err != nil {
   631  		return nil, err
   632  	}
   633  	if interceptor == nil {
   634  		return srv.(TransactServer).NameTxSync(ctx, in)
   635  	}
   636  	info := &grpc.UnaryServerInfo{
   637  		Server:     srv,
   638  		FullMethod: "/rpctransact.Transact/NameTxSync",
   639  	}
   640  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   641  		return srv.(TransactServer).NameTxSync(ctx, req.(*payload.NameTx))
   642  	}
   643  	return interceptor(ctx, in, info, handler)
   644  }
   645  
   646  func _Transact_NameTxAsync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   647  	in := new(payload.NameTx)
   648  	if err := dec(in); err != nil {
   649  		return nil, err
   650  	}
   651  	if interceptor == nil {
   652  		return srv.(TransactServer).NameTxAsync(ctx, in)
   653  	}
   654  	info := &grpc.UnaryServerInfo{
   655  		Server:     srv,
   656  		FullMethod: "/rpctransact.Transact/NameTxAsync",
   657  	}
   658  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   659  		return srv.(TransactServer).NameTxAsync(ctx, req.(*payload.NameTx))
   660  	}
   661  	return interceptor(ctx, in, info, handler)
   662  }
   663  
   664  var _Transact_serviceDesc = grpc.ServiceDesc{
   665  	ServiceName: "rpctransact.Transact",
   666  	HandlerType: (*TransactServer)(nil),
   667  	Methods: []grpc.MethodDesc{
   668  		{
   669  			MethodName: "BroadcastTxSync",
   670  			Handler:    _Transact_BroadcastTxSync_Handler,
   671  		},
   672  		{
   673  			MethodName: "BroadcastTxAsync",
   674  			Handler:    _Transact_BroadcastTxAsync_Handler,
   675  		},
   676  		{
   677  			MethodName: "SignTx",
   678  			Handler:    _Transact_SignTx_Handler,
   679  		},
   680  		{
   681  			MethodName: "FormulateTx",
   682  			Handler:    _Transact_FormulateTx_Handler,
   683  		},
   684  		{
   685  			MethodName: "CallTxSync",
   686  			Handler:    _Transact_CallTxSync_Handler,
   687  		},
   688  		{
   689  			MethodName: "CallTxAsync",
   690  			Handler:    _Transact_CallTxAsync_Handler,
   691  		},
   692  		{
   693  			MethodName: "CallTxSim",
   694  			Handler:    _Transact_CallTxSim_Handler,
   695  		},
   696  		{
   697  			MethodName: "CallCodeSim",
   698  			Handler:    _Transact_CallCodeSim_Handler,
   699  		},
   700  		{
   701  			MethodName: "SendTxSync",
   702  			Handler:    _Transact_SendTxSync_Handler,
   703  		},
   704  		{
   705  			MethodName: "SendTxAsync",
   706  			Handler:    _Transact_SendTxAsync_Handler,
   707  		},
   708  		{
   709  			MethodName: "NameTxSync",
   710  			Handler:    _Transact_NameTxSync_Handler,
   711  		},
   712  		{
   713  			MethodName: "NameTxAsync",
   714  			Handler:    _Transact_NameTxAsync_Handler,
   715  		},
   716  	},
   717  	Streams:  []grpc.StreamDesc{},
   718  	Metadata: "rpctransact.proto",
   719  }
   720  
   721  func (m *CallCodeParam) Marshal() (dAtA []byte, err error) {
   722  	size := m.Size()
   723  	dAtA = make([]byte, size)
   724  	n, err := m.MarshalTo(dAtA)
   725  	if err != nil {
   726  		return nil, err
   727  	}
   728  	return dAtA[:n], nil
   729  }
   730  
   731  func (m *CallCodeParam) MarshalTo(dAtA []byte) (int, error) {
   732  	var i int
   733  	_ = i
   734  	var l int
   735  	_ = l
   736  	dAtA[i] = 0xa
   737  	i++
   738  	i = encodeVarintRpctransact(dAtA, i, uint64(m.FromAddress.Size()))
   739  	n1, err := m.FromAddress.MarshalTo(dAtA[i:])
   740  	if err != nil {
   741  		return 0, err
   742  	}
   743  	i += n1
   744  	if len(m.Code) > 0 {
   745  		dAtA[i] = 0x12
   746  		i++
   747  		i = encodeVarintRpctransact(dAtA, i, uint64(len(m.Code)))
   748  		i += copy(dAtA[i:], m.Code)
   749  	}
   750  	if len(m.Data) > 0 {
   751  		dAtA[i] = 0x1a
   752  		i++
   753  		i = encodeVarintRpctransact(dAtA, i, uint64(len(m.Data)))
   754  		i += copy(dAtA[i:], m.Data)
   755  	}
   756  	if m.XXX_unrecognized != nil {
   757  		i += copy(dAtA[i:], m.XXX_unrecognized)
   758  	}
   759  	return i, nil
   760  }
   761  
   762  func (m *TxEnvelope) Marshal() (dAtA []byte, err error) {
   763  	size := m.Size()
   764  	dAtA = make([]byte, size)
   765  	n, err := m.MarshalTo(dAtA)
   766  	if err != nil {
   767  		return nil, err
   768  	}
   769  	return dAtA[:n], nil
   770  }
   771  
   772  func (m *TxEnvelope) MarshalTo(dAtA []byte) (int, error) {
   773  	var i int
   774  	_ = i
   775  	var l int
   776  	_ = l
   777  	if m.Envelope != nil {
   778  		dAtA[i] = 0xa
   779  		i++
   780  		i = encodeVarintRpctransact(dAtA, i, uint64(m.Envelope.Size()))
   781  		n2, err := m.Envelope.MarshalTo(dAtA[i:])
   782  		if err != nil {
   783  			return 0, err
   784  		}
   785  		i += n2
   786  	}
   787  	if m.XXX_unrecognized != nil {
   788  		i += copy(dAtA[i:], m.XXX_unrecognized)
   789  	}
   790  	return i, nil
   791  }
   792  
   793  func (m *TxEnvelopeParam) Marshal() (dAtA []byte, err error) {
   794  	size := m.Size()
   795  	dAtA = make([]byte, size)
   796  	n, err := m.MarshalTo(dAtA)
   797  	if err != nil {
   798  		return nil, err
   799  	}
   800  	return dAtA[:n], nil
   801  }
   802  
   803  func (m *TxEnvelopeParam) MarshalTo(dAtA []byte) (int, error) {
   804  	var i int
   805  	_ = i
   806  	var l int
   807  	_ = l
   808  	if m.Envelope != nil {
   809  		dAtA[i] = 0xa
   810  		i++
   811  		i = encodeVarintRpctransact(dAtA, i, uint64(m.Envelope.Size()))
   812  		n3, err := m.Envelope.MarshalTo(dAtA[i:])
   813  		if err != nil {
   814  			return 0, err
   815  		}
   816  		i += n3
   817  	}
   818  	if m.Payload != nil {
   819  		dAtA[i] = 0x12
   820  		i++
   821  		i = encodeVarintRpctransact(dAtA, i, uint64(m.Payload.Size()))
   822  		n4, err := m.Payload.MarshalTo(dAtA[i:])
   823  		if err != nil {
   824  			return 0, err
   825  		}
   826  		i += n4
   827  	}
   828  	dAtA[i] = 0x1a
   829  	i++
   830  	i = encodeVarintRpctransact(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(m.Timeout)))
   831  	n5, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Timeout, dAtA[i:])
   832  	if err != nil {
   833  		return 0, err
   834  	}
   835  	i += n5
   836  	if m.XXX_unrecognized != nil {
   837  		i += copy(dAtA[i:], m.XXX_unrecognized)
   838  	}
   839  	return i, nil
   840  }
   841  
   842  func encodeVarintRpctransact(dAtA []byte, offset int, v uint64) int {
   843  	for v >= 1<<7 {
   844  		dAtA[offset] = uint8(v&0x7f | 0x80)
   845  		v >>= 7
   846  		offset++
   847  	}
   848  	dAtA[offset] = uint8(v)
   849  	return offset + 1
   850  }
   851  func (m *CallCodeParam) Size() (n int) {
   852  	if m == nil {
   853  		return 0
   854  	}
   855  	var l int
   856  	_ = l
   857  	l = m.FromAddress.Size()
   858  	n += 1 + l + sovRpctransact(uint64(l))
   859  	l = len(m.Code)
   860  	if l > 0 {
   861  		n += 1 + l + sovRpctransact(uint64(l))
   862  	}
   863  	l = len(m.Data)
   864  	if l > 0 {
   865  		n += 1 + l + sovRpctransact(uint64(l))
   866  	}
   867  	if m.XXX_unrecognized != nil {
   868  		n += len(m.XXX_unrecognized)
   869  	}
   870  	return n
   871  }
   872  
   873  func (m *TxEnvelope) Size() (n int) {
   874  	if m == nil {
   875  		return 0
   876  	}
   877  	var l int
   878  	_ = l
   879  	if m.Envelope != nil {
   880  		l = m.Envelope.Size()
   881  		n += 1 + l + sovRpctransact(uint64(l))
   882  	}
   883  	if m.XXX_unrecognized != nil {
   884  		n += len(m.XXX_unrecognized)
   885  	}
   886  	return n
   887  }
   888  
   889  func (m *TxEnvelopeParam) Size() (n int) {
   890  	if m == nil {
   891  		return 0
   892  	}
   893  	var l int
   894  	_ = l
   895  	if m.Envelope != nil {
   896  		l = m.Envelope.Size()
   897  		n += 1 + l + sovRpctransact(uint64(l))
   898  	}
   899  	if m.Payload != nil {
   900  		l = m.Payload.Size()
   901  		n += 1 + l + sovRpctransact(uint64(l))
   902  	}
   903  	l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.Timeout)
   904  	n += 1 + l + sovRpctransact(uint64(l))
   905  	if m.XXX_unrecognized != nil {
   906  		n += len(m.XXX_unrecognized)
   907  	}
   908  	return n
   909  }
   910  
   911  func sovRpctransact(x uint64) (n int) {
   912  	for {
   913  		n++
   914  		x >>= 7
   915  		if x == 0 {
   916  			break
   917  		}
   918  	}
   919  	return n
   920  }
   921  func sozRpctransact(x uint64) (n int) {
   922  	return sovRpctransact(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   923  }
   924  func (m *CallCodeParam) Unmarshal(dAtA []byte) error {
   925  	l := len(dAtA)
   926  	iNdEx := 0
   927  	for iNdEx < l {
   928  		preIndex := iNdEx
   929  		var wire uint64
   930  		for shift := uint(0); ; shift += 7 {
   931  			if shift >= 64 {
   932  				return ErrIntOverflowRpctransact
   933  			}
   934  			if iNdEx >= l {
   935  				return io.ErrUnexpectedEOF
   936  			}
   937  			b := dAtA[iNdEx]
   938  			iNdEx++
   939  			wire |= uint64(b&0x7F) << shift
   940  			if b < 0x80 {
   941  				break
   942  			}
   943  		}
   944  		fieldNum := int32(wire >> 3)
   945  		wireType := int(wire & 0x7)
   946  		if wireType == 4 {
   947  			return fmt.Errorf("proto: CallCodeParam: wiretype end group for non-group")
   948  		}
   949  		if fieldNum <= 0 {
   950  			return fmt.Errorf("proto: CallCodeParam: illegal tag %d (wire type %d)", fieldNum, wire)
   951  		}
   952  		switch fieldNum {
   953  		case 1:
   954  			if wireType != 2 {
   955  				return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType)
   956  			}
   957  			var byteLen int
   958  			for shift := uint(0); ; shift += 7 {
   959  				if shift >= 64 {
   960  					return ErrIntOverflowRpctransact
   961  				}
   962  				if iNdEx >= l {
   963  					return io.ErrUnexpectedEOF
   964  				}
   965  				b := dAtA[iNdEx]
   966  				iNdEx++
   967  				byteLen |= int(b&0x7F) << shift
   968  				if b < 0x80 {
   969  					break
   970  				}
   971  			}
   972  			if byteLen < 0 {
   973  				return ErrInvalidLengthRpctransact
   974  			}
   975  			postIndex := iNdEx + byteLen
   976  			if postIndex < 0 {
   977  				return ErrInvalidLengthRpctransact
   978  			}
   979  			if postIndex > l {
   980  				return io.ErrUnexpectedEOF
   981  			}
   982  			if err := m.FromAddress.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   983  				return err
   984  			}
   985  			iNdEx = postIndex
   986  		case 2:
   987  			if wireType != 2 {
   988  				return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
   989  			}
   990  			var byteLen int
   991  			for shift := uint(0); ; shift += 7 {
   992  				if shift >= 64 {
   993  					return ErrIntOverflowRpctransact
   994  				}
   995  				if iNdEx >= l {
   996  					return io.ErrUnexpectedEOF
   997  				}
   998  				b := dAtA[iNdEx]
   999  				iNdEx++
  1000  				byteLen |= int(b&0x7F) << shift
  1001  				if b < 0x80 {
  1002  					break
  1003  				}
  1004  			}
  1005  			if byteLen < 0 {
  1006  				return ErrInvalidLengthRpctransact
  1007  			}
  1008  			postIndex := iNdEx + byteLen
  1009  			if postIndex < 0 {
  1010  				return ErrInvalidLengthRpctransact
  1011  			}
  1012  			if postIndex > l {
  1013  				return io.ErrUnexpectedEOF
  1014  			}
  1015  			m.Code = append(m.Code[:0], dAtA[iNdEx:postIndex]...)
  1016  			if m.Code == nil {
  1017  				m.Code = []byte{}
  1018  			}
  1019  			iNdEx = postIndex
  1020  		case 3:
  1021  			if wireType != 2 {
  1022  				return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  1023  			}
  1024  			var byteLen int
  1025  			for shift := uint(0); ; shift += 7 {
  1026  				if shift >= 64 {
  1027  					return ErrIntOverflowRpctransact
  1028  				}
  1029  				if iNdEx >= l {
  1030  					return io.ErrUnexpectedEOF
  1031  				}
  1032  				b := dAtA[iNdEx]
  1033  				iNdEx++
  1034  				byteLen |= int(b&0x7F) << shift
  1035  				if b < 0x80 {
  1036  					break
  1037  				}
  1038  			}
  1039  			if byteLen < 0 {
  1040  				return ErrInvalidLengthRpctransact
  1041  			}
  1042  			postIndex := iNdEx + byteLen
  1043  			if postIndex < 0 {
  1044  				return ErrInvalidLengthRpctransact
  1045  			}
  1046  			if postIndex > l {
  1047  				return io.ErrUnexpectedEOF
  1048  			}
  1049  			m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  1050  			if m.Data == nil {
  1051  				m.Data = []byte{}
  1052  			}
  1053  			iNdEx = postIndex
  1054  		default:
  1055  			iNdEx = preIndex
  1056  			skippy, err := skipRpctransact(dAtA[iNdEx:])
  1057  			if err != nil {
  1058  				return err
  1059  			}
  1060  			if skippy < 0 {
  1061  				return ErrInvalidLengthRpctransact
  1062  			}
  1063  			if (iNdEx + skippy) < 0 {
  1064  				return ErrInvalidLengthRpctransact
  1065  			}
  1066  			if (iNdEx + skippy) > l {
  1067  				return io.ErrUnexpectedEOF
  1068  			}
  1069  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1070  			iNdEx += skippy
  1071  		}
  1072  	}
  1073  
  1074  	if iNdEx > l {
  1075  		return io.ErrUnexpectedEOF
  1076  	}
  1077  	return nil
  1078  }
  1079  func (m *TxEnvelope) Unmarshal(dAtA []byte) error {
  1080  	l := len(dAtA)
  1081  	iNdEx := 0
  1082  	for iNdEx < l {
  1083  		preIndex := iNdEx
  1084  		var wire uint64
  1085  		for shift := uint(0); ; shift += 7 {
  1086  			if shift >= 64 {
  1087  				return ErrIntOverflowRpctransact
  1088  			}
  1089  			if iNdEx >= l {
  1090  				return io.ErrUnexpectedEOF
  1091  			}
  1092  			b := dAtA[iNdEx]
  1093  			iNdEx++
  1094  			wire |= uint64(b&0x7F) << shift
  1095  			if b < 0x80 {
  1096  				break
  1097  			}
  1098  		}
  1099  		fieldNum := int32(wire >> 3)
  1100  		wireType := int(wire & 0x7)
  1101  		if wireType == 4 {
  1102  			return fmt.Errorf("proto: TxEnvelope: wiretype end group for non-group")
  1103  		}
  1104  		if fieldNum <= 0 {
  1105  			return fmt.Errorf("proto: TxEnvelope: illegal tag %d (wire type %d)", fieldNum, wire)
  1106  		}
  1107  		switch fieldNum {
  1108  		case 1:
  1109  			if wireType != 2 {
  1110  				return fmt.Errorf("proto: wrong wireType = %d for field Envelope", wireType)
  1111  			}
  1112  			var msglen int
  1113  			for shift := uint(0); ; shift += 7 {
  1114  				if shift >= 64 {
  1115  					return ErrIntOverflowRpctransact
  1116  				}
  1117  				if iNdEx >= l {
  1118  					return io.ErrUnexpectedEOF
  1119  				}
  1120  				b := dAtA[iNdEx]
  1121  				iNdEx++
  1122  				msglen |= int(b&0x7F) << shift
  1123  				if b < 0x80 {
  1124  					break
  1125  				}
  1126  			}
  1127  			if msglen < 0 {
  1128  				return ErrInvalidLengthRpctransact
  1129  			}
  1130  			postIndex := iNdEx + msglen
  1131  			if postIndex < 0 {
  1132  				return ErrInvalidLengthRpctransact
  1133  			}
  1134  			if postIndex > l {
  1135  				return io.ErrUnexpectedEOF
  1136  			}
  1137  			if m.Envelope == nil {
  1138  				m.Envelope = &github_com_hyperledger_burrow_txs.Envelope{}
  1139  			}
  1140  			if err := m.Envelope.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1141  				return err
  1142  			}
  1143  			iNdEx = postIndex
  1144  		default:
  1145  			iNdEx = preIndex
  1146  			skippy, err := skipRpctransact(dAtA[iNdEx:])
  1147  			if err != nil {
  1148  				return err
  1149  			}
  1150  			if skippy < 0 {
  1151  				return ErrInvalidLengthRpctransact
  1152  			}
  1153  			if (iNdEx + skippy) < 0 {
  1154  				return ErrInvalidLengthRpctransact
  1155  			}
  1156  			if (iNdEx + skippy) > l {
  1157  				return io.ErrUnexpectedEOF
  1158  			}
  1159  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1160  			iNdEx += skippy
  1161  		}
  1162  	}
  1163  
  1164  	if iNdEx > l {
  1165  		return io.ErrUnexpectedEOF
  1166  	}
  1167  	return nil
  1168  }
  1169  func (m *TxEnvelopeParam) Unmarshal(dAtA []byte) error {
  1170  	l := len(dAtA)
  1171  	iNdEx := 0
  1172  	for iNdEx < l {
  1173  		preIndex := iNdEx
  1174  		var wire uint64
  1175  		for shift := uint(0); ; shift += 7 {
  1176  			if shift >= 64 {
  1177  				return ErrIntOverflowRpctransact
  1178  			}
  1179  			if iNdEx >= l {
  1180  				return io.ErrUnexpectedEOF
  1181  			}
  1182  			b := dAtA[iNdEx]
  1183  			iNdEx++
  1184  			wire |= uint64(b&0x7F) << shift
  1185  			if b < 0x80 {
  1186  				break
  1187  			}
  1188  		}
  1189  		fieldNum := int32(wire >> 3)
  1190  		wireType := int(wire & 0x7)
  1191  		if wireType == 4 {
  1192  			return fmt.Errorf("proto: TxEnvelopeParam: wiretype end group for non-group")
  1193  		}
  1194  		if fieldNum <= 0 {
  1195  			return fmt.Errorf("proto: TxEnvelopeParam: illegal tag %d (wire type %d)", fieldNum, wire)
  1196  		}
  1197  		switch fieldNum {
  1198  		case 1:
  1199  			if wireType != 2 {
  1200  				return fmt.Errorf("proto: wrong wireType = %d for field Envelope", wireType)
  1201  			}
  1202  			var msglen int
  1203  			for shift := uint(0); ; shift += 7 {
  1204  				if shift >= 64 {
  1205  					return ErrIntOverflowRpctransact
  1206  				}
  1207  				if iNdEx >= l {
  1208  					return io.ErrUnexpectedEOF
  1209  				}
  1210  				b := dAtA[iNdEx]
  1211  				iNdEx++
  1212  				msglen |= int(b&0x7F) << shift
  1213  				if b < 0x80 {
  1214  					break
  1215  				}
  1216  			}
  1217  			if msglen < 0 {
  1218  				return ErrInvalidLengthRpctransact
  1219  			}
  1220  			postIndex := iNdEx + msglen
  1221  			if postIndex < 0 {
  1222  				return ErrInvalidLengthRpctransact
  1223  			}
  1224  			if postIndex > l {
  1225  				return io.ErrUnexpectedEOF
  1226  			}
  1227  			if m.Envelope == nil {
  1228  				m.Envelope = &github_com_hyperledger_burrow_txs.Envelope{}
  1229  			}
  1230  			if err := m.Envelope.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1231  				return err
  1232  			}
  1233  			iNdEx = postIndex
  1234  		case 2:
  1235  			if wireType != 2 {
  1236  				return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType)
  1237  			}
  1238  			var msglen int
  1239  			for shift := uint(0); ; shift += 7 {
  1240  				if shift >= 64 {
  1241  					return ErrIntOverflowRpctransact
  1242  				}
  1243  				if iNdEx >= l {
  1244  					return io.ErrUnexpectedEOF
  1245  				}
  1246  				b := dAtA[iNdEx]
  1247  				iNdEx++
  1248  				msglen |= int(b&0x7F) << shift
  1249  				if b < 0x80 {
  1250  					break
  1251  				}
  1252  			}
  1253  			if msglen < 0 {
  1254  				return ErrInvalidLengthRpctransact
  1255  			}
  1256  			postIndex := iNdEx + msglen
  1257  			if postIndex < 0 {
  1258  				return ErrInvalidLengthRpctransact
  1259  			}
  1260  			if postIndex > l {
  1261  				return io.ErrUnexpectedEOF
  1262  			}
  1263  			if m.Payload == nil {
  1264  				m.Payload = &payload.Any{}
  1265  			}
  1266  			if err := m.Payload.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1267  				return err
  1268  			}
  1269  			iNdEx = postIndex
  1270  		case 3:
  1271  			if wireType != 2 {
  1272  				return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType)
  1273  			}
  1274  			var msglen int
  1275  			for shift := uint(0); ; shift += 7 {
  1276  				if shift >= 64 {
  1277  					return ErrIntOverflowRpctransact
  1278  				}
  1279  				if iNdEx >= l {
  1280  					return io.ErrUnexpectedEOF
  1281  				}
  1282  				b := dAtA[iNdEx]
  1283  				iNdEx++
  1284  				msglen |= int(b&0x7F) << shift
  1285  				if b < 0x80 {
  1286  					break
  1287  				}
  1288  			}
  1289  			if msglen < 0 {
  1290  				return ErrInvalidLengthRpctransact
  1291  			}
  1292  			postIndex := iNdEx + msglen
  1293  			if postIndex < 0 {
  1294  				return ErrInvalidLengthRpctransact
  1295  			}
  1296  			if postIndex > l {
  1297  				return io.ErrUnexpectedEOF
  1298  			}
  1299  			if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.Timeout, dAtA[iNdEx:postIndex]); err != nil {
  1300  				return err
  1301  			}
  1302  			iNdEx = postIndex
  1303  		default:
  1304  			iNdEx = preIndex
  1305  			skippy, err := skipRpctransact(dAtA[iNdEx:])
  1306  			if err != nil {
  1307  				return err
  1308  			}
  1309  			if skippy < 0 {
  1310  				return ErrInvalidLengthRpctransact
  1311  			}
  1312  			if (iNdEx + skippy) < 0 {
  1313  				return ErrInvalidLengthRpctransact
  1314  			}
  1315  			if (iNdEx + skippy) > l {
  1316  				return io.ErrUnexpectedEOF
  1317  			}
  1318  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1319  			iNdEx += skippy
  1320  		}
  1321  	}
  1322  
  1323  	if iNdEx > l {
  1324  		return io.ErrUnexpectedEOF
  1325  	}
  1326  	return nil
  1327  }
  1328  func skipRpctransact(dAtA []byte) (n int, err error) {
  1329  	l := len(dAtA)
  1330  	iNdEx := 0
  1331  	for iNdEx < l {
  1332  		var wire uint64
  1333  		for shift := uint(0); ; shift += 7 {
  1334  			if shift >= 64 {
  1335  				return 0, ErrIntOverflowRpctransact
  1336  			}
  1337  			if iNdEx >= l {
  1338  				return 0, io.ErrUnexpectedEOF
  1339  			}
  1340  			b := dAtA[iNdEx]
  1341  			iNdEx++
  1342  			wire |= (uint64(b) & 0x7F) << shift
  1343  			if b < 0x80 {
  1344  				break
  1345  			}
  1346  		}
  1347  		wireType := int(wire & 0x7)
  1348  		switch wireType {
  1349  		case 0:
  1350  			for shift := uint(0); ; shift += 7 {
  1351  				if shift >= 64 {
  1352  					return 0, ErrIntOverflowRpctransact
  1353  				}
  1354  				if iNdEx >= l {
  1355  					return 0, io.ErrUnexpectedEOF
  1356  				}
  1357  				iNdEx++
  1358  				if dAtA[iNdEx-1] < 0x80 {
  1359  					break
  1360  				}
  1361  			}
  1362  			return iNdEx, nil
  1363  		case 1:
  1364  			iNdEx += 8
  1365  			return iNdEx, nil
  1366  		case 2:
  1367  			var length int
  1368  			for shift := uint(0); ; shift += 7 {
  1369  				if shift >= 64 {
  1370  					return 0, ErrIntOverflowRpctransact
  1371  				}
  1372  				if iNdEx >= l {
  1373  					return 0, io.ErrUnexpectedEOF
  1374  				}
  1375  				b := dAtA[iNdEx]
  1376  				iNdEx++
  1377  				length |= (int(b) & 0x7F) << shift
  1378  				if b < 0x80 {
  1379  					break
  1380  				}
  1381  			}
  1382  			if length < 0 {
  1383  				return 0, ErrInvalidLengthRpctransact
  1384  			}
  1385  			iNdEx += length
  1386  			if iNdEx < 0 {
  1387  				return 0, ErrInvalidLengthRpctransact
  1388  			}
  1389  			return iNdEx, nil
  1390  		case 3:
  1391  			for {
  1392  				var innerWire uint64
  1393  				var start int = iNdEx
  1394  				for shift := uint(0); ; shift += 7 {
  1395  					if shift >= 64 {
  1396  						return 0, ErrIntOverflowRpctransact
  1397  					}
  1398  					if iNdEx >= l {
  1399  						return 0, io.ErrUnexpectedEOF
  1400  					}
  1401  					b := dAtA[iNdEx]
  1402  					iNdEx++
  1403  					innerWire |= (uint64(b) & 0x7F) << shift
  1404  					if b < 0x80 {
  1405  						break
  1406  					}
  1407  				}
  1408  				innerWireType := int(innerWire & 0x7)
  1409  				if innerWireType == 4 {
  1410  					break
  1411  				}
  1412  				next, err := skipRpctransact(dAtA[start:])
  1413  				if err != nil {
  1414  					return 0, err
  1415  				}
  1416  				iNdEx = start + next
  1417  				if iNdEx < 0 {
  1418  					return 0, ErrInvalidLengthRpctransact
  1419  				}
  1420  			}
  1421  			return iNdEx, nil
  1422  		case 4:
  1423  			return iNdEx, nil
  1424  		case 5:
  1425  			iNdEx += 4
  1426  			return iNdEx, nil
  1427  		default:
  1428  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1429  		}
  1430  	}
  1431  	panic("unreachable")
  1432  }
  1433  
  1434  var (
  1435  	ErrInvalidLengthRpctransact = fmt.Errorf("proto: negative length found during unmarshaling")
  1436  	ErrIntOverflowRpctransact   = fmt.Errorf("proto: integer overflow")
  1437  )