Skip to content

Commit 30f24ba

Browse files
committed
add GetTwoWayPegData RPC
1 parent b23aca0 commit 30f24ba

File tree

1 file changed

+38
-2
lines changed

1 file changed

+38
-2
lines changed

proto/mainchain.proto

+38-2
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,22 @@ message BlockHeaderInfo {
1111
bytes work = 4;
1212
}
1313

14-
message Deposit {
15-
uint64 sequence_number = 1;
14+
message OutPoint {
15+
bytes txid = 1;
16+
uint32 vout = 2;
17+
}
18+
19+
message Output {
1620
bytes address = 2;
1721
uint64 value = 3;
1822
}
1923

24+
message Deposit {
25+
uint64 sequence_number = 1;
26+
OutPoint outpoint = 2;
27+
Output output = 3;
28+
}
29+
2030
enum WithdrawalBundleEventType {
2131
WITHDRAWAL_BUNDLE_EVENT_TYPE_SUBMITTED_UNSPECIFIED = 0;
2232
WITHDRAWAL_BUNDLE_EVENT_TYPE_FAILED = 1;
@@ -35,15 +45,26 @@ message BlockInfo {
3545
}
3646

3747
service Mainchain {
48+
rpc BroadcastWithdrawalBundle(BroadcastWithdrawalBundleRequest)
49+
returns (BroadcastWithdrawalBundleResponse);
3850
rpc GetBlockHeaderInfo(GetBlockHeaderInfoRequest)
3951
returns (GetBlockHeaderInfoResponse);
4052
rpc GetBlockInfo(GetBlockInfoRequest) returns (GetBlockInfoResponse);
4153
rpc GetBmmHStarCommitments(GetBmmHStarCommitmentsRequest)
4254
returns (GetBmmHStarCommitmentsResponse);
4355
rpc GetChainTip(GetChainTipRequest) returns (GetChainTipResponse);
56+
rpc GetTwoWayPegData(GetTwoWayPegDataRequest)
57+
returns (GetTwoWayPegDataResponse);
4458
rpc SubscribeEvents(SubscribeEventsRequest) returns (stream EventResponse);
4559
}
4660

61+
message BroadcastWithdrawalBundleRequest {
62+
uint32 sidechain_id = 1;
63+
bytes transaction = 2;
64+
}
65+
message BroadcastWithdrawalBundleResponse {
66+
}
67+
4768
message GetBlockHeaderInfoRequest {
4869
bytes block_hash = 1;
4970
}
@@ -53,6 +74,7 @@ message GetBlockHeaderInfoResponse {
5374

5475
message GetBlockInfoRequest {
5576
bytes block_hash = 1;
77+
uint32 sidechain_id = 2;
5678
}
5779
message GetBlockInfoResponse {
5880
BlockHeaderInfo header_info = 1;
@@ -73,7 +95,21 @@ message GetChainTipResponse {
7395
BlockHeaderInfo block_header_info = 1;
7496
}
7597

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+
76111
message SubscribeEventsRequest {
112+
uint32 sidechain_id = 1;
77113
}
78114
message EventResponse {
79115
message Event {

0 commit comments

Comments
 (0)