spy.proto 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. syntax = "proto3";
  2. package spy.v1;
  3. option go_package = "github.com/certusone/wormhole/node/pkg/proto/spy/v1;spyv1";
  4. import "google/api/annotations.proto";
  5. import "gossip/v1/gossip.proto";
  6. import "publicrpc/v1/publicrpc.proto";
  7. // SpyRPCService exposes a gossip introspection service, allowing sniffing of gossip messages.
  8. service SpyRPCService {
  9. // SubscribeSignedVAA returns a stream of signed VAA messages received on the network.
  10. rpc SubscribeSignedVAA (SubscribeSignedVAARequest) returns (stream SubscribeSignedVAAResponse) {
  11. option (google.api.http) = {
  12. post: "/v1:subscribe_signed_vaa"
  13. body: "*"
  14. };
  15. }
  16. }
  17. // A MessageFilter represents an exact match for an emitter.
  18. message EmitterFilter {
  19. // Source chain
  20. publicrpc.v1.ChainID chain_id = 1;
  21. // Hex-encoded (without leading 0x) emitter address.
  22. string emitter_address = 2;
  23. }
  24. message BatchFilter {
  25. // Source chain
  26. publicrpc.v1.ChainID chain_id = 1;
  27. // Native transaction identifier bytes.
  28. bytes tx_id = 2;
  29. // Nonce of the messages in the batch.
  30. uint32 nonce = 3;
  31. }
  32. message BatchTransactionFilter {
  33. // Source chain
  34. publicrpc.v1.ChainID chain_id = 1;
  35. // Native transaction identifier bytes.
  36. bytes tx_id = 2;
  37. }
  38. message FilterEntry {
  39. oneof filter {
  40. EmitterFilter emitter_filter = 1;
  41. BatchFilter batch_filter = 2;
  42. BatchTransactionFilter batch_transaction_filter = 3;
  43. }
  44. }
  45. message SubscribeSignedVAARequest {
  46. // List of filters to apply to the stream (OR).
  47. // If empty, all messages are streamed.
  48. repeated FilterEntry filters = 1;
  49. }
  50. message SubscribeSignedVAAResponse {
  51. // Raw VAA bytes
  52. bytes vaa_bytes = 1;
  53. }