github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/protobuf/rpcevents.proto (about) 1 syntax = 'proto3'; 2 3 option go_package = "github.com/hyperledger/burrow/rpc/rpcevents"; 4 5 import "gogoproto/gogo.proto"; 6 import "exec.proto"; 7 8 package rpcevents; 9 10 option (gogoproto.marshaler_all) = true; 11 option (gogoproto.unmarshaler_all) = true; 12 option (gogoproto.stable_marshaler_all) = true; 13 option (gogoproto.sizer_all) = true; 14 // Enable registration with golang/protobuf for the grpc-gateway. 15 option (gogoproto.goproto_registration) = true; 16 // Enable generation of XXX_MessageName methods for grpc-go/status. 17 option (gogoproto.messagename_all) = true; 18 19 //-------------------------------------------------- 20 // Execution events 21 service ExecutionEvents { 22 // Get StreamEvents (including transactions) for a range of block heights 23 rpc Stream (BlocksRequest) returns (stream exec.StreamEvent); 24 // Get a particular TxExecution by hash 25 rpc Tx (TxRequest) returns (exec.TxExecution); 26 // GetEvents provides events streaming one block at a time - that is all events emitted in a particular block 27 // are guaranteed to be delivered in each GetEventsResponse 28 rpc Events (BlocksRequest) returns (stream EventsResponse); 29 } 30 31 message GetBlockRequest { 32 // Height of block required 33 uint64 Height = 1; 34 // Whether to wait for the block to become available 35 bool Wait = 2; 36 } 37 38 message TxRequest { 39 // Height of block required 40 bytes TxHash = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false]; 41 // Whether to wait for the block to become available 42 bool Wait = 2; 43 } 44 45 message BlocksRequest { 46 BlockRange BlockRange = 1; 47 // Specify a query on which to match the tags of events. 48 // Tag | Match type | Values 49 // ----------------------------------------- 50 // All events 51 // ----------------------------------------- 52 // TxType | String | "UnknownTx", "SendTx", "CallTx", "NameTx", "BondTx", "UnbondTx", "PermissionsTx", "GovernanceTx" 53 // TxHash | String | bytes 54 // EventType | String | "CallEvent", "LogEvent", "AccountInputEvent", "AccountOutputEvent" 55 // EventID | String | string 56 // Height | Integer | uint64 57 // Index | Integer | uint64 58 // MessageType | String | Go type name 59 // ----------------------------------------- 60 // Log event 61 // ----------------------------------------- 62 // Address | String | Address (hex) 63 // Log<0-4> | String | Word256 (hex) 64 // Log<0-4>Text | String | string (trimmed) 65 // ----------------------------------------- 66 // Call event 67 // ----------------------------------------- 68 // Origin | String | Address (hex) 69 // Callee | String | Address (hex) 70 // Caller | String | Address (hex) 71 // Value | Integer | uint64 72 // Gas | Integer | uint64 73 // StackDepth | Integer | uint64 74 // Exception | String | string 75 // ----------------------------------------- 76 // Tx event (input/output) 77 // ----------------------------------------- 78 // Exception | String | string 79 // 80 // For example: 81 // EventType = 'LogEvent' AND EventID CONTAINS 'bar' AND TxHash = '020304' AND Height >= 34 AND Index < 3 AND Address = 'DEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEF' 82 string Query = 2; 83 } 84 85 message EventsResponse { 86 uint64 Height = 1; 87 repeated exec.Event Events = 2; 88 } 89 90 message GetTxsRequest { 91 uint64 StartHeight = 1; 92 uint64 EndHeight = 2; 93 string Query = 3; 94 } 95 96 message GetTxsResponse { 97 uint64 Height = 1; 98 repeated exec.TxExecution TxExecutions = 2; 99 } 100 101 message Bound { 102 BoundType Type = 1; 103 uint64 Index = 2; 104 enum BoundType { 105 // Index is absolute index of an item 106 ABSOLUTE = 0; 107 // Index is an offset relative to last item 108 RELATIVE = 1; 109 // The first block 110 FIRST = 2; 111 // Ignore provided index and evaluate to latest index 112 LATEST = 3; 113 // Ignore provided index and stream new objects as they are generated 114 STREAM = 4; 115 } 116 } 117 118 // An inclusive range of blocks to include in output 119 message BlockRange { 120 // Bounds can be set to: 121 // absolute: block height 122 // relative: block height counting back from latest 123 // latest: latest block when call is processed 124 // stream: for End keep sending new blocks, for start same as latest 125 Bound Start = 1; 126 Bound End = 2; 127 } 128