diff --git a/gen/bitcoin/drivechaind/v1/drivechain.pb.go b/gen/bitcoin/drivechaind/v1/drivechain.pb.go index dd8c43d..bf9cf2b 100644 --- a/gen/bitcoin/drivechaind/v1/drivechain.pb.go +++ b/gen/bitcoin/drivechaind/v1/drivechain.pb.go @@ -218,6 +218,100 @@ func (x *ListActiveSidechainsResponse) GetSidechains() []*ListActiveSidechainsRe return nil } +type ListSidechainDepositsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Slot int32 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` +} + +func (x *ListSidechainDepositsRequest) Reset() { + *x = ListSidechainDepositsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_bitcoin_drivechaind_v1_drivechain_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSidechainDepositsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSidechainDepositsRequest) ProtoMessage() {} + +func (x *ListSidechainDepositsRequest) ProtoReflect() protoreflect.Message { + mi := &file_bitcoin_drivechaind_v1_drivechain_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSidechainDepositsRequest.ProtoReflect.Descriptor instead. +func (*ListSidechainDepositsRequest) Descriptor() ([]byte, []int) { + return file_bitcoin_drivechaind_v1_drivechain_proto_rawDescGZIP(), []int{4} +} + +func (x *ListSidechainDepositsRequest) GetSlot() int32 { + if x != nil { + return x.Slot + } + return 0 +} + +type ListSidechainDepositsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Deposits []*ListSidechainDepositsResponse_SidechainDeposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits,omitempty"` +} + +func (x *ListSidechainDepositsResponse) Reset() { + *x = ListSidechainDepositsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_bitcoin_drivechaind_v1_drivechain_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSidechainDepositsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSidechainDepositsResponse) ProtoMessage() {} + +func (x *ListSidechainDepositsResponse) ProtoReflect() protoreflect.Message { + mi := &file_bitcoin_drivechaind_v1_drivechain_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSidechainDepositsResponse.ProtoReflect.Descriptor instead. +func (*ListSidechainDepositsResponse) Descriptor() ([]byte, []int) { + return file_bitcoin_drivechaind_v1_drivechain_proto_rawDescGZIP(), []int{5} +} + +func (x *ListSidechainDepositsResponse) GetDeposits() []*ListSidechainDepositsResponse_SidechainDeposit { + if x != nil { + return x.Deposits + } + return nil +} + type ListActiveSidechainsResponse_Sidechain struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -236,7 +330,7 @@ type ListActiveSidechainsResponse_Sidechain struct { func (x *ListActiveSidechainsResponse_Sidechain) Reset() { *x = ListActiveSidechainsResponse_Sidechain{} if protoimpl.UnsafeEnabled { - mi := &file_bitcoin_drivechaind_v1_drivechain_proto_msgTypes[4] + mi := &file_bitcoin_drivechaind_v1_drivechain_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -249,7 +343,7 @@ func (x *ListActiveSidechainsResponse_Sidechain) String() string { func (*ListActiveSidechainsResponse_Sidechain) ProtoMessage() {} func (x *ListActiveSidechainsResponse_Sidechain) ProtoReflect() protoreflect.Message { - mi := &file_bitcoin_drivechaind_v1_drivechain_proto_msgTypes[4] + mi := &file_bitcoin_drivechaind_v1_drivechain_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -321,6 +415,93 @@ func (x *ListActiveSidechainsResponse_Sidechain) GetChaintipTxid() string { return "" } +type ListSidechainDepositsResponse_SidechainDeposit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Nsidechain int32 `protobuf:"varint,1,opt,name=nsidechain,proto3" json:"nsidechain,omitempty"` + Strdest string `protobuf:"bytes,2,opt,name=strdest,proto3" json:"strdest,omitempty"` + Txhex string `protobuf:"bytes,3,opt,name=txhex,proto3" json:"txhex,omitempty"` + Nburnindex int32 `protobuf:"varint,4,opt,name=nburnindex,proto3" json:"nburnindex,omitempty"` + Ntx int32 `protobuf:"varint,5,opt,name=ntx,proto3" json:"ntx,omitempty"` + Hashblock string `protobuf:"bytes,6,opt,name=hashblock,proto3" json:"hashblock,omitempty"` +} + +func (x *ListSidechainDepositsResponse_SidechainDeposit) Reset() { + *x = ListSidechainDepositsResponse_SidechainDeposit{} + if protoimpl.UnsafeEnabled { + mi := &file_bitcoin_drivechaind_v1_drivechain_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSidechainDepositsResponse_SidechainDeposit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSidechainDepositsResponse_SidechainDeposit) ProtoMessage() {} + +func (x *ListSidechainDepositsResponse_SidechainDeposit) ProtoReflect() protoreflect.Message { + mi := &file_bitcoin_drivechaind_v1_drivechain_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSidechainDepositsResponse_SidechainDeposit.ProtoReflect.Descriptor instead. +func (*ListSidechainDepositsResponse_SidechainDeposit) Descriptor() ([]byte, []int) { + return file_bitcoin_drivechaind_v1_drivechain_proto_rawDescGZIP(), []int{5, 0} +} + +func (x *ListSidechainDepositsResponse_SidechainDeposit) GetNsidechain() int32 { + if x != nil { + return x.Nsidechain + } + return 0 +} + +func (x *ListSidechainDepositsResponse_SidechainDeposit) GetStrdest() string { + if x != nil { + return x.Strdest + } + return "" +} + +func (x *ListSidechainDepositsResponse_SidechainDeposit) GetTxhex() string { + if x != nil { + return x.Txhex + } + return "" +} + +func (x *ListSidechainDepositsResponse_SidechainDeposit) GetNburnindex() int32 { + if x != nil { + return x.Nburnindex + } + return 0 +} + +func (x *ListSidechainDepositsResponse_SidechainDeposit) GetNtx() int32 { + if x != nil { + return x.Ntx + } + return 0 +} + +func (x *ListSidechainDepositsResponse_SidechainDeposit) GetHashblock() string { + if x != nil { + return x.Hashblock + } + return "" +} + var File_bitcoin_drivechaind_v1_drivechain_proto protoreflect.FileDescriptor var file_bitcoin_drivechaind_v1_drivechain_proto_rawDesc = []byte{ @@ -363,41 +544,72 @@ var file_bitcoin_drivechaind_v1_drivechain_proto_rawDesc = []byte{ 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x74, 0x69, 0x70, 0x5f, 0x74, 0x78, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x74, 0x69, 0x70, 0x54, 0x78, 0x69, 0x64, 0x32, 0xa1, 0x02, 0x0a, 0x11, 0x44, - 0x72, 0x69, 0x76, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x87, 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x69, 0x64, 0x65, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x35, 0x2e, 0x62, 0x69, - 0x74, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x64, 0x72, 0x69, 0x76, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x69, 0x64, 0x65, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x62, 0x69, 0x74, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x64, 0x72, 0x69, - 0x76, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x53, 0x69, 0x64, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x14, 0x4c, - 0x69, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x53, 0x69, 0x64, 0x65, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x73, 0x12, 0x33, 0x2e, 0x62, 0x69, 0x74, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x64, 0x72, - 0x69, 0x76, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x53, 0x69, 0x64, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x62, 0x69, 0x74, 0x63, 0x6f, - 0x69, 0x6e, 0x2e, 0x64, 0x72, 0x69, 0x76, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x53, 0x69, 0x64, 0x65, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xf0, - 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x69, 0x74, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x64, - 0x72, 0x69, 0x76, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x44, - 0x72, 0x69, 0x76, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x47, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x72, - 0x65, 0x62, 0x69, 0x74, 0x63, 0x6f, 0x69, 0x6e, 0x2f, 0x62, 0x74, 0x63, 0x2d, 0x62, 0x75, 0x66, - 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x62, 0x69, 0x74, 0x63, 0x6f, 0x69, 0x6e, 0x2f, 0x64, 0x72, 0x69, - 0x76, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x72, 0x69, 0x76, - 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x44, 0x58, 0xaa, - 0x02, 0x16, 0x42, 0x69, 0x74, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x16, 0x42, 0x69, 0x74, 0x63, 0x6f, - 0x69, 0x6e, 0x5c, 0x44, 0x72, 0x69, 0x76, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x64, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x22, 0x42, 0x69, 0x74, 0x63, 0x6f, 0x69, 0x6e, 0x5c, 0x44, 0x72, 0x69, 0x76, - 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x42, 0x69, 0x74, 0x63, 0x6f, 0x69, 0x6e, - 0x3a, 0x3a, 0x44, 0x72, 0x69, 0x76, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x64, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x69, 0x6e, 0x74, 0x69, 0x70, 0x54, 0x78, 0x69, 0x64, 0x22, 0x32, 0x0a, 0x1c, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x69, 0x64, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, + 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x22, 0xb8, + 0x02, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x69, 0x64, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x62, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x62, 0x69, 0x74, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x64, 0x72, 0x69, + 0x76, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x69, 0x64, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x69, 0x64, 0x65, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x73, 0x1a, 0xb2, 0x01, 0x0a, 0x10, 0x53, 0x69, 0x64, 0x65, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x73, 0x69, + 0x64, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6e, + 0x73, 0x69, 0x64, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x72, + 0x64, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x74, 0x72, 0x64, + 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x78, 0x68, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x74, 0x78, 0x68, 0x65, 0x78, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x62, 0x75, + 0x72, 0x6e, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6e, + 0x62, 0x75, 0x72, 0x6e, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x74, 0x78, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6e, 0x74, 0x78, 0x12, 0x1c, 0x0a, 0x09, 0x68, + 0x61, 0x73, 0x68, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x68, 0x61, 0x73, 0x68, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x32, 0xa8, 0x03, 0x0a, 0x11, 0x44, 0x72, + 0x69, 0x76, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x87, 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x69, 0x64, 0x65, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x35, 0x2e, 0x62, 0x69, 0x74, + 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x64, 0x72, 0x69, 0x76, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x69, 0x64, 0x65, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x36, 0x2e, 0x62, 0x69, 0x74, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x64, 0x72, 0x69, 0x76, + 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x53, 0x69, 0x64, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x14, 0x4c, 0x69, + 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x53, 0x69, 0x64, 0x65, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x73, 0x12, 0x33, 0x2e, 0x62, 0x69, 0x74, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x64, 0x72, 0x69, + 0x76, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x53, 0x69, 0x64, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x62, 0x69, 0x74, 0x63, 0x6f, 0x69, + 0x6e, 0x2e, 0x64, 0x72, 0x69, 0x76, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x53, 0x69, 0x64, 0x65, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x84, 0x01, + 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x69, 0x64, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x44, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x34, 0x2e, 0x62, 0x69, 0x74, 0x63, 0x6f, 0x69, + 0x6e, 0x2e, 0x64, 0x72, 0x69, 0x76, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x69, 0x64, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x44, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, + 0x62, 0x69, 0x74, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x64, 0x72, 0x69, 0x76, 0x65, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x69, 0x64, 0x65, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xf0, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x69, 0x74, + 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x64, 0x72, 0x69, 0x76, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x64, + 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x44, 0x72, 0x69, 0x76, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x47, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x72, 0x65, 0x62, 0x69, 0x74, 0x63, 0x6f, 0x69, 0x6e, 0x2f, 0x62, + 0x74, 0x63, 0x2d, 0x62, 0x75, 0x66, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x62, 0x69, 0x74, 0x63, 0x6f, + 0x69, 0x6e, 0x2f, 0x64, 0x72, 0x69, 0x76, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x64, 0x2f, 0x76, + 0x31, 0x3b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x64, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x42, 0x44, 0x58, 0xaa, 0x02, 0x16, 0x42, 0x69, 0x74, 0x63, 0x6f, 0x69, 0x6e, 0x2e, + 0x44, 0x72, 0x69, 0x76, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x16, 0x42, 0x69, 0x74, 0x63, 0x6f, 0x69, 0x6e, 0x5c, 0x44, 0x72, 0x69, 0x76, 0x65, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x22, 0x42, 0x69, 0x74, 0x63, 0x6f, 0x69, + 0x6e, 0x5c, 0x44, 0x72, 0x69, 0x76, 0x65, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x64, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x42, + 0x69, 0x74, 0x63, 0x6f, 0x69, 0x6e, 0x3a, 0x3a, 0x44, 0x72, 0x69, 0x76, 0x65, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -412,25 +624,31 @@ func file_bitcoin_drivechaind_v1_drivechain_proto_rawDescGZIP() []byte { return file_bitcoin_drivechaind_v1_drivechain_proto_rawDescData } -var file_bitcoin_drivechaind_v1_drivechain_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_bitcoin_drivechaind_v1_drivechain_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_bitcoin_drivechaind_v1_drivechain_proto_goTypes = []any{ - (*CreateSidechainDepositRequest)(nil), // 0: bitcoin.drivechaind.v1.CreateSidechainDepositRequest - (*CreateSidechainDepositResponse)(nil), // 1: bitcoin.drivechaind.v1.CreateSidechainDepositResponse - (*ListActiveSidechainsRequest)(nil), // 2: bitcoin.drivechaind.v1.ListActiveSidechainsRequest - (*ListActiveSidechainsResponse)(nil), // 3: bitcoin.drivechaind.v1.ListActiveSidechainsResponse - (*ListActiveSidechainsResponse_Sidechain)(nil), // 4: bitcoin.drivechaind.v1.ListActiveSidechainsResponse.Sidechain + (*CreateSidechainDepositRequest)(nil), // 0: bitcoin.drivechaind.v1.CreateSidechainDepositRequest + (*CreateSidechainDepositResponse)(nil), // 1: bitcoin.drivechaind.v1.CreateSidechainDepositResponse + (*ListActiveSidechainsRequest)(nil), // 2: bitcoin.drivechaind.v1.ListActiveSidechainsRequest + (*ListActiveSidechainsResponse)(nil), // 3: bitcoin.drivechaind.v1.ListActiveSidechainsResponse + (*ListSidechainDepositsRequest)(nil), // 4: bitcoin.drivechaind.v1.ListSidechainDepositsRequest + (*ListSidechainDepositsResponse)(nil), // 5: bitcoin.drivechaind.v1.ListSidechainDepositsResponse + (*ListActiveSidechainsResponse_Sidechain)(nil), // 6: bitcoin.drivechaind.v1.ListActiveSidechainsResponse.Sidechain + (*ListSidechainDepositsResponse_SidechainDeposit)(nil), // 7: bitcoin.drivechaind.v1.ListSidechainDepositsResponse.SidechainDeposit } var file_bitcoin_drivechaind_v1_drivechain_proto_depIdxs = []int32{ - 4, // 0: bitcoin.drivechaind.v1.ListActiveSidechainsResponse.sidechains:type_name -> bitcoin.drivechaind.v1.ListActiveSidechainsResponse.Sidechain - 0, // 1: bitcoin.drivechaind.v1.DrivechainService.CreateSidechainDeposit:input_type -> bitcoin.drivechaind.v1.CreateSidechainDepositRequest - 2, // 2: bitcoin.drivechaind.v1.DrivechainService.ListActiveSidechains:input_type -> bitcoin.drivechaind.v1.ListActiveSidechainsRequest - 1, // 3: bitcoin.drivechaind.v1.DrivechainService.CreateSidechainDeposit:output_type -> bitcoin.drivechaind.v1.CreateSidechainDepositResponse - 3, // 4: bitcoin.drivechaind.v1.DrivechainService.ListActiveSidechains:output_type -> bitcoin.drivechaind.v1.ListActiveSidechainsResponse - 3, // [3:5] is the sub-list for method output_type - 1, // [1:3] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 6, // 0: bitcoin.drivechaind.v1.ListActiveSidechainsResponse.sidechains:type_name -> bitcoin.drivechaind.v1.ListActiveSidechainsResponse.Sidechain + 7, // 1: bitcoin.drivechaind.v1.ListSidechainDepositsResponse.deposits:type_name -> bitcoin.drivechaind.v1.ListSidechainDepositsResponse.SidechainDeposit + 0, // 2: bitcoin.drivechaind.v1.DrivechainService.CreateSidechainDeposit:input_type -> bitcoin.drivechaind.v1.CreateSidechainDepositRequest + 2, // 3: bitcoin.drivechaind.v1.DrivechainService.ListActiveSidechains:input_type -> bitcoin.drivechaind.v1.ListActiveSidechainsRequest + 4, // 4: bitcoin.drivechaind.v1.DrivechainService.ListSidechainDeposits:input_type -> bitcoin.drivechaind.v1.ListSidechainDepositsRequest + 1, // 5: bitcoin.drivechaind.v1.DrivechainService.CreateSidechainDeposit:output_type -> bitcoin.drivechaind.v1.CreateSidechainDepositResponse + 3, // 6: bitcoin.drivechaind.v1.DrivechainService.ListActiveSidechains:output_type -> bitcoin.drivechaind.v1.ListActiveSidechainsResponse + 5, // 7: bitcoin.drivechaind.v1.DrivechainService.ListSidechainDeposits:output_type -> bitcoin.drivechaind.v1.ListSidechainDepositsResponse + 5, // [5:8] is the sub-list for method output_type + 2, // [2:5] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_bitcoin_drivechaind_v1_drivechain_proto_init() } @@ -488,6 +706,30 @@ func file_bitcoin_drivechaind_v1_drivechain_proto_init() { } } file_bitcoin_drivechaind_v1_drivechain_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*ListSidechainDepositsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_bitcoin_drivechaind_v1_drivechain_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*ListSidechainDepositsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_bitcoin_drivechaind_v1_drivechain_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*ListActiveSidechainsResponse_Sidechain); i { case 0: return &v.state @@ -499,6 +741,18 @@ func file_bitcoin_drivechaind_v1_drivechain_proto_init() { return nil } } + file_bitcoin_drivechaind_v1_drivechain_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*ListSidechainDepositsResponse_SidechainDeposit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -506,7 +760,7 @@ func file_bitcoin_drivechaind_v1_drivechain_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_bitcoin_drivechaind_v1_drivechain_proto_rawDesc, NumEnums: 0, - NumMessages: 5, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, diff --git a/gen/bitcoin/drivechaind/v1/drivechaindv1connect/drivechain.connect.go b/gen/bitcoin/drivechaind/v1/drivechaindv1connect/drivechain.connect.go index 24406a7..4100698 100644 --- a/gen/bitcoin/drivechaind/v1/drivechaindv1connect/drivechain.connect.go +++ b/gen/bitcoin/drivechaind/v1/drivechaindv1connect/drivechain.connect.go @@ -39,6 +39,9 @@ const ( // DrivechainServiceListActiveSidechainsProcedure is the fully-qualified name of the // DrivechainService's ListActiveSidechains RPC. DrivechainServiceListActiveSidechainsProcedure = "/bitcoin.drivechaind.v1.DrivechainService/ListActiveSidechains" + // DrivechainServiceListSidechainDepositsProcedure is the fully-qualified name of the + // DrivechainService's ListSidechainDeposits RPC. + DrivechainServiceListSidechainDepositsProcedure = "/bitcoin.drivechaind.v1.DrivechainService/ListSidechainDeposits" ) // These variables are the protoreflect.Descriptor objects for the RPCs defined in this package. @@ -46,12 +49,14 @@ var ( drivechainServiceServiceDescriptor = v1.File_bitcoin_drivechaind_v1_drivechain_proto.Services().ByName("DrivechainService") drivechainServiceCreateSidechainDepositMethodDescriptor = drivechainServiceServiceDescriptor.Methods().ByName("CreateSidechainDeposit") drivechainServiceListActiveSidechainsMethodDescriptor = drivechainServiceServiceDescriptor.Methods().ByName("ListActiveSidechains") + drivechainServiceListSidechainDepositsMethodDescriptor = drivechainServiceServiceDescriptor.Methods().ByName("ListSidechainDeposits") ) // DrivechainServiceClient is a client for the bitcoin.drivechaind.v1.DrivechainService service. type DrivechainServiceClient interface { CreateSidechainDeposit(context.Context, *connect.Request[v1.CreateSidechainDepositRequest]) (*connect.Response[v1.CreateSidechainDepositResponse], error) ListActiveSidechains(context.Context, *connect.Request[v1.ListActiveSidechainsRequest]) (*connect.Response[v1.ListActiveSidechainsResponse], error) + ListSidechainDeposits(context.Context, *connect.Request[v1.ListSidechainDepositsRequest]) (*connect.Response[v1.ListSidechainDepositsResponse], error) } // NewDrivechainServiceClient constructs a client for the bitcoin.drivechaind.v1.DrivechainService @@ -76,6 +81,12 @@ func NewDrivechainServiceClient(httpClient connect.HTTPClient, baseURL string, o connect.WithSchema(drivechainServiceListActiveSidechainsMethodDescriptor), connect.WithClientOptions(opts...), ), + listSidechainDeposits: connect.NewClient[v1.ListSidechainDepositsRequest, v1.ListSidechainDepositsResponse]( + httpClient, + baseURL+DrivechainServiceListSidechainDepositsProcedure, + connect.WithSchema(drivechainServiceListSidechainDepositsMethodDescriptor), + connect.WithClientOptions(opts...), + ), } } @@ -83,6 +94,7 @@ func NewDrivechainServiceClient(httpClient connect.HTTPClient, baseURL string, o type drivechainServiceClient struct { createSidechainDeposit *connect.Client[v1.CreateSidechainDepositRequest, v1.CreateSidechainDepositResponse] listActiveSidechains *connect.Client[v1.ListActiveSidechainsRequest, v1.ListActiveSidechainsResponse] + listSidechainDeposits *connect.Client[v1.ListSidechainDepositsRequest, v1.ListSidechainDepositsResponse] } // CreateSidechainDeposit calls bitcoin.drivechaind.v1.DrivechainService.CreateSidechainDeposit. @@ -95,11 +107,17 @@ func (c *drivechainServiceClient) ListActiveSidechains(ctx context.Context, req return c.listActiveSidechains.CallUnary(ctx, req) } +// ListSidechainDeposits calls bitcoin.drivechaind.v1.DrivechainService.ListSidechainDeposits. +func (c *drivechainServiceClient) ListSidechainDeposits(ctx context.Context, req *connect.Request[v1.ListSidechainDepositsRequest]) (*connect.Response[v1.ListSidechainDepositsResponse], error) { + return c.listSidechainDeposits.CallUnary(ctx, req) +} + // DrivechainServiceHandler is an implementation of the bitcoin.drivechaind.v1.DrivechainService // service. type DrivechainServiceHandler interface { CreateSidechainDeposit(context.Context, *connect.Request[v1.CreateSidechainDepositRequest]) (*connect.Response[v1.CreateSidechainDepositResponse], error) ListActiveSidechains(context.Context, *connect.Request[v1.ListActiveSidechainsRequest]) (*connect.Response[v1.ListActiveSidechainsResponse], error) + ListSidechainDeposits(context.Context, *connect.Request[v1.ListSidechainDepositsRequest]) (*connect.Response[v1.ListSidechainDepositsResponse], error) } // NewDrivechainServiceHandler builds an HTTP handler from the service implementation. It returns @@ -120,12 +138,20 @@ func NewDrivechainServiceHandler(svc DrivechainServiceHandler, opts ...connect.H connect.WithSchema(drivechainServiceListActiveSidechainsMethodDescriptor), connect.WithHandlerOptions(opts...), ) + drivechainServiceListSidechainDepositsHandler := connect.NewUnaryHandler( + DrivechainServiceListSidechainDepositsProcedure, + svc.ListSidechainDeposits, + connect.WithSchema(drivechainServiceListSidechainDepositsMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) return "/bitcoin.drivechaind.v1.DrivechainService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { switch r.URL.Path { case DrivechainServiceCreateSidechainDepositProcedure: drivechainServiceCreateSidechainDepositHandler.ServeHTTP(w, r) case DrivechainServiceListActiveSidechainsProcedure: drivechainServiceListActiveSidechainsHandler.ServeHTTP(w, r) + case DrivechainServiceListSidechainDepositsProcedure: + drivechainServiceListSidechainDepositsHandler.ServeHTTP(w, r) default: http.NotFound(w, r) } @@ -142,3 +168,7 @@ func (UnimplementedDrivechainServiceHandler) CreateSidechainDeposit(context.Cont func (UnimplementedDrivechainServiceHandler) ListActiveSidechains(context.Context, *connect.Request[v1.ListActiveSidechainsRequest]) (*connect.Response[v1.ListActiveSidechainsResponse], error) { return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bitcoin.drivechaind.v1.DrivechainService.ListActiveSidechains is not implemented")) } + +func (UnimplementedDrivechainServiceHandler) ListSidechainDeposits(context.Context, *connect.Request[v1.ListSidechainDepositsRequest]) (*connect.Response[v1.ListSidechainDepositsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bitcoin.drivechaind.v1.DrivechainService.ListSidechainDeposits is not implemented")) +} diff --git a/proto/bitcoin/drivechaind/v1/drivechain.proto b/proto/bitcoin/drivechaind/v1/drivechain.proto index f989b4a..7952e93 100644 --- a/proto/bitcoin/drivechaind/v1/drivechain.proto +++ b/proto/bitcoin/drivechaind/v1/drivechain.proto @@ -5,6 +5,7 @@ package bitcoin.drivechaind.v1; service DrivechainService { rpc CreateSidechainDeposit(CreateSidechainDepositRequest) returns (CreateSidechainDepositResponse); rpc ListActiveSidechains(ListActiveSidechainsRequest) returns (ListActiveSidechainsResponse); + rpc ListSidechainDeposits(ListSidechainDepositsRequest) returns (ListSidechainDepositsResponse); } message CreateSidechainDepositRequest { @@ -36,3 +37,20 @@ message ListActiveSidechainsResponse { repeated Sidechain sidechains = 1; } + +message ListSidechainDepositsRequest { + int32 slot = 1; +} + +message ListSidechainDepositsResponse { + message SidechainDeposit { + int32 nsidechain = 1; + string strdest = 2; + string txhex = 3; + int32 nburnindex = 4; + int32 ntx = 5; + string hashblock = 6; + } + + repeated SidechainDeposit deposits = 1; +} diff --git a/server/commands/drivechain.go b/server/commands/drivechain.go index 9322c43..87dc162 100644 --- a/server/commands/drivechain.go +++ b/server/commands/drivechain.go @@ -16,3 +16,9 @@ type ListSidechainCTip struct { // The sidechain slot Slot int `json:"slot"` } + +// ListSidechainDeposits retrieves a list of deposits for a specific sidechain +type ListSidechainDeposits struct { + // The sidechain slot + Slot int `json:"slot"` +} diff --git a/server/drivechain_server.go b/server/drivechain_server.go index d54e1e9..714d4fc 100644 --- a/server/drivechain_server.go +++ b/server/drivechain_server.go @@ -194,3 +194,26 @@ func chainToSlot(chain string) (int, error) { return 0, fmt.Errorf("unknown chain: %s", chain) } } + +// ListSidechainDeposits implements drivechaindv1connect.DrivechainServiceHandler. +func (b *Bitcoind) ListSidechainDeposits(ctx context.Context, c *connect.Request[pb.ListSidechainDepositsRequest]) (*connect.Response[pb.ListSidechainDepositsResponse], error) { + cmd, err := btcjson.NewCmd("listsidechaindeposits", c.Msg.Slot) + if err != nil { + return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("failed to create listsidechaindeposits command: %w", err)) + } + + res, err := rpcclient.ReceiveFuture(b.rpc.SendCmd(ctx, cmd)) + if err != nil { + return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("failed to execute listsidechaindeposits command: %w", err)) + } + + var deposits []*pb.ListSidechainDepositsResponse_SidechainDeposit + err = json.Unmarshal(res, &deposits) + if err != nil { + return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("failed to unmarshal listsidechaindeposits response: %w", err)) + } + + return connect.NewResponse(&pb.ListSidechainDepositsResponse{ + Deposits: deposits, + }), nil +} diff --git a/server/server.go b/server/server.go index b7be1ab..df0bccc 100644 --- a/server/server.go +++ b/server/server.go @@ -42,6 +42,7 @@ func init() { btcjson.MustRegisterCmd("createsidechaindeposit", new(commands.CreateSidechainDeposit), btcjson.UFWalletOnly) btcjson.MustRegisterCmd("listactivesidechains", new(commands.ListActiveSidechains), btcjson.UFWalletOnly) btcjson.MustRegisterCmd("listsidechainctip", new(commands.ListSidechainCTip), btcjson.UFWalletOnly) + btcjson.MustRegisterCmd("listsidechaindeposits", new(commands.ListSidechainDeposits), btcjson.UFWalletOnly) } type Bitcoind struct {