@@ -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 ;
@@ -73,7 +95,21 @@ message GetChainTipResponse {
73
95
BlockHeaderInfo block_header_info = 1 ;
74
96
}
75
97
98
+ message GetTwoWayPegDataRequest {
99
+ uint32 sidechain_id = 1 ;
100
+ optional bytes start_block_hash = 2 ;
101
+ bytes end_block_hash = 3 ;
102
+ }
103
+ message GetTwoWayPegDataResponse {
104
+ message ResponseItem {
105
+ BlockHeaderInfo block_header_info = 1 ;
106
+ BlockInfo block_info = 2 ;
107
+ }
108
+ repeated ResponseItem blocks = 1 ;
109
+ }
110
+
76
111
message SubscribeEventsRequest {
112
+ uint32 sidechain_id = 1 ;
77
113
}
78
114
message EventResponse {
79
115
message Event {
0 commit comments