@@ -11,12 +11,22 @@ message BlockHeaderInfo {
11
11
bytes work = 4 ;
12
12
}
13
13
14
- message Deposit {
15
- uint64 sequence_number = 1 ;
14
+ message OutPoint {
15
+ bytes txid = 1 ;
16
+ uint32 vout = 2 ;
17
+ }
18
+
19
+ message Output {
16
20
bytes address = 2 ;
17
21
uint64 value = 3 ;
18
22
}
19
23
24
+ message Deposit {
25
+ uint64 sequence_number = 1 ;
26
+ OutPoint outpoint = 2 ;
27
+ Output output = 3 ;
28
+ }
29
+
20
30
enum WithdrawalBundleEventType {
21
31
WITHDRAWAL_BUNDLE_EVENT_TYPE_SUBMITTED_UNSPECIFIED = 0 ;
22
32
WITHDRAWAL_BUNDLE_EVENT_TYPE_FAILED = 1 ;
@@ -35,15 +45,26 @@ message BlockInfo {
35
45
}
36
46
37
47
service Mainchain {
48
+ rpc BroadcastWithdrawalBundle (BroadcastWithdrawalBundleRequest )
49
+ returns (BroadcastWithdrawalBundleResponse );
38
50
rpc GetBlockHeaderInfo (GetBlockHeaderInfoRequest )
39
51
returns (GetBlockHeaderInfoResponse );
40
52
rpc GetBlockInfo (GetBlockInfoRequest ) returns (GetBlockInfoResponse );
41
53
rpc GetBmmHStarCommitments (GetBmmHStarCommitmentsRequest )
42
54
returns (GetBmmHStarCommitmentsResponse );
43
55
rpc GetChainTip (GetChainTipRequest ) returns (GetChainTipResponse );
56
+ rpc GetTwoWayPegData (GetTwoWayPegDataRequest )
57
+ returns (GetTwoWayPegDataResponse );
44
58
rpc SubscribeEvents (SubscribeEventsRequest ) returns (stream EventResponse );
45
59
}
46
60
61
+ message BroadcastWithdrawalBundleRequest {
62
+ uint32 sidechain_id = 1 ;
63
+ bytes transaction = 2 ;
64
+ }
65
+ message BroadcastWithdrawalBundleResponse {
66
+ }
67
+
47
68
message GetBlockHeaderInfoRequest {
48
69
bytes block_hash = 1 ;
49
70
}
@@ -53,6 +74,7 @@ message GetBlockHeaderInfoResponse {
53
74
54
75
message GetBlockInfoRequest {
55
76
bytes block_hash = 1 ;
77
+ uint32 sidechain_id = 2 ;
56
78
}
57
79
message GetBlockInfoResponse {
58
80
BlockHeaderInfo header_info = 1 ;
@@ -64,7 +86,16 @@ message GetBmmHStarCommitmentsRequest {
64
86
uint32 sidechain_id = 2 ;
65
87
}
66
88
message GetBmmHStarCommitmentsResponse {
67
- repeated bytes commitments = 1 ;
89
+ message BlockNotFoundError {
90
+ bytes block_hash = 1 ;
91
+ }
92
+ message Commitments {
93
+ repeated bytes commitments = 1 ;
94
+ }
95
+ oneof result {
96
+ BlockNotFoundError block_not_found = 1 ;
97
+ Commitments commitments = 2 ;
98
+ }
68
99
}
69
100
70
101
message GetChainTipRequest {
@@ -73,7 +104,21 @@ message GetChainTipResponse {
73
104
BlockHeaderInfo block_header_info = 1 ;
74
105
}
75
106
107
+ message GetTwoWayPegDataRequest {
108
+ uint32 sidechain_id = 1 ;
109
+ optional bytes start_block_hash = 2 ;
110
+ bytes end_block_hash = 3 ;
111
+ }
112
+ message GetTwoWayPegDataResponse {
113
+ message ResponseItem {
114
+ BlockHeaderInfo block_header_info = 1 ;
115
+ BlockInfo block_info = 2 ;
116
+ }
117
+ repeated ResponseItem blocks = 1 ;
118
+ }
119
+
76
120
message SubscribeEventsRequest {
121
+ uint32 sidechain_id = 1 ;
77
122
}
78
123
message EventResponse {
79
124
message Event {
0 commit comments