@@ -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,35 @@ message BlockInfo {
35
45
}
36
46
37
47
service Mainchain {
48
+ rpc BroadcastWithdrawalBundle (BroadcastWithdrawalBundleRequest )
49
+ returns (BroadcastWithdrawalBundleResponse );
50
+ // Regtest only
51
+ rpc GenerateBlocks (GenerateBlocksRequest )
52
+ returns (GenerateBlocksResponse );
38
53
rpc GetBlockHeaderInfo (GetBlockHeaderInfoRequest )
39
54
returns (GetBlockHeaderInfoResponse );
40
55
rpc GetBlockInfo (GetBlockInfoRequest ) returns (GetBlockInfoResponse );
41
56
rpc GetBmmHStarCommitments (GetBmmHStarCommitmentsRequest )
42
57
returns (GetBmmHStarCommitmentsResponse );
43
58
rpc GetChainTip (GetChainTipRequest ) returns (GetChainTipResponse );
59
+ rpc GetTwoWayPegData (GetTwoWayPegDataRequest )
60
+ returns (GetTwoWayPegDataResponse );
44
61
rpc SubscribeEvents (SubscribeEventsRequest ) returns (stream EventResponse );
45
62
}
46
63
64
+ message BroadcastWithdrawalBundleRequest {
65
+ uint32 sidechain_id = 1 ;
66
+ bytes transaction = 2 ;
67
+ }
68
+ message BroadcastWithdrawalBundleResponse {
69
+ }
70
+
71
+ message GenerateBlocksRequest {
72
+ uint32 blocks = 1 ;
73
+ }
74
+ message GenerateBlocksResponse {
75
+ }
76
+
47
77
message GetBlockHeaderInfoRequest {
48
78
bytes block_hash = 1 ;
49
79
}
@@ -53,6 +83,7 @@ message GetBlockHeaderInfoResponse {
53
83
54
84
message GetBlockInfoRequest {
55
85
bytes block_hash = 1 ;
86
+ uint32 sidechain_id = 2 ;
56
87
}
57
88
message GetBlockInfoResponse {
58
89
BlockHeaderInfo header_info = 1 ;
@@ -64,7 +95,16 @@ message GetBmmHStarCommitmentsRequest {
64
95
uint32 sidechain_id = 2 ;
65
96
}
66
97
message GetBmmHStarCommitmentsResponse {
67
- repeated bytes commitments = 1 ;
98
+ message BlockNotFoundError {
99
+ bytes block_hash = 1 ;
100
+ }
101
+ message Commitments {
102
+ repeated bytes commitments = 1 ;
103
+ }
104
+ oneof result {
105
+ BlockNotFoundError block_not_found = 1 ;
106
+ Commitments commitments = 2 ;
107
+ }
68
108
}
69
109
70
110
message GetChainTipRequest {
@@ -73,7 +113,21 @@ message GetChainTipResponse {
73
113
BlockHeaderInfo block_header_info = 1 ;
74
114
}
75
115
116
+ message GetTwoWayPegDataRequest {
117
+ uint32 sidechain_id = 1 ;
118
+ optional bytes start_block_hash = 2 ;
119
+ bytes end_block_hash = 3 ;
120
+ }
121
+ message GetTwoWayPegDataResponse {
122
+ message ResponseItem {
123
+ BlockHeaderInfo block_header_info = 1 ;
124
+ BlockInfo block_info = 2 ;
125
+ }
126
+ repeated ResponseItem blocks = 1 ;
127
+ }
128
+
76
129
message SubscribeEventsRequest {
130
+ uint32 sidechain_id = 1 ;
77
131
}
78
132
message EventResponse {
79
133
message Event {
0 commit comments