diff --git a/api/did/v1/query.pulsar.go b/api/did/v1/query.pulsar.go index 1cc237c18..e27a2b820 100644 --- a/api/did/v1/query.pulsar.go +++ b/api/did/v1/query.pulsar.go @@ -700,14 +700,16 @@ func (x *fastReflection_QueryRequest) ProtoMethods() *protoiface.Methods { } var ( - md_QueryParamsResponse protoreflect.MessageDescriptor - fd_QueryParamsResponse_params protoreflect.FieldDescriptor + md_QueryParamsResponse protoreflect.MessageDescriptor + fd_QueryParamsResponse_params protoreflect.FieldDescriptor + fd_QueryParamsResponse_ipfs_active protoreflect.FieldDescriptor ) func init() { file_did_v1_query_proto_init() md_QueryParamsResponse = File_did_v1_query_proto.Messages().ByName("QueryParamsResponse") fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") + fd_QueryParamsResponse_ipfs_active = md_QueryParamsResponse.Fields().ByName("ipfs_active") } var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) @@ -781,6 +783,12 @@ func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDesc return } } + if x.IpfsActive != false { + value := protoreflect.ValueOfBool(x.IpfsActive) + if !f(fd_QueryParamsResponse_ipfs_active, value) { + return + } + } } // Has reports whether a field is populated. @@ -798,6 +806,8 @@ func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor switch fd.FullName() { case "did.v1.QueryParamsResponse.params": return x.Params != nil + case "did.v1.QueryParamsResponse.ipfs_active": + return x.IpfsActive != false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsResponse")) @@ -816,6 +826,8 @@ func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescript switch fd.FullName() { case "did.v1.QueryParamsResponse.params": x.Params = nil + case "did.v1.QueryParamsResponse.ipfs_active": + x.IpfsActive = false default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsResponse")) @@ -835,6 +847,9 @@ func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDe case "did.v1.QueryParamsResponse.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "did.v1.QueryParamsResponse.ipfs_active": + value := x.IpfsActive + return protoreflect.ValueOfBool(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsResponse")) @@ -857,6 +872,8 @@ func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor switch fd.FullName() { case "did.v1.QueryParamsResponse.params": x.Params = value.Message().Interface().(*Params) + case "did.v1.QueryParamsResponse.ipfs_active": + x.IpfsActive = value.Bool() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsResponse")) @@ -882,6 +899,8 @@ func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescri x.Params = new(Params) } return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + case "did.v1.QueryParamsResponse.ipfs_active": + panic(fmt.Errorf("field ipfs_active of message did.v1.QueryParamsResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsResponse")) @@ -898,6 +917,8 @@ func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescr case "did.v1.QueryParamsResponse.params": m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "did.v1.QueryParamsResponse.ipfs_active": + return protoreflect.ValueOfBool(false) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsResponse")) @@ -971,6 +992,9 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods l = options.Size(x.Params) n += 1 + l + runtime.Sov(uint64(l)) } + if x.IpfsActive { + n += 2 + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1000,6 +1024,16 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.IpfsActive { + i-- + if x.IpfsActive { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } if x.Params != nil { encoded, err := options.Marshal(x.Params) if err != nil { @@ -1099,6 +1133,26 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IpfsActive", wireType) + } + var v int + 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++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.IpfsActive = bool(v != 0) default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -3788,6 +3842,8 @@ type QueryParamsResponse struct { // params defines the parameters of the module. Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + // ipfs_active returns true if the IPFS client is initialized + IpfsActive bool `protobuf:"varint,2,opt,name=ipfs_active,json=ipfsActive,proto3" json:"ipfs_active,omitempty"` } func (x *QueryParamsResponse) Reset() { @@ -3817,6 +3873,13 @@ func (x *QueryParamsResponse) GetParams() *Params { return nil } +func (x *QueryParamsResponse) GetIpfsActive() bool { + if x != nil { + return x.IpfsActive + } + return false +} + // QueryAccountsResponse is the response type for the Query/Exists RPC method. type QueryAccountsResponse struct { state protoimpl.MessageState @@ -4064,83 +4127,85 @@ var file_did_v1_query_proto_rawDesc = []byte{ 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, - 0x22, 0x3d, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x22, 0x5e, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, - 0x2f, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, - 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, - 0x22, 0xb2, 0x01, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, - 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x34, 0x0a, 0x0b, 0x63, 0x72, 0x65, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, - 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x44, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, - 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x41, 0x0a, 0x14, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x69, - 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x23, - 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, - 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x05, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x32, 0xa7, 0x04, 0x0a, 0x05, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x12, 0x50, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x14, 0x2e, - 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x5c, 0x0a, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, - 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x12, 0x76, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, - 0x6c, 0x73, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, - 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x29, 0x12, 0x27, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x7b, 0x6f, 0x72, - 0x69, 0x67, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, - 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x51, 0x0a, 0x07, 0x52, - 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, - 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x12, 0x58, - 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, - 0x7b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x7d, 0x12, 0x49, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x0e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x08, 0x22, 0x06, 0x2f, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, - 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, - 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, - 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, - 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x1f, 0x0a, 0x0b, 0x69, 0x70, 0x66, 0x73, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x70, 0x66, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x22, 0x2f, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, + 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, + 0x73, 0x22, 0xb2, 0x01, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x72, 0x65, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x34, 0x0a, 0x0b, 0x63, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x44, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, + 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, + 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x41, 0x0a, 0x14, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, + 0x69, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, + 0x23, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, + 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x05, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x32, 0xa7, 0x04, 0x0a, 0x05, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x12, 0x50, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x14, + 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, 0x2f, 0x64, 0x69, 0x64, 0x2f, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x5c, 0x0a, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, + 0x13, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x12, 0x76, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x73, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x64, 0x69, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x7b, 0x6f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x7d, + 0x2f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x51, 0x0a, 0x07, + 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, + 0x6c, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x12, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x12, + 0x58, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2f, 0x7b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x7d, 0x12, 0x49, 0x0a, 0x05, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x08, 0x22, 0x06, 0x2f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, + 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, + 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, + 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, + 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, + 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/did/v1/query.proto b/proto/did/v1/query.proto index 38038d8ec..0b2bcc718 100644 --- a/proto/did/v1/query.proto +++ b/proto/did/v1/query.proto @@ -52,6 +52,9 @@ message QueryRequest { message QueryParamsResponse { // params defines the parameters of the module. Params params = 1; + + // ipfs_active returns true if the IPFS client is initialized + bool ipfs_active = 2; } // QueryAccountsResponse is the response type for the Query/Exists RPC method. diff --git a/x/did/keeper/accounts.go b/x/did/keeper/accounts.go deleted file mode 100644 index 4a13e387d..000000000 --- a/x/did/keeper/accounts.go +++ /dev/null @@ -1,9 +0,0 @@ -package keeper - -// deriveAccount is used to derive a wallet account using bip32 -func (k Keeper) deriveAccount() { -} - -// insertAccount places an Account into the did module orm as a Delegation -func (k Keeper) insertAccount() { -} diff --git a/x/did/keeper/ipfs.go b/x/did/keeper/ipfs.go index b55569d4a..ec606b418 100644 --- a/x/did/keeper/ipfs.go +++ b/x/did/keeper/ipfs.go @@ -1 +1,56 @@ package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ipfs/boxo/files" + "github.com/ipfs/boxo/path" + "github.com/ipfs/kubo/core/coreiface/options" +) + +// AddToLocalIPFS adds a file to the local IPFS node +func (k Keeper) AddToLocalIPFS(ctx sdk.Context, data files.Node) (string, error) { + cid, err := k.ipfsClient.Unixfs().Add(ctx, data) + if err != nil { + return "", err + } + return cid.String(), nil +} + +// GetFromLocalIPFS gets a file from the local IPFS node +func (k Keeper) GetFromLocalIPFS(ctx sdk.Context, cid string) (files.Node, error) { + path, err := path.NewPath(cid) + if err != nil { + return nil, err + } + return k.ipfsClient.Unixfs().Get(ctx, path) +} + +// HasPathInLocalIPFS checks if a file is in the local IPFS node +func (k Keeper) HasPathInLocalIPFS(ctx sdk.Context, cid string) (bool, error) { + path, err := path.NewPath(cid) + if err != nil { + return false, err + } + v, err := k.ipfsClient.Unixfs().Get(ctx, path) + if err != nil { + return false, err + } + + if v == nil { + return false, nil + } + return true, nil +} + +// PinToLocalIPFS pins a file to the local IPFS node +func (k Keeper) PinToLocalIPFS(ctx sdk.Context, cid string, name string) error { + path, err := path.NewPath(cid) + if err != nil { + return err + } + err = k.ipfsClient.Pin().Add(ctx, path, options.Pin.Name(name)) + if err != nil { + return err + } + return nil +} diff --git a/x/did/keeper/keeper.go b/x/did/keeper/keeper.go index b8ff0227e..67b982666 100644 --- a/x/did/keeper/keeper.go +++ b/x/did/keeper/keeper.go @@ -10,6 +10,7 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" stakkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + "github.com/ipfs/kubo/client/rpc" apiv1 "github.com/onsonr/sonr/api/did/v1" "github.com/onsonr/sonr/x/did/types" @@ -29,7 +30,8 @@ type Keeper struct { AccountKeeper authkeeper.AccountKeeper StakingKeeper *stakkeeper.Keeper - authority string + authority string + ipfsClient *rpc.HttpApi } // NewKeeper creates a new poa Keeper instance @@ -47,7 +49,11 @@ func NewKeeper(cdc codec.BinaryCodec, storeService storetypes.KVStoreService, ac if err != nil { panic(err) } + + // Initialize IPFS client + ipfsClient, _ := rpc.NewLocalApi() k := Keeper{ + ipfsClient: ipfsClient, cdc: cdc, logger: logger, Params: collections.NewItem(sb, types.ParamsKey, "params", codec.CollValue[types.Params](cdc)), @@ -64,3 +70,8 @@ func NewKeeper(cdc codec.BinaryCodec, storeService storetypes.KVStoreService, ac k.Schema = schema return k } + +// HasIPFSConnection returns true if the IPFS client is initialized +func (k *Keeper) HasIPFSConnection() bool { + return k.ipfsClient != nil +} diff --git a/x/did/keeper/querier.go b/x/did/keeper/querier.go index 0131f5a91..f6d26a00f 100644 --- a/x/did/keeper/querier.go +++ b/x/did/keeper/querier.go @@ -5,7 +5,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - // "github.com/onsonr/sonr/internal/local" "github.com/onsonr/sonr/x/did/types" ) @@ -28,7 +27,7 @@ func (k Querier) Params(c context.Context, req *types.QueryRequest) (*types.Quer return nil, err } - return &types.QueryParamsResponse{Params: &p}, nil + return &types.QueryParamsResponse{Params: &p, IpfsActive: k.HasIPFSConnection()}, nil } // Accounts implements types.QueryServer. diff --git a/x/did/keeper/state.go b/x/did/keeper/state.go deleted file mode 100644 index 947d1e4a0..000000000 --- a/x/did/keeper/state.go +++ /dev/null @@ -1,37 +0,0 @@ -package keeper - -import ( - didv1 "github.com/onsonr/sonr/api/did/v1" - "github.com/onsonr/sonr/x/did/types" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -func (k Keeper) convertProfileToVerification() { -} - -func (k Keeper) insertAuthenticationFromCredential() { -} - -func (k Keeper) insertControllerFromMotrVault() { -} - -func (k Keeper) insertDelegationFromAccount(ctx sdk.Context, address string, label string) (*didv1.Delegation, error) { - del, err := k.OrmDB.DelegationTable().GetByControllerAccountLabel(ctx, address, label) - if err != nil { - return nil, err - } - return del, nil -} - -func (k Keeper) insertServiceRecord(ctx sdk.Context, msg *types.MsgRegisterService) error { - record, err := msg.ExtractServiceRecord() - if err != nil { - return err - } - err = k.OrmDB.ServiceRecordTable().Insert(ctx, record) - if err != nil { - return err - } - return nil -} diff --git a/x/did/types/query.pb.go b/x/did/types/query.pb.go index ec3b9b56f..b9f5c2cb3 100644 --- a/x/did/types/query.pb.go +++ b/x/did/types/query.pb.go @@ -101,6 +101,8 @@ func (m *QueryRequest) GetCredentials() []*Credential { type QueryParamsResponse struct { // params defines the parameters of the module. Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + // ipfs_active returns true if the IPFS client is initialized + IpfsActive bool `protobuf:"varint,2,opt,name=ipfs_active,json=ipfsActive,proto3" json:"ipfs_active,omitempty"` } func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } @@ -143,6 +145,13 @@ func (m *QueryParamsResponse) GetParams() *Params { return nil } +func (m *QueryParamsResponse) GetIpfsActive() bool { + if m != nil { + return m.IpfsActive + } + return false +} + // QueryAccountsResponse is the response type for the Query/Exists RPC method. type QueryAccountsResponse struct { Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` @@ -430,46 +439,48 @@ func init() { func init() { proto.RegisterFile("did/v1/query.proto", fileDescriptor_ae1fa9bb626e2869) } var fileDescriptor_ae1fa9bb626e2869 = []byte{ - // 620 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x4f, 0x4f, 0x13, 0x41, - 0x18, 0xc6, 0x59, 0x4a, 0xb7, 0xf5, 0x5d, 0x40, 0x9c, 0x16, 0xb2, 0x16, 0xdc, 0x90, 0x31, 0x51, - 0x48, 0x4c, 0x27, 0x54, 0x8f, 0x7a, 0x40, 0xb8, 0x78, 0x83, 0x95, 0x83, 0x31, 0x5e, 0x96, 0xdd, - 0x49, 0x1d, 0x6d, 0x67, 0xca, 0xce, 0x6c, 0x03, 0x21, 0x5c, 0x3c, 0x79, 0x34, 0xf1, 0x43, 0x78, - 0xf7, 0x53, 0x78, 0x24, 0xf1, 0xe2, 0xd1, 0x80, 0x1f, 0xc4, 0x74, 0x76, 0x86, 0xdd, 0xc5, 0x92, - 0x10, 0x2f, 0x4d, 0xe7, 0x79, 0xe7, 0xfd, 0xbd, 0x7f, 0xe6, 0x69, 0x01, 0x25, 0x2c, 0x21, 0xe3, - 0x2d, 0x72, 0x94, 0xd1, 0xf4, 0xa4, 0x3b, 0x4a, 0x85, 0x12, 0xc8, 0x4d, 0x58, 0xd2, 0x1d, 0x6f, - 0x75, 0xda, 0x26, 0xd6, 0xa7, 0x9c, 0x4a, 0x26, 0xf3, 0x68, 0xa7, 0x65, 0xd4, 0xa1, 0x48, 0xe8, - 0xc0, 0x8a, 0x6b, 0x7d, 0x21, 0xfa, 0x03, 0x4a, 0xa2, 0x11, 0x23, 0x11, 0xe7, 0x42, 0x45, 0x8a, - 0x09, 0x6e, 0xa2, 0xf8, 0xb3, 0x03, 0xf3, 0xfb, 0x93, 0x02, 0x21, 0x3d, 0xca, 0xa8, 0x54, 0x68, - 0x09, 0x6a, 0x09, 0x4b, 0x7c, 0x67, 0xdd, 0xd9, 0xb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 0x82, 0xfa, 0x41, 0xfe, 0xfa, 0x53, 0xb9, 0x9d, 0x8a, 0x5a, 0xb1, - 0x1b, 0x5e, 0xd4, 0xd4, 0x26, 0x76, 0x89, 0xf6, 0xcf, 0xcb, 0xe7, 0x3f, 0x2e, 0x02, 0xe7, 0xfc, - 0x22, 0x70, 0x7e, 0x5f, 0x04, 0xce, 0x97, 0xcb, 0x60, 0xe6, 0xfc, 0x32, 0x98, 0xf9, 0x75, 0x19, - 0xcc, 0xbc, 0xc5, 0x7d, 0xa6, 0xde, 0x67, 0x87, 0xdd, 0x58, 0x0c, 0x89, 0xe0, 0x52, 0xf0, 0x94, - 0xe8, 0x8f, 0x63, 0x3d, 0xa2, 0x3a, 0x19, 0x51, 0x79, 0xe8, 0xea, 0xbf, 0xc4, 0xa7, 0x7f, 0x03, - 0x00, 0x00, 0xff, 0xff, 0xb5, 0xea, 0x49, 0x17, 0x79, 0x05, 0x00, 0x00, + // 641 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xc1, 0x4f, 0x13, 0x4f, + 0x14, 0x66, 0x29, 0xdd, 0xf6, 0xf7, 0x16, 0xf8, 0xe1, 0xb4, 0x90, 0xb5, 0x60, 0x25, 0x63, 0xa2, + 0x90, 0x98, 0x4e, 0xa8, 0x1e, 0xbd, 0x20, 0x5c, 0xbc, 0xc1, 0xca, 0xc1, 0x18, 0xa3, 0x59, 0x76, + 0xc7, 0x3a, 0xda, 0xee, 0x94, 0x9d, 0x69, 0x03, 0x21, 0x5c, 0x3c, 0x79, 0x34, 0xf1, 0x8f, 0xf0, + 0xee, 0x5f, 0xe1, 0x91, 0xc4, 0x8b, 0x47, 0x03, 0xfe, 0x21, 0xa6, 0x6f, 0x67, 0xd8, 0x5d, 0x84, + 0x84, 0x78, 0x69, 0xfa, 0xbe, 0xf7, 0xde, 0xf7, 0xde, 0xfb, 0xe6, 0x6b, 0x81, 0xc4, 0x22, 0x66, + 0xe3, 0x0d, 0x76, 0x30, 0xe2, 0xe9, 0x51, 0x67, 0x98, 0x4a, 0x2d, 0x89, 0x1b, 0x8b, 0xb8, 0x33, + 0xde, 0x68, 0x35, 0x4d, 0xae, 0xc7, 0x13, 0xae, 0x84, 0xca, 0xb2, 0xad, 0x86, 0x41, 0x07, 0x32, + 0xe6, 0x7d, 0x0b, 0xae, 0xf4, 0xa4, 0xec, 0xf5, 0x39, 0x0b, 0x87, 0x82, 0x85, 0x49, 0x22, 0x75, + 0xa8, 0x85, 0x4c, 0x4c, 0x96, 0x7e, 0x72, 0x60, 0x76, 0x77, 0x32, 0x20, 0xe0, 0x07, 0x23, 0xae, + 0x34, 0x59, 0x80, 0x4a, 0x2c, 0x62, 0xdf, 0x59, 0x75, 0xd6, 0xfe, 0x0b, 0x26, 0x5f, 0xc9, 0x12, + 0xb8, 0x32, 0x15, 0x3d, 0x91, 0xf8, 0xd3, 0x08, 0x9a, 0x88, 0xf8, 0x50, 0x53, 0xa3, 0xfd, 0xf7, + 0x3c, 0xd2, 0x7e, 0x05, 0x13, 0x36, 0x24, 0x8f, 0xc1, 0x8b, 0x52, 0x1e, 0xf3, 0x44, 0x8b, 0xb0, + 0xaf, 0xfc, 0x99, 0xd5, 0xca, 0x9a, 0xd7, 0x25, 0x9d, 0x6c, 0xf7, 0xce, 0xd6, 0x45, 0x2a, 0x28, + 0x96, 0xd1, 0xd7, 0xd0, 0xc0, 0x4d, 0x76, 0xc2, 0x34, 0x1c, 0xa8, 0x80, 0xab, 0xa1, 0x4c, 0x14, + 0x27, 0xf7, 0xc1, 0x1d, 0x22, 0x82, 0x3b, 0x79, 0xdd, 0x79, 0xcb, 0x63, 0xea, 0x4c, 0x96, 0xdc, + 0x05, 0x4f, 0x0c, 0xdf, 0xaa, 0x37, 0x61, 0xa4, 0xc5, 0x98, 0xe3, 0xae, 0xf5, 0x00, 0x26, 0xd0, + 0x26, 0x22, 0x94, 0xc1, 0x22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Reference imports to suppress errors if they are not otherwise used. @@ -822,6 +833,16 @@ func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.IpfsActive { + i-- + if m.IpfsActive { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } if m.Params != nil { { size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) @@ -1108,6 +1129,9 @@ func (m *QueryParamsResponse) Size() (n int) { l = m.Params.Size() n += 1 + l + sovQuery(uint64(l)) } + if m.IpfsActive { + n += 2 + } return n } @@ -1450,6 +1474,26 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IpfsActive", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IpfsActive = bool(v != 0) default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:])