Skip to content

Commit 7fa9f1e

Browse files
committed
add gRPCs from bip300301_enforcer/proto
1 parent 8277a6b commit 7fa9f1e

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

proto/cusf/mainchain/v1/mainchain.proto

+46
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
syntax = "proto3";
44
package cusf.mainchain.v1;
55

6+
import "google/protobuf/wrappers.proto";
7+
68
enum AddressType {
79
ADDRESS_TYPE_UNSPECIFIED = 0;
810
ADDRESS_TYPE_DEFAULT = 1;
@@ -80,6 +82,10 @@ service MainchainService {
8082
returns (GetBmmHStarCommitmentsResponse);
8183
rpc GetChainInfo(GetChainInfoRequest) returns (GetChainInfoResponse);
8284
rpc GetChainTip(GetChainTipRequest) returns (GetChainTipResponse);
85+
rpc GetCtip(GetCtipRequest) returns (GetCtipResponse);
86+
rpc GetSidechainProposals(GetSidechainProposalsRequest)
87+
returns (GetSidechainProposalsResponse);
88+
rpc GetSidechains(GetSidechainsRequest) returns (GetSidechainsResponse);
8389
rpc GetTwoWayPegData(GetTwoWayPegDataRequest)
8490
returns (GetTwoWayPegDataResponse);
8591
rpc SubscribeEvents(SubscribeEventsRequest)
@@ -173,6 +179,46 @@ message GetChainTipResponse {
173179
BlockHeaderInfo block_header_info = 1;
174180
}
175181

182+
message GetCtipRequest {
183+
google.protobuf.UInt32Value sidechain_number = 1;
184+
}
185+
message GetCtipResponse {
186+
message Ctip {
187+
bytes txid = 1;
188+
uint32 vout = 2;
189+
uint64 value = 3;
190+
uint64 sequence_number = 4;
191+
}
192+
optional Ctip ctip = 1;
193+
}
194+
195+
message GetSidechainProposalsRequest {
196+
}
197+
message GetSidechainProposalsResponse {
198+
message SidechainProposal {
199+
uint32 sidechain_number = 1;
200+
bytes data = 2;
201+
bytes data_hash = 3;
202+
uint32 vote_count = 4;
203+
uint32 proposal_height = 5;
204+
uint32 proposal_age = 6;
205+
}
206+
repeated SidechainProposal sidechain_proposals = 1;
207+
}
208+
209+
message GetSidechainsRequest {
210+
}
211+
message GetSidechainsResponse {
212+
message SidechainInfo {
213+
uint32 sidechain_number = 1;
214+
bytes data = 2;
215+
uint32 vote_count = 3;
216+
uint32 proposal_height = 4;
217+
uint32 activation_height = 5;
218+
}
219+
repeated SidechainInfo sidechains = 1;
220+
}
221+
176222
message GetTwoWayPegDataRequest {
177223
uint32 sidechain_id = 1;
178224
optional bytes start_block_hash = 2;

0 commit comments

Comments
 (0)