2021-12-02 16:02:32 -08:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package spy.v1;
|
|
|
|
|
|
|
|
option go_package = "github.com/certusone/wormhole/node/pkg/proto/spy/v1;spyv1";
|
|
|
|
|
|
|
|
import "google/api/annotations.proto";
|
2022-11-09 08:39:57 -08:00
|
|
|
import "gossip/v1/gossip.proto";
|
2021-12-02 16:02:32 -08:00
|
|
|
import "publicrpc/v1/publicrpc.proto";
|
|
|
|
|
|
|
|
// SpyRPCService exposes a gossip introspection service, allowing sniffing of gossip messages.
|
|
|
|
service SpyRPCService {
|
|
|
|
// SubscribeSignedVAA returns a stream of signed VAA messages received on the network.
|
|
|
|
rpc SubscribeSignedVAA (SubscribeSignedVAARequest) returns (stream SubscribeSignedVAAResponse) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
post: "/v1:subscribe_signed_vaa"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// A MessageFilter represents an exact match for an emitter.
|
|
|
|
message EmitterFilter {
|
|
|
|
// Source chain
|
|
|
|
publicrpc.v1.ChainID chain_id = 1;
|
|
|
|
// Hex-encoded (without leading 0x) emitter address.
|
|
|
|
string emitter_address = 2;
|
|
|
|
}
|
|
|
|
|
2022-11-09 08:39:57 -08:00
|
|
|
|
|
|
|
message BatchFilter {
|
|
|
|
// Source chain
|
|
|
|
publicrpc.v1.ChainID chain_id = 1;
|
|
|
|
// Native transaction identifier bytes.
|
|
|
|
bytes tx_id = 2;
|
|
|
|
// Nonce of the messages in the batch.
|
|
|
|
uint32 nonce = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message BatchTransactionFilter {
|
|
|
|
// Source chain
|
|
|
|
publicrpc.v1.ChainID chain_id = 1;
|
|
|
|
// Native transaction identifier bytes.
|
|
|
|
bytes tx_id = 2;
|
|
|
|
}
|
|
|
|
|
2021-12-02 16:02:32 -08:00
|
|
|
message FilterEntry {
|
|
|
|
oneof filter {
|
|
|
|
EmitterFilter emitter_filter = 1;
|
2022-11-09 08:39:57 -08:00
|
|
|
BatchFilter batch_filter = 2;
|
|
|
|
BatchTransactionFilter batch_transaction_filter = 3;
|
2021-12-02 16:02:32 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message SubscribeSignedVAARequest {
|
|
|
|
// List of filters to apply to the stream (OR).
|
|
|
|
// If empty, all messages are streamed.
|
|
|
|
repeated FilterEntry filters = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SubscribeSignedVAAResponse {
|
|
|
|
// Raw VAA bytes
|
|
|
|
bytes vaa_bytes = 1;
|
|
|
|
}
|