-
Notifications
You must be signed in to change notification settings - Fork 1
/
axelar.proto
90 lines (75 loc) · 2.08 KB
/
axelar.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
syntax = "proto3";
import "google/api/annotations.proto";
option go_package = "github.com/commonprefix/xrpl-relayer/axelar";
service Amplifier {
rpc Verify(stream VerifyRequest) returns (stream VerifyResponse);
rpc GetPayload(GetPayloadRequest) returns (GetPayloadResponse) {
option (google.api.http) = {
get : "/v1beta1/payload/{hash}"
};
}
rpc SubscribeToApprovals(SubscribeToApprovalsRequest)
returns (stream SubscribeToApprovalsResponse);
rpc SubscribeToWasmEvents(SubscribeToWasmEventsRequest)
returns (stream SubscribeToWasmEventsResponse);
rpc Broadcast(BroadcastRequest) returns (BroadcastResponse) {
option (google.api.http) = {
post : "/v1beta1/broadcast"
body : "*"
};
}
}
message Message {
string id = 1; // the unique identifier with which the message can be looked
// up on the source chain
string source_chain = 2;
string source_address = 3;
string destination_chain = 4;
string destination_address = 5;
bytes payload = 6;
}
message GetPayloadRequest { bytes hash = 1; }
message GetPayloadResponse { bytes payload = 1; }
message SubscribeToApprovalsRequest {
repeated string chains = 1;
optional uint64 start_height = 2; // can be used to replay events
}
message SubscribeToApprovalsResponse {
string chain = 1;
bytes execute_data = 2;
uint64 block_height = 3;
}
message VerifyRequest { Message message = 1; }
message VerifyResponse {
Message message = 1;
optional Error error = 2;
}
enum ErrorCode {
VERIFICATION_FAILED = 0;
INTERNAL_ERROR = 1;
AXELAR_NETWORK_ERROR = 2;
INSUFFICIENT_GAS = 3;
FAILED_ON_CHAIN = 4;
MESSAGE_NOT_FOUND = 5;
}
message Error {
string error = 1;
ErrorCode error_code = 2;
}
message SubscribeToWasmEventsRequest { optional uint64 start_height = 1; }
message SubscribeToWasmEventsResponse {
string type = 1;
repeated Attribute attributes = 2;
uint64 height = 3;
}
message Attribute {
string key = 1;
string value = 2;
}
message BroadcastRequest {
string address = 1;
bytes payload = 2;
}
message BroadcastResponse {
bool success = 1;
}