@@ -11,10 +11,20 @@ message BlockHeaderInfo {
11
11
bytes work = 4 ;
12
12
}
13
13
14
+ message OutPoint {
15
+ bytes txid = 1 ;
16
+ uint32 vout = 2 ;
17
+ }
18
+
19
+ message Output {
20
+ bytes address = 2 ;
21
+ uint64 value_sats = 3 ;
22
+ }
23
+
14
24
message Deposit {
15
25
uint64 sequence_number = 1 ;
16
- bytes address = 2 ;
17
- uint64 value = 3 ;
26
+ OutPoint outpoint = 2 ;
27
+ Output output = 3 ;
18
28
}
19
29
20
30
enum WithdrawalBundleEventType {
@@ -35,15 +45,48 @@ message BlockInfo {
35
45
}
36
46
37
47
service Mainchain {
48
+ rpc BroadcastWithdrawalBundle (BroadcastWithdrawalBundleRequest )
49
+ returns (BroadcastWithdrawalBundleResponse );
50
+ rpc CreateBmmCriticalDataTransaction (CreateBmmCriticalDataTransactionRequest )
51
+ returns (CreateBmmCriticalDataTransactionResponse );
52
+ // Regtest only
53
+ rpc GenerateBlocks (GenerateBlocksRequest )
54
+ returns (GenerateBlocksResponse );
38
55
rpc GetBlockHeaderInfo (GetBlockHeaderInfoRequest )
39
56
returns (GetBlockHeaderInfoResponse );
40
57
rpc GetBlockInfo (GetBlockInfoRequest ) returns (GetBlockInfoResponse );
41
58
rpc GetBmmHStarCommitments (GetBmmHStarCommitmentsRequest )
42
59
returns (GetBmmHStarCommitmentsResponse );
43
60
rpc GetChainTip (GetChainTipRequest ) returns (GetChainTipResponse );
61
+ rpc GetTwoWayPegData (GetTwoWayPegDataRequest )
62
+ returns (GetTwoWayPegDataResponse );
44
63
rpc SubscribeEvents (SubscribeEventsRequest ) returns (stream EventResponse );
45
64
}
46
65
66
+ message BroadcastWithdrawalBundleRequest {
67
+ uint32 sidechain_id = 1 ;
68
+ bytes transaction = 2 ;
69
+ }
70
+ message BroadcastWithdrawalBundleResponse {
71
+ }
72
+
73
+ message CreateBmmCriticalDataTransactionRequest {
74
+ uint32 sidechain_id = 1 ;
75
+ uint64 value_sats = 2 ;
76
+ uint32 height = 3 ;
77
+ bytes critical_hash = 4 ;
78
+ bytes prev_bytes = 5 ;
79
+ }
80
+ message CreateBmmCriticalDataTransactionResponse {
81
+ bytes txid = 1 ;
82
+ }
83
+
84
+ message GenerateBlocksRequest {
85
+ uint32 blocks = 1 ;
86
+ }
87
+ message GenerateBlocksResponse {
88
+ }
89
+
47
90
message GetBlockHeaderInfoRequest {
48
91
bytes block_hash = 1 ;
49
92
}
@@ -53,6 +96,7 @@ message GetBlockHeaderInfoResponse {
53
96
54
97
message GetBlockInfoRequest {
55
98
bytes block_hash = 1 ;
99
+ uint32 sidechain_id = 2 ;
56
100
}
57
101
message GetBlockInfoResponse {
58
102
BlockHeaderInfo header_info = 1 ;
@@ -64,7 +108,16 @@ message GetBmmHStarCommitmentsRequest {
64
108
uint32 sidechain_id = 2 ;
65
109
}
66
110
message GetBmmHStarCommitmentsResponse {
67
- repeated bytes commitments = 1 ;
111
+ message BlockNotFoundError {
112
+ bytes block_hash = 1 ;
113
+ }
114
+ message Commitments {
115
+ repeated bytes commitments = 1 ;
116
+ }
117
+ oneof result {
118
+ BlockNotFoundError block_not_found = 1 ;
119
+ Commitments commitments = 2 ;
120
+ }
68
121
}
69
122
70
123
message GetChainTipRequest {
@@ -73,7 +126,21 @@ message GetChainTipResponse {
73
126
BlockHeaderInfo block_header_info = 1 ;
74
127
}
75
128
129
+ message GetTwoWayPegDataRequest {
130
+ uint32 sidechain_id = 1 ;
131
+ optional bytes start_block_hash = 2 ;
132
+ bytes end_block_hash = 3 ;
133
+ }
134
+ message GetTwoWayPegDataResponse {
135
+ message ResponseItem {
136
+ BlockHeaderInfo block_header_info = 1 ;
137
+ BlockInfo block_info = 2 ;
138
+ }
139
+ repeated ResponseItem blocks = 1 ;
140
+ }
141
+
76
142
message SubscribeEventsRequest {
143
+ uint32 sidechain_id = 1 ;
77
144
}
78
145
message EventResponse {
79
146
message Event {
0 commit comments