Skip to content

Commit 2a891c5

Browse files
committed
add GetTwoWayPegData RPC
1 parent b23aca0 commit 2a891c5

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

proto/mainchain.proto

+29-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;
@@ -41,6 +51,8 @@ service Mainchain {
4151
rpc GetBmmHStarCommitments(GetBmmHStarCommitmentsRequest)
4252
returns (GetBmmHStarCommitmentsResponse);
4353
rpc GetChainTip(GetChainTipRequest) returns (GetChainTipResponse);
54+
rpc GetTwoWayPegData(GetTwoWayPegDataRequest)
55+
returns (GetTwoWayPegDataResponse);
4456
rpc SubscribeEvents(SubscribeEventsRequest) returns (stream EventResponse);
4557
}
4658

@@ -53,6 +65,7 @@ message GetBlockHeaderInfoResponse {
5365

5466
message GetBlockInfoRequest {
5567
bytes block_hash = 1;
68+
uint32 sidechain_id = 2;
5669
}
5770
message GetBlockInfoResponse {
5871
BlockHeaderInfo header_info = 1;
@@ -73,7 +86,21 @@ message GetChainTipResponse {
7386
BlockHeaderInfo block_header_info = 1;
7487
}
7588

89+
message GetTwoWayPegDataRequest {
90+
uint32 sidechain_id = 1;
91+
optional bytes start_block_hash = 2;
92+
bytes end_block_hash = 3;
93+
}
94+
message GetTwoWayPegDataResponse {
95+
message ResponseItem {
96+
BlockHeaderInfo block_header_info = 1;
97+
BlockInfo block_info = 2;
98+
}
99+
repeated ResponseItem blocks = 1;
100+
}
101+
76102
message SubscribeEventsRequest {
103+
uint32 sidechain_id = 1;
77104
}
78105
message EventResponse {
79106
message Event {

0 commit comments

Comments
 (0)