67 lines
1.3 KiB
Protocol Buffer
67 lines
1.3 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package agent.v1;
|
|
|
|
// TODO: documentation
|
|
|
|
option go_package = "proto/agent/v1;agentv1";
|
|
|
|
service Agent {
|
|
rpc SubmitVAA (SubmitVAARequest) returns (SubmitVAAResponse);
|
|
rpc WatchLockups (WatchLockupsRequest) returns (stream LockupEvent);
|
|
}
|
|
|
|
message Empty {
|
|
}
|
|
|
|
message SubmitVAARequest {
|
|
bytes vaa = 1;
|
|
}
|
|
|
|
message SubmitVAAResponse {
|
|
string signature = 1;
|
|
}
|
|
|
|
message WatchLockupsRequest {
|
|
|
|
}
|
|
|
|
message LockupEvent {
|
|
uint64 slot = 1;
|
|
string lockupAddress = 2; // TODO: why is this a string?
|
|
uint64 time = 3;
|
|
oneof event {
|
|
LockupEventNew new = 4;
|
|
LockupEventVAAPosted vaaPosted = 5;
|
|
Empty empty = 6;
|
|
}
|
|
}
|
|
|
|
// Token on Solana was locked or burned.
|
|
message LockupEventNew {
|
|
uint32 nonce = 1;
|
|
uint32 sourceChain = 2;
|
|
uint32 targetChain = 3;
|
|
bytes sourceAddress = 4;
|
|
bytes targetAddress = 5;
|
|
uint32 tokenChain = 6;
|
|
bytes tokenAddress = 7;
|
|
uint32 tokenDecimals = 8;
|
|
bytes amount = 9;
|
|
}
|
|
|
|
// A VAA was posted to Solana for data availability.
|
|
message LockupEventVAAPosted {
|
|
uint32 nonce = 1;
|
|
uint32 sourceChain = 2;
|
|
uint32 targetChain = 3;
|
|
bytes sourceAddress = 4;
|
|
bytes targetAddress = 5;
|
|
uint32 tokenChain = 6;
|
|
bytes tokenAddress = 7;
|
|
uint32 tokenDecimals = 8;
|
|
bytes amount = 9;
|
|
|
|
bytes vaa = 10;
|
|
}
|