github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/js/proto/rpctransact_grpc_pb.js (about)

     1  // GENERATED CODE -- DO NOT EDIT!
     2  
     3  'use strict';
     4  var grpc = require('@grpc/grpc-js');
     5  var rpctransact_pb = require('./rpctransact_pb.js');
     6  var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js');
     7  var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js');
     8  var exec_pb = require('./exec_pb.js');
     9  var payload_pb = require('./payload_pb.js');
    10  var txs_pb = require('./txs_pb.js');
    11  
    12  function serialize_exec_TxExecution(arg) {
    13    if (!(arg instanceof exec_pb.TxExecution)) {
    14      throw new Error('Expected argument of type exec.TxExecution');
    15    }
    16    return Buffer.from(arg.serializeBinary());
    17  }
    18  
    19  function deserialize_exec_TxExecution(buffer_arg) {
    20    return exec_pb.TxExecution.deserializeBinary(new Uint8Array(buffer_arg));
    21  }
    22  
    23  function serialize_payload_Any(arg) {
    24    if (!(arg instanceof payload_pb.Any)) {
    25      throw new Error('Expected argument of type payload.Any');
    26    }
    27    return Buffer.from(arg.serializeBinary());
    28  }
    29  
    30  function deserialize_payload_Any(buffer_arg) {
    31    return payload_pb.Any.deserializeBinary(new Uint8Array(buffer_arg));
    32  }
    33  
    34  function serialize_payload_CallTx(arg) {
    35    if (!(arg instanceof payload_pb.CallTx)) {
    36      throw new Error('Expected argument of type payload.CallTx');
    37    }
    38    return Buffer.from(arg.serializeBinary());
    39  }
    40  
    41  function deserialize_payload_CallTx(buffer_arg) {
    42    return payload_pb.CallTx.deserializeBinary(new Uint8Array(buffer_arg));
    43  }
    44  
    45  function serialize_payload_NameTx(arg) {
    46    if (!(arg instanceof payload_pb.NameTx)) {
    47      throw new Error('Expected argument of type payload.NameTx');
    48    }
    49    return Buffer.from(arg.serializeBinary());
    50  }
    51  
    52  function deserialize_payload_NameTx(buffer_arg) {
    53    return payload_pb.NameTx.deserializeBinary(new Uint8Array(buffer_arg));
    54  }
    55  
    56  function serialize_payload_SendTx(arg) {
    57    if (!(arg instanceof payload_pb.SendTx)) {
    58      throw new Error('Expected argument of type payload.SendTx');
    59    }
    60    return Buffer.from(arg.serializeBinary());
    61  }
    62  
    63  function deserialize_payload_SendTx(buffer_arg) {
    64    return payload_pb.SendTx.deserializeBinary(new Uint8Array(buffer_arg));
    65  }
    66  
    67  function serialize_rpctransact_CallCodeParam(arg) {
    68    if (!(arg instanceof rpctransact_pb.CallCodeParam)) {
    69      throw new Error('Expected argument of type rpctransact.CallCodeParam');
    70    }
    71    return Buffer.from(arg.serializeBinary());
    72  }
    73  
    74  function deserialize_rpctransact_CallCodeParam(buffer_arg) {
    75    return rpctransact_pb.CallCodeParam.deserializeBinary(new Uint8Array(buffer_arg));
    76  }
    77  
    78  function serialize_rpctransact_TxEnvelope(arg) {
    79    if (!(arg instanceof rpctransact_pb.TxEnvelope)) {
    80      throw new Error('Expected argument of type rpctransact.TxEnvelope');
    81    }
    82    return Buffer.from(arg.serializeBinary());
    83  }
    84  
    85  function deserialize_rpctransact_TxEnvelope(buffer_arg) {
    86    return rpctransact_pb.TxEnvelope.deserializeBinary(new Uint8Array(buffer_arg));
    87  }
    88  
    89  function serialize_rpctransact_TxEnvelopeParam(arg) {
    90    if (!(arg instanceof rpctransact_pb.TxEnvelopeParam)) {
    91      throw new Error('Expected argument of type rpctransact.TxEnvelopeParam');
    92    }
    93    return Buffer.from(arg.serializeBinary());
    94  }
    95  
    96  function deserialize_rpctransact_TxEnvelopeParam(buffer_arg) {
    97    return rpctransact_pb.TxEnvelopeParam.deserializeBinary(new Uint8Array(buffer_arg));
    98  }
    99  
   100  function serialize_txs_Receipt(arg) {
   101    if (!(arg instanceof txs_pb.Receipt)) {
   102      throw new Error('Expected argument of type txs.Receipt');
   103    }
   104    return Buffer.from(arg.serializeBinary());
   105  }
   106  
   107  function deserialize_txs_Receipt(buffer_arg) {
   108    return txs_pb.Receipt.deserializeBinary(new Uint8Array(buffer_arg));
   109  }
   110  
   111  
   112  // Transaction Service Definition
   113  var TransactService = exports.TransactService = {
   114    // Broadcast a transaction to the mempool - if the transaction is not signed signing will be attempted server-side
   115  // and wait for it to be included in block
   116  broadcastTxSync: {
   117      path: '/rpctransact.Transact/BroadcastTxSync',
   118      requestStream: false,
   119      responseStream: false,
   120      requestType: rpctransact_pb.TxEnvelopeParam,
   121      responseType: exec_pb.TxExecution,
   122      requestSerialize: serialize_rpctransact_TxEnvelopeParam,
   123      requestDeserialize: deserialize_rpctransact_TxEnvelopeParam,
   124      responseSerialize: serialize_exec_TxExecution,
   125      responseDeserialize: deserialize_exec_TxExecution,
   126    },
   127    // Broadcast a transaction to the mempool - if the transaction is not signed signing will be attempted server-side
   128  broadcastTxAsync: {
   129      path: '/rpctransact.Transact/BroadcastTxAsync',
   130      requestStream: false,
   131      responseStream: false,
   132      requestType: rpctransact_pb.TxEnvelopeParam,
   133      responseType: txs_pb.Receipt,
   134      requestSerialize: serialize_rpctransact_TxEnvelopeParam,
   135      requestDeserialize: deserialize_rpctransact_TxEnvelopeParam,
   136      responseSerialize: serialize_txs_Receipt,
   137      responseDeserialize: deserialize_txs_Receipt,
   138    },
   139    // Sign transaction server-side
   140  signTx: {
   141      path: '/rpctransact.Transact/SignTx',
   142      requestStream: false,
   143      responseStream: false,
   144      requestType: rpctransact_pb.TxEnvelopeParam,
   145      responseType: rpctransact_pb.TxEnvelope,
   146      requestSerialize: serialize_rpctransact_TxEnvelopeParam,
   147      requestDeserialize: deserialize_rpctransact_TxEnvelopeParam,
   148      responseSerialize: serialize_rpctransact_TxEnvelope,
   149      responseDeserialize: deserialize_rpctransact_TxEnvelope,
   150    },
   151    // Formulate a transaction from a Payload and retrun the envelop with the Tx bytes ready to sign
   152  formulateTx: {
   153      path: '/rpctransact.Transact/FormulateTx',
   154      requestStream: false,
   155      responseStream: false,
   156      requestType: payload_pb.Any,
   157      responseType: rpctransact_pb.TxEnvelope,
   158      requestSerialize: serialize_payload_Any,
   159      requestDeserialize: deserialize_payload_Any,
   160      responseSerialize: serialize_rpctransact_TxEnvelope,
   161      responseDeserialize: deserialize_rpctransact_TxEnvelope,
   162    },
   163    // Formulate and sign a CallTx transaction signed server-side and wait for it to be included in a block, retrieving response
   164  callTxSync: {
   165      path: '/rpctransact.Transact/CallTxSync',
   166      requestStream: false,
   167      responseStream: false,
   168      requestType: payload_pb.CallTx,
   169      responseType: exec_pb.TxExecution,
   170      requestSerialize: serialize_payload_CallTx,
   171      requestDeserialize: deserialize_payload_CallTx,
   172      responseSerialize: serialize_exec_TxExecution,
   173      responseDeserialize: deserialize_exec_TxExecution,
   174    },
   175    // Formulate and sign a CallTx transaction signed server-side
   176  callTxAsync: {
   177      path: '/rpctransact.Transact/CallTxAsync',
   178      requestStream: false,
   179      responseStream: false,
   180      requestType: payload_pb.CallTx,
   181      responseType: txs_pb.Receipt,
   182      requestSerialize: serialize_payload_CallTx,
   183      requestDeserialize: deserialize_payload_CallTx,
   184      responseSerialize: serialize_txs_Receipt,
   185      responseDeserialize: deserialize_txs_Receipt,
   186    },
   187    // Perform a 'simulated' call of a contract against the current committed EVM state without any changes been saved
   188  // and wait for the transaction to be included in a block
   189  callTxSim: {
   190      path: '/rpctransact.Transact/CallTxSim',
   191      requestStream: false,
   192      responseStream: false,
   193      requestType: payload_pb.CallTx,
   194      responseType: exec_pb.TxExecution,
   195      requestSerialize: serialize_payload_CallTx,
   196      requestDeserialize: deserialize_payload_CallTx,
   197      responseSerialize: serialize_exec_TxExecution,
   198      responseDeserialize: deserialize_exec_TxExecution,
   199    },
   200    // Perform a 'simulated' execution of provided code against the current committed EVM state without any changes been saved
   201  callCodeSim: {
   202      path: '/rpctransact.Transact/CallCodeSim',
   203      requestStream: false,
   204      responseStream: false,
   205      requestType: rpctransact_pb.CallCodeParam,
   206      responseType: exec_pb.TxExecution,
   207      requestSerialize: serialize_rpctransact_CallCodeParam,
   208      requestDeserialize: deserialize_rpctransact_CallCodeParam,
   209      responseSerialize: serialize_exec_TxExecution,
   210      responseDeserialize: deserialize_exec_TxExecution,
   211    },
   212    // Formulate a SendTx transaction signed server-side and wait for it to be included in a block, retrieving response
   213  sendTxSync: {
   214      path: '/rpctransact.Transact/SendTxSync',
   215      requestStream: false,
   216      responseStream: false,
   217      requestType: payload_pb.SendTx,
   218      responseType: exec_pb.TxExecution,
   219      requestSerialize: serialize_payload_SendTx,
   220      requestDeserialize: deserialize_payload_SendTx,
   221      responseSerialize: serialize_exec_TxExecution,
   222      responseDeserialize: deserialize_exec_TxExecution,
   223    },
   224    // Formulate and  SendTx transaction signed server-side
   225  sendTxAsync: {
   226      path: '/rpctransact.Transact/SendTxAsync',
   227      requestStream: false,
   228      responseStream: false,
   229      requestType: payload_pb.SendTx,
   230      responseType: txs_pb.Receipt,
   231      requestSerialize: serialize_payload_SendTx,
   232      requestDeserialize: deserialize_payload_SendTx,
   233      responseSerialize: serialize_txs_Receipt,
   234      responseDeserialize: deserialize_txs_Receipt,
   235    },
   236    // Formulate a NameTx signed server-side and wait for it to be included in a block returning the registered name
   237  nameTxSync: {
   238      path: '/rpctransact.Transact/NameTxSync',
   239      requestStream: false,
   240      responseStream: false,
   241      requestType: payload_pb.NameTx,
   242      responseType: exec_pb.TxExecution,
   243      requestSerialize: serialize_payload_NameTx,
   244      requestDeserialize: deserialize_payload_NameTx,
   245      responseSerialize: serialize_exec_TxExecution,
   246      responseDeserialize: deserialize_exec_TxExecution,
   247    },
   248    // Formulate a NameTx signed server-side
   249  nameTxAsync: {
   250      path: '/rpctransact.Transact/NameTxAsync',
   251      requestStream: false,
   252      responseStream: false,
   253      requestType: payload_pb.NameTx,
   254      responseType: txs_pb.Receipt,
   255      requestSerialize: serialize_payload_NameTx,
   256      requestDeserialize: deserialize_payload_NameTx,
   257      responseSerialize: serialize_txs_Receipt,
   258      responseDeserialize: deserialize_txs_Receipt,
   259    },
   260  };
   261  
   262  exports.TransactClient = grpc.makeGenericClientConstructor(TransactService);