@@ -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,15 @@ message GetBmmHStarCommitmentsRequest {
64
86
uint32 sidechain_id = 2 ;
65
87
}
66
88
message GetBmmHStarCommitmentsResponse {
67
- repeated bytes commitments = 1 ;
89
+ message BlockNotFoundError {
90
+ }
91
+ message Commitments {
92
+ repeated bytes commitments = 1 ;
93
+ }
94
+ oneof result {
95
+ BlockNotFoundError block_not_found = 1 ;
96
+ Commitments commitments = 2 ;
97
+ }
68
98
}
69
99
70
100
message GetChainTipRequest {
@@ -73,7 +103,21 @@ message GetChainTipResponse {
73
103
BlockHeaderInfo block_header_info = 1 ;
74
104
}
75
105
106
+ message GetTwoWayPegDataRequest {
107
+ uint32 sidechain_id = 1 ;
108
+ optional bytes start_block_hash = 2 ;
109
+ bytes end_block_hash = 3 ;
110
+ }
111
+ message GetTwoWayPegDataResponse {
112
+ message ResponseItem {
113
+ BlockHeaderInfo block_header_info = 1 ;
114
+ BlockInfo block_info = 2 ;
115
+ }
116
+ repeated ResponseItem blocks = 1 ;
117
+ }
118
+
76
119
message SubscribeEventsRequest {
120
+ uint32 sidechain_id = 1 ;
77
121
}
78
122
message EventResponse {
79
123
message Event {
0 commit comments