diff --git a/api/side/lending/lending.pulsar.go b/api/side/lending/lending.pulsar.go index d6df5404..da527318 100644 --- a/api/side/lending/lending.pulsar.go +++ b/api/side/lending/lending.pulsar.go @@ -3284,6 +3284,7 @@ var ( fd_Repayment_txid protoreflect.FieldDescriptor fd_Repayment_tx protoreflect.FieldDescriptor fd_Repayment_repay_adaptor_point protoreflect.FieldDescriptor + fd_Repayment_borrower_signature protoreflect.FieldDescriptor fd_Repayment_create_at protoreflect.FieldDescriptor ) @@ -3294,6 +3295,7 @@ func init() { fd_Repayment_txid = md_Repayment.Fields().ByName("txid") fd_Repayment_tx = md_Repayment.Fields().ByName("tx") fd_Repayment_repay_adaptor_point = md_Repayment.Fields().ByName("repay_adaptor_point") + fd_Repayment_borrower_signature = md_Repayment.Fields().ByName("borrower_signature") fd_Repayment_create_at = md_Repayment.Fields().ByName("create_at") } @@ -3386,6 +3388,12 @@ func (x *fastReflection_Repayment) Range(f func(protoreflect.FieldDescriptor, pr return } } + if x.BorrowerSignature != "" { + value := protoreflect.ValueOfString(x.BorrowerSignature) + if !f(fd_Repayment_borrower_signature, value) { + return + } + } if x.CreateAt != nil { value := protoreflect.ValueOfMessage(x.CreateAt.ProtoReflect()) if !f(fd_Repayment_create_at, value) { @@ -3415,6 +3423,8 @@ func (x *fastReflection_Repayment) Has(fd protoreflect.FieldDescriptor) bool { return x.Tx != "" case "side.lending.Repayment.repay_adaptor_point": return x.RepayAdaptorPoint != "" + case "side.lending.Repayment.borrower_signature": + return x.BorrowerSignature != "" case "side.lending.Repayment.create_at": return x.CreateAt != nil default: @@ -3441,6 +3451,8 @@ func (x *fastReflection_Repayment) Clear(fd protoreflect.FieldDescriptor) { x.Tx = "" case "side.lending.Repayment.repay_adaptor_point": x.RepayAdaptorPoint = "" + case "side.lending.Repayment.borrower_signature": + x.BorrowerSignature = "" case "side.lending.Repayment.create_at": x.CreateAt = nil default: @@ -3471,6 +3483,9 @@ func (x *fastReflection_Repayment) Get(descriptor protoreflect.FieldDescriptor) case "side.lending.Repayment.repay_adaptor_point": value := x.RepayAdaptorPoint return protoreflect.ValueOfString(value) + case "side.lending.Repayment.borrower_signature": + value := x.BorrowerSignature + return protoreflect.ValueOfString(value) case "side.lending.Repayment.create_at": value := x.CreateAt return protoreflect.ValueOfMessage(value.ProtoReflect()) @@ -3502,6 +3517,8 @@ func (x *fastReflection_Repayment) Set(fd protoreflect.FieldDescriptor, value pr x.Tx = value.Interface().(string) case "side.lending.Repayment.repay_adaptor_point": x.RepayAdaptorPoint = value.Interface().(string) + case "side.lending.Repayment.borrower_signature": + x.BorrowerSignature = value.Interface().(string) case "side.lending.Repayment.create_at": x.CreateAt = value.Message().Interface().(*timestamppb.Timestamp) default: @@ -3537,6 +3554,8 @@ func (x *fastReflection_Repayment) Mutable(fd protoreflect.FieldDescriptor) prot panic(fmt.Errorf("field tx of message side.lending.Repayment is not mutable")) case "side.lending.Repayment.repay_adaptor_point": panic(fmt.Errorf("field repay_adaptor_point of message side.lending.Repayment is not mutable")) + case "side.lending.Repayment.borrower_signature": + panic(fmt.Errorf("field borrower_signature of message side.lending.Repayment is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.Repayment")) @@ -3558,6 +3577,8 @@ func (x *fastReflection_Repayment) NewField(fd protoreflect.FieldDescriptor) pro return protoreflect.ValueOfString("") case "side.lending.Repayment.repay_adaptor_point": return protoreflect.ValueOfString("") + case "side.lending.Repayment.borrower_signature": + return protoreflect.ValueOfString("") case "side.lending.Repayment.create_at": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) @@ -3646,9 +3667,13 @@ func (x *fastReflection_Repayment) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.BorrowerSignature) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.CreateAt != nil { l = options.Size(x.CreateAt) - n += 2 + l + runtime.Sov(uint64(l)) + n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -3691,9 +3716,14 @@ func (x *fastReflection_Repayment) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x1 + dAtA[i] = 0x32 + } + if len(x.BorrowerSignature) > 0 { + i -= len(x.BorrowerSignature) + copy(dAtA[i:], x.BorrowerSignature) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BorrowerSignature))) i-- - dAtA[i] = 0x92 + dAtA[i] = 0x2a } if len(x.RepayAdaptorPoint) > 0 { i -= len(x.RepayAdaptorPoint) @@ -3900,7 +3930,39 @@ func (x *fastReflection_Repayment) ProtoMethods() *protoiface.Methods { } x.RepayAdaptorPoint = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 18: + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BorrowerSignature", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.BorrowerSignature = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreateAt", wireType) } @@ -4440,7 +4502,8 @@ type Repayment struct { Txid string `protobuf:"bytes,2,opt,name=txid,proto3" json:"txid,omitempty"` Tx string `protobuf:"bytes,3,opt,name=tx,proto3" json:"tx,omitempty"` RepayAdaptorPoint string `protobuf:"bytes,4,opt,name=repay_adaptor_point,json=repayAdaptorPoint,proto3" json:"repay_adaptor_point,omitempty"` - CreateAt *timestamppb.Timestamp `protobuf:"bytes,18,opt,name=create_at,json=createAt,proto3" json:"create_at,omitempty"` + BorrowerSignature string `protobuf:"bytes,5,opt,name=borrower_signature,json=borrowerSignature,proto3" json:"borrower_signature,omitempty"` + CreateAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=create_at,json=createAt,proto3" json:"create_at,omitempty"` } func (x *Repayment) Reset() { @@ -4491,6 +4554,13 @@ func (x *Repayment) GetRepayAdaptorPoint() string { return "" } +func (x *Repayment) GetBorrowerSignature() string { + if x != nil { + return x.BorrowerSignature + } + return "" +} + func (x *Repayment) GetCreateAt() *timestamppb.Timestamp { if x != nil { return x.CreateAt @@ -4585,37 +4655,40 @@ var file_side_lending_lending_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x74, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, - 0x78, 0x22, 0xbb, 0x01, 0x0a, 0x09, 0x52, 0x65, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x78, 0x22, 0xea, 0x01, 0x0a, 0x09, 0x52, 0x65, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6c, 0x6f, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x6f, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x78, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x78, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x78, 0x12, 0x2e, 0x0a, 0x13, 0x72, 0x65, 0x70, 0x61, 0x79, 0x5f, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x72, 0x65, 0x70, 0x61, 0x79, - 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x09, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, - 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x08, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x74, 0x2a, - 0x26, 0x0a, 0x0a, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x0a, - 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x41, - 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x2a, 0x64, 0x0a, 0x0a, 0x4c, 0x6f, 0x61, 0x6e, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x10, 0x00, - 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x10, 0x01, 0x12, 0x0c, 0x0a, - 0x08, 0x44, 0x69, 0x73, 0x62, 0x75, 0x72, 0x73, 0x65, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x52, - 0x65, 0x70, 0x61, 0x79, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x10, 0x05, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x10, 0x06, 0x42, 0x90, 0x01, - 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x42, 0x0c, 0x4c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x69, 0x64, 0x65, 0x2f, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0xa2, 0x02, 0x03, 0x53, 0x4c, 0x58, 0xaa, 0x02, 0x0c, 0x53, 0x69, 0x64, 0x65, 0x2e, 0x4c, - 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0xca, 0x02, 0x0c, 0x53, 0x69, 0x64, 0x65, 0x5c, 0x4c, 0x65, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0xe2, 0x02, 0x18, 0x53, 0x69, 0x64, 0x65, 0x5c, 0x4c, 0x65, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x0d, 0x53, 0x69, 0x64, 0x65, 0x3a, 0x3a, 0x4c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x12, + 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, + 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, + 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x08, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x74, 0x2a, 0x26, + 0x0a, 0x0a, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x0a, 0x06, + 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x41, 0x43, + 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x2a, 0x64, 0x0a, 0x0a, 0x4c, 0x6f, 0x61, 0x6e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x10, 0x00, 0x12, + 0x0b, 0x0a, 0x07, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, + 0x44, 0x69, 0x73, 0x62, 0x75, 0x72, 0x73, 0x65, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x65, + 0x70, 0x61, 0x79, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x65, 0x10, + 0x05, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x10, 0x06, 0x42, 0x90, 0x01, 0x0a, + 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x42, 0x0c, 0x4c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x73, 0x69, 0x64, 0x65, 0x2f, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0xa2, 0x02, 0x03, 0x53, 0x4c, 0x58, 0xaa, 0x02, 0x0c, 0x53, 0x69, 0x64, 0x65, 0x2e, 0x4c, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0xca, 0x02, 0x0c, 0x53, 0x69, 0x64, 0x65, 0x5c, 0x4c, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0xe2, 0x02, 0x18, 0x53, 0x69, 0x64, 0x65, 0x5c, 0x4c, 0x65, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x0d, 0x53, 0x69, 0x64, 0x65, 0x3a, 0x3a, 0x4c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/side/lending/query.pulsar.go b/api/side/lending/query.pulsar.go index d90a30e6..435631e1 100644 --- a/api/side/lending/query.pulsar.go +++ b/api/side/lending/query.pulsar.go @@ -3645,6 +3645,846 @@ func (x *fastReflection_QueryLoanCETResponse) ProtoMethods() *protoiface.Methods } } +var ( + md_QueryRepaymentTxRequest protoreflect.MessageDescriptor + fd_QueryRepaymentTxRequest_loan_id protoreflect.FieldDescriptor +) + +func init() { + file_side_lending_query_proto_init() + md_QueryRepaymentTxRequest = File_side_lending_query_proto.Messages().ByName("QueryRepaymentTxRequest") + fd_QueryRepaymentTxRequest_loan_id = md_QueryRepaymentTxRequest.Fields().ByName("loan_id") +} + +var _ protoreflect.Message = (*fastReflection_QueryRepaymentTxRequest)(nil) + +type fastReflection_QueryRepaymentTxRequest QueryRepaymentTxRequest + +func (x *QueryRepaymentTxRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryRepaymentTxRequest)(x) +} + +func (x *QueryRepaymentTxRequest) slowProtoReflect() protoreflect.Message { + mi := &file_side_lending_query_proto_msgTypes[8] + 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) +} + +var _fastReflection_QueryRepaymentTxRequest_messageType fastReflection_QueryRepaymentTxRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryRepaymentTxRequest_messageType{} + +type fastReflection_QueryRepaymentTxRequest_messageType struct{} + +func (x fastReflection_QueryRepaymentTxRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryRepaymentTxRequest)(nil) +} +func (x fastReflection_QueryRepaymentTxRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryRepaymentTxRequest) +} +func (x fastReflection_QueryRepaymentTxRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRepaymentTxRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryRepaymentTxRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRepaymentTxRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryRepaymentTxRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryRepaymentTxRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryRepaymentTxRequest) New() protoreflect.Message { + return new(fastReflection_QueryRepaymentTxRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryRepaymentTxRequest) Interface() protoreflect.ProtoMessage { + return (*QueryRepaymentTxRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryRepaymentTxRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.LoanId != "" { + value := protoreflect.ValueOfString(x.LoanId) + if !f(fd_QueryRepaymentTxRequest_loan_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryRepaymentTxRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "side.lending.QueryRepaymentTxRequest.loan_id": + return x.LoanId != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.QueryRepaymentTxRequest")) + } + panic(fmt.Errorf("message side.lending.QueryRepaymentTxRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryRepaymentTxRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "side.lending.QueryRepaymentTxRequest.loan_id": + x.LoanId = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.QueryRepaymentTxRequest")) + } + panic(fmt.Errorf("message side.lending.QueryRepaymentTxRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryRepaymentTxRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "side.lending.QueryRepaymentTxRequest.loan_id": + value := x.LoanId + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.QueryRepaymentTxRequest")) + } + panic(fmt.Errorf("message side.lending.QueryRepaymentTxRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryRepaymentTxRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "side.lending.QueryRepaymentTxRequest.loan_id": + x.LoanId = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.QueryRepaymentTxRequest")) + } + panic(fmt.Errorf("message side.lending.QueryRepaymentTxRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryRepaymentTxRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "side.lending.QueryRepaymentTxRequest.loan_id": + panic(fmt.Errorf("field loan_id of message side.lending.QueryRepaymentTxRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.QueryRepaymentTxRequest")) + } + panic(fmt.Errorf("message side.lending.QueryRepaymentTxRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryRepaymentTxRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "side.lending.QueryRepaymentTxRequest.loan_id": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.QueryRepaymentTxRequest")) + } + panic(fmt.Errorf("message side.lending.QueryRepaymentTxRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryRepaymentTxRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in side.lending.QueryRepaymentTxRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryRepaymentTxRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryRepaymentTxRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryRepaymentTxRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryRepaymentTxRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryRepaymentTxRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.LoanId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryRepaymentTxRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.LoanId) > 0 { + i -= len(x.LoanId) + copy(dAtA[i:], x.LoanId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.LoanId))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryRepaymentTxRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRepaymentTxRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRepaymentTxRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LoanId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.LoanId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryRepaymentTxResponse protoreflect.MessageDescriptor + fd_QueryRepaymentTxResponse_claim_tx protoreflect.FieldDescriptor +) + +func init() { + file_side_lending_query_proto_init() + md_QueryRepaymentTxResponse = File_side_lending_query_proto.Messages().ByName("QueryRepaymentTxResponse") + fd_QueryRepaymentTxResponse_claim_tx = md_QueryRepaymentTxResponse.Fields().ByName("claim_tx") +} + +var _ protoreflect.Message = (*fastReflection_QueryRepaymentTxResponse)(nil) + +type fastReflection_QueryRepaymentTxResponse QueryRepaymentTxResponse + +func (x *QueryRepaymentTxResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryRepaymentTxResponse)(x) +} + +func (x *QueryRepaymentTxResponse) slowProtoReflect() protoreflect.Message { + mi := &file_side_lending_query_proto_msgTypes[9] + 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) +} + +var _fastReflection_QueryRepaymentTxResponse_messageType fastReflection_QueryRepaymentTxResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryRepaymentTxResponse_messageType{} + +type fastReflection_QueryRepaymentTxResponse_messageType struct{} + +func (x fastReflection_QueryRepaymentTxResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryRepaymentTxResponse)(nil) +} +func (x fastReflection_QueryRepaymentTxResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryRepaymentTxResponse) +} +func (x fastReflection_QueryRepaymentTxResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRepaymentTxResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryRepaymentTxResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRepaymentTxResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryRepaymentTxResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryRepaymentTxResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryRepaymentTxResponse) New() protoreflect.Message { + return new(fastReflection_QueryRepaymentTxResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryRepaymentTxResponse) Interface() protoreflect.ProtoMessage { + return (*QueryRepaymentTxResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryRepaymentTxResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ClaimTx != "" { + value := protoreflect.ValueOfString(x.ClaimTx) + if !f(fd_QueryRepaymentTxResponse_claim_tx, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryRepaymentTxResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "side.lending.QueryRepaymentTxResponse.claim_tx": + return x.ClaimTx != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.QueryRepaymentTxResponse")) + } + panic(fmt.Errorf("message side.lending.QueryRepaymentTxResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryRepaymentTxResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "side.lending.QueryRepaymentTxResponse.claim_tx": + x.ClaimTx = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.QueryRepaymentTxResponse")) + } + panic(fmt.Errorf("message side.lending.QueryRepaymentTxResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryRepaymentTxResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "side.lending.QueryRepaymentTxResponse.claim_tx": + value := x.ClaimTx + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.QueryRepaymentTxResponse")) + } + panic(fmt.Errorf("message side.lending.QueryRepaymentTxResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryRepaymentTxResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "side.lending.QueryRepaymentTxResponse.claim_tx": + x.ClaimTx = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.QueryRepaymentTxResponse")) + } + panic(fmt.Errorf("message side.lending.QueryRepaymentTxResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryRepaymentTxResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "side.lending.QueryRepaymentTxResponse.claim_tx": + panic(fmt.Errorf("field claim_tx of message side.lending.QueryRepaymentTxResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.QueryRepaymentTxResponse")) + } + panic(fmt.Errorf("message side.lending.QueryRepaymentTxResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryRepaymentTxResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "side.lending.QueryRepaymentTxResponse.claim_tx": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.QueryRepaymentTxResponse")) + } + panic(fmt.Errorf("message side.lending.QueryRepaymentTxResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryRepaymentTxResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in side.lending.QueryRepaymentTxResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryRepaymentTxResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryRepaymentTxResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryRepaymentTxResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryRepaymentTxResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryRepaymentTxResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.ClaimTx) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryRepaymentTxResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ClaimTx) > 0 { + i -= len(x.ClaimTx) + copy(dAtA[i:], x.ClaimTx) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ClaimTx))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryRepaymentTxResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRepaymentTxResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRepaymentTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ClaimTx", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ClaimTx = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -3971,6 +4811,76 @@ func (*QueryLoanCETResponse) Descriptor() ([]byte, []int) { return file_side_lending_query_proto_rawDescGZIP(), []int{7} } +type QueryRepaymentTxRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + LoanId string `protobuf:"bytes,1,opt,name=loan_id,json=loanId,proto3" json:"loan_id,omitempty"` +} + +func (x *QueryRepaymentTxRequest) Reset() { + *x = QueryRepaymentTxRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_side_lending_query_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryRepaymentTxRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryRepaymentTxRequest) ProtoMessage() {} + +// Deprecated: Use QueryRepaymentTxRequest.ProtoReflect.Descriptor instead. +func (*QueryRepaymentTxRequest) Descriptor() ([]byte, []int) { + return file_side_lending_query_proto_rawDescGZIP(), []int{8} +} + +func (x *QueryRepaymentTxRequest) GetLoanId() string { + if x != nil { + return x.LoanId + } + return "" +} + +type QueryRepaymentTxResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClaimTx string `protobuf:"bytes,1,opt,name=claim_tx,json=claimTx,proto3" json:"claim_tx,omitempty"` +} + +func (x *QueryRepaymentTxResponse) Reset() { + *x = QueryRepaymentTxResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_side_lending_query_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryRepaymentTxResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryRepaymentTxResponse) ProtoMessage() {} + +// Deprecated: Use QueryRepaymentTxResponse.ProtoReflect.Descriptor instead. +func (*QueryRepaymentTxResponse) Descriptor() ([]byte, []int) { + return file_side_lending_query_proto_rawDescGZIP(), []int{9} +} + +func (x *QueryRepaymentTxResponse) GetClaimTx() string { + if x != nil { + return x.ClaimTx + } + return "" +} + var File_side_lending_query_proto protoreflect.FileDescriptor var file_side_lending_query_proto_rawDesc = []byte{ @@ -4032,50 +4942,66 @@ var file_side_lending_query_proto_rawDesc = []byte{ 0x61, 0x6d, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x61, 0x6e, 0x43, 0x45, 0x54, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x16, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x61, 0x6e, 0x43, 0x45, 0x54, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x32, 0x98, 0x04, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x6b, 0x0a, 0x06, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x20, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, - 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x73, 0x69, 0x64, 0x65, 0x2f, 0x6c, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x98, 0x01, 0x0a, 0x11, 0x43, 0x6f, - 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x2b, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x73, - 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x22, 0x12, 0x20, 0x2f, 0x73, 0x69, 0x64, 0x65, 0x2f, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x2f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x94, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x2e, 0x73, 0x69, 0x64, 0x65, - 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x69, - 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x73, 0x69, 0x64, - 0x65, 0x2f, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x70, 0x0a, 0x07, 0x4c, - 0x6f, 0x61, 0x6e, 0x43, 0x45, 0x54, 0x12, 0x21, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x61, 0x6e, 0x43, - 0x45, 0x54, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x69, 0x64, 0x65, - 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, - 0x61, 0x6e, 0x43, 0x45, 0x54, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x73, 0x69, 0x64, 0x65, 0x2f, 0x6c, 0x65, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x6c, 0x6f, 0x61, 0x6e, 0x2f, 0x63, 0x65, 0x74, 0x42, 0x8e, 0x01, - 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x73, 0x69, 0x64, 0x65, 0x2f, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0xa2, - 0x02, 0x03, 0x53, 0x4c, 0x58, 0xaa, 0x02, 0x0c, 0x53, 0x69, 0x64, 0x65, 0x2e, 0x4c, 0x65, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0xca, 0x02, 0x0c, 0x53, 0x69, 0x64, 0x65, 0x5c, 0x4c, 0x65, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0xe2, 0x02, 0x18, 0x53, 0x69, 0x64, 0x65, 0x5c, 0x4c, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x0d, 0x53, 0x69, 0x64, 0x65, 0x3a, 0x3a, 0x4c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x65, 0x22, 0x32, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x70, 0x61, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, + 0x07, 0x6c, 0x6f, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x6c, 0x6f, 0x61, 0x6e, 0x49, 0x64, 0x22, 0x35, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, + 0x65, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x74, 0x78, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x54, 0x78, 0x32, 0xaf, 0x05, + 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x6b, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x20, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, + 0x2f, 0x73, 0x69, 0x64, 0x65, 0x2f, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x98, 0x01, 0x0a, 0x11, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, + 0x72, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2b, 0x2e, 0x73, 0x69, 0x64, + 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, + 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, + 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6c, 0x6c, + 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, + 0x73, 0x69, 0x64, 0x65, 0x2f, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x63, 0x6f, 0x6c, + 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x94, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2b, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x73, 0x69, 0x64, 0x65, 0x2f, 0x6c, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x70, 0x0a, 0x07, 0x4c, 0x6f, 0x61, 0x6e, 0x43, 0x45, + 0x54, 0x12, 0x21, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x61, 0x6e, 0x43, 0x45, 0x54, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x61, 0x6e, 0x43, 0x45, 0x54, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, + 0x12, 0x16, 0x2f, 0x73, 0x69, 0x64, 0x65, 0x2f, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2f, + 0x6c, 0x6f, 0x61, 0x6e, 0x2f, 0x63, 0x65, 0x74, 0x12, 0x94, 0x01, 0x0a, 0x11, 0x55, 0x6e, 0x73, + 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x78, 0x12, 0x25, + 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x52, 0x65, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x78, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x70, 0x61, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x73, 0x69, 0x64, 0x65, 0x2f, 0x6c, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x6c, 0x6f, 0x61, 0x6e, 0x2f, 0x72, 0x65, 0x70, 0x61, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x2f, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x74, 0x78, 0x42, + 0x8e, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x69, 0x64, 0x65, 0x2f, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0xa2, 0x02, 0x03, 0x53, 0x4c, 0x58, 0xaa, 0x02, 0x0c, 0x53, 0x69, 0x64, 0x65, 0x2e, 0x4c, + 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0xca, 0x02, 0x0c, 0x53, 0x69, 0x64, 0x65, 0x5c, 0x4c, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0xe2, 0x02, 0x18, 0x53, 0x69, 0x64, 0x65, 0x5c, 0x4c, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x0d, 0x53, 0x69, 0x64, 0x65, 0x3a, 0x3a, 0x4c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4090,7 +5016,7 @@ func file_side_lending_query_proto_rawDescGZIP() []byte { return file_side_lending_query_proto_rawDescData } -var file_side_lending_query_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_side_lending_query_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_side_lending_query_proto_goTypes = []interface{}{ (*QueryLiquidationEventRequest)(nil), // 0: side.lending.QueryLiquidationEventRequest (*QueryLiquidationEventResponse)(nil), // 1: side.lending.QueryLiquidationEventResponse @@ -4100,26 +5026,30 @@ var file_side_lending_query_proto_goTypes = []interface{}{ (*QueryParamsResponse)(nil), // 5: side.lending.QueryParamsResponse (*QueryLoanCETRequest)(nil), // 6: side.lending.QueryLoanCETRequest (*QueryLoanCETResponse)(nil), // 7: side.lending.QueryLoanCETResponse - (*v1beta1.Coin)(nil), // 8: cosmos.base.v1beta1.Coin - (*Params)(nil), // 9: side.lending.Params + (*QueryRepaymentTxRequest)(nil), // 8: side.lending.QueryRepaymentTxRequest + (*QueryRepaymentTxResponse)(nil), // 9: side.lending.QueryRepaymentTxResponse + (*v1beta1.Coin)(nil), // 10: cosmos.base.v1beta1.Coin + (*Params)(nil), // 11: side.lending.Params } var file_side_lending_query_proto_depIdxs = []int32{ - 8, // 0: side.lending.QueryLiquidationEventRequest.borrow_amount:type_name -> cosmos.base.v1beta1.Coin - 8, // 1: side.lending.QueryLiquidationEventRequest.collateral_acmount:type_name -> cosmos.base.v1beta1.Coin - 9, // 2: side.lending.QueryParamsResponse.params:type_name -> side.lending.Params - 4, // 3: side.lending.Query.Params:input_type -> side.lending.QueryParamsRequest - 2, // 4: side.lending.Query.CollateralAddress:input_type -> side.lending.QueryCollateralAddressRequest - 0, // 5: side.lending.Query.LiquidationEvent:input_type -> side.lending.QueryLiquidationEventRequest - 6, // 6: side.lending.Query.LoanCET:input_type -> side.lending.QueryLoanCETRequest - 5, // 7: side.lending.Query.Params:output_type -> side.lending.QueryParamsResponse - 3, // 8: side.lending.Query.CollateralAddress:output_type -> side.lending.QueryCollateralAddressResponse - 1, // 9: side.lending.Query.LiquidationEvent:output_type -> side.lending.QueryLiquidationEventResponse - 7, // 10: side.lending.Query.LoanCET:output_type -> side.lending.QueryLoanCETResponse - 7, // [7:11] is the sub-list for method output_type - 3, // [3:7] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 10, // 0: side.lending.QueryLiquidationEventRequest.borrow_amount:type_name -> cosmos.base.v1beta1.Coin + 10, // 1: side.lending.QueryLiquidationEventRequest.collateral_acmount:type_name -> cosmos.base.v1beta1.Coin + 11, // 2: side.lending.QueryParamsResponse.params:type_name -> side.lending.Params + 4, // 3: side.lending.Query.Params:input_type -> side.lending.QueryParamsRequest + 2, // 4: side.lending.Query.CollateralAddress:input_type -> side.lending.QueryCollateralAddressRequest + 0, // 5: side.lending.Query.LiquidationEvent:input_type -> side.lending.QueryLiquidationEventRequest + 6, // 6: side.lending.Query.LoanCET:input_type -> side.lending.QueryLoanCETRequest + 8, // 7: side.lending.Query.UnsignedPaymentTx:input_type -> side.lending.QueryRepaymentTxRequest + 5, // 8: side.lending.Query.Params:output_type -> side.lending.QueryParamsResponse + 3, // 9: side.lending.Query.CollateralAddress:output_type -> side.lending.QueryCollateralAddressResponse + 1, // 10: side.lending.Query.LiquidationEvent:output_type -> side.lending.QueryLiquidationEventResponse + 7, // 11: side.lending.Query.LoanCET:output_type -> side.lending.QueryLoanCETResponse + 9, // 12: side.lending.Query.UnsignedPaymentTx:output_type -> side.lending.QueryRepaymentTxResponse + 8, // [8:13] is the sub-list for method output_type + 3, // [3:8] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_side_lending_query_proto_init() } @@ -4226,6 +5156,30 @@ func file_side_lending_query_proto_init() { return nil } } + file_side_lending_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryRepaymentTxRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_side_lending_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryRepaymentTxResponse); 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{ @@ -4233,7 +5187,7 @@ func file_side_lending_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_side_lending_query_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 10, NumExtensions: 0, NumServices: 1, }, diff --git a/api/side/lending/query_grpc.pb.go b/api/side/lending/query_grpc.pb.go index 328d55d5..9721a939 100644 --- a/api/side/lending/query_grpc.pb.go +++ b/api/side/lending/query_grpc.pb.go @@ -23,6 +23,7 @@ const ( Query_CollateralAddress_FullMethodName = "/side.lending.Query/CollateralAddress" Query_LiquidationEvent_FullMethodName = "/side.lending.Query/LiquidationEvent" Query_LoanCET_FullMethodName = "/side.lending.Query/LoanCET" + Query_UnsignedPaymentTx_FullMethodName = "/side.lending.Query/UnsignedPaymentTx" ) // QueryClient is the client API for Query service. @@ -34,6 +35,7 @@ type QueryClient interface { CollateralAddress(ctx context.Context, in *QueryCollateralAddressRequest, opts ...grpc.CallOption) (*QueryCollateralAddressResponse, error) LiquidationEvent(ctx context.Context, in *QueryLiquidationEventRequest, opts ...grpc.CallOption) (*QueryLiquidationEventResponse, error) LoanCET(ctx context.Context, in *QueryLoanCETRequest, opts ...grpc.CallOption) (*QueryLoanCETResponse, error) + UnsignedPaymentTx(ctx context.Context, in *QueryRepaymentTxRequest, opts ...grpc.CallOption) (*QueryRepaymentTxResponse, error) } type queryClient struct { @@ -80,6 +82,15 @@ func (c *queryClient) LoanCET(ctx context.Context, in *QueryLoanCETRequest, opts return out, nil } +func (c *queryClient) UnsignedPaymentTx(ctx context.Context, in *QueryRepaymentTxRequest, opts ...grpc.CallOption) (*QueryRepaymentTxResponse, error) { + out := new(QueryRepaymentTxResponse) + err := c.cc.Invoke(ctx, Query_UnsignedPaymentTx_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer // for forward compatibility @@ -89,6 +100,7 @@ type QueryServer interface { CollateralAddress(context.Context, *QueryCollateralAddressRequest) (*QueryCollateralAddressResponse, error) LiquidationEvent(context.Context, *QueryLiquidationEventRequest) (*QueryLiquidationEventResponse, error) LoanCET(context.Context, *QueryLoanCETRequest) (*QueryLoanCETResponse, error) + UnsignedPaymentTx(context.Context, *QueryRepaymentTxRequest) (*QueryRepaymentTxResponse, error) mustEmbedUnimplementedQueryServer() } @@ -108,6 +120,9 @@ func (UnimplementedQueryServer) LiquidationEvent(context.Context, *QueryLiquidat func (UnimplementedQueryServer) LoanCET(context.Context, *QueryLoanCETRequest) (*QueryLoanCETResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method LoanCET not implemented") } +func (UnimplementedQueryServer) UnsignedPaymentTx(context.Context, *QueryRepaymentTxRequest) (*QueryRepaymentTxResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnsignedPaymentTx not implemented") +} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. @@ -193,6 +208,24 @@ func _Query_LoanCET_Handler(srv interface{}, ctx context.Context, dec func(inter return interceptor(ctx, in, info, handler) } +func _Query_UnsignedPaymentTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryRepaymentTxRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).UnsignedPaymentTx(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_UnsignedPaymentTx_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).UnsignedPaymentTx(ctx, req.(*QueryRepaymentTxRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Query_ServiceDesc is the grpc.ServiceDesc for Query service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -216,6 +249,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "LoanCET", Handler: _Query_LoanCET_Handler, }, + { + MethodName: "UnsignedPaymentTx", + Handler: _Query_UnsignedPaymentTx_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "side/lending/query.proto", diff --git a/api/side/lending/tx.pulsar.go b/api/side/lending/tx.pulsar.go index 79322256..031e2696 100644 --- a/api/side/lending/tx.pulsar.go +++ b/api/side/lending/tx.pulsar.go @@ -920,11 +920,12 @@ func (x *fastReflection_MsgCreatePoolResponse) ProtoMethods() *protoiface.Method } var ( - md_MsgRepay protoreflect.MessageDescriptor - fd_MsgRepay_borrower protoreflect.FieldDescriptor - fd_MsgRepay_loan_id protoreflect.FieldDescriptor - fd_MsgRepay_amount protoreflect.FieldDescriptor - fd_MsgRepay_adaptor_point protoreflect.FieldDescriptor + md_MsgRepay protoreflect.MessageDescriptor + fd_MsgRepay_borrower protoreflect.FieldDescriptor + fd_MsgRepay_loan_id protoreflect.FieldDescriptor + fd_MsgRepay_adaptor_point protoreflect.FieldDescriptor + fd_MsgRepay_claim_tx_id protoreflect.FieldDescriptor + fd_MsgRepay_adaptor_signature protoreflect.FieldDescriptor ) func init() { @@ -932,8 +933,9 @@ func init() { md_MsgRepay = File_side_lending_tx_proto.Messages().ByName("MsgRepay") fd_MsgRepay_borrower = md_MsgRepay.Fields().ByName("borrower") fd_MsgRepay_loan_id = md_MsgRepay.Fields().ByName("loan_id") - fd_MsgRepay_amount = md_MsgRepay.Fields().ByName("amount") fd_MsgRepay_adaptor_point = md_MsgRepay.Fields().ByName("adaptor_point") + fd_MsgRepay_claim_tx_id = md_MsgRepay.Fields().ByName("claim_tx_id") + fd_MsgRepay_adaptor_signature = md_MsgRepay.Fields().ByName("adaptor_signature") } var _ protoreflect.Message = (*fastReflection_MsgRepay)(nil) @@ -1013,18 +1015,24 @@ func (x *fastReflection_MsgRepay) Range(f func(protoreflect.FieldDescriptor, pro return } } - if x.Amount != nil { - value := protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) - if !f(fd_MsgRepay_amount, value) { - return - } - } if x.AdaptorPoint != "" { value := protoreflect.ValueOfString(x.AdaptorPoint) if !f(fd_MsgRepay_adaptor_point, value) { return } } + if x.ClaimTxId != "" { + value := protoreflect.ValueOfString(x.ClaimTxId) + if !f(fd_MsgRepay_claim_tx_id, value) { + return + } + } + if x.AdaptorSignature != "" { + value := protoreflect.ValueOfString(x.AdaptorSignature) + if !f(fd_MsgRepay_adaptor_signature, value) { + return + } + } } // Has reports whether a field is populated. @@ -1044,10 +1052,12 @@ func (x *fastReflection_MsgRepay) Has(fd protoreflect.FieldDescriptor) bool { return x.Borrower != "" case "side.lending.MsgRepay.loan_id": return x.LoanId != "" - case "side.lending.MsgRepay.amount": - return x.Amount != nil case "side.lending.MsgRepay.adaptor_point": return x.AdaptorPoint != "" + case "side.lending.MsgRepay.claim_tx_id": + return x.ClaimTxId != "" + case "side.lending.MsgRepay.adaptor_signature": + return x.AdaptorSignature != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.MsgRepay")) @@ -1068,10 +1078,12 @@ func (x *fastReflection_MsgRepay) Clear(fd protoreflect.FieldDescriptor) { x.Borrower = "" case "side.lending.MsgRepay.loan_id": x.LoanId = "" - case "side.lending.MsgRepay.amount": - x.Amount = nil case "side.lending.MsgRepay.adaptor_point": x.AdaptorPoint = "" + case "side.lending.MsgRepay.claim_tx_id": + x.ClaimTxId = "" + case "side.lending.MsgRepay.adaptor_signature": + x.AdaptorSignature = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.MsgRepay")) @@ -1094,12 +1106,15 @@ func (x *fastReflection_MsgRepay) Get(descriptor protoreflect.FieldDescriptor) p case "side.lending.MsgRepay.loan_id": value := x.LoanId return protoreflect.ValueOfString(value) - case "side.lending.MsgRepay.amount": - value := x.Amount - return protoreflect.ValueOfMessage(value.ProtoReflect()) case "side.lending.MsgRepay.adaptor_point": value := x.AdaptorPoint return protoreflect.ValueOfString(value) + case "side.lending.MsgRepay.claim_tx_id": + value := x.ClaimTxId + return protoreflect.ValueOfString(value) + case "side.lending.MsgRepay.adaptor_signature": + value := x.AdaptorSignature + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.MsgRepay")) @@ -1124,10 +1139,12 @@ func (x *fastReflection_MsgRepay) Set(fd protoreflect.FieldDescriptor, value pro x.Borrower = value.Interface().(string) case "side.lending.MsgRepay.loan_id": x.LoanId = value.Interface().(string) - case "side.lending.MsgRepay.amount": - x.Amount = value.Message().Interface().(*v1beta1.Coin) case "side.lending.MsgRepay.adaptor_point": x.AdaptorPoint = value.Interface().(string) + case "side.lending.MsgRepay.claim_tx_id": + x.ClaimTxId = value.Interface().(string) + case "side.lending.MsgRepay.adaptor_signature": + x.AdaptorSignature = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.MsgRepay")) @@ -1148,17 +1165,16 @@ func (x *fastReflection_MsgRepay) Set(fd protoreflect.FieldDescriptor, value pro // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRepay) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "side.lending.MsgRepay.amount": - if x.Amount == nil { - x.Amount = new(v1beta1.Coin) - } - return protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) case "side.lending.MsgRepay.borrower": panic(fmt.Errorf("field borrower of message side.lending.MsgRepay is not mutable")) case "side.lending.MsgRepay.loan_id": panic(fmt.Errorf("field loan_id of message side.lending.MsgRepay is not mutable")) case "side.lending.MsgRepay.adaptor_point": panic(fmt.Errorf("field adaptor_point of message side.lending.MsgRepay is not mutable")) + case "side.lending.MsgRepay.claim_tx_id": + panic(fmt.Errorf("field claim_tx_id of message side.lending.MsgRepay is not mutable")) + case "side.lending.MsgRepay.adaptor_signature": + panic(fmt.Errorf("field adaptor_signature of message side.lending.MsgRepay is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.MsgRepay")) @@ -1176,11 +1192,12 @@ func (x *fastReflection_MsgRepay) NewField(fd protoreflect.FieldDescriptor) prot return protoreflect.ValueOfString("") case "side.lending.MsgRepay.loan_id": return protoreflect.ValueOfString("") - case "side.lending.MsgRepay.amount": - m := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(m.ProtoReflect()) case "side.lending.MsgRepay.adaptor_point": return protoreflect.ValueOfString("") + case "side.lending.MsgRepay.claim_tx_id": + return protoreflect.ValueOfString("") + case "side.lending.MsgRepay.adaptor_signature": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.MsgRepay")) @@ -1258,11 +1275,15 @@ func (x *fastReflection_MsgRepay) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.Amount != nil { - l = options.Size(x.Amount) + l = len(x.AdaptorPoint) + if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.AdaptorPoint) + l = len(x.ClaimTxId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.AdaptorSignature) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -1295,25 +1316,25 @@ func (x *fastReflection_MsgRepay) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.AdaptorSignature) > 0 { + i -= len(x.AdaptorSignature) + copy(dAtA[i:], x.AdaptorSignature) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AdaptorSignature))) + i-- + dAtA[i] = 0x2a + } + if len(x.ClaimTxId) > 0 { + i -= len(x.ClaimTxId) + copy(dAtA[i:], x.ClaimTxId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ClaimTxId))) + i-- + dAtA[i] = 0x22 + } if len(x.AdaptorPoint) > 0 { i -= len(x.AdaptorPoint) copy(dAtA[i:], x.AdaptorPoint) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AdaptorPoint))) i-- - dAtA[i] = 0x22 - } - if x.Amount != nil { - encoded, err := options.Marshal(x.Amount) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- dAtA[i] = 0x1a } if len(x.LoanId) > 0 { @@ -1445,9 +1466,9 @@ func (x *fastReflection_MsgRepay) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 3: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AdaptorPoint", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -1457,31 +1478,59 @@ func (x *fastReflection_MsgRepay) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.Amount == nil { - x.Amount = &v1beta1.Coin{} + x.AdaptorPoint = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ClaimTxId", wireType) } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } + x.ClaimTxId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 5: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AdaptorPoint", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AdaptorSignature", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1509,7 +1558,7 @@ func (x *fastReflection_MsgRepay) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.AdaptorPoint = string(dAtA[iNdEx:postIndex]) + x.AdaptorSignature = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -7089,146 +7138,1044 @@ func (x *fastReflection_MsgApproveResponse) ProtoMethods() *protoiface.Methods { } } -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: side/lending/tx.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +var ( + md_MsgClose protoreflect.MessageDescriptor + fd_MsgClose_relayer protoreflect.FieldDescriptor + fd_MsgClose_loan_id protoreflect.FieldDescriptor + fd_MsgClose_signature protoreflect.FieldDescriptor ) -type MsgCreatePool struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - PoolId string `protobuf:"bytes,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` - LendingAsset string `protobuf:"bytes,3,opt,name=lending_asset,json=lendingAsset,proto3" json:"lending_asset,omitempty"` -} - -func (x *MsgCreatePool) Reset() { - *x = MsgCreatePool{} - if protoimpl.UnsafeEnabled { - mi := &file_side_lending_tx_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCreatePool) String() string { - return protoimpl.X.MessageStringOf(x) +func init() { + file_side_lending_tx_proto_init() + md_MsgClose = File_side_lending_tx_proto.Messages().ByName("MsgClose") + fd_MsgClose_relayer = md_MsgClose.Fields().ByName("relayer") + fd_MsgClose_loan_id = md_MsgClose.Fields().ByName("loan_id") + fd_MsgClose_signature = md_MsgClose.Fields().ByName("signature") } -func (*MsgCreatePool) ProtoMessage() {} +var _ protoreflect.Message = (*fastReflection_MsgClose)(nil) -// Deprecated: Use MsgCreatePool.ProtoReflect.Descriptor instead. -func (*MsgCreatePool) Descriptor() ([]byte, []int) { - return file_side_lending_tx_proto_rawDescGZIP(), []int{0} -} +type fastReflection_MsgClose MsgClose -func (x *MsgCreatePool) GetCreator() string { - if x != nil { - return x.Creator - } - return "" +func (x *MsgClose) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgClose)(x) } -func (x *MsgCreatePool) GetPoolId() string { - if x != nil { - return x.PoolId +func (x *MsgClose) slowProtoReflect() protoreflect.Message { + mi := &file_side_lending_tx_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -func (x *MsgCreatePool) GetLendingAsset() string { - if x != nil { - return x.LendingAsset - } - return "" -} +var _fastReflection_MsgClose_messageType fastReflection_MsgClose_messageType +var _ protoreflect.MessageType = fastReflection_MsgClose_messageType{} -type MsgCreatePoolResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} +type fastReflection_MsgClose_messageType struct{} -func (x *MsgCreatePoolResponse) Reset() { - *x = MsgCreatePoolResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_side_lending_tx_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (x fastReflection_MsgClose_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgClose)(nil) } - -func (x *MsgCreatePoolResponse) String() string { - return protoimpl.X.MessageStringOf(x) +func (x fastReflection_MsgClose_messageType) New() protoreflect.Message { + return new(fastReflection_MsgClose) } - -func (*MsgCreatePoolResponse) ProtoMessage() {} - -// Deprecated: Use MsgCreatePoolResponse.ProtoReflect.Descriptor instead. -func (*MsgCreatePoolResponse) Descriptor() ([]byte, []int) { - return file_side_lending_tx_proto_rawDescGZIP(), []int{1} +func (x fastReflection_MsgClose_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgClose } -type MsgRepay struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Borrower string `protobuf:"bytes,1,opt,name=borrower,proto3" json:"borrower,omitempty"` - LoanId string `protobuf:"bytes,2,opt,name=loan_id,json=loanId,proto3" json:"loan_id,omitempty"` - Amount *v1beta1.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` - AdaptorPoint string `protobuf:"bytes,4,opt,name=adaptor_point,json=adaptorPoint,proto3" json:"adaptor_point,omitempty"` +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgClose) Descriptor() protoreflect.MessageDescriptor { + return md_MsgClose } -func (x *MsgRepay) Reset() { - *x = MsgRepay{} - if protoimpl.UnsafeEnabled { - mi := &file_side_lending_tx_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgClose) Type() protoreflect.MessageType { + return _fastReflection_MsgClose_messageType } -func (x *MsgRepay) String() string { - return protoimpl.X.MessageStringOf(x) +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgClose) New() protoreflect.Message { + return new(fastReflection_MsgClose) } -func (*MsgRepay) ProtoMessage() {} - -// Deprecated: Use MsgRepay.ProtoReflect.Descriptor instead. -func (*MsgRepay) Descriptor() ([]byte, []int) { - return file_side_lending_tx_proto_rawDescGZIP(), []int{2} +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgClose) Interface() protoreflect.ProtoMessage { + return (*MsgClose)(x) } -func (x *MsgRepay) GetBorrower() string { - if x != nil { - return x.Borrower +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgClose) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Relayer != "" { + value := protoreflect.ValueOfString(x.Relayer) + if !f(fd_MsgClose_relayer, value) { + return + } + } + if x.LoanId != "" { + value := protoreflect.ValueOfString(x.LoanId) + if !f(fd_MsgClose_loan_id, value) { + return + } + } + if x.Signature != "" { + value := protoreflect.ValueOfString(x.Signature) + if !f(fd_MsgClose_signature, value) { + return + } } - return "" } -func (x *MsgRepay) GetLoanId() string { - if x != nil { - return x.LoanId +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgClose) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "side.lending.MsgClose.relayer": + return x.Relayer != "" + case "side.lending.MsgClose.loan_id": + return x.LoanId != "" + case "side.lending.MsgClose.signature": + return x.Signature != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.MsgClose")) + } + panic(fmt.Errorf("message side.lending.MsgClose does not contain field %s", fd.FullName())) } - return "" } -func (x *MsgRepay) GetAmount() *v1beta1.Coin { - if x != nil { - return x.Amount - } - return nil +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgClose) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "side.lending.MsgClose.relayer": + x.Relayer = "" + case "side.lending.MsgClose.loan_id": + x.LoanId = "" + case "side.lending.MsgClose.signature": + x.Signature = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.MsgClose")) + } + panic(fmt.Errorf("message side.lending.MsgClose does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgClose) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "side.lending.MsgClose.relayer": + value := x.Relayer + return protoreflect.ValueOfString(value) + case "side.lending.MsgClose.loan_id": + value := x.LoanId + return protoreflect.ValueOfString(value) + case "side.lending.MsgClose.signature": + value := x.Signature + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.MsgClose")) + } + panic(fmt.Errorf("message side.lending.MsgClose does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgClose) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "side.lending.MsgClose.relayer": + x.Relayer = value.Interface().(string) + case "side.lending.MsgClose.loan_id": + x.LoanId = value.Interface().(string) + case "side.lending.MsgClose.signature": + x.Signature = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.MsgClose")) + } + panic(fmt.Errorf("message side.lending.MsgClose does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgClose) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "side.lending.MsgClose.relayer": + panic(fmt.Errorf("field relayer of message side.lending.MsgClose is not mutable")) + case "side.lending.MsgClose.loan_id": + panic(fmt.Errorf("field loan_id of message side.lending.MsgClose is not mutable")) + case "side.lending.MsgClose.signature": + panic(fmt.Errorf("field signature of message side.lending.MsgClose is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.MsgClose")) + } + panic(fmt.Errorf("message side.lending.MsgClose does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgClose) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "side.lending.MsgClose.relayer": + return protoreflect.ValueOfString("") + case "side.lending.MsgClose.loan_id": + return protoreflect.ValueOfString("") + case "side.lending.MsgClose.signature": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.MsgClose")) + } + panic(fmt.Errorf("message side.lending.MsgClose does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgClose) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in side.lending.MsgClose", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgClose) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgClose) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgClose) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgClose) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgClose) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Relayer) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.LoanId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Signature) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgClose) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Signature) > 0 { + i -= len(x.Signature) + copy(dAtA[i:], x.Signature) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signature))) + i-- + dAtA[i] = 0x1a + } + if len(x.LoanId) > 0 { + i -= len(x.LoanId) + copy(dAtA[i:], x.LoanId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.LoanId))) + i-- + dAtA[i] = 0x12 + } + if len(x.Relayer) > 0 { + i -= len(x.Relayer) + copy(dAtA[i:], x.Relayer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Relayer))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgClose) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgClose: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgClose: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Relayer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Relayer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LoanId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.LoanId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Signature = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgCloseResponse protoreflect.MessageDescriptor +) + +func init() { + file_side_lending_tx_proto_init() + md_MsgCloseResponse = File_side_lending_tx_proto.Messages().ByName("MsgCloseResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgCloseResponse)(nil) + +type fastReflection_MsgCloseResponse MsgCloseResponse + +func (x *MsgCloseResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCloseResponse)(x) +} + +func (x *MsgCloseResponse) slowProtoReflect() protoreflect.Message { + mi := &file_side_lending_tx_proto_msgTypes[15] + 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) +} + +var _fastReflection_MsgCloseResponse_messageType fastReflection_MsgCloseResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgCloseResponse_messageType{} + +type fastReflection_MsgCloseResponse_messageType struct{} + +func (x fastReflection_MsgCloseResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCloseResponse)(nil) +} +func (x fastReflection_MsgCloseResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCloseResponse) +} +func (x fastReflection_MsgCloseResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCloseResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCloseResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCloseResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgCloseResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgCloseResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCloseResponse) New() protoreflect.Message { + return new(fastReflection_MsgCloseResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCloseResponse) Interface() protoreflect.ProtoMessage { + return (*MsgCloseResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgCloseResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgCloseResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.MsgCloseResponse")) + } + panic(fmt.Errorf("message side.lending.MsgCloseResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCloseResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.MsgCloseResponse")) + } + panic(fmt.Errorf("message side.lending.MsgCloseResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgCloseResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.MsgCloseResponse")) + } + panic(fmt.Errorf("message side.lending.MsgCloseResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCloseResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.MsgCloseResponse")) + } + panic(fmt.Errorf("message side.lending.MsgCloseResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCloseResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.MsgCloseResponse")) + } + panic(fmt.Errorf("message side.lending.MsgCloseResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgCloseResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.MsgCloseResponse")) + } + panic(fmt.Errorf("message side.lending.MsgCloseResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgCloseResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in side.lending.MsgCloseResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgCloseResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCloseResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgCloseResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgCloseResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCloseResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgCloseResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgCloseResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCloseResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCloseResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: side/lending/tx.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type MsgCreatePool struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + PoolId string `protobuf:"bytes,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` + LendingAsset string `protobuf:"bytes,3,opt,name=lending_asset,json=lendingAsset,proto3" json:"lending_asset,omitempty"` +} + +func (x *MsgCreatePool) Reset() { + *x = MsgCreatePool{} + if protoimpl.UnsafeEnabled { + mi := &file_side_lending_tx_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCreatePool) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCreatePool) ProtoMessage() {} + +// Deprecated: Use MsgCreatePool.ProtoReflect.Descriptor instead. +func (*MsgCreatePool) Descriptor() ([]byte, []int) { + return file_side_lending_tx_proto_rawDescGZIP(), []int{0} +} + +func (x *MsgCreatePool) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +func (x *MsgCreatePool) GetPoolId() string { + if x != nil { + return x.PoolId + } + return "" +} + +func (x *MsgCreatePool) GetLendingAsset() string { + if x != nil { + return x.LendingAsset + } + return "" +} + +type MsgCreatePoolResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgCreatePoolResponse) Reset() { + *x = MsgCreatePoolResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_side_lending_tx_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCreatePoolResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCreatePoolResponse) ProtoMessage() {} + +// Deprecated: Use MsgCreatePoolResponse.ProtoReflect.Descriptor instead. +func (*MsgCreatePoolResponse) Descriptor() ([]byte, []int) { + return file_side_lending_tx_proto_rawDescGZIP(), []int{1} +} + +type MsgRepay struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Borrower string `protobuf:"bytes,1,opt,name=borrower,proto3" json:"borrower,omitempty"` + LoanId string `protobuf:"bytes,2,opt,name=loan_id,json=loanId,proto3" json:"loan_id,omitempty"` + AdaptorPoint string `protobuf:"bytes,3,opt,name=adaptor_point,json=adaptorPoint,proto3" json:"adaptor_point,omitempty"` + ClaimTxId string `protobuf:"bytes,4,opt,name=claim_tx_id,json=claimTxId,proto3" json:"claim_tx_id,omitempty"` + AdaptorSignature string `protobuf:"bytes,5,opt,name=adaptor_signature,json=adaptorSignature,proto3" json:"adaptor_signature,omitempty"` +} + +func (x *MsgRepay) Reset() { + *x = MsgRepay{} + if protoimpl.UnsafeEnabled { + mi := &file_side_lending_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRepay) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRepay) ProtoMessage() {} + +// Deprecated: Use MsgRepay.ProtoReflect.Descriptor instead. +func (*MsgRepay) Descriptor() ([]byte, []int) { + return file_side_lending_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgRepay) GetBorrower() string { + if x != nil { + return x.Borrower + } + return "" +} + +func (x *MsgRepay) GetLoanId() string { + if x != nil { + return x.LoanId + } + return "" } func (x *MsgRepay) GetAdaptorPoint() string { @@ -7238,6 +8185,20 @@ func (x *MsgRepay) GetAdaptorPoint() string { return "" } +func (x *MsgRepay) GetClaimTxId() string { + if x != nil { + return x.ClaimTxId + } + return "" +} + +func (x *MsgRepay) GetAdaptorSignature() string { + if x != nil { + return x.AdaptorSignature + } + return "" +} + type MsgRepayResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -7732,6 +8693,83 @@ func (*MsgApproveResponse) Descriptor() ([]byte, []int) { return file_side_lending_tx_proto_rawDescGZIP(), []int{13} } +type MsgClose struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Relayer string `protobuf:"bytes,1,opt,name=relayer,proto3" json:"relayer,omitempty"` + LoanId string `protobuf:"bytes,2,opt,name=loan_id,json=loanId,proto3" json:"loan_id,omitempty"` + Signature string `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (x *MsgClose) Reset() { + *x = MsgClose{} + if protoimpl.UnsafeEnabled { + mi := &file_side_lending_tx_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgClose) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgClose) ProtoMessage() {} + +// Deprecated: Use MsgClose.ProtoReflect.Descriptor instead. +func (*MsgClose) Descriptor() ([]byte, []int) { + return file_side_lending_tx_proto_rawDescGZIP(), []int{14} +} + +func (x *MsgClose) GetRelayer() string { + if x != nil { + return x.Relayer + } + return "" +} + +func (x *MsgClose) GetLoanId() string { + if x != nil { + return x.LoanId + } + return "" +} + +func (x *MsgClose) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +type MsgCloseResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgCloseResponse) Reset() { + *x = MsgCloseResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_side_lending_tx_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCloseResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCloseResponse) ProtoMessage() {} + +// Deprecated: Use MsgCloseResponse.ProtoReflect.Descriptor instead. +func (*MsgCloseResponse) Descriptor() ([]byte, []int) { + return file_side_lending_tx_proto_rawDescGZIP(), []int{15} +} + var File_side_lending_tx_proto protoreflect.FileDescriptor var file_side_lending_tx_proto_rawDesc = []byte{ @@ -7751,133 +8789,146 @@ var file_side_lending_tx_proto_rawDesc = []byte{ 0x0c, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x17, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa6, 0x01, 0x0a, 0x08, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x70, 0x61, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc0, 0x01, 0x0a, 0x08, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x70, 0x61, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x6c, 0x6f, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x6c, 0x6f, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, - 0x6e, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x64, 0x61, - 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x3a, 0x0d, - 0x82, 0xe7, 0xb0, 0x2a, 0x08, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x22, 0x12, 0x0a, - 0x10, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x70, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x70, 0x0a, 0x09, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x12, 0x1a, - 0x0a, 0x08, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x6c, 0x6f, - 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x6f, 0x61, - 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x6f, 0x61, 0x6e, 0x5f, 0x73, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x6f, 0x61, 0x6e, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x3a, 0x0d, 0x82, 0xe7, 0xb0, 0x2a, 0x08, 0x62, 0x6f, 0x72, 0x72, 0x6f, - 0x77, 0x65, 0x72, 0x22, 0x13, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x82, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, - 0x41, 0x64, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x17, 0x0a, 0x07, - 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, - 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x31, 0x0a, - 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x6c, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x4c, 0x0a, - 0x17, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, - 0x6f, 0x69, 0x6e, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x22, 0x6c, 0x0a, 0x12, 0x4d, - 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, - 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x06, 0x73, 0x68, 0x61, - 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x3a, 0x0b, 0x82, 0xe7, - 0xb0, 0x2a, 0x06, 0x6c, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x4f, 0x0a, 0x1a, 0x4d, 0x73, 0x67, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x6c, 0x6f, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, + 0x72, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, + 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0b, 0x63, + 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x74, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x54, 0x78, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x61, + 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x53, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x0d, 0x82, 0xe7, 0xb0, 0x2a, 0x08, 0x62, + 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x22, 0x12, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x52, 0x65, + 0x70, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x70, 0x0a, 0x09, 0x4d, + 0x73, 0x67, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x72, 0x72, + 0x6f, 0x77, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x6f, 0x72, 0x72, + 0x6f, 0x77, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x6c, 0x6f, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x6f, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, + 0x0b, 0x6c, 0x6f, 0x61, 0x6e, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x6f, 0x61, 0x6e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x3a, 0x0d, + 0x82, 0xe7, 0xb0, 0x2a, 0x08, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x22, 0x13, 0x0a, + 0x11, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x82, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x4c, 0x69, 0x71, + 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x12, + 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x6c, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, - 0x69, 0x6e, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xf9, 0x02, 0x0a, 0x08, 0x4d, - 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x72, 0x72, 0x6f, - 0x77, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x6f, 0x72, 0x72, 0x6f, - 0x77, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x5f, - 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x62, 0x6f, - 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x10, - 0x6c, 0x6f, 0x61, 0x6e, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x6f, 0x61, 0x6e, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x75, 0x72, 0x69, - 0x74, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6d, - 0x61, 0x74, 0x75, 0x72, 0x69, 0x74, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x66, - 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0c, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x0d, 0x62, 0x6f, 0x72, - 0x72, 0x6f, 0x77, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x0c, 0x62, 0x6f, 0x72, - 0x72, 0x6f, 0x77, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x74, 0x73, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x5f, 0x74, 0x78, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x78, 0x3a, 0x0d, 0x82, 0xe7, 0xb0, 0x2a, 0x08, 0x62, 0x6f, - 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x22, 0x37, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, - 0x6c, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x61, - 0x75, 0x6c, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, - 0x84, 0x01, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0d, 0x64, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x5f, 0x74, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x78, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, - 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x6f, 0x66, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x72, - 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x22, 0x14, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, - 0x72, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x9e, 0x04, 0x0a, - 0x03, 0x4d, 0x73, 0x67, 0x12, 0x4e, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, - 0x6f, 0x6c, 0x12, 0x1b, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x1a, - 0x23, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, - 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0c, 0x41, 0x64, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, - 0x64, 0x69, 0x74, 0x79, 0x12, 0x1d, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, - 0x69, 0x74, 0x79, 0x1a, 0x25, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, - 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x0f, 0x52, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x20, 0x2e, + 0x69, 0x6e, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, + 0x06, 0x6c, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x4c, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x41, 0x64, + 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x06, 0x73, + 0x68, 0x61, 0x72, 0x65, 0x73, 0x22, 0x6c, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6c, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x06, + 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x6c, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x22, 0x4f, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x31, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xf9, 0x02, 0x0a, 0x08, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, + 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x27, 0x0a, + 0x0f, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, + 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x10, 0x6c, 0x6f, 0x61, 0x6e, 0x5f, 0x73, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x6c, 0x6f, 0x61, 0x6e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6d, 0x61, 0x74, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x66, 0x69, + 0x6e, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, + 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x6f, + 0x6c, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x0d, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x0c, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x41, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x63, 0x65, 0x74, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, + 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x74, 0x78, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, + 0x78, 0x3a, 0x0d, 0x82, 0xe7, 0xb0, 0x2a, 0x08, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, + 0x22, 0x37, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x76, 0x61, 0x75, + 0x6c, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x0a, 0x4d, 0x73, + 0x67, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0d, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x74, 0x78, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x54, 0x78, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x70, 0x6f, 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, + 0x6f, 0x66, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x22, 0x14, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x69, 0x0a, 0x08, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x6f, + 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, + 0x6c, 0x6f, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, + 0x6f, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x22, 0x12, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xdf, 0x04, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x4e, 0x0a, + 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x1b, 0x2e, 0x73, 0x69, + 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x1a, 0x23, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, + 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, + 0x0c, 0x41, 0x64, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x1d, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x1a, - 0x28, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, - 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x05, 0x41, 0x70, 0x70, - 0x6c, 0x79, 0x12, 0x16, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x1a, 0x1e, 0x2e, 0x73, 0x69, 0x64, - 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, - 0x6c, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x07, 0x41, 0x70, - 0x70, 0x72, 0x6f, 0x76, 0x65, 0x12, 0x18, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x1a, - 0x20, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, - 0x73, 0x67, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x42, 0x0a, 0x06, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x12, 0x17, 0x2e, 0x73, 0x69, - 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, - 0x64, 0x65, 0x65, 0x6d, 0x1a, 0x1f, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x05, 0x52, 0x65, 0x70, 0x61, 0x79, 0x12, 0x16, + 0x41, 0x64, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x1a, 0x25, 0x2e, 0x73, + 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x41, + 0x64, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x0f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4c, 0x69, 0x71, + 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x20, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4c, + 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x1a, 0x28, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, + 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x05, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x16, 0x2e, 0x73, 0x69, + 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x70, + 0x70, 0x6c, 0x79, 0x1a, 0x1e, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x07, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x12, 0x18, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, - 0x67, 0x52, 0x65, 0x70, 0x61, 0x79, 0x1a, 0x1e, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x70, 0x61, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x8b, 0x01, - 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x73, 0x69, 0x64, 0x65, 0x2f, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0xa2, 0x02, 0x03, 0x53, - 0x4c, 0x58, 0xaa, 0x02, 0x0c, 0x53, 0x69, 0x64, 0x65, 0x2e, 0x4c, 0x65, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0xca, 0x02, 0x0c, 0x53, 0x69, 0x64, 0x65, 0x5c, 0x4c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0xe2, 0x02, 0x18, 0x53, 0x69, 0x64, 0x65, 0x5c, 0x4c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x53, 0x69, - 0x64, 0x65, 0x3a, 0x3a, 0x4c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x67, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x1a, 0x20, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, + 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x72, 0x6f, + 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x06, 0x52, 0x65, + 0x64, 0x65, 0x65, 0x6d, 0x12, 0x17, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x1a, 0x1f, 0x2e, + 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, + 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, + 0x0a, 0x05, 0x52, 0x65, 0x70, 0x61, 0x79, 0x12, 0x16, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, + 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x70, 0x61, 0x79, 0x1a, + 0x1e, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, + 0x73, 0x67, 0x52, 0x65, 0x70, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x3f, 0x0a, 0x05, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x16, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, + 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x6f, 0x73, 0x65, + 0x1a, 0x1e, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, + 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x8b, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, + 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x07, 0x54, 0x78, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, + 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x69, 0x64, 0x65, 0x2f, 0x6c, + 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0xa2, 0x02, 0x03, 0x53, 0x4c, 0x58, 0xaa, 0x02, 0x0c, 0x53, + 0x69, 0x64, 0x65, 0x2e, 0x4c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0xca, 0x02, 0x0c, 0x53, 0x69, + 0x64, 0x65, 0x5c, 0x4c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0xe2, 0x02, 0x18, 0x53, 0x69, 0x64, + 0x65, 0x5c, 0x4c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x53, 0x69, 0x64, 0x65, 0x3a, 0x3a, 0x4c, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -7892,7 +8943,7 @@ func file_side_lending_tx_proto_rawDescGZIP() []byte { return file_side_lending_tx_proto_rawDescData } -var file_side_lending_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_side_lending_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_side_lending_tx_proto_goTypes = []interface{}{ (*MsgCreatePool)(nil), // 0: side.lending.MsgCreatePool (*MsgCreatePoolResponse)(nil), // 1: side.lending.MsgCreatePoolResponse @@ -7908,22 +8959,24 @@ var file_side_lending_tx_proto_goTypes = []interface{}{ (*MsgApplyResponse)(nil), // 11: side.lending.MsgApplyResponse (*MsgApprove)(nil), // 12: side.lending.MsgApprove (*MsgApproveResponse)(nil), // 13: side.lending.MsgApproveResponse - (*v1beta1.Coin)(nil), // 14: cosmos.base.v1beta1.Coin + (*MsgClose)(nil), // 14: side.lending.MsgClose + (*MsgCloseResponse)(nil), // 15: side.lending.MsgCloseResponse + (*v1beta1.Coin)(nil), // 16: cosmos.base.v1beta1.Coin } var file_side_lending_tx_proto_depIdxs = []int32{ - 14, // 0: side.lending.MsgRepay.amount:type_name -> cosmos.base.v1beta1.Coin - 14, // 1: side.lending.MsgAddLiquidity.amount:type_name -> cosmos.base.v1beta1.Coin - 14, // 2: side.lending.MsgAddLiquidityResponse.shares:type_name -> cosmos.base.v1beta1.Coin - 14, // 3: side.lending.MsgRemoveLiquidity.shares:type_name -> cosmos.base.v1beta1.Coin - 14, // 4: side.lending.MsgRemoveLiquidityResponse.amount:type_name -> cosmos.base.v1beta1.Coin - 14, // 5: side.lending.MsgApply.borrow_amount:type_name -> cosmos.base.v1beta1.Coin - 0, // 6: side.lending.Msg.CreatePool:input_type -> side.lending.MsgCreatePool - 6, // 7: side.lending.Msg.AddLiquidity:input_type -> side.lending.MsgAddLiquidity - 8, // 8: side.lending.Msg.RemoveLiquidity:input_type -> side.lending.MsgRemoveLiquidity - 10, // 9: side.lending.Msg.Apply:input_type -> side.lending.MsgApply - 12, // 10: side.lending.Msg.Approve:input_type -> side.lending.MsgApprove - 4, // 11: side.lending.Msg.Redeem:input_type -> side.lending.MsgRedeem - 2, // 12: side.lending.Msg.Repay:input_type -> side.lending.MsgRepay + 16, // 0: side.lending.MsgAddLiquidity.amount:type_name -> cosmos.base.v1beta1.Coin + 16, // 1: side.lending.MsgAddLiquidityResponse.shares:type_name -> cosmos.base.v1beta1.Coin + 16, // 2: side.lending.MsgRemoveLiquidity.shares:type_name -> cosmos.base.v1beta1.Coin + 16, // 3: side.lending.MsgRemoveLiquidityResponse.amount:type_name -> cosmos.base.v1beta1.Coin + 16, // 4: side.lending.MsgApply.borrow_amount:type_name -> cosmos.base.v1beta1.Coin + 0, // 5: side.lending.Msg.CreatePool:input_type -> side.lending.MsgCreatePool + 6, // 6: side.lending.Msg.AddLiquidity:input_type -> side.lending.MsgAddLiquidity + 8, // 7: side.lending.Msg.RemoveLiquidity:input_type -> side.lending.MsgRemoveLiquidity + 10, // 8: side.lending.Msg.Apply:input_type -> side.lending.MsgApply + 12, // 9: side.lending.Msg.Approve:input_type -> side.lending.MsgApprove + 4, // 10: side.lending.Msg.Redeem:input_type -> side.lending.MsgRedeem + 2, // 11: side.lending.Msg.Repay:input_type -> side.lending.MsgRepay + 14, // 12: side.lending.Msg.Close:input_type -> side.lending.MsgClose 1, // 13: side.lending.Msg.CreatePool:output_type -> side.lending.MsgCreatePoolResponse 7, // 14: side.lending.Msg.AddLiquidity:output_type -> side.lending.MsgAddLiquidityResponse 9, // 15: side.lending.Msg.RemoveLiquidity:output_type -> side.lending.MsgRemoveLiquidityResponse @@ -7931,11 +8984,12 @@ var file_side_lending_tx_proto_depIdxs = []int32{ 13, // 17: side.lending.Msg.Approve:output_type -> side.lending.MsgApproveResponse 5, // 18: side.lending.Msg.Redeem:output_type -> side.lending.MsgRedeemResponse 3, // 19: side.lending.Msg.Repay:output_type -> side.lending.MsgRepayResponse - 13, // [13:20] is the sub-list for method output_type - 6, // [6:13] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 15, // 20: side.lending.Msg.Close:output_type -> side.lending.MsgCloseResponse + 13, // [13:21] is the sub-list for method output_type + 5, // [5:13] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_side_lending_tx_proto_init() } @@ -8112,6 +9166,30 @@ func file_side_lending_tx_proto_init() { return nil } } + file_side_lending_tx_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgClose); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_side_lending_tx_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCloseResponse); 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{ @@ -8119,7 +9197,7 @@ func file_side_lending_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_side_lending_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 14, + NumMessages: 16, NumExtensions: 0, NumServices: 1, }, diff --git a/api/side/lending/tx_grpc.pb.go b/api/side/lending/tx_grpc.pb.go index f466926c..9d6013df 100644 --- a/api/side/lending/tx_grpc.pb.go +++ b/api/side/lending/tx_grpc.pb.go @@ -26,6 +26,7 @@ const ( Msg_Approve_FullMethodName = "/side.lending.Msg/Approve" Msg_Redeem_FullMethodName = "/side.lending.Msg/Redeem" Msg_Repay_FullMethodName = "/side.lending.Msg/Repay" + Msg_Close_FullMethodName = "/side.lending.Msg/Close" ) // MsgClient is the client API for Msg service. @@ -39,6 +40,7 @@ type MsgClient interface { Approve(ctx context.Context, in *MsgApprove, opts ...grpc.CallOption) (*MsgApproveResponse, error) Redeem(ctx context.Context, in *MsgRedeem, opts ...grpc.CallOption) (*MsgRedeemResponse, error) Repay(ctx context.Context, in *MsgRepay, opts ...grpc.CallOption) (*MsgRepayResponse, error) + Close(ctx context.Context, in *MsgClose, opts ...grpc.CallOption) (*MsgCloseResponse, error) } type msgClient struct { @@ -112,6 +114,15 @@ func (c *msgClient) Repay(ctx context.Context, in *MsgRepay, opts ...grpc.CallOp return out, nil } +func (c *msgClient) Close(ctx context.Context, in *MsgClose, opts ...grpc.CallOption) (*MsgCloseResponse, error) { + out := new(MsgCloseResponse) + err := c.cc.Invoke(ctx, Msg_Close_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility @@ -123,6 +134,7 @@ type MsgServer interface { Approve(context.Context, *MsgApprove) (*MsgApproveResponse, error) Redeem(context.Context, *MsgRedeem) (*MsgRedeemResponse, error) Repay(context.Context, *MsgRepay) (*MsgRepayResponse, error) + Close(context.Context, *MsgClose) (*MsgCloseResponse, error) mustEmbedUnimplementedMsgServer() } @@ -151,6 +163,9 @@ func (UnimplementedMsgServer) Redeem(context.Context, *MsgRedeem) (*MsgRedeemRes func (UnimplementedMsgServer) Repay(context.Context, *MsgRepay) (*MsgRepayResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Repay not implemented") } +func (UnimplementedMsgServer) Close(context.Context, *MsgClose) (*MsgCloseResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Close not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -290,6 +305,24 @@ func _Msg_Repay_Handler(srv interface{}, ctx context.Context, dec func(interface return interceptor(ctx, in, info, handler) } +func _Msg_Close_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgClose) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Close(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_Close_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Close(ctx, req.(*MsgClose)) + } + return interceptor(ctx, in, info, handler) +} + // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -325,6 +358,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "Repay", Handler: _Msg_Repay_Handler, }, + { + MethodName: "Close", + Handler: _Msg_Close_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "side/lending/tx.proto", diff --git a/proto/side/lending/lending.proto b/proto/side/lending/lending.proto index 89516792..d89ec989 100644 --- a/proto/side/lending/lending.proto +++ b/proto/side/lending/lending.proto @@ -94,5 +94,6 @@ message Repayment { string txid = 2; string tx = 3; string repay_adaptor_point = 4; - google.protobuf.Timestamp create_at = 18 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + string borrower_signature = 5; + google.protobuf.Timestamp create_at = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } \ No newline at end of file diff --git a/proto/side/lending/query.proto b/proto/side/lending/query.proto index 9303095d..b0f6c83b 100644 --- a/proto/side/lending/query.proto +++ b/proto/side/lending/query.proto @@ -28,6 +28,10 @@ service Query { rpc LoanCET(QueryLoanCETRequest) returns (QueryLoanCETResponse) { option (google.api.http).get = "/side/lending/loan/cet"; } + + rpc UnsignedPaymentTx(QueryRepaymentTxRequest) returns (QueryRepaymentTxResponse) { + option (google.api.http).get = "/side/lending/loan/repayment/unsigned_tx"; + } } message QueryLiquidationEventRequest{ @@ -69,3 +73,11 @@ message QueryLoanCETRequest { // QueryLoanCETResponse is response type for the Query/LoanCET RPC method. message QueryLoanCETResponse { } + +message QueryRepaymentTxRequest { + string loan_id = 1; +} + +message QueryRepaymentTxResponse { + string claim_tx = 1; +} diff --git a/proto/side/lending/tx.proto b/proto/side/lending/tx.proto index d2210c15..e4e80816 100644 --- a/proto/side/lending/tx.proto +++ b/proto/side/lending/tx.proto @@ -18,6 +18,7 @@ service Msg { rpc Approve(MsgApprove) returns (MsgApproveResponse); rpc Redeem(MsgRedeem) returns (MsgRedeemResponse); rpc Repay(MsgRepay) returns (MsgRepayResponse); + rpc Close(MsgClose) returns (MsgCloseResponse); } message MsgCreatePool { @@ -36,8 +37,9 @@ message MsgRepay{ string borrower = 1; string loan_id = 2; - cosmos.base.v1beta1.Coin amount = 3; - string adaptor_point = 4; + string adaptor_point = 3; + string claim_tx_id = 4; + string adaptor_signature = 5; } message MsgRepayResponse{} @@ -106,3 +108,13 @@ message MsgApprove { message MsgApproveResponse { } + +message MsgClose { + option (cosmos.msg.v1.signer) = "relayer"; + + string relayer = 1; + string loan_id =2; + string signature = 3; +} + +message MsgCloseResponse{} diff --git a/x/lending/keeper/msg_server.go b/x/lending/keeper/msg_server.go index 7de14e56..112f3e05 100644 --- a/x/lending/keeper/msg_server.go +++ b/x/lending/keeper/msg_server.go @@ -246,11 +246,21 @@ func (m msgServer) Repay(goCtx context.Context, msg *types.MsgRepay) (*types.Msg if err != nil { return nil, err } + + // verify claimTx is msg.claimTx later + if claimTx.UnsignedTx.TxHash().String() != msg.ClaimTxId { + return nil, types.ErrInvalidRepayment + } + + // verify signature + // msg.AdaptorSignature, + repayment := types.Repayment{ LoanId: msg.LoanId, Txid: claimTx.UnsignedTx.TxHash().String(), Tx: tx, RepayAdaptorPoint: msg.AdaptorPoint, + BorrowerSignature: msg.AdaptorSignature, CreateAt: ctx.BlockTime(), } @@ -265,6 +275,40 @@ func (m msgServer) Repay(goCtx context.Context, msg *types.MsgRepay) (*types.Msg return &types.MsgRepayResponse{}, nil } +// Close implements types.MsgServer. +func (m msgServer) Close(goCtx context.Context, msg *types.MsgClose) (*types.MsgCloseResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + if !m.HasLoan(ctx, msg.LoanId) { + return nil, types.ErrLoanNotExists + } + + if !m.HasRepayment(ctx, msg.LoanId) { + return nil, types.ErrInvalidRepayment + } + + repay := m.GetRepayment(ctx, msg.LoanId) + + // extract secret from signature + secret := msg.Signature + repay.RepayAdaptorPoint // fix it later. + + if types.AdaptorPoint(secret) != repay.RepayAdaptorPoint { + return nil, types.ErrInvalidRepaymentSecret + } + + loan := m.GetLoan(ctx, msg.LoanId) + + amount := loan.BorrowAmount.Amount.Add(loan.Interests).Add(loan.Fees) + if err := m.bankKeeper.SendCoinsFromModuleToModule(ctx, types.RepaymentEscrowAccount, types.ModuleName, sdk.NewCoins(sdk.NewCoin(loan.BorrowAmount.Denom, amount))); err != nil { + return nil, err + } + + loan.Status = types.LoanStatus_Close + m.SetLoan(ctx, loan) + + return &types.MsgCloseResponse{}, nil +} + // NewMsgServerImpl returns an implementation of the MsgServer interface // for the provided Keeper. func NewMsgServerImpl(keeper Keeper) types.MsgServer { diff --git a/x/lending/keeper/queries.go b/x/lending/keeper/queries.go index d8076360..134dbce9 100644 --- a/x/lending/keeper/queries.go +++ b/x/lending/keeper/queries.go @@ -27,3 +27,8 @@ func (k Keeper) LoanCET(context.Context, *types.QueryLoanCETRequest) (*types.Que func (k Keeper) Params(context.Context, *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { panic("unimplemented") } + +// UnsignedPaymentTx implements types.QueryServer. +func (k Keeper) UnsignedPaymentTx(context.Context, *types.QueryRepaymentTxRequest) (*types.QueryRepaymentTxResponse, error) { + panic("unimplemented") +} diff --git a/x/lending/types/errors.go b/x/lending/types/errors.go index b1e09328..1d2403c1 100644 --- a/x/lending/types/errors.go +++ b/x/lending/types/errors.go @@ -37,6 +37,8 @@ var ( ErrEmptyLoanSecret = errorsmod.Register(ModuleName, 5001, "invalid loan secret") ErrMismatchLoanSecret = errorsmod.Register(ModuleName, 5001, "mismatch loan secret") - ErrEmptyAdaptorPoint = errorsmod.Register(ModuleName, 6001, "invalid adaptor point") - ErrInvalidRepayment = errorsmod.Register(ModuleName, 6002, "invalid repayment") + ErrEmptyAdaptorPoint = errorsmod.Register(ModuleName, 6001, "invalid adaptor point") + ErrInvalidRepayment = errorsmod.Register(ModuleName, 6002, "invalid repayment") + ErrInvalidRepaymentTx = errorsmod.Register(ModuleName, 6003, "invalid repayment tx") + ErrInvalidRepaymentSecret = errorsmod.Register(ModuleName, 6003, "invalid repayment secret") ) diff --git a/x/lending/types/lending.pb.go b/x/lending/types/lending.pb.go index a0d190f5..0a5b7164 100644 --- a/x/lending/types/lending.pb.go +++ b/x/lending/types/lending.pb.go @@ -433,7 +433,8 @@ type Repayment struct { Txid string `protobuf:"bytes,2,opt,name=txid,proto3" json:"txid,omitempty"` Tx string `protobuf:"bytes,3,opt,name=tx,proto3" json:"tx,omitempty"` RepayAdaptorPoint string `protobuf:"bytes,4,opt,name=repay_adaptor_point,json=repayAdaptorPoint,proto3" json:"repay_adaptor_point,omitempty"` - CreateAt time.Time `protobuf:"bytes,18,opt,name=create_at,json=createAt,proto3,stdtime" json:"create_at"` + BorrowerSignature string `protobuf:"bytes,5,opt,name=borrower_signature,json=borrowerSignature,proto3" json:"borrower_signature,omitempty"` + CreateAt time.Time `protobuf:"bytes,6,opt,name=create_at,json=createAt,proto3,stdtime" json:"create_at"` } func (m *Repayment) Reset() { *m = Repayment{} } @@ -497,6 +498,13 @@ func (m *Repayment) GetRepayAdaptorPoint() string { return "" } +func (m *Repayment) GetBorrowerSignature() string { + if m != nil { + return m.BorrowerSignature + } + return "" +} + func (m *Repayment) GetCreateAt() time.Time { if m != nil { return m.CreateAt @@ -517,62 +525,63 @@ func init() { func init() { proto.RegisterFile("side/lending/lending.proto", fileDescriptor_eb4e0b35327359cc) } var fileDescriptor_eb4e0b35327359cc = []byte{ - // 870 bytes of a gzipped FileDescriptorProto + // 891 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xcd, 0x8e, 0xe3, 0x44, - 0x10, 0x8e, 0x93, 0x6c, 0x26, 0xae, 0xfc, 0xac, 0xa7, 0xf9, 0xf3, 0x46, 0xda, 0x64, 0x14, 0x04, - 0x8a, 0x56, 0xc8, 0x66, 0x86, 0x23, 0x12, 0x22, 0x33, 0xb3, 0x2b, 0x05, 0x8d, 0xd0, 0xca, 0x13, - 0x71, 0xe0, 0x62, 0x75, 0xd2, 0x3d, 0x49, 0x0b, 0xdb, 0x6d, 0xdc, 0xe5, 0x21, 0x79, 0x07, 0x0e, - 0x7b, 0xe0, 0x6d, 0x78, 0x81, 0x3d, 0xee, 0x11, 0x71, 0x58, 0xd0, 0xcc, 0x8b, 0xa0, 0x6e, 0xdb, - 0xc9, 0xac, 0x40, 0x10, 0x71, 0x8a, 0xab, 0xea, 0xab, 0xbf, 0xaf, 0xaa, 0x3a, 0x30, 0x50, 0x82, - 0x71, 0x3f, 0xe2, 0x09, 0x13, 0xc9, 0xaa, 0xfa, 0xf5, 0xd2, 0x4c, 0xa2, 0x24, 0x5d, 0x6d, 0xf3, - 0x4a, 0xdd, 0xe0, 0xfd, 0x95, 0x5c, 0x49, 0x63, 0xf0, 0xf5, 0x57, 0x81, 0x19, 0x8c, 0x56, 0x52, - 0xae, 0x22, 0xee, 0x1b, 0x69, 0x91, 0xdf, 0xf8, 0x28, 0x62, 0xae, 0x90, 0xc6, 0x69, 0x09, 0x18, - 0x2e, 0xa5, 0x8a, 0xa5, 0xf2, 0x17, 0x54, 0x71, 0xff, 0xf6, 0x74, 0xc1, 0x91, 0x9e, 0xfa, 0x4b, - 0x29, 0x92, 0xc2, 0x3e, 0xfe, 0xb9, 0x0e, 0x9d, 0xab, 0x22, 0xc5, 0x4b, 0x29, 0x23, 0xd2, 0x87, - 0xba, 0x60, 0xae, 0x75, 0x62, 0x4d, 0xec, 0xa0,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68, 0x95, + 0x39, 0x27, 0x93, 0x73, 0x68, 0x5d, 0x3e, 0x5b, 0xa8, 0xb8, 0xee, 0x7a, 0xfb, 0x42, 0x98, 0xca, + 0x9c, 0x13, 0x84, 0xa0, 0x1d, 0x52, 0x29, 0xaa, 0x25, 0xd0, 0xdf, 0x13, 0x02, 0x70, 0x55, 0x92, + 0x77, 0xcd, 0x23, 0x85, 0x90, 0x6b, 0x46, 0x6a, 0x84, 0xfa, 0x3e, 0x6c, 0xc7, 0x9e, 0x00, 0xec, + 0x64, 0xa9, 0x76, 0xc9, 0xda, 0xaa, 0x32, 0xf9, 0xcb, 0x00, 0xcb, 0xa7, 0x19, 0xde, 0x24, 0x34, + 0x95, 0xff, 0xd9, 0xe0, 0x3f, 0x8e, 0x1f, 0x40, 0x73, 0x5b, 0xb1, 0x29, 0xd7, 0xc8, 0x85, 0xf7, + 0x72, 0x55, 0x29, 0xc0, 0x04, 0x67, 0x92, 0xe7, 0x41, 0xc6, 0x59, 0xfd, 0xf2, 0xf8, 0x27, 0x3a, + 0x34, 0x2b, 0x23, 0x2f, 0x54, 0x00, 0x7d, 0x0e, 0xa8, 0xde, 0xf6, 0x40, 0xb0, 0x28, 0x55, 0x6b, + 0x59, 0x2e, 0xa9, 0xe5, 0x9f, 0xd4, 0x91, 0x9b, 0x3a, 0xf0, 0xb6, 0xa2, 0xe6, 0xbb, 0x28, 0xfa, + 0xf4, 0x53, 0x80, 0xdd, 0x9b, 0x85, 0x00, 0xcc, 0xd9, 0xe5, 0x62, 0xfe, 0xfd, 0x33, 0xbb, 0x81, + 0x7a, 0xd0, 0x99, 0x7f, 0x57, 0x59, 0xc6, 0x53, 0x02, 0xb0, 0x53, 0x17, 0x59, 0x70, 0x34, 0x53, + 0x0f, 0xb3, 0xdd, 0x40, 0x5d, 0x38, 0x9e, 0x65, 0x59, 0xce, 0xef, 0xa8, 0x6d, 0xa8, 0x9c, 0x2b, + 0x26, 0x96, 0x45, 0x2e, 0xa8, 0xdd, 0x54, 0x28, 0xcd, 0xa3, 0xdd, 0x52, 0xa8, 0x2b, 0x7a, 0xab, + 0x44, 0xb0, 0xdb, 0xa8, 0x0f, 0xd6, 0x35, 0xfb, 0xa9, 0x60, 0x04, 0x4b, 0x6a, 0x1f, 0x29, 0xd8, + 0x65, 0xcc, 0x05, 0xb5, 0xcd, 0x8b, 0xe7, 0xaf, 0xee, 0x47, 0xc6, 0xeb, 0xfb, 0x91, 0xf1, 0xe7, + 0xfd, 0xc8, 0x78, 0xf9, 0x30, 0x6a, 0xbc, 0x7e, 0x18, 0x35, 0x7e, 0x7b, 0x18, 0x35, 0x7e, 0xf8, + 0x2c, 0x62, 0x72, 0x55, 0x2c, 0xdd, 0x90, 0x27, 0x9e, 0x9a, 0x39, 0x7d, 0xbd, 0x90, 0xc7, 0xda, + 0xf0, 0xd6, 0xdb, 0xff, 0x3b, 0xb9, 0xc9, 0xa8, 0x58, 0x9a, 0x3a, 0xfc, 0xe5, 0xdf, 0x01, 0x00, + 0x00, 0xff, 0xff, 0x05, 0x3b, 0x89, 0x71, 0x0c, 0x07, 0x00, 0x00, } func (m *LendingPool) Marshal() (dAtA []byte, err error) { @@ -919,9 +928,14 @@ func (m *Repayment) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= n4 i = encodeVarintLending(dAtA, i, uint64(n4)) i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x92 + dAtA[i] = 0x32 + if len(m.BorrowerSignature) > 0 { + i -= len(m.BorrowerSignature) + copy(dAtA[i:], m.BorrowerSignature) + i = encodeVarintLending(dAtA, i, uint64(len(m.BorrowerSignature))) + i-- + dAtA[i] = 0x2a + } if len(m.RepayAdaptorPoint) > 0 { i -= len(m.RepayAdaptorPoint) copy(dAtA[i:], m.RepayAdaptorPoint) @@ -1118,8 +1132,12 @@ func (m *Repayment) Size() (n int) { if l > 0 { n += 1 + l + sovLending(uint64(l)) } + l = len(m.BorrowerSignature) + if l > 0 { + n += 1 + l + sovLending(uint64(l)) + } l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreateAt) - n += 2 + l + sovLending(uint64(l)) + n += 1 + l + sovLending(uint64(l)) return n } @@ -2351,7 +2369,39 @@ func (m *Repayment) Unmarshal(dAtA []byte) error { } m.RepayAdaptorPoint = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 18: + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BorrowerSignature", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLending + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthLending + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLending + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BorrowerSignature = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CreateAt", wireType) } diff --git a/x/lending/types/msg_repay.go b/x/lending/types/msg_repay.go index 7171f4fd..7571f2b9 100644 --- a/x/lending/types/msg_repay.go +++ b/x/lending/types/msg_repay.go @@ -1,17 +1,18 @@ package types import ( - "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" ) var _ sdk.Msg = &MsgRepay{} -func NewMsgRepay(borrower string, amount sdk.Coin, adaptorPoint string) *MsgRepay { +func NewMsgRepay(borrower string, loanId string, adaptorPoint string, txid string, signature string) *MsgRepay { return &MsgRepay{ - Borrower: borrower, - Amount: &amount, - AdaptorPoint: adaptorPoint, + Borrower: borrower, + AdaptorPoint: adaptorPoint, + LoanId: loanId, + ClaimTxId: txid, + AdaptorSignature: signature, } } @@ -25,9 +26,17 @@ func (m *MsgRepay) ValidateBasic() error { return ErrEmptyAdaptorPoint } - if m.Amount.Amount.LTE(math.NewInt(0)) { + if len(m.LoanId) == 0 { return ErrInvalidRepayment } + if len(m.ClaimTxId) == 0 { + return ErrInvalidRepaymentTx + } + + if len(m.AdaptorSignature) == 0 { + return ErrInvalidRepaymentTx + } + return nil } diff --git a/x/lending/types/query.pb.go b/x/lending/types/query.pb.go index 4d344212..f95e525b 100644 --- a/x/lending/types/query.pb.go +++ b/x/lending/types/query.pb.go @@ -419,6 +419,94 @@ func (m *QueryLoanCETResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryLoanCETResponse proto.InternalMessageInfo +type QueryRepaymentTxRequest struct { + LoanId string `protobuf:"bytes,1,opt,name=loan_id,json=loanId,proto3" json:"loan_id,omitempty"` +} + +func (m *QueryRepaymentTxRequest) Reset() { *m = QueryRepaymentTxRequest{} } +func (m *QueryRepaymentTxRequest) String() string { return proto.CompactTextString(m) } +func (*QueryRepaymentTxRequest) ProtoMessage() {} +func (*QueryRepaymentTxRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_27db04072aa81358, []int{8} +} +func (m *QueryRepaymentTxRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryRepaymentTxRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryRepaymentTxRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryRepaymentTxRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRepaymentTxRequest.Merge(m, src) +} +func (m *QueryRepaymentTxRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryRepaymentTxRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRepaymentTxRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryRepaymentTxRequest proto.InternalMessageInfo + +func (m *QueryRepaymentTxRequest) GetLoanId() string { + if m != nil { + return m.LoanId + } + return "" +} + +type QueryRepaymentTxResponse struct { + ClaimTx string `protobuf:"bytes,1,opt,name=claim_tx,json=claimTx,proto3" json:"claim_tx,omitempty"` +} + +func (m *QueryRepaymentTxResponse) Reset() { *m = QueryRepaymentTxResponse{} } +func (m *QueryRepaymentTxResponse) String() string { return proto.CompactTextString(m) } +func (*QueryRepaymentTxResponse) ProtoMessage() {} +func (*QueryRepaymentTxResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_27db04072aa81358, []int{9} +} +func (m *QueryRepaymentTxResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryRepaymentTxResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryRepaymentTxResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryRepaymentTxResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRepaymentTxResponse.Merge(m, src) +} +func (m *QueryRepaymentTxResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryRepaymentTxResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRepaymentTxResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryRepaymentTxResponse proto.InternalMessageInfo + +func (m *QueryRepaymentTxResponse) GetClaimTx() string { + if m != nil { + return m.ClaimTx + } + return "" +} + func init() { proto.RegisterType((*QueryLiquidationEventRequest)(nil), "side.lending.QueryLiquidationEventRequest") proto.RegisterType((*QueryLiquidationEventResponse)(nil), "side.lending.QueryLiquidationEventResponse") @@ -428,55 +516,63 @@ func init() { proto.RegisterType((*QueryParamsResponse)(nil), "side.lending.QueryParamsResponse") proto.RegisterType((*QueryLoanCETRequest)(nil), "side.lending.QueryLoanCETRequest") proto.RegisterType((*QueryLoanCETResponse)(nil), "side.lending.QueryLoanCETResponse") + proto.RegisterType((*QueryRepaymentTxRequest)(nil), "side.lending.QueryRepaymentTxRequest") + proto.RegisterType((*QueryRepaymentTxResponse)(nil), "side.lending.QueryRepaymentTxResponse") } func init() { proto.RegisterFile("side/lending/query.proto", fileDescriptor_27db04072aa81358) } var fileDescriptor_27db04072aa81358 = []byte{ - // 683 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0x41, 0x4f, 0xd4, 0x40, - 0x18, 0xa5, 0xb8, 0x80, 0x8c, 0x8b, 0xc2, 0xb0, 0x92, 0x65, 0x83, 0x15, 0xea, 0x01, 0x02, 0xd8, - 0x06, 0xbc, 0x79, 0x30, 0xc1, 0x0d, 0x46, 0x13, 0x12, 0x71, 0xe5, 0xe4, 0xa5, 0x99, 0x6d, 0x87, - 0x32, 0xa1, 0x9d, 0xaf, 0x74, 0xa6, 0xe8, 0x5e, 0xbd, 0x7a, 0x31, 0xd1, 0x03, 0x3f, 0xc1, 0xbf, - 0xe1, 0xcd, 0x23, 0x89, 0x17, 0x8f, 0x06, 0xfc, 0x21, 0xa6, 0x33, 0x53, 0x97, 0xc2, 0x2e, 0x72, - 0xda, 0x9d, 0xf7, 0xde, 0xbc, 0xef, 0xcd, 0x37, 0xf3, 0x15, 0x35, 0x05, 0x0b, 0xa9, 0x17, 0x53, - 0x1e, 0x32, 0x1e, 0x79, 0x47, 0x39, 0xcd, 0x7a, 0x6e, 0x9a, 0x81, 0x04, 0x5c, 0x2f, 0x18, 0xd7, - 0x30, 0xad, 0x46, 0x04, 0x11, 0x28, 0xc2, 0x2b, 0xfe, 0x69, 0x4d, 0x6b, 0x21, 0x02, 0x88, 0x62, - 0xea, 0x91, 0x94, 0x79, 0x84, 0x73, 0x90, 0x44, 0x32, 0xe0, 0xc2, 0xb0, 0xab, 0x01, 0x88, 0x04, - 0x84, 0xd7, 0x25, 0x82, 0x6a, 0x6b, 0xef, 0x78, 0xa3, 0x4b, 0x25, 0xd9, 0xf0, 0x52, 0x12, 0x31, - 0xae, 0xc4, 0x46, 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0x33, 0x57, 0x1a, 0x87, 0xd7, 0x06, 0xd8, 0x0e, 0x7b, 0x21, 0xad, 0xf5, 0x9b, 0x89, 0x4d, 0x9c, - 0x15, 0x15, 0xc7, 0xc1, 0x8b, 0xd5, 0x38, 0xfd, 0x41, 0xf1, 0xcc, 0xdd, 0xe0, 0xaf, 0x16, 0x9a, - 0xbe, 0x3c, 0x24, 0x78, 0x75, 0x40, 0xb1, 0x21, 0x43, 0xdf, 0x5a, 0xbb, 0x91, 0xd6, 0xe4, 0x5a, - 0x56, 0xb9, 0x96, 0xf0, 0xc3, 0x6a, 0xae, 0xb8, 0xaf, 0xf7, 0xd4, 0xc8, 0xe0, 0x14, 0x4d, 0x98, - 0xbb, 0xc3, 0x83, 0xba, 0x5f, 0xbd, 0xee, 0x96, 0x73, 0x9d, 0xc4, 0x94, 0xb6, 0x55, 0xe9, 0x26, - 0x9e, 0xbb, 0x54, 0x1a, 0x08, 0xf7, 0x02, 0x2a, 0x9f, 0xbf, 0xf8, 0x71, 0x66, 0x5b, 0xa7, 0x67, - 0xb6, 0xf5, 0xfb, 0xcc, 0xb6, 0x3e, 0x9f, 0xdb, 0x23, 0xa7, 0xe7, 0xf6, 0xc8, 0xaf, 0x73, 0x7b, - 0xe4, 0xdd, 0x7a, 0xc4, 0xe4, 0x41, 0xde, 0x75, 0x03, 0x48, 0xd4, 0x5e, 0xf5, 0x35, 0x0c, 0x20, - 0xd6, 0x46, 0x1f, 0xfe, 0x59, 0xc9, 0x5e, 0x4a, 0x45, 0x77, 0x5c, 0xd1, 0x4f, 0xfe, 0x06, 0x00, - 0x00, 0xff, 0xff, 0x1e, 0xce, 0xd8, 0xb2, 0x0d, 0x06, 0x00, 0x00, + // 779 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x95, 0x41, 0x4f, 0xd4, 0x4c, + 0x18, 0xc7, 0x29, 0x2f, 0xec, 0xbe, 0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x32, 0x75, 0xe7, 0x3c, 0x39, 0xef, 0xc6, 0x38, 0x6d, 0x57, 0x44, 0xf8, 0xe1, 0x9f, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xdf, 0x2f, 0x26, 0x4f, 0x0f, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -496,6 +592,7 @@ type QueryClient interface { CollateralAddress(ctx context.Context, in *QueryCollateralAddressRequest, opts ...grpc.CallOption) (*QueryCollateralAddressResponse, error) LiquidationEvent(ctx context.Context, in *QueryLiquidationEventRequest, opts ...grpc.CallOption) (*QueryLiquidationEventResponse, error) LoanCET(ctx context.Context, in *QueryLoanCETRequest, opts ...grpc.CallOption) (*QueryLoanCETResponse, error) + UnsignedPaymentTx(ctx context.Context, in *QueryRepaymentTxRequest, opts ...grpc.CallOption) (*QueryRepaymentTxResponse, error) } type queryClient struct { @@ -542,6 +639,15 @@ func (c *queryClient) LoanCET(ctx context.Context, in *QueryLoanCETRequest, opts return out, nil } +func (c *queryClient) UnsignedPaymentTx(ctx context.Context, in *QueryRepaymentTxRequest, opts ...grpc.CallOption) (*QueryRepaymentTxResponse, error) { + out := new(QueryRepaymentTxResponse) + err := c.cc.Invoke(ctx, "/side.lending.Query/UnsignedPaymentTx", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Params queries the parameters of the module. @@ -549,6 +655,7 @@ type QueryServer interface { CollateralAddress(context.Context, *QueryCollateralAddressRequest) (*QueryCollateralAddressResponse, error) LiquidationEvent(context.Context, *QueryLiquidationEventRequest) (*QueryLiquidationEventResponse, error) LoanCET(context.Context, *QueryLoanCETRequest) (*QueryLoanCETResponse, error) + UnsignedPaymentTx(context.Context, *QueryRepaymentTxRequest) (*QueryRepaymentTxResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -567,6 +674,9 @@ func (*UnimplementedQueryServer) LiquidationEvent(ctx context.Context, req *Quer func (*UnimplementedQueryServer) LoanCET(ctx context.Context, req *QueryLoanCETRequest) (*QueryLoanCETResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method LoanCET not implemented") } +func (*UnimplementedQueryServer) UnsignedPaymentTx(ctx context.Context, req *QueryRepaymentTxRequest) (*QueryRepaymentTxResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnsignedPaymentTx not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -644,6 +754,24 @@ func _Query_LoanCET_Handler(srv interface{}, ctx context.Context, dec func(inter return interceptor(ctx, in, info, handler) } +func _Query_UnsignedPaymentTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryRepaymentTxRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).UnsignedPaymentTx(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/side.lending.Query/UnsignedPaymentTx", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).UnsignedPaymentTx(ctx, req.(*QueryRepaymentTxRequest)) + } + return interceptor(ctx, in, info, handler) +} + var Query_serviceDesc = _Query_serviceDesc var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "side.lending.Query", @@ -665,6 +793,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "LoanCET", Handler: _Query_LoanCET_Handler, }, + { + MethodName: "UnsignedPaymentTx", + Handler: _Query_UnsignedPaymentTx_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "side/lending/query.proto", @@ -949,6 +1081,66 @@ func (m *QueryLoanCETResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *QueryRepaymentTxRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryRepaymentTxRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryRepaymentTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.LoanId) > 0 { + i -= len(m.LoanId) + copy(dAtA[i:], m.LoanId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.LoanId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryRepaymentTxResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryRepaymentTxResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryRepaymentTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ClaimTx) > 0 { + i -= len(m.ClaimTx) + copy(dAtA[i:], m.ClaimTx) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ClaimTx))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -1078,6 +1270,32 @@ func (m *QueryLoanCETResponse) Size() (n int) { return n } +func (m *QueryRepaymentTxRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.LoanId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryRepaymentTxResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ClaimTx) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1854,6 +2072,170 @@ func (m *QueryLoanCETResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryRepaymentTxRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryRepaymentTxRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryRepaymentTxRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LoanId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LoanId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryRepaymentTxResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryRepaymentTxResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryRepaymentTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClaimTx", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClaimTx = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/lending/types/query.pb.gw.go b/x/lending/types/query.pb.gw.go index d04303bb..83aecaef 100644 --- a/x/lending/types/query.pb.gw.go +++ b/x/lending/types/query.pb.gw.go @@ -141,6 +141,42 @@ func local_request_Query_LoanCET_0(ctx context.Context, marshaler runtime.Marsha } +var ( + filter_Query_UnsignedPaymentTx_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_UnsignedPaymentTx_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRepaymentTxRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UnsignedPaymentTx_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UnsignedPaymentTx(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_UnsignedPaymentTx_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRepaymentTxRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UnsignedPaymentTx_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.UnsignedPaymentTx(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -239,6 +275,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_UnsignedPaymentTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_UnsignedPaymentTx_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_UnsignedPaymentTx_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -360,6 +419,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_UnsignedPaymentTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_UnsignedPaymentTx_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_UnsignedPaymentTx_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -371,6 +450,8 @@ var ( pattern_Query_LiquidationEvent_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"side", "lending", "liquidation", "price"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_LoanCET_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"side", "lending", "loan", "cet"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_UnsignedPaymentTx_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"side", "lending", "loan", "repayment", "unsigned_tx"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -381,4 +462,6 @@ var ( forward_Query_LiquidationEvent_0 = runtime.ForwardResponseMessage forward_Query_LoanCET_0 = runtime.ForwardResponseMessage + + forward_Query_UnsignedPaymentTx_0 = runtime.ForwardResponseMessage ) diff --git a/x/lending/types/taproot.go b/x/lending/types/taproot.go index 17c55075..c2dfa16e 100644 --- a/x/lending/types/taproot.go +++ b/x/lending/types/taproot.go @@ -15,6 +15,10 @@ func HashLoanSecret(secret string) string { return secret } +func AdaptorPoint(secret string) string { + return secret +} + func GetTaprootAddress(script []byte) (*btcutil.AddressTaproot, error) { conf := sdk.GetConfig().GetBtcChainCfg() return btcutil.NewAddressTaproot(script, conf) diff --git a/x/lending/types/tx.pb.go b/x/lending/types/tx.pb.go index b68d27c3..23af66dc 100644 --- a/x/lending/types/tx.pb.go +++ b/x/lending/types/tx.pb.go @@ -127,10 +127,11 @@ func (m *MsgCreatePoolResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCreatePoolResponse proto.InternalMessageInfo type MsgRepay struct { - Borrower string `protobuf:"bytes,1,opt,name=borrower,proto3" json:"borrower,omitempty"` - LoanId string `protobuf:"bytes,2,opt,name=loan_id,json=loanId,proto3" json:"loan_id,omitempty"` - Amount *types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` - AdaptorPoint string `protobuf:"bytes,4,opt,name=adaptor_point,json=adaptorPoint,proto3" json:"adaptor_point,omitempty"` + Borrower string `protobuf:"bytes,1,opt,name=borrower,proto3" json:"borrower,omitempty"` + LoanId string `protobuf:"bytes,2,opt,name=loan_id,json=loanId,proto3" json:"loan_id,omitempty"` + AdaptorPoint string `protobuf:"bytes,3,opt,name=adaptor_point,json=adaptorPoint,proto3" json:"adaptor_point,omitempty"` + ClaimTxId string `protobuf:"bytes,4,opt,name=claim_tx_id,json=claimTxId,proto3" json:"claim_tx_id,omitempty"` + AdaptorSignature string `protobuf:"bytes,5,opt,name=adaptor_signature,json=adaptorSignature,proto3" json:"adaptor_signature,omitempty"` } func (m *MsgRepay) Reset() { *m = MsgRepay{} } @@ -180,16 +181,23 @@ func (m *MsgRepay) GetLoanId() string { return "" } -func (m *MsgRepay) GetAmount() *types.Coin { +func (m *MsgRepay) GetAdaptorPoint() string { if m != nil { - return m.Amount + return m.AdaptorPoint } - return nil + return "" } -func (m *MsgRepay) GetAdaptorPoint() string { +func (m *MsgRepay) GetClaimTxId() string { if m != nil { - return m.AdaptorPoint + return m.ClaimTxId + } + return "" +} + +func (m *MsgRepay) GetAdaptorSignature() string { + if m != nil { + return m.AdaptorSignature } return "" } @@ -790,6 +798,102 @@ func (m *MsgApproveResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgApproveResponse proto.InternalMessageInfo +type MsgClose struct { + Relayer string `protobuf:"bytes,1,opt,name=relayer,proto3" json:"relayer,omitempty"` + LoanId string `protobuf:"bytes,2,opt,name=loan_id,json=loanId,proto3" json:"loan_id,omitempty"` + Signature string `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (m *MsgClose) Reset() { *m = MsgClose{} } +func (m *MsgClose) String() string { return proto.CompactTextString(m) } +func (*MsgClose) ProtoMessage() {} +func (*MsgClose) Descriptor() ([]byte, []int) { + return fileDescriptor_13b5a91577424108, []int{14} +} +func (m *MsgClose) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgClose) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgClose.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgClose) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgClose.Merge(m, src) +} +func (m *MsgClose) XXX_Size() int { + return m.Size() +} +func (m *MsgClose) XXX_DiscardUnknown() { + xxx_messageInfo_MsgClose.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgClose proto.InternalMessageInfo + +func (m *MsgClose) GetRelayer() string { + if m != nil { + return m.Relayer + } + return "" +} + +func (m *MsgClose) GetLoanId() string { + if m != nil { + return m.LoanId + } + return "" +} + +func (m *MsgClose) GetSignature() string { + if m != nil { + return m.Signature + } + return "" +} + +type MsgCloseResponse struct { +} + +func (m *MsgCloseResponse) Reset() { *m = MsgCloseResponse{} } +func (m *MsgCloseResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCloseResponse) ProtoMessage() {} +func (*MsgCloseResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_13b5a91577424108, []int{15} +} +func (m *MsgCloseResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCloseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCloseResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCloseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCloseResponse.Merge(m, src) +} +func (m *MsgCloseResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCloseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCloseResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCloseResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgCreatePool)(nil), "side.lending.MsgCreatePool") proto.RegisterType((*MsgCreatePoolResponse)(nil), "side.lending.MsgCreatePoolResponse") @@ -805,67 +909,74 @@ func init() { proto.RegisterType((*MsgApplyResponse)(nil), "side.lending.MsgApplyResponse") proto.RegisterType((*MsgApprove)(nil), "side.lending.MsgApprove") proto.RegisterType((*MsgApproveResponse)(nil), "side.lending.MsgApproveResponse") + proto.RegisterType((*MsgClose)(nil), "side.lending.MsgClose") + proto.RegisterType((*MsgCloseResponse)(nil), "side.lending.MsgCloseResponse") } func init() { proto.RegisterFile("side/lending/tx.proto", fileDescriptor_13b5a91577424108) } var fileDescriptor_13b5a91577424108 = []byte{ - // 878 bytes of a gzipped FileDescriptorProto + // 951 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 0x36, 0xfd, 0x23, 0xdb, 0x63, 0x29, 0x4e, 0xd9, 0xc4, 0x62, 0x58, 0x84, 0x31, 0x68, 0x14, - 0x35, 0x82, 0x82, 0x84, 0xd3, 0x43, 0x01, 0x1f, 0x5a, 0x28, 0x41, 0x8b, 0x1a, 0x88, 0x5b, 0x43, - 0xf5, 0xa9, 0x40, 0x41, 0xac, 0xc4, 0x0d, 0xb5, 0x28, 0xc9, 0x65, 0xb9, 0x4b, 0xd5, 0xba, 0x15, - 0x41, 0x1f, 0xa0, 0x4f, 0xd0, 0x63, 0xcf, 0x79, 0x8c, 0x1e, 0x73, 0xec, 0xb1, 0xb0, 0x0f, 0x79, - 0x86, 0xde, 0x82, 0xfd, 0xe1, 0x8a, 0xfa, 0x89, 0x12, 0xf8, 0x24, 0xce, 0xf7, 0x0d, 0x67, 0xbf, - 0x99, 0x9d, 0x19, 0x0a, 0xee, 0x33, 0x12, 0xe3, 0x30, 0xc5, 0x79, 0x4c, 0xf2, 0x24, 0xe4, 0x57, - 0x41, 0x51, 0x52, 0x4e, 0xed, 0xb6, 0x80, 0x03, 0x0d, 0xbb, 0xf7, 0x12, 0x9a, 0x50, 0x49, 0x84, - 0xe2, 0x49, 0xf9, 0xb8, 0xdd, 0x21, 0x65, 0x19, 0x65, 0x61, 0xc6, 0x92, 0x70, 0x7c, 0x22, 0x7e, - 0x34, 0xe1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0x29, 0x3d, 0x15, 0x61, 0x5e, 0x84, 0xf6, 0x31, 0x34, 0x34, + 0xbb, 0x00, 0x31, 0x86, 0x79, 0x6b, 0x4b, 0xba, 0xeb, 0x1a, 0xec, 0x08, 0xec, 0xac, 0xfe, 0xfa, + 0xdd, 0x9b, 0xa7, 0x45, 0x2e, 0xb7, 0x09, 0x0f, 0xe7, 0xb6, 0xed, 0x62, 0x96, 0xd1, 0x94, 0x61, + 0xf7, 0x0f, 0x0b, 0xf6, 0x2e, 0x59, 0xd4, 0xc5, 0x19, 0x9a, 0xda, 0x0e, 0xec, 0xf5, 0x69, 0x9e, + 0xd3, 0x5f, 0x70, 0x41, 0xc6, 0xd8, 0x82, 0x4d, 0x4c, 0x51, 0x5a, 0x62, 0x23, 0x4c, 0xc5, 0x06, + 0x85, 0x28, 0xe3, 0x34, 0x0f, 0x32, 0x4a, 0x52, 0xc3, 0x46, 0x83, 0x57, 0x02, 0xb3, 0xdb, 0x50, + 0x1b, 0xc4, 0x88, 0x24, 0x01, 0x9f, 0x88, 0x0c, 0xdb, 0x32, 0xa4, 0x2a, 0xa1, 0xde, 0xe4, 0x22, + 0xb4, 0x3f, 0x85, 0xfb, 0x45, 0x12, 0x46, 0xa2, 0x14, 0xf1, 0x51, 0x8e, 0x5b, 0x3b, 0x32, 0xea, + 0x40, 0x3b, 0x5e, 0x16, 0xf8, 0x59, 0x43, 0x94, 0x66, 0x98, 0xb9, 0x36, 0x1c, 0x14, 0x15, 0x98, + 0xb2, 0x32, 0xa8, 0x4a, 0x2c, 0xc4, 0x38, 0xf9, 0x7f, 0x65, 0x3d, 0x81, 0x9a, 0x74, 0x30, 0x3c, + 0xc8, 0xcd, 0x11, 0x83, 0x80, 0x5e, 0x4a, 0x64, 0x91, 0xc5, 0x07, 0x70, 0xdf, 0xec, 0x68, 0x68, + 0xbc, 0xb6, 0x60, 0xff, 0x92, 0x45, 0x9d, 0x30, 0x7c, 0x41, 0x7e, 0x1e, 0x91, 0x90, 0xf0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0xfb, + 0x6b, 0x35, 0xcd, 0x30, 0xeb, 0x57, 0xa4, 0xfb, 0xf3, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x6f, + 0x73, 0x83, 0x10, 0x77, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -887,6 +998,7 @@ type MsgClient interface { Approve(ctx context.Context, in *MsgApprove, opts ...grpc.CallOption) (*MsgApproveResponse, error) Redeem(ctx context.Context, in *MsgRedeem, opts ...grpc.CallOption) (*MsgRedeemResponse, error) Repay(ctx context.Context, in *MsgRepay, opts ...grpc.CallOption) (*MsgRepayResponse, error) + Close(ctx context.Context, in *MsgClose, opts ...grpc.CallOption) (*MsgCloseResponse, error) } type msgClient struct { @@ -960,6 +1072,15 @@ func (c *msgClient) Repay(ctx context.Context, in *MsgRepay, opts ...grpc.CallOp return out, nil } +func (c *msgClient) Close(ctx context.Context, in *MsgClose, opts ...grpc.CallOption) (*MsgCloseResponse, error) { + out := new(MsgCloseResponse) + err := c.cc.Invoke(ctx, "/side.lending.Msg/Close", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { CreatePool(context.Context, *MsgCreatePool) (*MsgCreatePoolResponse, error) @@ -969,6 +1090,7 @@ type MsgServer interface { Approve(context.Context, *MsgApprove) (*MsgApproveResponse, error) Redeem(context.Context, *MsgRedeem) (*MsgRedeemResponse, error) Repay(context.Context, *MsgRepay) (*MsgRepayResponse, error) + Close(context.Context, *MsgClose) (*MsgCloseResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -996,6 +1118,9 @@ func (*UnimplementedMsgServer) Redeem(ctx context.Context, req *MsgRedeem) (*Msg func (*UnimplementedMsgServer) Repay(ctx context.Context, req *MsgRepay) (*MsgRepayResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Repay not implemented") } +func (*UnimplementedMsgServer) Close(ctx context.Context, req *MsgClose) (*MsgCloseResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Close not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -1127,6 +1252,24 @@ func _Msg_Repay_Handler(srv interface{}, ctx context.Context, dec func(interface return interceptor(ctx, in, info, handler) } +func _Msg_Close_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgClose) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Close(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/side.lending.Msg/Close", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Close(ctx, req.(*MsgClose)) + } + return interceptor(ctx, in, info, handler) +} + var Msg_serviceDesc = _Msg_serviceDesc var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "side.lending.Msg", @@ -1160,6 +1303,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "Repay", Handler: _Msg_Repay_Handler, }, + { + MethodName: "Close", + Handler: _Msg_Close_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "side/lending/tx.proto", @@ -1252,23 +1399,25 @@ func (m *MsgRepay) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.AdaptorSignature) > 0 { + i -= len(m.AdaptorSignature) + copy(dAtA[i:], m.AdaptorSignature) + i = encodeVarintTx(dAtA, i, uint64(len(m.AdaptorSignature))) + i-- + dAtA[i] = 0x2a + } + if len(m.ClaimTxId) > 0 { + i -= len(m.ClaimTxId) + copy(dAtA[i:], m.ClaimTxId) + i = encodeVarintTx(dAtA, i, uint64(len(m.ClaimTxId))) + i-- + dAtA[i] = 0x22 + } if len(m.AdaptorPoint) > 0 { i -= len(m.AdaptorPoint) copy(dAtA[i:], m.AdaptorPoint) i = encodeVarintTx(dAtA, i, uint64(len(m.AdaptorPoint))) i-- - dAtA[i] = 0x22 - } - if m.Amount != nil { - { - size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x1a } if len(m.LoanId) > 0 { @@ -1735,6 +1884,73 @@ func (m *MsgApproveResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *MsgClose) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgClose) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgClose) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x1a + } + if len(m.LoanId) > 0 { + i -= len(m.LoanId) + copy(dAtA[i:], m.LoanId) + i = encodeVarintTx(dAtA, i, uint64(len(m.LoanId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Relayer) > 0 { + i -= len(m.Relayer) + copy(dAtA[i:], m.Relayer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Relayer))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCloseResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCloseResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCloseResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -1790,11 +2006,15 @@ func (m *MsgRepay) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.Amount != nil { - l = m.Amount.Size() + l = len(m.AdaptorPoint) + if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.AdaptorPoint) + l = len(m.ClaimTxId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.AdaptorSignature) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -1997,6 +2217,36 @@ func (m *MsgApproveResponse) Size() (n int) { return n } +func (m *MsgClose) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Relayer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.LoanId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgCloseResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2294,9 +2544,9 @@ func (m *MsgRepay) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AdaptorPoint", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -2306,31 +2556,59 @@ func (m *MsgRepay) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Amount == nil { - m.Amount = &types.Coin{} + m.AdaptorPoint = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClaimTxId", wireType) } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClaimTxId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AdaptorPoint", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AdaptorSignature", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2358,7 +2636,7 @@ func (m *MsgRepay) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.AdaptorPoint = string(dAtA[iNdEx:postIndex]) + m.AdaptorSignature = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3712,6 +3990,202 @@ func (m *MsgApproveResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgClose) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgClose: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgClose: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Relayer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Relayer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LoanId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LoanId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCloseResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCloseResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCloseResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0