github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/js/proto/rpcevents_grpc_pb.js (about) 1 // GENERATED CODE -- DO NOT EDIT! 2 3 'use strict'; 4 var grpc = require('@grpc/grpc-js'); 5 var rpcevents_pb = require('./rpcevents_pb.js'); 6 var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); 7 var exec_pb = require('./exec_pb.js'); 8 9 function serialize_exec_StreamEvent(arg) { 10 if (!(arg instanceof exec_pb.StreamEvent)) { 11 throw new Error('Expected argument of type exec.StreamEvent'); 12 } 13 return Buffer.from(arg.serializeBinary()); 14 } 15 16 function deserialize_exec_StreamEvent(buffer_arg) { 17 return exec_pb.StreamEvent.deserializeBinary(new Uint8Array(buffer_arg)); 18 } 19 20 function serialize_exec_TxExecution(arg) { 21 if (!(arg instanceof exec_pb.TxExecution)) { 22 throw new Error('Expected argument of type exec.TxExecution'); 23 } 24 return Buffer.from(arg.serializeBinary()); 25 } 26 27 function deserialize_exec_TxExecution(buffer_arg) { 28 return exec_pb.TxExecution.deserializeBinary(new Uint8Array(buffer_arg)); 29 } 30 31 function serialize_rpcevents_BlocksRequest(arg) { 32 if (!(arg instanceof rpcevents_pb.BlocksRequest)) { 33 throw new Error('Expected argument of type rpcevents.BlocksRequest'); 34 } 35 return Buffer.from(arg.serializeBinary()); 36 } 37 38 function deserialize_rpcevents_BlocksRequest(buffer_arg) { 39 return rpcevents_pb.BlocksRequest.deserializeBinary(new Uint8Array(buffer_arg)); 40 } 41 42 function serialize_rpcevents_EventsResponse(arg) { 43 if (!(arg instanceof rpcevents_pb.EventsResponse)) { 44 throw new Error('Expected argument of type rpcevents.EventsResponse'); 45 } 46 return Buffer.from(arg.serializeBinary()); 47 } 48 49 function deserialize_rpcevents_EventsResponse(buffer_arg) { 50 return rpcevents_pb.EventsResponse.deserializeBinary(new Uint8Array(buffer_arg)); 51 } 52 53 function serialize_rpcevents_TxRequest(arg) { 54 if (!(arg instanceof rpcevents_pb.TxRequest)) { 55 throw new Error('Expected argument of type rpcevents.TxRequest'); 56 } 57 return Buffer.from(arg.serializeBinary()); 58 } 59 60 function deserialize_rpcevents_TxRequest(buffer_arg) { 61 return rpcevents_pb.TxRequest.deserializeBinary(new Uint8Array(buffer_arg)); 62 } 63 64 65 // -------------------------------------------------- 66 // Execution events 67 var ExecutionEventsService = exports.ExecutionEventsService = { 68 // Get StreamEvents (including transactions) for a range of block heights 69 stream: { 70 path: '/rpcevents.ExecutionEvents/Stream', 71 requestStream: false, 72 responseStream: true, 73 requestType: rpcevents_pb.BlocksRequest, 74 responseType: exec_pb.StreamEvent, 75 requestSerialize: serialize_rpcevents_BlocksRequest, 76 requestDeserialize: deserialize_rpcevents_BlocksRequest, 77 responseSerialize: serialize_exec_StreamEvent, 78 responseDeserialize: deserialize_exec_StreamEvent, 79 }, 80 // Get a particular TxExecution by hash 81 tx: { 82 path: '/rpcevents.ExecutionEvents/Tx', 83 requestStream: false, 84 responseStream: false, 85 requestType: rpcevents_pb.TxRequest, 86 responseType: exec_pb.TxExecution, 87 requestSerialize: serialize_rpcevents_TxRequest, 88 requestDeserialize: deserialize_rpcevents_TxRequest, 89 responseSerialize: serialize_exec_TxExecution, 90 responseDeserialize: deserialize_exec_TxExecution, 91 }, 92 // GetEvents provides events streaming one block at a time - that is all events emitted in a particular block 93 // are guaranteed to be delivered in each GetEventsResponse 94 events: { 95 path: '/rpcevents.ExecutionEvents/Events', 96 requestStream: false, 97 responseStream: true, 98 requestType: rpcevents_pb.BlocksRequest, 99 responseType: rpcevents_pb.EventsResponse, 100 requestSerialize: serialize_rpcevents_BlocksRequest, 101 requestDeserialize: deserialize_rpcevents_BlocksRequest, 102 responseSerialize: serialize_rpcevents_EventsResponse, 103 responseDeserialize: deserialize_rpcevents_EventsResponse, 104 }, 105 }; 106 107 exports.ExecutionEventsClient = grpc.makeGenericClientConstructor(ExecutionEventsService);