diff --git a/Taskfile.yml b/Taskfile.yml index 00d6a83ab..c06c1c7a1 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -13,14 +13,5 @@ tasks: proto: cmd: devbox -q run proto - templ: - cmd: templ generate - - build:vltd: - cmd: go build -o ./bin/vltd ./cmd/vltd - build:sonrd: cmd: go build -o ./bin/sonrd ./cmd/sonrd - - build:dwn: - cmd: tinygo build -o ./bin/dwn.wasm -target wasi ./internal/dwn/db.go diff --git a/api/did/v1/query.pulsar.go b/api/did/v1/query.pulsar.go index e69d5e5c9..badb81c64 100644 --- a/api/did/v1/query.pulsar.go +++ b/api/did/v1/query.pulsar.go @@ -2539,27 +2539,25 @@ func (x *fastReflection_QueryResolveResponse) ProtoMethods() *protoiface.Methods } var ( - md_QueryLoginOptionsRequest protoreflect.MessageDescriptor - fd_QueryLoginOptionsRequest_origin protoreflect.FieldDescriptor - fd_QueryLoginOptionsRequest_handle protoreflect.FieldDescriptor + md_QueryWitnessCredentialRequest protoreflect.MessageDescriptor + fd_QueryWitnessCredentialRequest_id protoreflect.FieldDescriptor ) func init() { file_did_v1_query_proto_init() - md_QueryLoginOptionsRequest = File_did_v1_query_proto.Messages().ByName("QueryLoginOptionsRequest") - fd_QueryLoginOptionsRequest_origin = md_QueryLoginOptionsRequest.Fields().ByName("origin") - fd_QueryLoginOptionsRequest_handle = md_QueryLoginOptionsRequest.Fields().ByName("handle") + md_QueryWitnessCredentialRequest = File_did_v1_query_proto.Messages().ByName("QueryWitnessCredentialRequest") + fd_QueryWitnessCredentialRequest_id = md_QueryWitnessCredentialRequest.Fields().ByName("id") } -var _ protoreflect.Message = (*fastReflection_QueryLoginOptionsRequest)(nil) +var _ protoreflect.Message = (*fastReflection_QueryWitnessCredentialRequest)(nil) -type fastReflection_QueryLoginOptionsRequest QueryLoginOptionsRequest +type fastReflection_QueryWitnessCredentialRequest QueryWitnessCredentialRequest -func (x *QueryLoginOptionsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryLoginOptionsRequest)(x) +func (x *QueryWitnessCredentialRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryWitnessCredentialRequest)(x) } -func (x *QueryLoginOptionsRequest) slowProtoReflect() protoreflect.Message { +func (x *QueryWitnessCredentialRequest) slowProtoReflect() protoreflect.Message { mi := &file_did_v1_query_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2571,43 +2569,43 @@ func (x *QueryLoginOptionsRequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryLoginOptionsRequest_messageType fastReflection_QueryLoginOptionsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryLoginOptionsRequest_messageType{} +var _fastReflection_QueryWitnessCredentialRequest_messageType fastReflection_QueryWitnessCredentialRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryWitnessCredentialRequest_messageType{} -type fastReflection_QueryLoginOptionsRequest_messageType struct{} +type fastReflection_QueryWitnessCredentialRequest_messageType struct{} -func (x fastReflection_QueryLoginOptionsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryLoginOptionsRequest)(nil) +func (x fastReflection_QueryWitnessCredentialRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryWitnessCredentialRequest)(nil) } -func (x fastReflection_QueryLoginOptionsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryLoginOptionsRequest) +func (x fastReflection_QueryWitnessCredentialRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryWitnessCredentialRequest) } -func (x fastReflection_QueryLoginOptionsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryLoginOptionsRequest +func (x fastReflection_QueryWitnessCredentialRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryWitnessCredentialRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryLoginOptionsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryLoginOptionsRequest +func (x *fastReflection_QueryWitnessCredentialRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryWitnessCredentialRequest } // 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_QueryLoginOptionsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryLoginOptionsRequest_messageType +func (x *fastReflection_QueryWitnessCredentialRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryWitnessCredentialRequest_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryLoginOptionsRequest) New() protoreflect.Message { - return new(fastReflection_QueryLoginOptionsRequest) +func (x *fastReflection_QueryWitnessCredentialRequest) New() protoreflect.Message { + return new(fastReflection_QueryWitnessCredentialRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryLoginOptionsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryLoginOptionsRequest)(x) +func (x *fastReflection_QueryWitnessCredentialRequest) Interface() protoreflect.ProtoMessage { + return (*QueryWitnessCredentialRequest)(x) } // Range iterates over every populated field in an undefined order, @@ -2615,16 +2613,10 @@ func (x *fastReflection_QueryLoginOptionsRequest) Interface() protoreflect.Proto // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryLoginOptionsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Origin != "" { - value := protoreflect.ValueOfString(x.Origin) - if !f(fd_QueryLoginOptionsRequest_origin, value) { - return - } - } - if x.Handle != "" { - value := protoreflect.ValueOfString(x.Handle) - if !f(fd_QueryLoginOptionsRequest_handle, value) { +func (x *fastReflection_QueryWitnessCredentialRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != "" { + value := protoreflect.ValueOfString(x.Id) + if !f(fd_QueryWitnessCredentialRequest_id, value) { return } } @@ -2641,17 +2633,15 @@ func (x *fastReflection_QueryLoginOptionsRequest) Range(f func(protoreflect.Fiel // 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_QueryLoginOptionsRequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryWitnessCredentialRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.QueryLoginOptionsRequest.origin": - return x.Origin != "" - case "did.v1.QueryLoginOptionsRequest.handle": - return x.Handle != "" + case "did.v1.QueryWitnessCredentialRequest.id": + return x.Id != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryLoginOptionsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryWitnessCredentialRequest")) } - panic(fmt.Errorf("message did.v1.QueryLoginOptionsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryWitnessCredentialRequest does not contain field %s", fd.FullName())) } } @@ -2661,17 +2651,15 @@ func (x *fastReflection_QueryLoginOptionsRequest) Has(fd protoreflect.FieldDescr // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLoginOptionsRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryWitnessCredentialRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.QueryLoginOptionsRequest.origin": - x.Origin = "" - case "did.v1.QueryLoginOptionsRequest.handle": - x.Handle = "" + case "did.v1.QueryWitnessCredentialRequest.id": + x.Id = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryLoginOptionsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryWitnessCredentialRequest")) } - panic(fmt.Errorf("message did.v1.QueryLoginOptionsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryWitnessCredentialRequest does not contain field %s", fd.FullName())) } } @@ -2681,19 +2669,16 @@ func (x *fastReflection_QueryLoginOptionsRequest) Clear(fd protoreflect.FieldDes // 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_QueryLoginOptionsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryWitnessCredentialRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.QueryLoginOptionsRequest.origin": - value := x.Origin - return protoreflect.ValueOfString(value) - case "did.v1.QueryLoginOptionsRequest.handle": - value := x.Handle + case "did.v1.QueryWitnessCredentialRequest.id": + value := x.Id return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryLoginOptionsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryWitnessCredentialRequest")) } - panic(fmt.Errorf("message did.v1.QueryLoginOptionsRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.QueryWitnessCredentialRequest does not contain field %s", descriptor.FullName())) } } @@ -2707,17 +2692,15 @@ func (x *fastReflection_QueryLoginOptionsRequest) Get(descriptor protoreflect.Fi // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLoginOptionsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryWitnessCredentialRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.QueryLoginOptionsRequest.origin": - x.Origin = value.Interface().(string) - case "did.v1.QueryLoginOptionsRequest.handle": - x.Handle = value.Interface().(string) + case "did.v1.QueryWitnessCredentialRequest.id": + x.Id = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryLoginOptionsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryWitnessCredentialRequest")) } - panic(fmt.Errorf("message did.v1.QueryLoginOptionsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryWitnessCredentialRequest does not contain field %s", fd.FullName())) } } @@ -2731,44 +2714,40 @@ func (x *fastReflection_QueryLoginOptionsRequest) Set(fd protoreflect.FieldDescr // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLoginOptionsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryWitnessCredentialRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.QueryLoginOptionsRequest.origin": - panic(fmt.Errorf("field origin of message did.v1.QueryLoginOptionsRequest is not mutable")) - case "did.v1.QueryLoginOptionsRequest.handle": - panic(fmt.Errorf("field handle of message did.v1.QueryLoginOptionsRequest is not mutable")) + case "did.v1.QueryWitnessCredentialRequest.id": + panic(fmt.Errorf("field id of message did.v1.QueryWitnessCredentialRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryLoginOptionsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryWitnessCredentialRequest")) } - panic(fmt.Errorf("message did.v1.QueryLoginOptionsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryWitnessCredentialRequest 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_QueryLoginOptionsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryWitnessCredentialRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.QueryLoginOptionsRequest.origin": - return protoreflect.ValueOfString("") - case "did.v1.QueryLoginOptionsRequest.handle": + case "did.v1.QueryWitnessCredentialRequest.id": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryLoginOptionsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryWitnessCredentialRequest")) } - panic(fmt.Errorf("message did.v1.QueryLoginOptionsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryWitnessCredentialRequest 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_QueryLoginOptionsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryWitnessCredentialRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryLoginOptionsRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryWitnessCredentialRequest", d.FullName())) } panic("unreachable") } @@ -2776,7 +2755,7 @@ func (x *fastReflection_QueryLoginOptionsRequest) WhichOneof(d protoreflect.Oneo // 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_QueryLoginOptionsRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryWitnessCredentialRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2787,7 +2766,7 @@ func (x *fastReflection_QueryLoginOptionsRequest) GetUnknown() protoreflect.RawF // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLoginOptionsRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryWitnessCredentialRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2799,7 +2778,7 @@ func (x *fastReflection_QueryLoginOptionsRequest) SetUnknown(fields protoreflect // 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_QueryLoginOptionsRequest) IsValid() bool { +func (x *fastReflection_QueryWitnessCredentialRequest) IsValid() bool { return x != nil } @@ -2809,9 +2788,9 @@ func (x *fastReflection_QueryLoginOptionsRequest) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryLoginOptionsRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryWitnessCredentialRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryLoginOptionsRequest) + x := input.Message.Interface().(*QueryWitnessCredentialRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2823,11 +2802,7 @@ func (x *fastReflection_QueryLoginOptionsRequest) ProtoMethods() *protoiface.Met var n int var l int _ = l - l = len(x.Origin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Handle) + l = len(x.Id) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -2841,7 +2816,7 @@ func (x *fastReflection_QueryLoginOptionsRequest) ProtoMethods() *protoiface.Met } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryLoginOptionsRequest) + x := input.Message.Interface().(*QueryWitnessCredentialRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2860,17 +2835,10 @@ func (x *fastReflection_QueryLoginOptionsRequest) ProtoMethods() *protoiface.Met i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Handle) > 0 { - i -= len(x.Handle) - copy(dAtA[i:], x.Handle) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Handle))) - i-- - dAtA[i] = 0x12 - } - if len(x.Origin) > 0 { - i -= len(x.Origin) - copy(dAtA[i:], x.Origin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Origin))) + if len(x.Id) > 0 { + i -= len(x.Id) + copy(dAtA[i:], x.Id) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) i-- dAtA[i] = 0xa } @@ -2885,7 +2853,7 @@ func (x *fastReflection_QueryLoginOptionsRequest) ProtoMethods() *protoiface.Met }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryLoginOptionsRequest) + x := input.Message.Interface().(*QueryWitnessCredentialRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2917,15 +2885,15 @@ func (x *fastReflection_QueryLoginOptionsRequest) ProtoMethods() *protoiface.Met fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLoginOptionsRequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryWitnessCredentialRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLoginOptionsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryWitnessCredentialRequest: 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 Origin", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2953,39 +2921,7 @@ func (x *fastReflection_QueryLoginOptionsRequest) ProtoMethods() *protoiface.Met if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Origin = 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 Handle", 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.Handle = string(dAtA[iNdEx:postIndex]) + x.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3023,25 +2959,25 @@ func (x *fastReflection_QueryLoginOptionsRequest) ProtoMethods() *protoiface.Met } var ( - md_QueryLoginOptionsResponse protoreflect.MessageDescriptor - fd_QueryLoginOptionsResponse_options protoreflect.FieldDescriptor + md_QueryWitnessCredentialResponse protoreflect.MessageDescriptor + fd_QueryWitnessCredentialResponse_options protoreflect.FieldDescriptor ) func init() { file_did_v1_query_proto_init() - md_QueryLoginOptionsResponse = File_did_v1_query_proto.Messages().ByName("QueryLoginOptionsResponse") - fd_QueryLoginOptionsResponse_options = md_QueryLoginOptionsResponse.Fields().ByName("options") + md_QueryWitnessCredentialResponse = File_did_v1_query_proto.Messages().ByName("QueryWitnessCredentialResponse") + fd_QueryWitnessCredentialResponse_options = md_QueryWitnessCredentialResponse.Fields().ByName("options") } -var _ protoreflect.Message = (*fastReflection_QueryLoginOptionsResponse)(nil) +var _ protoreflect.Message = (*fastReflection_QueryWitnessCredentialResponse)(nil) -type fastReflection_QueryLoginOptionsResponse QueryLoginOptionsResponse +type fastReflection_QueryWitnessCredentialResponse QueryWitnessCredentialResponse -func (x *QueryLoginOptionsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryLoginOptionsResponse)(x) +func (x *QueryWitnessCredentialResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryWitnessCredentialResponse)(x) } -func (x *QueryLoginOptionsResponse) slowProtoReflect() protoreflect.Message { +func (x *QueryWitnessCredentialResponse) slowProtoReflect() protoreflect.Message { mi := &file_did_v1_query_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3053,43 +2989,43 @@ func (x *QueryLoginOptionsResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryLoginOptionsResponse_messageType fastReflection_QueryLoginOptionsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryLoginOptionsResponse_messageType{} +var _fastReflection_QueryWitnessCredentialResponse_messageType fastReflection_QueryWitnessCredentialResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryWitnessCredentialResponse_messageType{} -type fastReflection_QueryLoginOptionsResponse_messageType struct{} +type fastReflection_QueryWitnessCredentialResponse_messageType struct{} -func (x fastReflection_QueryLoginOptionsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryLoginOptionsResponse)(nil) +func (x fastReflection_QueryWitnessCredentialResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryWitnessCredentialResponse)(nil) } -func (x fastReflection_QueryLoginOptionsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryLoginOptionsResponse) +func (x fastReflection_QueryWitnessCredentialResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryWitnessCredentialResponse) } -func (x fastReflection_QueryLoginOptionsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryLoginOptionsResponse +func (x fastReflection_QueryWitnessCredentialResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryWitnessCredentialResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryLoginOptionsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryLoginOptionsResponse +func (x *fastReflection_QueryWitnessCredentialResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryWitnessCredentialResponse } // 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_QueryLoginOptionsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryLoginOptionsResponse_messageType +func (x *fastReflection_QueryWitnessCredentialResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryWitnessCredentialResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryLoginOptionsResponse) New() protoreflect.Message { - return new(fastReflection_QueryLoginOptionsResponse) +func (x *fastReflection_QueryWitnessCredentialResponse) New() protoreflect.Message { + return new(fastReflection_QueryWitnessCredentialResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryLoginOptionsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryLoginOptionsResponse)(x) +func (x *fastReflection_QueryWitnessCredentialResponse) Interface() protoreflect.ProtoMessage { + return (*QueryWitnessCredentialResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -3097,10 +3033,10 @@ func (x *fastReflection_QueryLoginOptionsResponse) Interface() protoreflect.Prot // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryLoginOptionsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_QueryWitnessCredentialResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Options != "" { value := protoreflect.ValueOfString(x.Options) - if !f(fd_QueryLoginOptionsResponse_options, value) { + if !f(fd_QueryWitnessCredentialResponse_options, value) { return } } @@ -3117,15 +3053,15 @@ func (x *fastReflection_QueryLoginOptionsResponse) Range(f func(protoreflect.Fie // 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_QueryLoginOptionsResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryWitnessCredentialResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.QueryLoginOptionsResponse.options": + case "did.v1.QueryWitnessCredentialResponse.options": return x.Options != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryLoginOptionsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryWitnessCredentialResponse")) } - panic(fmt.Errorf("message did.v1.QueryLoginOptionsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryWitnessCredentialResponse does not contain field %s", fd.FullName())) } } @@ -3135,15 +3071,15 @@ func (x *fastReflection_QueryLoginOptionsResponse) Has(fd protoreflect.FieldDesc // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLoginOptionsResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryWitnessCredentialResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.QueryLoginOptionsResponse.options": + case "did.v1.QueryWitnessCredentialResponse.options": x.Options = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryLoginOptionsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryWitnessCredentialResponse")) } - panic(fmt.Errorf("message did.v1.QueryLoginOptionsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryWitnessCredentialResponse does not contain field %s", fd.FullName())) } } @@ -3153,16 +3089,16 @@ func (x *fastReflection_QueryLoginOptionsResponse) Clear(fd protoreflect.FieldDe // 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_QueryLoginOptionsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryWitnessCredentialResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.QueryLoginOptionsResponse.options": + case "did.v1.QueryWitnessCredentialResponse.options": value := x.Options return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryLoginOptionsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryWitnessCredentialResponse")) } - panic(fmt.Errorf("message did.v1.QueryLoginOptionsResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.QueryWitnessCredentialResponse does not contain field %s", descriptor.FullName())) } } @@ -3176,15 +3112,15 @@ func (x *fastReflection_QueryLoginOptionsResponse) Get(descriptor protoreflect.F // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLoginOptionsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryWitnessCredentialResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.QueryLoginOptionsResponse.options": + case "did.v1.QueryWitnessCredentialResponse.options": x.Options = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryLoginOptionsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryWitnessCredentialResponse")) } - panic(fmt.Errorf("message did.v1.QueryLoginOptionsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryWitnessCredentialResponse does not contain field %s", fd.FullName())) } } @@ -3198,40 +3134,40 @@ func (x *fastReflection_QueryLoginOptionsResponse) Set(fd protoreflect.FieldDesc // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLoginOptionsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryWitnessCredentialResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.QueryLoginOptionsResponse.options": - panic(fmt.Errorf("field options of message did.v1.QueryLoginOptionsResponse is not mutable")) + case "did.v1.QueryWitnessCredentialResponse.options": + panic(fmt.Errorf("field options of message did.v1.QueryWitnessCredentialResponse is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryLoginOptionsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryWitnessCredentialResponse")) } - panic(fmt.Errorf("message did.v1.QueryLoginOptionsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryWitnessCredentialResponse 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_QueryLoginOptionsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryWitnessCredentialResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.QueryLoginOptionsResponse.options": + case "did.v1.QueryWitnessCredentialResponse.options": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryLoginOptionsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryWitnessCredentialResponse")) } - panic(fmt.Errorf("message did.v1.QueryLoginOptionsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryWitnessCredentialResponse 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_QueryLoginOptionsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryWitnessCredentialResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryLoginOptionsResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryWitnessCredentialResponse", d.FullName())) } panic("unreachable") } @@ -3239,7 +3175,7 @@ func (x *fastReflection_QueryLoginOptionsResponse) WhichOneof(d protoreflect.One // 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_QueryLoginOptionsResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryWitnessCredentialResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -3250,7 +3186,7 @@ func (x *fastReflection_QueryLoginOptionsResponse) GetUnknown() protoreflect.Raw // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLoginOptionsResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryWitnessCredentialResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -3262,7 +3198,7 @@ func (x *fastReflection_QueryLoginOptionsResponse) SetUnknown(fields protoreflec // 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_QueryLoginOptionsResponse) IsValid() bool { +func (x *fastReflection_QueryWitnessCredentialResponse) IsValid() bool { return x != nil } @@ -3272,9 +3208,9 @@ func (x *fastReflection_QueryLoginOptionsResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryLoginOptionsResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryWitnessCredentialResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryLoginOptionsResponse) + x := input.Message.Interface().(*QueryWitnessCredentialResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3300,7 +3236,7 @@ func (x *fastReflection_QueryLoginOptionsResponse) ProtoMethods() *protoiface.Me } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryLoginOptionsResponse) + x := input.Message.Interface().(*QueryWitnessCredentialResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3337,7 +3273,7 @@ func (x *fastReflection_QueryLoginOptionsResponse) ProtoMethods() *protoiface.Me }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryLoginOptionsResponse) + x := input.Message.Interface().(*QueryWitnessCredentialResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3369,914 +3305,10 @@ func (x *fastReflection_QueryLoginOptionsResponse) ProtoMethods() *protoiface.Me fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLoginOptionsResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryWitnessCredentialResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLoginOptionsResponse: 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 Options", 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.Options = 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_QueryRegisterOptionsRequest protoreflect.MessageDescriptor - fd_QueryRegisterOptionsRequest_origin protoreflect.FieldDescriptor - fd_QueryRegisterOptionsRequest_handle protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_query_proto_init() - md_QueryRegisterOptionsRequest = File_did_v1_query_proto.Messages().ByName("QueryRegisterOptionsRequest") - fd_QueryRegisterOptionsRequest_origin = md_QueryRegisterOptionsRequest.Fields().ByName("origin") - fd_QueryRegisterOptionsRequest_handle = md_QueryRegisterOptionsRequest.Fields().ByName("handle") -} - -var _ protoreflect.Message = (*fastReflection_QueryRegisterOptionsRequest)(nil) - -type fastReflection_QueryRegisterOptionsRequest QueryRegisterOptionsRequest - -func (x *QueryRegisterOptionsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryRegisterOptionsRequest)(x) -} - -func (x *QueryRegisterOptionsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_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_QueryRegisterOptionsRequest_messageType fastReflection_QueryRegisterOptionsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryRegisterOptionsRequest_messageType{} - -type fastReflection_QueryRegisterOptionsRequest_messageType struct{} - -func (x fastReflection_QueryRegisterOptionsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryRegisterOptionsRequest)(nil) -} -func (x fastReflection_QueryRegisterOptionsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryRegisterOptionsRequest) -} -func (x fastReflection_QueryRegisterOptionsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryRegisterOptionsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryRegisterOptionsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryRegisterOptionsRequest -} - -// 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_QueryRegisterOptionsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryRegisterOptionsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryRegisterOptionsRequest) New() protoreflect.Message { - return new(fastReflection_QueryRegisterOptionsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryRegisterOptionsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryRegisterOptionsRequest)(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_QueryRegisterOptionsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Origin != "" { - value := protoreflect.ValueOfString(x.Origin) - if !f(fd_QueryRegisterOptionsRequest_origin, value) { - return - } - } - if x.Handle != "" { - value := protoreflect.ValueOfString(x.Handle) - if !f(fd_QueryRegisterOptionsRequest_handle, 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_QueryRegisterOptionsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.QueryRegisterOptionsRequest.origin": - return x.Origin != "" - case "did.v1.QueryRegisterOptionsRequest.handle": - return x.Handle != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRegisterOptionsRequest")) - } - panic(fmt.Errorf("message did.v1.QueryRegisterOptionsRequest 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_QueryRegisterOptionsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.QueryRegisterOptionsRequest.origin": - x.Origin = "" - case "did.v1.QueryRegisterOptionsRequest.handle": - x.Handle = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRegisterOptionsRequest")) - } - panic(fmt.Errorf("message did.v1.QueryRegisterOptionsRequest 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_QueryRegisterOptionsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.QueryRegisterOptionsRequest.origin": - value := x.Origin - return protoreflect.ValueOfString(value) - case "did.v1.QueryRegisterOptionsRequest.handle": - value := x.Handle - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRegisterOptionsRequest")) - } - panic(fmt.Errorf("message did.v1.QueryRegisterOptionsRequest 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_QueryRegisterOptionsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.QueryRegisterOptionsRequest.origin": - x.Origin = value.Interface().(string) - case "did.v1.QueryRegisterOptionsRequest.handle": - x.Handle = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRegisterOptionsRequest")) - } - panic(fmt.Errorf("message did.v1.QueryRegisterOptionsRequest 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_QueryRegisterOptionsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryRegisterOptionsRequest.origin": - panic(fmt.Errorf("field origin of message did.v1.QueryRegisterOptionsRequest is not mutable")) - case "did.v1.QueryRegisterOptionsRequest.handle": - panic(fmt.Errorf("field handle of message did.v1.QueryRegisterOptionsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRegisterOptionsRequest")) - } - panic(fmt.Errorf("message did.v1.QueryRegisterOptionsRequest 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_QueryRegisterOptionsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryRegisterOptionsRequest.origin": - return protoreflect.ValueOfString("") - case "did.v1.QueryRegisterOptionsRequest.handle": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRegisterOptionsRequest")) - } - panic(fmt.Errorf("message did.v1.QueryRegisterOptionsRequest 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_QueryRegisterOptionsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryRegisterOptionsRequest", 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_QueryRegisterOptionsRequest) 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_QueryRegisterOptionsRequest) 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_QueryRegisterOptionsRequest) 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_QueryRegisterOptionsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryRegisterOptionsRequest) - 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.Origin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Handle) - 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().(*QueryRegisterOptionsRequest) - 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.Handle) > 0 { - i -= len(x.Handle) - copy(dAtA[i:], x.Handle) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Handle))) - i-- - dAtA[i] = 0x12 - } - if len(x.Origin) > 0 { - i -= len(x.Origin) - copy(dAtA[i:], x.Origin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Origin))) - 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().(*QueryRegisterOptionsRequest) - 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: QueryRegisterOptionsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRegisterOptionsRequest: 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 Origin", 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.Origin = 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 Handle", 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.Handle = 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_QueryRegisterOptionsResponse protoreflect.MessageDescriptor - fd_QueryRegisterOptionsResponse_options protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_query_proto_init() - md_QueryRegisterOptionsResponse = File_did_v1_query_proto.Messages().ByName("QueryRegisterOptionsResponse") - fd_QueryRegisterOptionsResponse_options = md_QueryRegisterOptionsResponse.Fields().ByName("options") -} - -var _ protoreflect.Message = (*fastReflection_QueryRegisterOptionsResponse)(nil) - -type fastReflection_QueryRegisterOptionsResponse QueryRegisterOptionsResponse - -func (x *QueryRegisterOptionsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryRegisterOptionsResponse)(x) -} - -func (x *QueryRegisterOptionsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_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_QueryRegisterOptionsResponse_messageType fastReflection_QueryRegisterOptionsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryRegisterOptionsResponse_messageType{} - -type fastReflection_QueryRegisterOptionsResponse_messageType struct{} - -func (x fastReflection_QueryRegisterOptionsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryRegisterOptionsResponse)(nil) -} -func (x fastReflection_QueryRegisterOptionsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryRegisterOptionsResponse) -} -func (x fastReflection_QueryRegisterOptionsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryRegisterOptionsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryRegisterOptionsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryRegisterOptionsResponse -} - -// 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_QueryRegisterOptionsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryRegisterOptionsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryRegisterOptionsResponse) New() protoreflect.Message { - return new(fastReflection_QueryRegisterOptionsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryRegisterOptionsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryRegisterOptionsResponse)(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_QueryRegisterOptionsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Options != "" { - value := protoreflect.ValueOfString(x.Options) - if !f(fd_QueryRegisterOptionsResponse_options, 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_QueryRegisterOptionsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.QueryRegisterOptionsResponse.options": - return x.Options != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRegisterOptionsResponse")) - } - panic(fmt.Errorf("message did.v1.QueryRegisterOptionsResponse 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_QueryRegisterOptionsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.QueryRegisterOptionsResponse.options": - x.Options = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRegisterOptionsResponse")) - } - panic(fmt.Errorf("message did.v1.QueryRegisterOptionsResponse 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_QueryRegisterOptionsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.QueryRegisterOptionsResponse.options": - value := x.Options - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRegisterOptionsResponse")) - } - panic(fmt.Errorf("message did.v1.QueryRegisterOptionsResponse 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_QueryRegisterOptionsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.QueryRegisterOptionsResponse.options": - x.Options = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRegisterOptionsResponse")) - } - panic(fmt.Errorf("message did.v1.QueryRegisterOptionsResponse 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_QueryRegisterOptionsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryRegisterOptionsResponse.options": - panic(fmt.Errorf("field options of message did.v1.QueryRegisterOptionsResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRegisterOptionsResponse")) - } - panic(fmt.Errorf("message did.v1.QueryRegisterOptionsResponse 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_QueryRegisterOptionsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryRegisterOptionsResponse.options": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRegisterOptionsResponse")) - } - panic(fmt.Errorf("message did.v1.QueryRegisterOptionsResponse 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_QueryRegisterOptionsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryRegisterOptionsResponse", 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_QueryRegisterOptionsResponse) 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_QueryRegisterOptionsResponse) 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_QueryRegisterOptionsResponse) 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_QueryRegisterOptionsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryRegisterOptionsResponse) - 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.Options) - 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().(*QueryRegisterOptionsResponse) - 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.Options) > 0 { - i -= len(x.Options) - copy(dAtA[i:], x.Options) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Options))) - 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().(*QueryRegisterOptionsResponse) - 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: QueryRegisterOptionsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRegisterOptionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryWitnessCredentialResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4577,17 +3609,16 @@ func (x *QueryResolveResponse) GetDocument() string { } // QueryLoginOptionsRequest is the request type for the Query/LoginOptions RPC method. -type QueryLoginOptionsRequest struct { +type QueryWitnessCredentialRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Origin string `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"` - Handle string `protobuf:"bytes,2,opt,name=handle,proto3" json:"handle,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } -func (x *QueryLoginOptionsRequest) Reset() { - *x = QueryLoginOptionsRequest{} +func (x *QueryWitnessCredentialRequest) Reset() { + *x = QueryWitnessCredentialRequest{} if protoimpl.UnsafeEnabled { mi := &file_did_v1_query_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4595,33 +3626,26 @@ func (x *QueryLoginOptionsRequest) Reset() { } } -func (x *QueryLoginOptionsRequest) String() string { +func (x *QueryWitnessCredentialRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryLoginOptionsRequest) ProtoMessage() {} +func (*QueryWitnessCredentialRequest) ProtoMessage() {} -// Deprecated: Use QueryLoginOptionsRequest.ProtoReflect.Descriptor instead. -func (*QueryLoginOptionsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use QueryWitnessCredentialRequest.ProtoReflect.Descriptor instead. +func (*QueryWitnessCredentialRequest) Descriptor() ([]byte, []int) { return file_did_v1_query_proto_rawDescGZIP(), []int{6} } -func (x *QueryLoginOptionsRequest) GetOrigin() string { +func (x *QueryWitnessCredentialRequest) GetId() string { if x != nil { - return x.Origin - } - return "" -} - -func (x *QueryLoginOptionsRequest) GetHandle() string { - if x != nil { - return x.Handle + return x.Id } return "" } // QueryLoginOptionsResponse is the response type for the Query/LoginOptions RPC method. -type QueryLoginOptionsResponse struct { +type QueryWitnessCredentialResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -4630,8 +3654,8 @@ type QueryLoginOptionsResponse struct { Options string `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"` } -func (x *QueryLoginOptionsResponse) Reset() { - *x = QueryLoginOptionsResponse{} +func (x *QueryWitnessCredentialResponse) Reset() { + *x = QueryWitnessCredentialResponse{} if protoimpl.UnsafeEnabled { mi := &file_did_v1_query_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4639,98 +3663,18 @@ func (x *QueryLoginOptionsResponse) Reset() { } } -func (x *QueryLoginOptionsResponse) String() string { +func (x *QueryWitnessCredentialResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryLoginOptionsResponse) ProtoMessage() {} +func (*QueryWitnessCredentialResponse) ProtoMessage() {} -// Deprecated: Use QueryLoginOptionsResponse.ProtoReflect.Descriptor instead. -func (*QueryLoginOptionsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use QueryWitnessCredentialResponse.ProtoReflect.Descriptor instead. +func (*QueryWitnessCredentialResponse) Descriptor() ([]byte, []int) { return file_did_v1_query_proto_rawDescGZIP(), []int{7} } -func (x *QueryLoginOptionsResponse) GetOptions() string { - if x != nil { - return x.Options - } - return "" -} - -// QueryRegisterOptionsRequest is the request type for the Query/RegisterOptions RPC method. -type QueryRegisterOptionsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Origin string `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"` - Handle string `protobuf:"bytes,2,opt,name=handle,proto3" json:"handle,omitempty"` -} - -func (x *QueryRegisterOptionsRequest) Reset() { - *x = QueryRegisterOptionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryRegisterOptionsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryRegisterOptionsRequest) ProtoMessage() {} - -// Deprecated: Use QueryRegisterOptionsRequest.ProtoReflect.Descriptor instead. -func (*QueryRegisterOptionsRequest) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{8} -} - -func (x *QueryRegisterOptionsRequest) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -func (x *QueryRegisterOptionsRequest) GetHandle() string { - if x != nil { - return x.Handle - } - return "" -} - -// QueryRegisterOptionsResponse is the response type for the Query/RegisterOptions RPC method. -type QueryRegisterOptionsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Options string `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"` -} - -func (x *QueryRegisterOptionsResponse) Reset() { - *x = QueryRegisterOptionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryRegisterOptionsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryRegisterOptionsResponse) ProtoMessage() {} - -// Deprecated: Use QueryRegisterOptionsResponse.ProtoReflect.Descriptor instead. -func (*QueryRegisterOptionsResponse) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{9} -} - -func (x *QueryRegisterOptionsResponse) GetOptions() string { +func (x *QueryWitnessCredentialResponse) GetOptions() string { if x != nil { return x.Options } @@ -4763,68 +3707,43 @@ var file_did_v1_query_proto_rawDesc = []byte{ 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x22, - 0x4a, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, - 0x67, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x35, 0x0a, 0x19, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x22, 0x4d, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x61, 0x6e, - 0x64, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, - 0x65, 0x22, 0x38, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0xcd, 0x04, 0x0a, 0x05, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x56, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 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, 0x6d, 0x0a, - 0x0e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, - 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, - 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x64, 0x69, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, - 0x12, 0x1a, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x2f, 0x7b, 0x6b, - 0x69, 0x6e, 0x64, 0x7d, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x12, 0x69, 0x0a, 0x11, - 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, - 0x72, 0x12, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 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, 0x19, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x6c, - 0x76, 0x65, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x81, 0x01, 0x0a, 0x0c, 0x4c, 0x6f, 0x67, 0x69, - 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x6c, 0x6f, 0x67, 0x69, - 0x6e, 0x2f, 0x7b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x68, 0x61, 0x6e, 0x64, - 0x6c, 0x65, 0x7d, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x8d, 0x01, 0x0a, 0x0f, - 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x23, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x29, 0x12, 0x27, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x2f, 0x7b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x68, 0x61, 0x6e, 0x64, - 0x6c, 0x65, 0x7d, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0x68, 0x77, 0x61, 0x79, 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, + 0x2f, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x43, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x22, 0x3a, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, + 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0xd4, 0x02, 0x0a, + 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x56, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 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, 0x69, + 0x0a, 0x11, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x12, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 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, 0x19, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x72, 0x65, 0x73, + 0x6f, 0x6c, 0x76, 0x65, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x87, 0x01, 0x0a, 0x11, 0x57, 0x69, + 0x74, 0x6e, 0x65, 0x73, 0x73, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, + 0x25, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, 0x69, + 0x74, 0x6e, 0x65, 0x73, 0x73, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x43, 0x72, 0x65, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x61, 0x73, 0x73, + 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x77, 0x69, 0x74, 0x6e, + 0x65, 0x73, 0x73, 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, 0x68, 0x77, 0x61, 0x79, 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 ( @@ -4839,37 +3758,31 @@ func file_did_v1_query_proto_rawDescGZIP() []byte { return file_did_v1_query_proto_rawDescData } -var file_did_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_did_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_did_v1_query_proto_goTypes = []interface{}{ - (*QueryParamsRequest)(nil), // 0: did.v1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 1: did.v1.QueryParamsResponse - (*QueryExistsRequest)(nil), // 2: did.v1.QueryExistsRequest - (*QueryExistsResponse)(nil), // 3: did.v1.QueryExistsResponse - (*QueryResolveRequest)(nil), // 4: did.v1.QueryResolveRequest - (*QueryResolveResponse)(nil), // 5: did.v1.QueryResolveResponse - (*QueryLoginOptionsRequest)(nil), // 6: did.v1.QueryLoginOptionsRequest - (*QueryLoginOptionsResponse)(nil), // 7: did.v1.QueryLoginOptionsResponse - (*QueryRegisterOptionsRequest)(nil), // 8: did.v1.QueryRegisterOptionsRequest - (*QueryRegisterOptionsResponse)(nil), // 9: did.v1.QueryRegisterOptionsResponse - (*Params)(nil), // 10: did.v1.Params + (*QueryParamsRequest)(nil), // 0: did.v1.QueryParamsRequest + (*QueryParamsResponse)(nil), // 1: did.v1.QueryParamsResponse + (*QueryExistsRequest)(nil), // 2: did.v1.QueryExistsRequest + (*QueryExistsResponse)(nil), // 3: did.v1.QueryExistsResponse + (*QueryResolveRequest)(nil), // 4: did.v1.QueryResolveRequest + (*QueryResolveResponse)(nil), // 5: did.v1.QueryResolveResponse + (*QueryWitnessCredentialRequest)(nil), // 6: did.v1.QueryWitnessCredentialRequest + (*QueryWitnessCredentialResponse)(nil), // 7: did.v1.QueryWitnessCredentialResponse + (*Params)(nil), // 8: did.v1.Params } var file_did_v1_query_proto_depIdxs = []int32{ - 10, // 0: did.v1.QueryParamsResponse.params:type_name -> did.v1.Params - 0, // 1: did.v1.Query.Params:input_type -> did.v1.QueryParamsRequest - 2, // 2: did.v1.Query.PropertyExists:input_type -> did.v1.QueryExistsRequest - 4, // 3: did.v1.Query.ResolveIdentifier:input_type -> did.v1.QueryResolveRequest - 6, // 4: did.v1.Query.LoginOptions:input_type -> did.v1.QueryLoginOptionsRequest - 8, // 5: did.v1.Query.RegisterOptions:input_type -> did.v1.QueryRegisterOptionsRequest - 1, // 6: did.v1.Query.Params:output_type -> did.v1.QueryParamsResponse - 3, // 7: did.v1.Query.PropertyExists:output_type -> did.v1.QueryExistsResponse - 5, // 8: did.v1.Query.ResolveIdentifier:output_type -> did.v1.QueryResolveResponse - 7, // 9: did.v1.Query.LoginOptions:output_type -> did.v1.QueryLoginOptionsResponse - 9, // 10: did.v1.Query.RegisterOptions:output_type -> did.v1.QueryRegisterOptionsResponse - 6, // [6:11] is the sub-list for method output_type - 1, // [1:6] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 8, // 0: did.v1.QueryParamsResponse.params:type_name -> did.v1.Params + 0, // 1: did.v1.Query.Params:input_type -> did.v1.QueryParamsRequest + 4, // 2: did.v1.Query.ResolveIdentifier:input_type -> did.v1.QueryResolveRequest + 6, // 3: did.v1.Query.WitnessCredential:input_type -> did.v1.QueryWitnessCredentialRequest + 1, // 4: did.v1.Query.Params:output_type -> did.v1.QueryParamsResponse + 5, // 5: did.v1.Query.ResolveIdentifier:output_type -> did.v1.QueryResolveResponse + 7, // 6: did.v1.Query.WitnessCredential:output_type -> did.v1.QueryWitnessCredentialResponse + 4, // [4:7] is the sub-list for method output_type + 1, // [1:4] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_did_v1_query_proto_init() } @@ -4952,7 +3865,7 @@ func file_did_v1_query_proto_init() { } } file_did_v1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryLoginOptionsRequest); i { + switch v := v.(*QueryWitnessCredentialRequest); i { case 0: return &v.state case 1: @@ -4964,31 +3877,7 @@ func file_did_v1_query_proto_init() { } } file_did_v1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryLoginOptionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryRegisterOptionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryRegisterOptionsResponse); i { + switch v := v.(*QueryWitnessCredentialResponse); i { case 0: return &v.state case 1: @@ -5006,7 +3895,7 @@ func file_did_v1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 10, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, diff --git a/api/did/v1/query_grpc.pb.go b/api/did/v1/query_grpc.pb.go index 945137d2e..0428e9076 100644 --- a/api/did/v1/query_grpc.pb.go +++ b/api/did/v1/query_grpc.pb.go @@ -20,10 +20,8 @@ const _ = grpc.SupportPackageIsVersion7 const ( Query_Params_FullMethodName = "/did.v1.Query/Params" - Query_PropertyExists_FullMethodName = "/did.v1.Query/PropertyExists" Query_ResolveIdentifier_FullMethodName = "/did.v1.Query/ResolveIdentifier" - Query_LoginOptions_FullMethodName = "/did.v1.Query/LoginOptions" - Query_RegisterOptions_FullMethodName = "/did.v1.Query/RegisterOptions" + Query_WitnessCredential_FullMethodName = "/did.v1.Query/WitnessCredential" ) // QueryClient is the client API for Query service. @@ -32,14 +30,10 @@ const ( type QueryClient interface { // Params queries all parameters of the module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // Exists queries if an id exists. - PropertyExists(ctx context.Context, in *QueryExistsRequest, opts ...grpc.CallOption) (*QueryExistsResponse, error) // Resolve queries the DID document by its id. ResolveIdentifier(ctx context.Context, in *QueryResolveRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) // LoginOptions queries the PublicKeyCredentialAttestationOptions for starting a login flow. - LoginOptions(ctx context.Context, in *QueryLoginOptionsRequest, opts ...grpc.CallOption) (*QueryLoginOptionsResponse, error) - // RegisterOptions queries the PublicKeyCredentialCreationOptions for starting a register flow. - RegisterOptions(ctx context.Context, in *QueryRegisterOptionsRequest, opts ...grpc.CallOption) (*QueryRegisterOptionsResponse, error) + WitnessCredential(ctx context.Context, in *QueryWitnessCredentialRequest, opts ...grpc.CallOption) (*QueryWitnessCredentialResponse, error) } type queryClient struct { @@ -59,15 +53,6 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } -func (c *queryClient) PropertyExists(ctx context.Context, in *QueryExistsRequest, opts ...grpc.CallOption) (*QueryExistsResponse, error) { - out := new(QueryExistsResponse) - err := c.cc.Invoke(ctx, Query_PropertyExists_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *queryClient) ResolveIdentifier(ctx context.Context, in *QueryResolveRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) { out := new(QueryResolveResponse) err := c.cc.Invoke(ctx, Query_ResolveIdentifier_FullMethodName, in, out, opts...) @@ -77,18 +62,9 @@ func (c *queryClient) ResolveIdentifier(ctx context.Context, in *QueryResolveReq return out, nil } -func (c *queryClient) LoginOptions(ctx context.Context, in *QueryLoginOptionsRequest, opts ...grpc.CallOption) (*QueryLoginOptionsResponse, error) { - out := new(QueryLoginOptionsResponse) - err := c.cc.Invoke(ctx, Query_LoginOptions_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) RegisterOptions(ctx context.Context, in *QueryRegisterOptionsRequest, opts ...grpc.CallOption) (*QueryRegisterOptionsResponse, error) { - out := new(QueryRegisterOptionsResponse) - err := c.cc.Invoke(ctx, Query_RegisterOptions_FullMethodName, in, out, opts...) +func (c *queryClient) WitnessCredential(ctx context.Context, in *QueryWitnessCredentialRequest, opts ...grpc.CallOption) (*QueryWitnessCredentialResponse, error) { + out := new(QueryWitnessCredentialResponse) + err := c.cc.Invoke(ctx, Query_WitnessCredential_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -101,14 +77,10 @@ func (c *queryClient) RegisterOptions(ctx context.Context, in *QueryRegisterOpti type QueryServer interface { // Params queries all parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // Exists queries if an id exists. - PropertyExists(context.Context, *QueryExistsRequest) (*QueryExistsResponse, error) // Resolve queries the DID document by its id. ResolveIdentifier(context.Context, *QueryResolveRequest) (*QueryResolveResponse, error) // LoginOptions queries the PublicKeyCredentialAttestationOptions for starting a login flow. - LoginOptions(context.Context, *QueryLoginOptionsRequest) (*QueryLoginOptionsResponse, error) - // RegisterOptions queries the PublicKeyCredentialCreationOptions for starting a register flow. - RegisterOptions(context.Context, *QueryRegisterOptionsRequest) (*QueryRegisterOptionsResponse, error) + WitnessCredential(context.Context, *QueryWitnessCredentialRequest) (*QueryWitnessCredentialResponse, error) mustEmbedUnimplementedQueryServer() } @@ -119,17 +91,11 @@ type UnimplementedQueryServer struct { func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } -func (UnimplementedQueryServer) PropertyExists(context.Context, *QueryExistsRequest) (*QueryExistsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PropertyExists not implemented") -} func (UnimplementedQueryServer) ResolveIdentifier(context.Context, *QueryResolveRequest) (*QueryResolveResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ResolveIdentifier not implemented") } -func (UnimplementedQueryServer) LoginOptions(context.Context, *QueryLoginOptionsRequest) (*QueryLoginOptionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LoginOptions not implemented") -} -func (UnimplementedQueryServer) RegisterOptions(context.Context, *QueryRegisterOptionsRequest) (*QueryRegisterOptionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RegisterOptions not implemented") +func (UnimplementedQueryServer) WitnessCredential(context.Context, *QueryWitnessCredentialRequest) (*QueryWitnessCredentialResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WitnessCredential not implemented") } func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} @@ -162,24 +128,6 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } -func _Query_PropertyExists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryExistsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).PropertyExists(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_PropertyExists_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).PropertyExists(ctx, req.(*QueryExistsRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Query_ResolveIdentifier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryResolveRequest) if err := dec(in); err != nil { @@ -198,38 +146,20 @@ func _Query_ResolveIdentifier_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _Query_LoginOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryLoginOptionsRequest) +func _Query_WitnessCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryWitnessCredentialRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).LoginOptions(ctx, in) + return srv.(QueryServer).WitnessCredential(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Query_LoginOptions_FullMethodName, + FullMethod: Query_WitnessCredential_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).LoginOptions(ctx, req.(*QueryLoginOptionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_RegisterOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryRegisterOptionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).RegisterOptions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_RegisterOptions_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).RegisterOptions(ctx, req.(*QueryRegisterOptionsRequest)) + return srv.(QueryServer).WitnessCredential(ctx, req.(*QueryWitnessCredentialRequest)) } return interceptor(ctx, in, info, handler) } @@ -245,21 +175,13 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "Params", Handler: _Query_Params_Handler, }, - { - MethodName: "PropertyExists", - Handler: _Query_PropertyExists_Handler, - }, { MethodName: "ResolveIdentifier", Handler: _Query_ResolveIdentifier_Handler, }, { - MethodName: "LoginOptions", - Handler: _Query_LoginOptions_Handler, - }, - { - MethodName: "RegisterOptions", - Handler: _Query_RegisterOptions_Handler, + MethodName: "WitnessCredential", + Handler: _Query_WitnessCredential_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/api/did/v1/state.cosmos_orm.go b/api/did/v1/state.cosmos_orm.go index d21f63157..36a851976 100644 --- a/api/did/v1/state.cosmos_orm.go +++ b/api/did/v1/state.cosmos_orm.go @@ -9,6 +9,120 @@ import ( ormerrors "cosmossdk.io/orm/types/ormerrors" ) +type AliasesTable interface { + Insert(ctx context.Context, aliases *Aliases) error + Update(ctx context.Context, aliases *Aliases) error + Save(ctx context.Context, aliases *Aliases) error + Delete(ctx context.Context, aliases *Aliases) error + Has(ctx context.Context, id string) (found bool, err error) + // Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + Get(ctx context.Context, id string) (*Aliases, error) + List(ctx context.Context, prefixKey AliasesIndexKey, opts ...ormlist.Option) (AliasesIterator, error) + ListRange(ctx context.Context, from, to AliasesIndexKey, opts ...ormlist.Option) (AliasesIterator, error) + DeleteBy(ctx context.Context, prefixKey AliasesIndexKey) error + DeleteRange(ctx context.Context, from, to AliasesIndexKey) error + + doNotImplement() +} + +type AliasesIterator struct { + ormtable.Iterator +} + +func (i AliasesIterator) Value() (*Aliases, error) { + var aliases Aliases + err := i.UnmarshalMessage(&aliases) + return &aliases, err +} + +type AliasesIndexKey interface { + id() uint32 + values() []interface{} + aliasesIndexKey() +} + +// primary key starting index.. +type AliasesPrimaryKey = AliasesIdIndexKey + +type AliasesIdIndexKey struct { + vs []interface{} +} + +func (x AliasesIdIndexKey) id() uint32 { return 0 } +func (x AliasesIdIndexKey) values() []interface{} { return x.vs } +func (x AliasesIdIndexKey) aliasesIndexKey() {} + +func (this AliasesIdIndexKey) WithId(id string) AliasesIdIndexKey { + this.vs = []interface{}{id} + return this +} + +type aliasesTable struct { + table ormtable.Table +} + +func (this aliasesTable) Insert(ctx context.Context, aliases *Aliases) error { + return this.table.Insert(ctx, aliases) +} + +func (this aliasesTable) Update(ctx context.Context, aliases *Aliases) error { + return this.table.Update(ctx, aliases) +} + +func (this aliasesTable) Save(ctx context.Context, aliases *Aliases) error { + return this.table.Save(ctx, aliases) +} + +func (this aliasesTable) Delete(ctx context.Context, aliases *Aliases) error { + return this.table.Delete(ctx, aliases) +} + +func (this aliasesTable) Has(ctx context.Context, id string) (found bool, err error) { + return this.table.PrimaryKey().Has(ctx, id) +} + +func (this aliasesTable) Get(ctx context.Context, id string) (*Aliases, error) { + var aliases Aliases + found, err := this.table.PrimaryKey().Get(ctx, &aliases, id) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &aliases, nil +} + +func (this aliasesTable) List(ctx context.Context, prefixKey AliasesIndexKey, opts ...ormlist.Option) (AliasesIterator, error) { + it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) + return AliasesIterator{it}, err +} + +func (this aliasesTable) ListRange(ctx context.Context, from, to AliasesIndexKey, opts ...ormlist.Option) (AliasesIterator, error) { + it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) + return AliasesIterator{it}, err +} + +func (this aliasesTable) DeleteBy(ctx context.Context, prefixKey AliasesIndexKey) error { + return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) +} + +func (this aliasesTable) DeleteRange(ctx context.Context, from, to AliasesIndexKey) error { + return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) +} + +func (this aliasesTable) doNotImplement() {} + +var _ AliasesTable = aliasesTable{} + +func NewAliasesTable(db ormtable.Schema) (AliasesTable, error) { + table := db.GetTable(&Aliases{}) + if table == nil { + return nil, ormerrors.TableNotFound.Wrap(string((&Aliases{}).ProtoReflect().Descriptor().FullName())) + } + return aliasesTable{table}, nil +} + type AssertionTable interface { Insert(ctx context.Context, assertion *Assertion) error Update(ctx context.Context, assertion *Assertion) error @@ -580,6 +694,7 @@ func NewServiceTable(db ormtable.Schema) (ServiceTable, error) { } type StateStore interface { + AliasesTable() AliasesTable AssertionTable() AssertionTable AttestationTable() AttestationTable ControllerTable() ControllerTable @@ -590,6 +705,7 @@ type StateStore interface { } type stateStore struct { + aliases AliasesTable assertion AssertionTable attestation AttestationTable controller ControllerTable @@ -597,6 +713,10 @@ type stateStore struct { service ServiceTable } +func (x stateStore) AliasesTable() AliasesTable { + return x.aliases +} + func (x stateStore) AssertionTable() AssertionTable { return x.assertion } @@ -622,6 +742,11 @@ func (stateStore) doNotImplement() {} var _ StateStore = stateStore{} func NewStateStore(db ormtable.Schema) (StateStore, error) { + aliasesTable, err := NewAliasesTable(db) + if err != nil { + return nil, err + } + assertionTable, err := NewAssertionTable(db) if err != nil { return nil, err @@ -648,6 +773,7 @@ func NewStateStore(db ormtable.Schema) (StateStore, error) { } return stateStore{ + aliasesTable, assertionTable, attestationTable, controllerTable, diff --git a/api/did/v1/state.pulsar.go b/api/did/v1/state.pulsar.go index 085bff4fc..8ca876f9b 100644 --- a/api/did/v1/state.pulsar.go +++ b/api/did/v1/state.pulsar.go @@ -14,6 +14,666 @@ import ( sync "sync" ) +var ( + md_Aliases protoreflect.MessageDescriptor + fd_Aliases_id protoreflect.FieldDescriptor + fd_Aliases_origin protoreflect.FieldDescriptor + fd_Aliases_handle protoreflect.FieldDescriptor + fd_Aliases_controller protoreflect.FieldDescriptor + fd_Aliases_expiration protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_state_proto_init() + md_Aliases = File_did_v1_state_proto.Messages().ByName("Aliases") + fd_Aliases_id = md_Aliases.Fields().ByName("id") + fd_Aliases_origin = md_Aliases.Fields().ByName("origin") + fd_Aliases_handle = md_Aliases.Fields().ByName("handle") + fd_Aliases_controller = md_Aliases.Fields().ByName("controller") + fd_Aliases_expiration = md_Aliases.Fields().ByName("expiration") +} + +var _ protoreflect.Message = (*fastReflection_Aliases)(nil) + +type fastReflection_Aliases Aliases + +func (x *Aliases) ProtoReflect() protoreflect.Message { + return (*fastReflection_Aliases)(x) +} + +func (x *Aliases) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_state_proto_msgTypes[0] + 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_Aliases_messageType fastReflection_Aliases_messageType +var _ protoreflect.MessageType = fastReflection_Aliases_messageType{} + +type fastReflection_Aliases_messageType struct{} + +func (x fastReflection_Aliases_messageType) Zero() protoreflect.Message { + return (*fastReflection_Aliases)(nil) +} +func (x fastReflection_Aliases_messageType) New() protoreflect.Message { + return new(fastReflection_Aliases) +} +func (x fastReflection_Aliases_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Aliases +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Aliases) Descriptor() protoreflect.MessageDescriptor { + return md_Aliases +} + +// 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_Aliases) Type() protoreflect.MessageType { + return _fastReflection_Aliases_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Aliases) New() protoreflect.Message { + return new(fastReflection_Aliases) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Aliases) Interface() protoreflect.ProtoMessage { + return (*Aliases)(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_Aliases) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != "" { + value := protoreflect.ValueOfString(x.Id) + if !f(fd_Aliases_id, value) { + return + } + } + if x.Origin != "" { + value := protoreflect.ValueOfString(x.Origin) + if !f(fd_Aliases_origin, value) { + return + } + } + if x.Handle != "" { + value := protoreflect.ValueOfString(x.Handle) + if !f(fd_Aliases_handle, value) { + return + } + } + if x.Controller != "" { + value := protoreflect.ValueOfString(x.Controller) + if !f(fd_Aliases_controller, value) { + return + } + } + if x.Expiration != uint64(0) { + value := protoreflect.ValueOfUint64(x.Expiration) + if !f(fd_Aliases_expiration, 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_Aliases) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.Aliases.id": + return x.Id != "" + case "did.v1.Aliases.origin": + return x.Origin != "" + case "did.v1.Aliases.handle": + return x.Handle != "" + case "did.v1.Aliases.controller": + return x.Controller != "" + case "did.v1.Aliases.expiration": + return x.Expiration != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Aliases")) + } + panic(fmt.Errorf("message did.v1.Aliases 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_Aliases) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.Aliases.id": + x.Id = "" + case "did.v1.Aliases.origin": + x.Origin = "" + case "did.v1.Aliases.handle": + x.Handle = "" + case "did.v1.Aliases.controller": + x.Controller = "" + case "did.v1.Aliases.expiration": + x.Expiration = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Aliases")) + } + panic(fmt.Errorf("message did.v1.Aliases 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_Aliases) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.Aliases.id": + value := x.Id + return protoreflect.ValueOfString(value) + case "did.v1.Aliases.origin": + value := x.Origin + return protoreflect.ValueOfString(value) + case "did.v1.Aliases.handle": + value := x.Handle + return protoreflect.ValueOfString(value) + case "did.v1.Aliases.controller": + value := x.Controller + return protoreflect.ValueOfString(value) + case "did.v1.Aliases.expiration": + value := x.Expiration + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Aliases")) + } + panic(fmt.Errorf("message did.v1.Aliases 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_Aliases) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.Aliases.id": + x.Id = value.Interface().(string) + case "did.v1.Aliases.origin": + x.Origin = value.Interface().(string) + case "did.v1.Aliases.handle": + x.Handle = value.Interface().(string) + case "did.v1.Aliases.controller": + x.Controller = value.Interface().(string) + case "did.v1.Aliases.expiration": + x.Expiration = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Aliases")) + } + panic(fmt.Errorf("message did.v1.Aliases 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_Aliases) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.Aliases.id": + panic(fmt.Errorf("field id of message did.v1.Aliases is not mutable")) + case "did.v1.Aliases.origin": + panic(fmt.Errorf("field origin of message did.v1.Aliases is not mutable")) + case "did.v1.Aliases.handle": + panic(fmt.Errorf("field handle of message did.v1.Aliases is not mutable")) + case "did.v1.Aliases.controller": + panic(fmt.Errorf("field controller of message did.v1.Aliases is not mutable")) + case "did.v1.Aliases.expiration": + panic(fmt.Errorf("field expiration of message did.v1.Aliases is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Aliases")) + } + panic(fmt.Errorf("message did.v1.Aliases 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_Aliases) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.Aliases.id": + return protoreflect.ValueOfString("") + case "did.v1.Aliases.origin": + return protoreflect.ValueOfString("") + case "did.v1.Aliases.handle": + return protoreflect.ValueOfString("") + case "did.v1.Aliases.controller": + return protoreflect.ValueOfString("") + case "did.v1.Aliases.expiration": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Aliases")) + } + panic(fmt.Errorf("message did.v1.Aliases 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_Aliases) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.Aliases", 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_Aliases) 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_Aliases) 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_Aliases) 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_Aliases) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Aliases) + 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.Id) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Origin) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Handle) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Controller) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Expiration != 0 { + n += 1 + runtime.Sov(uint64(x.Expiration)) + } + 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().(*Aliases) + 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 x.Expiration != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Expiration)) + i-- + dAtA[i] = 0x28 + } + if len(x.Controller) > 0 { + i -= len(x.Controller) + copy(dAtA[i:], x.Controller) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) + i-- + dAtA[i] = 0x22 + } + if len(x.Handle) > 0 { + i -= len(x.Handle) + copy(dAtA[i:], x.Handle) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Handle))) + i-- + dAtA[i] = 0x1a + } + if len(x.Origin) > 0 { + i -= len(x.Origin) + copy(dAtA[i:], x.Origin) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Origin))) + i-- + dAtA[i] = 0x12 + } + if len(x.Id) > 0 { + i -= len(x.Id) + copy(dAtA[i:], x.Id) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + 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().(*Aliases) + 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: Aliases: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Aliases: 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 Id", 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.Id = 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 Origin", 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.Origin = 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 Handle", 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.Handle = 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 Controller", 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.Controller = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) + } + x.Expiration = 0 + 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++ + x.Expiration |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 _ protoreflect.Map = (*_Assertion_4_map)(nil) type _Assertion_4_map struct { @@ -124,7 +784,7 @@ func (x *Assertion) ProtoReflect() protoreflect.Message { } func (x *Assertion) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_state_proto_msgTypes[0] + mi := &file_did_v1_state_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -960,7 +1620,7 @@ func (x *Attestation) ProtoReflect() protoreflect.Message { } func (x *Attestation) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_state_proto_msgTypes[1] + mi := &file_did_v1_state_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1636,7 +2296,7 @@ func (x *Controller) ProtoReflect() protoreflect.Message { } func (x *Controller) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_state_proto_msgTypes[2] + mi := &file_did_v1_state_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2402,7 +3062,7 @@ func (x *Delegation) ProtoReflect() protoreflect.Message { } func (x *Delegation) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_state_proto_msgTypes[3] + mi := &file_did_v1_state_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3404,7 +4064,7 @@ func (x *Service) ProtoReflect() protoreflect.Message { } func (x *Service) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_state_proto_msgTypes[4] + mi := &file_did_v1_state_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4003,6 +4663,79 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// Aliases represents the `alsoKnownAs` property associated with a DID Controller +type Aliases struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unique identifier of the alias + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Origin is the Alias provider + Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` + // Handle is the user defined alias + Handle string `protobuf:"bytes,3,opt,name=handle,proto3" json:"handle,omitempty"` + // Controller of the alias + Controller string `protobuf:"bytes,4,opt,name=controller,proto3" json:"controller,omitempty"` + // Expiration of the alias + Expiration uint64 `protobuf:"varint,5,opt,name=expiration,proto3" json:"expiration,omitempty"` +} + +func (x *Aliases) Reset() { + *x = Aliases{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_state_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Aliases) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Aliases) ProtoMessage() {} + +// Deprecated: Use Aliases.ProtoReflect.Descriptor instead. +func (*Aliases) Descriptor() ([]byte, []int) { + return file_did_v1_state_proto_rawDescGZIP(), []int{0} +} + +func (x *Aliases) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Aliases) GetOrigin() string { + if x != nil { + return x.Origin + } + return "" +} + +func (x *Aliases) GetHandle() string { + if x != nil { + return x.Handle + } + return "" +} + +func (x *Aliases) GetController() string { + if x != nil { + return x.Controller + } + return "" +} + +func (x *Aliases) GetExpiration() uint64 { + if x != nil { + return x.Expiration + } + return 0 +} + // Assertion represents strongly created credentials (e.g., Passkeys, SSH, GPG, Native Secure Enclaave) type Assertion struct { state protoimpl.MessageState @@ -4024,7 +4757,7 @@ type Assertion struct { func (x *Assertion) Reset() { *x = Assertion{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_state_proto_msgTypes[0] + mi := &file_did_v1_state_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4038,7 +4771,7 @@ func (*Assertion) ProtoMessage() {} // Deprecated: Use Assertion.ProtoReflect.Descriptor instead. func (*Assertion) Descriptor() ([]byte, []int) { - return file_did_v1_state_proto_rawDescGZIP(), []int{0} + return file_did_v1_state_proto_rawDescGZIP(), []int{1} } func (x *Assertion) GetId() string { @@ -4097,7 +4830,7 @@ type Attestation struct { func (x *Attestation) Reset() { *x = Attestation{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_state_proto_msgTypes[1] + mi := &file_did_v1_state_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4111,7 +4844,7 @@ func (*Attestation) ProtoMessage() {} // Deprecated: Use Attestation.ProtoReflect.Descriptor instead. func (*Attestation) Descriptor() ([]byte, []int) { - return file_did_v1_state_proto_rawDescGZIP(), []int{1} + return file_did_v1_state_proto_rawDescGZIP(), []int{2} } func (x *Attestation) GetId() string { @@ -4170,7 +4903,7 @@ type Controller struct { func (x *Controller) Reset() { *x = Controller{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_state_proto_msgTypes[2] + mi := &file_did_v1_state_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4184,7 +4917,7 @@ func (*Controller) ProtoMessage() {} // Deprecated: Use Controller.ProtoReflect.Descriptor instead. func (*Controller) Descriptor() ([]byte, []int) { - return file_did_v1_state_proto_rawDescGZIP(), []int{2} + return file_did_v1_state_proto_rawDescGZIP(), []int{3} } func (x *Controller) GetId() string { @@ -4249,7 +4982,7 @@ type Delegation struct { func (x *Delegation) Reset() { *x = Delegation{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_state_proto_msgTypes[3] + mi := &file_did_v1_state_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4263,7 +4996,7 @@ func (*Delegation) ProtoMessage() {} // Deprecated: Use Delegation.ProtoReflect.Descriptor instead. func (*Delegation) Descriptor() ([]byte, []int) { - return file_did_v1_state_proto_rawDescGZIP(), []int{3} + return file_did_v1_state_proto_rawDescGZIP(), []int{4} } func (x *Delegation) GetId() string { @@ -4341,7 +5074,7 @@ type Service struct { func (x *Service) Reset() { *x = Service{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_state_proto_msgTypes[4] + mi := &file_did_v1_state_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4355,7 +5088,7 @@ func (*Service) ProtoMessage() {} // Deprecated: Use Service.ProtoReflect.Descriptor instead. func (*Service) Descriptor() ([]byte, []int) { - return file_did_v1_state_proto_rawDescGZIP(), []int{4} + return file_did_v1_state_proto_rawDescGZIP(), []int{5} } func (x *Service) GetId() string { @@ -4393,87 +5126,97 @@ var file_did_v1_state_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, - 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x80, 0x02, 0x0a, 0x09, - 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x12, 0x3b, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, + 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x99, 0x01, 0x0a, 0x07, + 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, + 0x16, 0x0a, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x65, 0x78, 0x70, + 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, + 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x22, 0x80, 0x02, 0x0a, 0x09, 0x41, 0x73, 0x73, 0x65, + 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, + 0x12, 0x3b, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, + 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, + 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x1a, 0x3b, 0x0a, + 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, + 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x22, 0x94, 0x01, 0x0a, 0x0b, 0x41, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, + 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, + 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, + 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, + 0x66, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x0e, - 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x22, 0x94, - 0x01, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, - 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x02, 0x22, 0xaf, 0x01, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4d, - 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x61, 0x75, 0x6c, - 0x74, 0x5f, 0x63, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x61, 0x75, - 0x6c, 0x74, 0x43, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, - 0x72, 0x69, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x67, - 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, - 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x22, 0x8b, 0x03, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x0e, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x44, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, - 0x79, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x12, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4d, 0x75, 0x6c, 0x74, - 0x69, 0x62, 0x61, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, - 0x6b, 0x65, 0x79, 0x5f, 0x6a, 0x77, 0x6b, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, - 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, - 0x4a, 0x77, 0x6b, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, - 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, - 0x6c, 0x49, 0x64, 0x1a, 0x40, 0x0a, 0x12, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, - 0x4a, 0x77, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x04, 0x22, 0x9e, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, - 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, - 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x64, 0x69, - 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x44, 0x69, 0x64, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x05, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, - 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 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, 0x68, 0x77, 0x61, 0x79, 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, + 0x72, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x03, 0x22, 0xaf, 0x01, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, + 0x69, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, + 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x12, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4d, 0x75, 0x6c, 0x74, 0x69, + 0x62, 0x61, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x69, + 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, + 0x69, 0x6e, 0x74, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x04, 0x22, 0x8b, 0x03, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x64, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x44, 0x69, 0x64, 0x12, + 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6d, 0x75, + 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, + 0x65, 0x12, 0x4d, 0x0a, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, + 0x6a, 0x77, 0x6b, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x69, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b, 0x73, + 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x1a, + 0x40, 0x0a, 0x12, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x05, 0x22, 0x9e, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, + 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x29, 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x44, + 0x69, 0x64, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x06, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 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, 0x68, 0x77, 0x61, 0x79, 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 ( @@ -4488,19 +5231,20 @@ func file_did_v1_state_proto_rawDescGZIP() []byte { return file_did_v1_state_proto_rawDescData } -var file_did_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_did_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_did_v1_state_proto_goTypes = []interface{}{ - (*Assertion)(nil), // 0: did.v1.Assertion - (*Attestation)(nil), // 1: did.v1.Attestation - (*Controller)(nil), // 2: did.v1.Controller - (*Delegation)(nil), // 3: did.v1.Delegation - (*Service)(nil), // 4: did.v1.Service - nil, // 5: did.v1.Assertion.MetadataEntry - nil, // 6: did.v1.Delegation.PublicKeyJwksEntry + (*Aliases)(nil), // 0: did.v1.Aliases + (*Assertion)(nil), // 1: did.v1.Assertion + (*Attestation)(nil), // 2: did.v1.Attestation + (*Controller)(nil), // 3: did.v1.Controller + (*Delegation)(nil), // 4: did.v1.Delegation + (*Service)(nil), // 5: did.v1.Service + nil, // 6: did.v1.Assertion.MetadataEntry + nil, // 7: did.v1.Delegation.PublicKeyJwksEntry } var file_did_v1_state_proto_depIdxs = []int32{ - 5, // 0: did.v1.Assertion.metadata:type_name -> did.v1.Assertion.MetadataEntry - 6, // 1: did.v1.Delegation.public_key_jwks:type_name -> did.v1.Delegation.PublicKeyJwksEntry + 6, // 0: did.v1.Assertion.metadata:type_name -> did.v1.Assertion.MetadataEntry + 7, // 1: did.v1.Delegation.public_key_jwks:type_name -> did.v1.Delegation.PublicKeyJwksEntry 2, // [2:2] is the sub-list for method output_type 2, // [2:2] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name @@ -4516,7 +5260,7 @@ func file_did_v1_state_proto_init() { file_did_v1_genesis_proto_init() if !protoimpl.UnsafeEnabled { file_did_v1_state_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Assertion); i { + switch v := v.(*Aliases); i { case 0: return &v.state case 1: @@ -4528,7 +5272,7 @@ func file_did_v1_state_proto_init() { } } file_did_v1_state_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Attestation); i { + switch v := v.(*Assertion); i { case 0: return &v.state case 1: @@ -4540,7 +5284,7 @@ func file_did_v1_state_proto_init() { } } file_did_v1_state_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Controller); i { + switch v := v.(*Attestation); i { case 0: return &v.state case 1: @@ -4552,7 +5296,7 @@ func file_did_v1_state_proto_init() { } } file_did_v1_state_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Delegation); i { + switch v := v.(*Controller); i { case 0: return &v.state case 1: @@ -4564,6 +5308,18 @@ func file_did_v1_state_proto_init() { } } file_did_v1_state_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Delegation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_state_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Service); i { case 0: return &v.state @@ -4582,7 +5338,7 @@ func file_did_v1_state_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_state_proto_rawDesc, NumEnums: 0, - NumMessages: 7, + NumMessages: 8, NumExtensions: 0, NumServices: 0, }, diff --git a/cmd/sonrd/main.go b/cmd/sonrd/main.go index b479544a1..980000e08 100644 --- a/cmd/sonrd/main.go +++ b/cmd/sonrd/main.go @@ -4,8 +4,8 @@ import ( "os" "cosmossdk.io/log" - svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" + _ "github.com/joho/godotenv/autoload" "github.com/onsonr/hway/app" ) diff --git a/devbox.json b/devbox.json index 98c07b377..e4846a317 100644 --- a/devbox.json +++ b/devbox.json @@ -3,25 +3,19 @@ "packages": [ "ipfs@latest", "golangci-lint@latest", - "go_1_21@latest", + "go_1_22@latest", "templ@latest", "air@latest" ], "env": { "GOPATH": "$HOME/go", - "PATH": "$HOME/go/bin:$PATH" + "PATH": "$HOME/go/bin:$PATH" }, "shell": { "scripts": { - "proto": [ - "make proto-gen" - ], - "templ": [ - "templ generate" - ], - "ps": [ - "devbox services ls" - ] + "proto": ["make proto-gen"], + "templ": ["templ generate"], + "ps": ["devbox services ls"] } } } diff --git a/go.mod b/go.mod index cdd47ec42..8be15b0e9 100644 --- a/go.mod +++ b/go.mod @@ -2,8 +2,6 @@ module github.com/onsonr/hway go 1.22 -toolchain go1.22.3 - // overrides replace ( cosmossdk.io/core => cosmossdk.io/core v0.11.0 @@ -198,6 +196,7 @@ require ( github.com/jbenet/goprocess v0.1.4 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect + github.com/joho/godotenv v1.5.1 // indirect github.com/klauspost/compress v1.17.9 // indirect github.com/klauspost/cpuid/v2 v2.2.8 // indirect github.com/kr/pretty v0.3.1 // indirect diff --git a/go.sum b/go.sum index 354de7c36..fd90fab5b 100644 --- a/go.sum +++ b/go.sum @@ -1538,6 +1538,8 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGw github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= +github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= +github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= diff --git a/proto/did/v1/query.proto b/proto/did/v1/query.proto index 3f8f95d31..9ff61ffbc 100644 --- a/proto/did/v1/query.proto +++ b/proto/did/v1/query.proto @@ -56,25 +56,13 @@ message QueryResolveResponse { } // QueryLoginOptionsRequest is the request type for the Query/LoginOptions RPC method. -message QueryLoginOptionsRequest { - string origin = 1; - string handle = 2; +message QueryWitnessCredentialRequest { + string id = 1; } // QueryLoginOptionsResponse is the response type for the Query/LoginOptions RPC method. -message QueryLoginOptionsResponse { +message QueryWitnessCredentialResponse { // options is the PublicKeyCredentialAttestationOptions string options = 1; } -// QueryRegisterOptionsRequest is the request type for the Query/RegisterOptions RPC method. -message QueryRegisterOptionsRequest { - string origin = 1; - string handle = 2; -} - -// QueryRegisterOptionsResponse is the response type for the Query/RegisterOptions RPC method. -message QueryRegisterOptionsResponse { - string options = 1; -} - diff --git a/proto/did/v1/state.proto b/proto/did/v1/state.proto index 7b179cb4b..3712201ec 100644 --- a/proto/did/v1/state.proto +++ b/proto/did/v1/state.proto @@ -6,10 +6,33 @@ option go_package = "github.com/onsonr/hway/x/did/types"; import "cosmos/orm/v1/orm.proto"; import "did/v1/genesis.proto"; +// Aliases represents the `alsoKnownAs` property associated with a DID Controller +message Aliases { + option (cosmos.orm.v1.table) = { + id: 1 + primary_key: {fields: "id"} + }; + + // The unique identifier of the alias + string id = 1; + + // Origin is the Alias provider + string origin = 2; + + // Handle is the user defined alias + string handle = 3; + + // Controller of the alias + string controller = 4; + + // Expiration of the alias + uint64 expiration = 5; +} + // Assertion represents strongly created credentials (e.g., Passkeys, SSH, GPG, Native Secure Enclaave) message Assertion { option (cosmos.orm.v1.table) = { - id: 1 + id: 2 primary_key: {fields: "id"} }; @@ -33,7 +56,7 @@ message Assertion { // Attestation represents linked identifiers (e.g., Crypto Accounts, Github, Email, Phone) message Attestation { option (cosmos.orm.v1.table) = { - id: 2 + id: 3 primary_key: {fields: "id"} }; @@ -57,7 +80,7 @@ message Attestation { // Controller represents a Sonr DWN Vault message Controller { option (cosmos.orm.v1.table) = { - id: 3 + id: 4 primary_key: {fields: "id"} }; @@ -80,7 +103,7 @@ message Controller { // Delegation represents IBC Account Controllers for various chains (e.g., ETH, BTC) message Delegation { option (cosmos.orm.v1.table) = { - id: 4 + id: 5 primary_key: {fields: "id"} }; @@ -112,7 +135,7 @@ message Delegation { // Service represents a service in a DID Document message Service { option (cosmos.orm.v1.table) = { - id: 5 + id: 6 primary_key: {fields: "id"} }; diff --git a/x/did/keeper/querier.go b/x/did/keeper/querier.go index 64c52ba22..c2f402fea 100644 --- a/x/did/keeper/querier.go +++ b/x/did/keeper/querier.go @@ -31,19 +31,6 @@ func (k Querier) Params(c context.Context, req *types.QueryParamsRequest) (*type return &types.QueryParamsResponse{Params: &p}, nil } -// LoginOptions implements types.QueryServer. -func (k Querier) LoginOptions(goCtx context.Context, req *types.QueryLoginOptionsRequest) (*types.QueryLoginOptionsResponse, error) { - // ctx := sdk.UnwrapSDKContext(goCtx) - panic("LoginOptions is unimplemented") - return &types.QueryLoginOptionsResponse{}, nil -} - -// RegisterOptions implements types.QueryServer. -func (k Querier) RegisterOptions(goCtx context.Context, req *types.QueryRegisterOptionsRequest) (*types.QueryRegisterOptionsResponse, error) { - panic("RegisterOptions is unimplemented") - return &types.QueryRegisterOptionsResponse{}, nil -} - // PropertyExists implements types.QueryServer. func (k Querier) PropertyExists(goCtx context.Context, req *types.QueryExistsRequest) (*types.QueryExistsResponse, error) { // ctx := sdk.UnwrapSDKContext(goCtx) @@ -57,3 +44,10 @@ func (k Querier) ResolveIdentifier(goCtx context.Context, req *types.QueryResolv panic("ResolveIdentifier is unimplemented") return &types.QueryResolveResponse{}, nil } + +// WitnessCredential implements types.QueryServer. +func (k Querier) WitnessCredential(goCtx context.Context, req *types.QueryWitnessCredentialRequest) (*types.QueryWitnessCredentialResponse, error) { + // ctx := sdk.UnwrapSDKContext(goCtx) + panic("WitnessCredential is unimplemented") + return &types.QueryWitnessCredentialResponse{}, nil +} diff --git a/x/did/keeper/server_test.go b/x/did/keeper/server_test.go index dbfa8ecd6..f403f0cb5 100644 --- a/x/did/keeper/server_test.go +++ b/x/did/keeper/server_test.go @@ -50,7 +50,6 @@ func TestParams(t *testing.T) { require.EqualValues(&tc.request.Params, r.Params) } - }) } } diff --git a/x/did/types/query.pb.go b/x/did/types/query.pb.go index 7d9d88a09..dc64b90fd 100644 --- a/x/did/types/query.pb.go +++ b/x/did/types/query.pb.go @@ -301,23 +301,22 @@ func (m *QueryResolveResponse) GetDocument() string { } // QueryLoginOptionsRequest is the request type for the Query/LoginOptions RPC method. -type QueryLoginOptionsRequest struct { - Origin string `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"` - Handle string `protobuf:"bytes,2,opt,name=handle,proto3" json:"handle,omitempty"` +type QueryWitnessCredentialRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } -func (m *QueryLoginOptionsRequest) Reset() { *m = QueryLoginOptionsRequest{} } -func (m *QueryLoginOptionsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryLoginOptionsRequest) ProtoMessage() {} -func (*QueryLoginOptionsRequest) Descriptor() ([]byte, []int) { +func (m *QueryWitnessCredentialRequest) Reset() { *m = QueryWitnessCredentialRequest{} } +func (m *QueryWitnessCredentialRequest) String() string { return proto.CompactTextString(m) } +func (*QueryWitnessCredentialRequest) ProtoMessage() {} +func (*QueryWitnessCredentialRequest) Descriptor() ([]byte, []int) { return fileDescriptor_ae1fa9bb626e2869, []int{6} } -func (m *QueryLoginOptionsRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryWitnessCredentialRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryLoginOptionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryWitnessCredentialRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryLoginOptionsRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryWitnessCredentialRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -327,50 +326,43 @@ func (m *QueryLoginOptionsRequest) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } -func (m *QueryLoginOptionsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryLoginOptionsRequest.Merge(m, src) +func (m *QueryWitnessCredentialRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryWitnessCredentialRequest.Merge(m, src) } -func (m *QueryLoginOptionsRequest) XXX_Size() int { +func (m *QueryWitnessCredentialRequest) XXX_Size() int { return m.Size() } -func (m *QueryLoginOptionsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryLoginOptionsRequest.DiscardUnknown(m) +func (m *QueryWitnessCredentialRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryWitnessCredentialRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryLoginOptionsRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryWitnessCredentialRequest proto.InternalMessageInfo -func (m *QueryLoginOptionsRequest) GetOrigin() string { +func (m *QueryWitnessCredentialRequest) GetId() string { if m != nil { - return m.Origin - } - return "" -} - -func (m *QueryLoginOptionsRequest) GetHandle() string { - if m != nil { - return m.Handle + return m.Id } return "" } // QueryLoginOptionsResponse is the response type for the Query/LoginOptions RPC method. -type QueryLoginOptionsResponse struct { +type QueryWitnessCredentialResponse struct { // options is the PublicKeyCredentialAttestationOptions Options string `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"` } -func (m *QueryLoginOptionsResponse) Reset() { *m = QueryLoginOptionsResponse{} } -func (m *QueryLoginOptionsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryLoginOptionsResponse) ProtoMessage() {} -func (*QueryLoginOptionsResponse) Descriptor() ([]byte, []int) { +func (m *QueryWitnessCredentialResponse) Reset() { *m = QueryWitnessCredentialResponse{} } +func (m *QueryWitnessCredentialResponse) String() string { return proto.CompactTextString(m) } +func (*QueryWitnessCredentialResponse) ProtoMessage() {} +func (*QueryWitnessCredentialResponse) Descriptor() ([]byte, []int) { return fileDescriptor_ae1fa9bb626e2869, []int{7} } -func (m *QueryLoginOptionsResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryWitnessCredentialResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryLoginOptionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryWitnessCredentialResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryLoginOptionsResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryWitnessCredentialResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -380,117 +372,19 @@ func (m *QueryLoginOptionsResponse) XXX_Marshal(b []byte, deterministic bool) ([ return b[:n], nil } } -func (m *QueryLoginOptionsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryLoginOptionsResponse.Merge(m, src) +func (m *QueryWitnessCredentialResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryWitnessCredentialResponse.Merge(m, src) } -func (m *QueryLoginOptionsResponse) XXX_Size() int { +func (m *QueryWitnessCredentialResponse) XXX_Size() int { return m.Size() } -func (m *QueryLoginOptionsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryLoginOptionsResponse.DiscardUnknown(m) +func (m *QueryWitnessCredentialResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryWitnessCredentialResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryLoginOptionsResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryWitnessCredentialResponse proto.InternalMessageInfo -func (m *QueryLoginOptionsResponse) GetOptions() string { - if m != nil { - return m.Options - } - return "" -} - -// QueryRegisterOptionsRequest is the request type for the Query/RegisterOptions RPC method. -type QueryRegisterOptionsRequest struct { - Origin string `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"` - Handle string `protobuf:"bytes,2,opt,name=handle,proto3" json:"handle,omitempty"` -} - -func (m *QueryRegisterOptionsRequest) Reset() { *m = QueryRegisterOptionsRequest{} } -func (m *QueryRegisterOptionsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryRegisterOptionsRequest) ProtoMessage() {} -func (*QueryRegisterOptionsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{8} -} -func (m *QueryRegisterOptionsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryRegisterOptionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryRegisterOptionsRequest.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 *QueryRegisterOptionsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryRegisterOptionsRequest.Merge(m, src) -} -func (m *QueryRegisterOptionsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryRegisterOptionsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryRegisterOptionsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryRegisterOptionsRequest proto.InternalMessageInfo - -func (m *QueryRegisterOptionsRequest) GetOrigin() string { - if m != nil { - return m.Origin - } - return "" -} - -func (m *QueryRegisterOptionsRequest) GetHandle() string { - if m != nil { - return m.Handle - } - return "" -} - -// QueryRegisterOptionsResponse is the response type for the Query/RegisterOptions RPC method. -type QueryRegisterOptionsResponse struct { - Options string `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"` -} - -func (m *QueryRegisterOptionsResponse) Reset() { *m = QueryRegisterOptionsResponse{} } -func (m *QueryRegisterOptionsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryRegisterOptionsResponse) ProtoMessage() {} -func (*QueryRegisterOptionsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{9} -} -func (m *QueryRegisterOptionsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryRegisterOptionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryRegisterOptionsResponse.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 *QueryRegisterOptionsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryRegisterOptionsResponse.Merge(m, src) -} -func (m *QueryRegisterOptionsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryRegisterOptionsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryRegisterOptionsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryRegisterOptionsResponse proto.InternalMessageInfo - -func (m *QueryRegisterOptionsResponse) GetOptions() string { +func (m *QueryWitnessCredentialResponse) GetOptions() string { if m != nil { return m.Options } @@ -504,52 +398,43 @@ func init() { proto.RegisterType((*QueryExistsResponse)(nil), "did.v1.QueryExistsResponse") proto.RegisterType((*QueryResolveRequest)(nil), "did.v1.QueryResolveRequest") proto.RegisterType((*QueryResolveResponse)(nil), "did.v1.QueryResolveResponse") - proto.RegisterType((*QueryLoginOptionsRequest)(nil), "did.v1.QueryLoginOptionsRequest") - proto.RegisterType((*QueryLoginOptionsResponse)(nil), "did.v1.QueryLoginOptionsResponse") - proto.RegisterType((*QueryRegisterOptionsRequest)(nil), "did.v1.QueryRegisterOptionsRequest") - proto.RegisterType((*QueryRegisterOptionsResponse)(nil), "did.v1.QueryRegisterOptionsResponse") + proto.RegisterType((*QueryWitnessCredentialRequest)(nil), "did.v1.QueryWitnessCredentialRequest") + proto.RegisterType((*QueryWitnessCredentialResponse)(nil), "did.v1.QueryWitnessCredentialResponse") } func init() { proto.RegisterFile("did/v1/query.proto", fileDescriptor_ae1fa9bb626e2869) } var fileDescriptor_ae1fa9bb626e2869 = []byte{ - // 571 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xcf, 0x6b, 0x13, 0x41, - 0x14, 0xc7, 0xb3, 0xa1, 0x5d, 0xeb, 0xab, 0x46, 0x3a, 0x09, 0x25, 0xdd, 0x86, 0xa5, 0x8e, 0xb5, - 0x2a, 0x68, 0x86, 0x46, 0x04, 0x0f, 0xea, 0x41, 0xf0, 0xa0, 0x28, 0xd6, 0x1c, 0x3c, 0x78, 0xdb, - 0x76, 0xc7, 0xcd, 0x60, 0x32, 0xb3, 0xdd, 0x99, 0xc4, 0x86, 0x90, 0x83, 0xde, 0x05, 0xc1, 0x7f, - 0xca, 0x8b, 0x50, 0xf0, 0xe2, 0x51, 0x12, 0xff, 0x10, 0xc9, 0xcc, 0x5b, 0x71, 0xe3, 0x5a, 0x0f, - 0xde, 0xf2, 0x7e, 0x7d, 0xbe, 0x6f, 0xf2, 0xbe, 0x2c, 0x90, 0x58, 0xc4, 0x6c, 0xb4, 0xcf, 0x8e, - 0x87, 0x3c, 0x1b, 0xb7, 0xd3, 0x4c, 0x19, 0x45, 0xfc, 0x58, 0xc4, 0xed, 0xd1, 0x7e, 0xd0, 0x4a, - 0x94, 0x4a, 0xfa, 0x9c, 0x45, 0xa9, 0x60, 0x91, 0x94, 0xca, 0x44, 0x46, 0x28, 0xa9, 0x5d, 0x57, - 0xd0, 0xc0, 0xc9, 0x84, 0x4b, 0xae, 0x05, 0x66, 0x69, 0x03, 0xc8, 0x8b, 0x05, 0xea, 0x20, 0xca, - 0xa2, 0x81, 0xee, 0xf2, 0xe3, 0x21, 0xd7, 0x86, 0xde, 0x87, 0x7a, 0x21, 0xab, 0x53, 0x25, 0x35, - 0x27, 0x7b, 0xe0, 0xa7, 0x36, 0xd3, 0xf4, 0x76, 0xbc, 0xeb, 0xeb, 0x9d, 0x5a, 0xdb, 0x29, 0xb7, - 0xb1, 0x0f, 0xab, 0xf4, 0x01, 0x42, 0x1f, 0x9d, 0x08, 0x6d, 0x72, 0x28, 0x21, 0xb0, 0xf2, 0x46, - 0xc8, 0xd8, 0xce, 0x9e, 0xef, 0xda, 0xdf, 0xa4, 0x01, 0xab, 0xa3, 0xa8, 0x3f, 0xe4, 0xcd, 0xaa, - 0x4d, 0xba, 0x80, 0xde, 0x42, 0xf9, 0x7c, 0x1e, 0xe5, 0x37, 0xc1, 0xe7, 0x36, 0x63, 0x11, 0x6b, - 0x5d, 0x8c, 0xe8, 0x55, 0x6c, 0xef, 0x72, 0xad, 0xfa, 0x23, 0x9e, 0xeb, 0xd5, 0xa0, 0x2a, 0x72, - 0xb5, 0xaa, 0x88, 0x69, 0x07, 0x1a, 0xc5, 0x36, 0xc4, 0x06, 0xb0, 0x16, 0xab, 0xa3, 0xe1, 0x80, - 0x4b, 0x83, 0xdd, 0xbf, 0x62, 0xfa, 0x04, 0x9a, 0x76, 0xe6, 0xa9, 0x4a, 0x84, 0x7c, 0x9e, 0xda, - 0xff, 0x33, 0xe7, 0x6f, 0x82, 0xaf, 0x32, 0x91, 0x08, 0x89, 0x53, 0x18, 0x2d, 0xf2, 0xbd, 0x48, - 0xc6, 0xfd, 0xfc, 0x51, 0x18, 0xd1, 0x3b, 0xb0, 0x55, 0xc2, 0xc2, 0x25, 0x9a, 0x70, 0x4e, 0xb9, - 0x14, 0xd2, 0xf2, 0x90, 0x3e, 0x83, 0x6d, 0x5c, 0x3b, 0x11, 0xda, 0xf0, 0xec, 0x3f, 0xb7, 0xb8, - 0x0b, 0xad, 0x72, 0xdc, 0xbf, 0x16, 0xe9, 0x7c, 0x59, 0x81, 0x55, 0x3b, 0x4a, 0x5e, 0x82, 0xef, - 0x2e, 0x4e, 0x82, 0xdc, 0x01, 0x7f, 0x9a, 0x28, 0xd8, 0x2e, 0xad, 0x39, 0x19, 0x5a, 0x7f, 0xff, - 0xf5, 0xc7, 0xa7, 0xea, 0x45, 0xb2, 0xce, 0x16, 0xb6, 0x74, 0xbe, 0x21, 0x03, 0xa8, 0x1d, 0x64, - 0x2a, 0xe5, 0x99, 0xc1, 0xd3, 0x2f, 0xf1, 0x0b, 0x7e, 0x5a, 0xe2, 0x17, 0xbd, 0x42, 0xa9, 0xe5, - 0xb7, 0x48, 0x60, 0xf9, 0xce, 0x28, 0x6c, 0xb2, 0xf0, 0xdc, 0x94, 0x4d, 0xac, 0xcb, 0xa6, 0x44, - 0xc0, 0x06, 0x7a, 0xe1, 0x71, 0xcc, 0xa5, 0x11, 0xaf, 0x05, 0xcf, 0x48, 0x91, 0x5a, 0xb4, 0x54, - 0xd0, 0x2a, 0x2f, 0xa2, 0xe6, 0x96, 0xd5, 0xac, 0x93, 0x0d, 0xab, 0x99, 0xb9, 0x2a, 0x9b, 0x88, - 0x78, 0x4a, 0xde, 0x79, 0x70, 0xe1, 0xf7, 0xbb, 0x93, 0x9d, 0x02, 0xa9, 0xc4, 0x5e, 0xc1, 0xe5, - 0x33, 0x3a, 0x50, 0xf0, 0xa6, 0x15, 0xdc, 0x23, 0xbb, 0x56, 0xb0, 0xbf, 0x68, 0x61, 0x13, 0x77, - 0xff, 0x29, 0x9b, 0xb8, 0x83, 0x4f, 0x19, 0xde, 0x8f, 0x7c, 0xf0, 0xe0, 0xd2, 0xd2, 0xd5, 0xc9, - 0x95, 0xa5, 0x07, 0x95, 0x59, 0x2c, 0xd8, 0x3d, 0xbb, 0x09, 0x97, 0x61, 0x76, 0x99, 0x1b, 0xe4, - 0x1a, 0xbe, 0xde, 0x75, 0xfd, 0x7d, 0x9f, 0x87, 0xf7, 0x3e, 0xcf, 0x42, 0xef, 0x74, 0x16, 0x7a, - 0xdf, 0x67, 0xa1, 0xf7, 0x71, 0x1e, 0x56, 0x4e, 0xe7, 0x61, 0xe5, 0xdb, 0x3c, 0xac, 0xbc, 0xa2, - 0x89, 0x30, 0xbd, 0xe1, 0x61, 0xfb, 0x48, 0x0d, 0x98, 0x92, 0x5a, 0xc9, 0x8c, 0xf5, 0xde, 0x46, - 0x63, 0x76, 0x62, 0xd1, 0x66, 0x9c, 0x72, 0x7d, 0xe8, 0xdb, 0xef, 0xd7, 0xed, 0x9f, 0x01, 0x00, - 0x00, 0xff, 0xff, 0xa8, 0xc6, 0x26, 0xa6, 0x11, 0x05, 0x00, 0x00, + // 459 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0xcf, 0x6b, 0x13, 0x41, + 0x14, 0xc7, 0xb3, 0x8b, 0x5d, 0xeb, 0x2b, 0x16, 0x32, 0x09, 0x12, 0xb7, 0xed, 0x22, 0x23, 0x2d, + 0x5e, 0xdc, 0xa1, 0xf1, 0x26, 0xea, 0x41, 0xf1, 0xe0, 0x4d, 0x73, 0x50, 0xf0, 0x36, 0xed, 0x3c, + 0xd3, 0xc1, 0x64, 0x66, 0xbb, 0x33, 0x9b, 0x36, 0x88, 0x17, 0x2f, 0x5e, 0x05, 0xff, 0x29, 0x8f, + 0x05, 0x3d, 0x78, 0x94, 0xc4, 0x3f, 0x44, 0xf2, 0x76, 0x56, 0x58, 0xda, 0xd0, 0x5b, 0xde, 0x8f, + 0xef, 0xf7, 0x33, 0xf9, 0x3e, 0x16, 0x98, 0xd2, 0x4a, 0xcc, 0x0e, 0xc5, 0x69, 0x85, 0xe5, 0x3c, + 0x2f, 0x4a, 0xeb, 0x2d, 0x4b, 0x94, 0x56, 0xf9, 0xec, 0x30, 0xdd, 0x1d, 0x5b, 0x3b, 0x9e, 0xa0, + 0x90, 0x85, 0x16, 0xd2, 0x18, 0xeb, 0xa5, 0xd7, 0xd6, 0xb8, 0x7a, 0x2b, 0xed, 0x07, 0xe5, 0x18, + 0x0d, 0x3a, 0x1d, 0xba, 0xbc, 0x0f, 0xec, 0xcd, 0xca, 0xea, 0xb5, 0x2c, 0xe5, 0xd4, 0x8d, 0xf0, + 0xb4, 0x42, 0xe7, 0xf9, 0x53, 0xe8, 0xb5, 0xba, 0xae, 0xb0, 0xc6, 0x21, 0x3b, 0x80, 0xa4, 0xa0, + 0xce, 0x20, 0xba, 0x17, 0x3d, 0xd8, 0x1a, 0x6e, 0xe7, 0x35, 0x39, 0x0f, 0x7b, 0x61, 0xca, 0x9f, + 0x05, 0xd3, 0x97, 0xe7, 0xda, 0xf9, 0xc6, 0x94, 0x31, 0xb8, 0xf1, 0x51, 0x1b, 0x45, 0xda, 0x5b, + 0x23, 0xfa, 0xcd, 0xfa, 0xb0, 0x31, 0x93, 0x93, 0x0a, 0x07, 0x31, 0x35, 0xeb, 0x82, 0x3f, 0x0c, + 0xf8, 0x46, 0x1f, 0xf0, 0x77, 0x20, 0x41, 0xea, 0x90, 0xc5, 0xe6, 0x28, 0x54, 0x7c, 0x3f, 0xac, + 0x8f, 0xd0, 0xd9, 0xc9, 0x0c, 0x1b, 0xde, 0x36, 0xc4, 0xba, 0xa1, 0xc5, 0x5a, 0xf1, 0x21, 0xf4, + 0xdb, 0x6b, 0xc1, 0x36, 0x85, 0x4d, 0x65, 0x8f, 0xab, 0x29, 0x1a, 0x1f, 0xb6, 0xff, 0xd7, 0x5c, + 0xc0, 0x1e, 0x69, 0xde, 0x69, 0x6f, 0xd0, 0xb9, 0x17, 0x25, 0x2a, 0x34, 0x5e, 0xcb, 0xc9, 0x3a, + 0xc8, 0x63, 0xc8, 0xd6, 0x09, 0x02, 0x6e, 0x00, 0x37, 0x6d, 0x41, 0x87, 0x09, 0xb2, 0xa6, 0x1c, + 0xfe, 0x8a, 0x61, 0x83, 0xc4, 0xec, 0x2d, 0x24, 0x75, 0xa4, 0x2c, 0x6d, 0x22, 0xbe, 0x7c, 0xa5, + 0x74, 0xe7, 0xca, 0x59, 0x8d, 0xe1, 0xbd, 0x2f, 0x3f, 0xff, 0x7e, 0x8f, 0x6f, 0xb3, 0x2d, 0xb1, + 0xba, 0x7b, 0x7d, 0x18, 0xa6, 0xa1, 0x1b, 0xfe, 0xfd, 0x2b, 0x7a, 0xd6, 0x07, 0x8d, 0x25, 0x6b, + 0xdb, 0xb4, 0x43, 0x4c, 0x77, 0xaf, 0x1e, 0x06, 0xc8, 0x5d, 0x82, 0xf4, 0x58, 0x97, 0x20, 0x65, + 0x3d, 0x15, 0x9f, 0xb4, 0xfa, 0xcc, 0xbe, 0x46, 0xd0, 0xbd, 0x14, 0x02, 0xdb, 0x6f, 0xd9, 0xad, + 0x4b, 0x35, 0x3d, 0xb8, 0x6e, 0x2d, 0xf0, 0xef, 0x13, 0x7f, 0x8f, 0xed, 0x10, 0x5f, 0x3a, 0x87, + 0xe5, 0x2a, 0x4a, 0x7a, 0x81, 0x38, 0xab, 0x65, 0xcf, 0x9f, 0xfc, 0x58, 0x64, 0xd1, 0xc5, 0x22, + 0x8b, 0xfe, 0x2c, 0xb2, 0xe8, 0xdb, 0x32, 0xeb, 0x5c, 0x2c, 0xb3, 0xce, 0xef, 0x65, 0xd6, 0x79, + 0xcf, 0xc7, 0xda, 0x9f, 0x54, 0x47, 0xf9, 0xb1, 0x9d, 0x0a, 0x6b, 0x9c, 0x35, 0xa5, 0x38, 0x39, + 0x93, 0x73, 0x71, 0x4e, 0x76, 0x7e, 0x5e, 0xa0, 0x3b, 0x4a, 0xe8, 0x3b, 0x79, 0xf4, 0x2f, 0x00, + 0x00, 0xff, 0xff, 0xa6, 0x3a, 0x22, 0xfd, 0x79, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -566,14 +451,10 @@ const _ = grpc.SupportPackageIsVersion4 type QueryClient interface { // Params queries all parameters of the module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // Exists queries if an id exists. - PropertyExists(ctx context.Context, in *QueryExistsRequest, opts ...grpc.CallOption) (*QueryExistsResponse, error) // Resolve queries the DID document by its id. ResolveIdentifier(ctx context.Context, in *QueryResolveRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) // LoginOptions queries the PublicKeyCredentialAttestationOptions for starting a login flow. - LoginOptions(ctx context.Context, in *QueryLoginOptionsRequest, opts ...grpc.CallOption) (*QueryLoginOptionsResponse, error) - // RegisterOptions queries the PublicKeyCredentialCreationOptions for starting a register flow. - RegisterOptions(ctx context.Context, in *QueryRegisterOptionsRequest, opts ...grpc.CallOption) (*QueryRegisterOptionsResponse, error) + WitnessCredential(ctx context.Context, in *QueryWitnessCredentialRequest, opts ...grpc.CallOption) (*QueryWitnessCredentialResponse, error) } type queryClient struct { @@ -593,15 +474,6 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } -func (c *queryClient) PropertyExists(ctx context.Context, in *QueryExistsRequest, opts ...grpc.CallOption) (*QueryExistsResponse, error) { - out := new(QueryExistsResponse) - err := c.cc.Invoke(ctx, "/did.v1.Query/PropertyExists", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *queryClient) ResolveIdentifier(ctx context.Context, in *QueryResolveRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) { out := new(QueryResolveResponse) err := c.cc.Invoke(ctx, "/did.v1.Query/ResolveIdentifier", in, out, opts...) @@ -611,18 +483,9 @@ func (c *queryClient) ResolveIdentifier(ctx context.Context, in *QueryResolveReq return out, nil } -func (c *queryClient) LoginOptions(ctx context.Context, in *QueryLoginOptionsRequest, opts ...grpc.CallOption) (*QueryLoginOptionsResponse, error) { - out := new(QueryLoginOptionsResponse) - err := c.cc.Invoke(ctx, "/did.v1.Query/LoginOptions", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) RegisterOptions(ctx context.Context, in *QueryRegisterOptionsRequest, opts ...grpc.CallOption) (*QueryRegisterOptionsResponse, error) { - out := new(QueryRegisterOptionsResponse) - err := c.cc.Invoke(ctx, "/did.v1.Query/RegisterOptions", in, out, opts...) +func (c *queryClient) WitnessCredential(ctx context.Context, in *QueryWitnessCredentialRequest, opts ...grpc.CallOption) (*QueryWitnessCredentialResponse, error) { + out := new(QueryWitnessCredentialResponse) + err := c.cc.Invoke(ctx, "/did.v1.Query/WitnessCredential", in, out, opts...) if err != nil { return nil, err } @@ -633,14 +496,10 @@ func (c *queryClient) RegisterOptions(ctx context.Context, in *QueryRegisterOpti type QueryServer interface { // Params queries all parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // Exists queries if an id exists. - PropertyExists(context.Context, *QueryExistsRequest) (*QueryExistsResponse, error) // Resolve queries the DID document by its id. ResolveIdentifier(context.Context, *QueryResolveRequest) (*QueryResolveResponse, error) // LoginOptions queries the PublicKeyCredentialAttestationOptions for starting a login flow. - LoginOptions(context.Context, *QueryLoginOptionsRequest) (*QueryLoginOptionsResponse, error) - // RegisterOptions queries the PublicKeyCredentialCreationOptions for starting a register flow. - RegisterOptions(context.Context, *QueryRegisterOptionsRequest) (*QueryRegisterOptionsResponse, error) + WitnessCredential(context.Context, *QueryWitnessCredentialRequest) (*QueryWitnessCredentialResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -650,17 +509,11 @@ type UnimplementedQueryServer struct { func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } -func (*UnimplementedQueryServer) PropertyExists(ctx context.Context, req *QueryExistsRequest) (*QueryExistsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PropertyExists not implemented") -} func (*UnimplementedQueryServer) ResolveIdentifier(ctx context.Context, req *QueryResolveRequest) (*QueryResolveResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ResolveIdentifier not implemented") } -func (*UnimplementedQueryServer) LoginOptions(ctx context.Context, req *QueryLoginOptionsRequest) (*QueryLoginOptionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LoginOptions not implemented") -} -func (*UnimplementedQueryServer) RegisterOptions(ctx context.Context, req *QueryRegisterOptionsRequest) (*QueryRegisterOptionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RegisterOptions not implemented") +func (*UnimplementedQueryServer) WitnessCredential(ctx context.Context, req *QueryWitnessCredentialRequest) (*QueryWitnessCredentialResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WitnessCredential not implemented") } func RegisterQueryServer(s grpc1.Server, srv QueryServer) { @@ -685,24 +538,6 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } -func _Query_PropertyExists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryExistsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).PropertyExists(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/did.v1.Query/PropertyExists", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).PropertyExists(ctx, req.(*QueryExistsRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Query_ResolveIdentifier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryResolveRequest) if err := dec(in); err != nil { @@ -721,38 +556,20 @@ func _Query_ResolveIdentifier_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _Query_LoginOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryLoginOptionsRequest) +func _Query_WitnessCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryWitnessCredentialRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).LoginOptions(ctx, in) + return srv.(QueryServer).WitnessCredential(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/did.v1.Query/LoginOptions", + FullMethod: "/did.v1.Query/WitnessCredential", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).LoginOptions(ctx, req.(*QueryLoginOptionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_RegisterOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryRegisterOptionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).RegisterOptions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/did.v1.Query/RegisterOptions", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).RegisterOptions(ctx, req.(*QueryRegisterOptionsRequest)) + return srv.(QueryServer).WitnessCredential(ctx, req.(*QueryWitnessCredentialRequest)) } return interceptor(ctx, in, info, handler) } @@ -765,21 +582,13 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Params", Handler: _Query_Params_Handler, }, - { - MethodName: "PropertyExists", - Handler: _Query_PropertyExists_Handler, - }, { MethodName: "ResolveIdentifier", Handler: _Query_ResolveIdentifier_Handler, }, { - MethodName: "LoginOptions", - Handler: _Query_LoginOptions_Handler, - }, - { - MethodName: "RegisterOptions", - Handler: _Query_RegisterOptions_Handler, + MethodName: "WitnessCredential", + Handler: _Query_WitnessCredential_Handler, }, }, Streams: []grpc.StreamDesc{}, @@ -974,7 +783,7 @@ func (m *QueryResolveResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryLoginOptionsRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryWitnessCredentialRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -984,34 +793,27 @@ func (m *QueryLoginOptionsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryLoginOptionsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryWitnessCredentialRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryLoginOptionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryWitnessCredentialRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Handle) > 0 { - i -= len(m.Handle) - copy(dAtA[i:], m.Handle) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Handle))) - i-- - dAtA[i] = 0x12 - } - if len(m.Origin) > 0 { - i -= len(m.Origin) - copy(dAtA[i:], m.Origin) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Origin))) + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *QueryLoginOptionsResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryWitnessCredentialResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1021,79 +823,12 @@ func (m *QueryLoginOptionsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryLoginOptionsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryWitnessCredentialResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryLoginOptionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Options) > 0 { - i -= len(m.Options) - copy(dAtA[i:], m.Options) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Options))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryRegisterOptionsRequest) 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 *QueryRegisterOptionsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryRegisterOptionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Handle) > 0 { - i -= len(m.Handle) - copy(dAtA[i:], m.Handle) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Handle))) - i-- - dAtA[i] = 0x12 - } - if len(m.Origin) > 0 { - i -= len(m.Origin) - copy(dAtA[i:], m.Origin) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Origin))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryRegisterOptionsResponse) 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 *QueryRegisterOptionsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryRegisterOptionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryWitnessCredentialResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1196,54 +931,20 @@ func (m *QueryResolveResponse) Size() (n int) { return n } -func (m *QueryLoginOptionsRequest) Size() (n int) { +func (m *QueryWitnessCredentialRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Origin) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Handle) + l = len(m.Id) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } -func (m *QueryLoginOptionsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Options) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryRegisterOptionsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Origin) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Handle) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryRegisterOptionsResponse) Size() (n int) { +func (m *QueryWitnessCredentialResponse) Size() (n int) { if m == nil { return 0 } @@ -1746,7 +1447,7 @@ func (m *QueryResolveResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryLoginOptionsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryWitnessCredentialRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1769,15 +1470,15 @@ func (m *QueryLoginOptionsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryLoginOptionsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryWitnessCredentialRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLoginOptionsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryWitnessCredentialRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1805,39 +1506,7 @@ func (m *QueryLoginOptionsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Origin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Handle", 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.Handle = string(dAtA[iNdEx:postIndex]) + m.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1860,7 +1529,7 @@ func (m *QueryLoginOptionsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryLoginOptionsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryWitnessCredentialResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1883,206 +1552,10 @@ func (m *QueryLoginOptionsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryLoginOptionsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryWitnessCredentialResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLoginOptionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Options", 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.Options = 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 *QueryRegisterOptionsRequest) 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: QueryRegisterOptionsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryRegisterOptionsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Origin", 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.Origin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Handle", 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.Handle = 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 *QueryRegisterOptionsResponse) 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: QueryRegisterOptionsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryRegisterOptionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryWitnessCredentialResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/x/did/types/query.pb.gw.go b/x/did/types/query.pb.gw.go index 28b99950e..eddb7e149 100644 --- a/x/did/types/query.pb.gw.go +++ b/x/did/types/query.pb.gw.go @@ -51,82 +51,6 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal } -func request_Query_PropertyExists_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryExistsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["kind"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "kind") - } - - protoReq.Kind, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "kind", err) - } - - val, ok = pathParams["value"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "value") - } - - protoReq.Value, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "value", err) - } - - msg, err := client.PropertyExists(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_PropertyExists_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryExistsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["kind"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "kind") - } - - protoReq.Kind, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "kind", err) - } - - val, ok = pathParams["value"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "value") - } - - protoReq.Value, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "value", err) - } - - msg, err := server.PropertyExists(ctx, &protoReq) - return msg, metadata, err - -} - func request_Query_ResolveIdentifier_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryResolveRequest var metadata runtime.ServerMetadata @@ -181,8 +105,8 @@ func local_request_Query_ResolveIdentifier_0(ctx context.Context, marshaler runt } -func request_Query_LoginOptions_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryLoginOptionsRequest +func request_Query_WitnessCredential_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryWitnessCredentialRequest var metadata runtime.ServerMetadata var ( @@ -192,35 +116,24 @@ func request_Query_LoginOptions_0(ctx context.Context, marshaler runtime.Marshal _ = err ) - val, ok = pathParams["origin"] + val, ok = pathParams["id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Origin, err = runtime.String(val) + protoReq.Id, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - val, ok = pathParams["handle"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "handle") - } - - protoReq.Handle, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "handle", err) - } - - msg, err := client.LoginOptions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.WitnessCredential(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_LoginOptions_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryLoginOptionsRequest +func local_request_Query_WitnessCredential_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryWitnessCredentialRequest var metadata runtime.ServerMetadata var ( @@ -230,105 +143,18 @@ func local_request_Query_LoginOptions_0(ctx context.Context, marshaler runtime.M _ = err ) - val, ok = pathParams["origin"] + val, ok = pathParams["id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Origin, err = runtime.String(val) + protoReq.Id, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - val, ok = pathParams["handle"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "handle") - } - - protoReq.Handle, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "handle", err) - } - - msg, err := server.LoginOptions(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_RegisterOptions_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryRegisterOptionsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["origin"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin") - } - - protoReq.Origin, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err) - } - - val, ok = pathParams["handle"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "handle") - } - - protoReq.Handle, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "handle", err) - } - - msg, err := client.RegisterOptions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_RegisterOptions_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryRegisterOptionsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["origin"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin") - } - - protoReq.Origin, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err) - } - - val, ok = pathParams["handle"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "handle") - } - - protoReq.Handle, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "handle", err) - } - - msg, err := server.RegisterOptions(ctx, &protoReq) + msg, err := server.WitnessCredential(ctx, &protoReq) return msg, metadata, err } @@ -362,29 +188,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_PropertyExists_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_PropertyExists_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_PropertyExists_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_ResolveIdentifier_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -408,7 +211,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_LoginOptions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_WitnessCredential_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -419,7 +222,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_LoginOptions_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_WitnessCredential_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 { @@ -427,30 +230,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_LoginOptions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_RegisterOptions_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_RegisterOptions_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_RegisterOptions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_WitnessCredential_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -515,26 +295,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_PropertyExists_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_PropertyExists_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_PropertyExists_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_ResolveIdentifier_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -555,7 +315,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_LoginOptions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_WitnessCredential_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) @@ -564,34 +324,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_LoginOptions_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_WitnessCredential_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_LoginOptions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_RegisterOptions_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_RegisterOptions_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_RegisterOptions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_WitnessCredential_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -601,23 +341,15 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie var ( pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"did", "params"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_PropertyExists_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3}, []string{"did", "exists", "kind", "value"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_ResolveIdentifier_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"did", "resolve", "id"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_LoginOptions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"did", "login", "origin", "handle", "options"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_RegisterOptions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"did", "register", "origin", "handle", "options"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_WitnessCredential_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"did", "assertion", "id", "witness"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( forward_Query_Params_0 = runtime.ForwardResponseMessage - forward_Query_PropertyExists_0 = runtime.ForwardResponseMessage - forward_Query_ResolveIdentifier_0 = runtime.ForwardResponseMessage - forward_Query_LoginOptions_0 = runtime.ForwardResponseMessage - - forward_Query_RegisterOptions_0 = runtime.ForwardResponseMessage + forward_Query_WitnessCredential_0 = runtime.ForwardResponseMessage ) diff --git a/x/did/types/state.pb.go b/x/did/types/state.pb.go index 630dcd928..83d3dc4bb 100644 --- a/x/did/types/state.pb.go +++ b/x/did/types/state.pb.go @@ -23,6 +23,88 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// Aliases represents the `alsoKnownAs` property associated with a DID Controller +type Aliases struct { + // The unique identifier of the alias + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Origin is the Alias provider + Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` + // Handle is the user defined alias + Handle string `protobuf:"bytes,3,opt,name=handle,proto3" json:"handle,omitempty"` + // Controller of the alias + Controller string `protobuf:"bytes,4,opt,name=controller,proto3" json:"controller,omitempty"` + // Expiration of the alias + Expiration uint64 `protobuf:"varint,5,opt,name=expiration,proto3" json:"expiration,omitempty"` +} + +func (m *Aliases) Reset() { *m = Aliases{} } +func (m *Aliases) String() string { return proto.CompactTextString(m) } +func (*Aliases) ProtoMessage() {} +func (*Aliases) Descriptor() ([]byte, []int) { + return fileDescriptor_f44bb702879c34b4, []int{0} +} +func (m *Aliases) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Aliases) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Aliases.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 *Aliases) XXX_Merge(src proto.Message) { + xxx_messageInfo_Aliases.Merge(m, src) +} +func (m *Aliases) XXX_Size() int { + return m.Size() +} +func (m *Aliases) XXX_DiscardUnknown() { + xxx_messageInfo_Aliases.DiscardUnknown(m) +} + +var xxx_messageInfo_Aliases proto.InternalMessageInfo + +func (m *Aliases) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *Aliases) GetOrigin() string { + if m != nil { + return m.Origin + } + return "" +} + +func (m *Aliases) GetHandle() string { + if m != nil { + return m.Handle + } + return "" +} + +func (m *Aliases) GetController() string { + if m != nil { + return m.Controller + } + return "" +} + +func (m *Aliases) GetExpiration() uint64 { + if m != nil { + return m.Expiration + } + return 0 +} + // Assertion represents strongly created credentials (e.g., Passkeys, SSH, GPG, Native Secure Enclaave) type Assertion struct { // The unique identifier of the attestation @@ -41,7 +123,7 @@ func (m *Assertion) Reset() { *m = Assertion{} } func (m *Assertion) String() string { return proto.CompactTextString(m) } func (*Assertion) ProtoMessage() {} func (*Assertion) Descriptor() ([]byte, []int) { - return fileDescriptor_f44bb702879c34b4, []int{0} + return fileDescriptor_f44bb702879c34b4, []int{1} } func (m *Assertion) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -123,7 +205,7 @@ func (m *Attestation) Reset() { *m = Attestation{} } func (m *Attestation) String() string { return proto.CompactTextString(m) } func (*Attestation) ProtoMessage() {} func (*Attestation) Descriptor() ([]byte, []int) { - return fileDescriptor_f44bb702879c34b4, []int{1} + return fileDescriptor_f44bb702879c34b4, []int{2} } func (m *Attestation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -205,7 +287,7 @@ func (m *Controller) Reset() { *m = Controller{} } func (m *Controller) String() string { return proto.CompactTextString(m) } func (*Controller) ProtoMessage() {} func (*Controller) Descriptor() ([]byte, []int) { - return fileDescriptor_f44bb702879c34b4, []int{2} + return fileDescriptor_f44bb702879c34b4, []int{3} } func (m *Controller) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -293,7 +375,7 @@ func (m *Delegation) Reset() { *m = Delegation{} } func (m *Delegation) String() string { return proto.CompactTextString(m) } func (*Delegation) ProtoMessage() {} func (*Delegation) Descriptor() ([]byte, []int) { - return fileDescriptor_f44bb702879c34b4, []int{3} + return fileDescriptor_f44bb702879c34b4, []int{4} } func (m *Delegation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -394,7 +476,7 @@ func (m *Service) Reset() { *m = Service{} } func (m *Service) String() string { return proto.CompactTextString(m) } func (*Service) ProtoMessage() {} func (*Service) Descriptor() ([]byte, []int) { - return fileDescriptor_f44bb702879c34b4, []int{4} + return fileDescriptor_f44bb702879c34b4, []int{5} } func (m *Service) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -452,6 +534,7 @@ func (m *Service) GetControllerDid() string { } func init() { + proto.RegisterType((*Aliases)(nil), "did.v1.Aliases") proto.RegisterType((*Assertion)(nil), "did.v1.Assertion") proto.RegisterMapType((map[string]string)(nil), "did.v1.Assertion.MetadataEntry") proto.RegisterType((*Attestation)(nil), "did.v1.Attestation") @@ -464,46 +547,105 @@ func init() { func init() { proto.RegisterFile("did/v1/state.proto", fileDescriptor_f44bb702879c34b4) } var fileDescriptor_f44bb702879c34b4 = []byte{ - // 621 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xc1, 0x6e, 0xd3, 0x40, - 0x10, 0x86, 0xeb, 0x38, 0x6d, 0x93, 0x49, 0xd2, 0x56, 0xab, 0x4a, 0x98, 0x20, 0x4c, 0x08, 0xaa, - 0x14, 0x2e, 0x36, 0x85, 0x0b, 0x6a, 0x39, 0x50, 0xda, 0x1e, 0x00, 0x55, 0x42, 0x81, 0x13, 0x97, - 0xc8, 0xf1, 0x6e, 0xd3, 0x25, 0xf6, 0xae, 0xb5, 0xbb, 0x49, 0xf1, 0x8d, 0x3b, 0x12, 0xe2, 0xc0, - 0xb9, 0xaf, 0xc0, 0x6b, 0x70, 0xac, 0xc4, 0x85, 0x23, 0x6a, 0xdf, 0x80, 0x27, 0x40, 0xde, 0xb5, - 0x53, 0xd3, 0x14, 0x10, 0xe2, 0x66, 0x7f, 0x33, 0xe3, 0xf9, 0xe7, 0x9f, 0x91, 0x01, 0x61, 0x8a, - 0xfd, 0xe9, 0xa6, 0x2f, 0x55, 0xa0, 0x88, 0x97, 0x08, 0xae, 0x38, 0x5a, 0xc2, 0x14, 0x7b, 0xd3, - 0xcd, 0xf6, 0xb5, 0x90, 0xcb, 0x98, 0x4b, 0x9f, 0x8b, 0x38, 0x4b, 0xe1, 0x22, 0x36, 0x09, 0xed, - 0xf5, 0xbc, 0x68, 0x44, 0x18, 0x91, 0x54, 0x1a, 0xda, 0x7d, 0x57, 0x81, 0xfa, 0x8e, 0x94, 0x44, - 0x28, 0xca, 0x19, 0x5a, 0x81, 0x0a, 0xc5, 0x8e, 0xd5, 0xb1, 0x7a, 0xf5, 0x7e, 0x85, 0x62, 0x74, - 0x1d, 0x6a, 0x63, 0x92, 0x0e, 0x54, 0x9a, 0x10, 0xa7, 0xa2, 0xe9, 0xf2, 0x98, 0xa4, 0xaf, 0xd2, - 0x84, 0x20, 0x17, 0x20, 0x14, 0x04, 0x13, 0xa6, 0x68, 0x10, 0x39, 0x76, 0xc7, 0xea, 0x35, 0xfb, - 0x25, 0x82, 0xb6, 0xa1, 0x16, 0x13, 0x15, 0xe0, 0x40, 0x05, 0x4e, 0xb5, 0x63, 0xf7, 0x1a, 0xf7, - 0x6f, 0x79, 0x46, 0xa2, 0x37, 0xeb, 0xe7, 0x1d, 0xe4, 0x19, 0xfb, 0x4c, 0x89, 0xb4, 0x3f, 0x2b, - 0xd0, 0x1f, 0xe7, 0x4c, 0x09, 0x1e, 0x45, 0x44, 0x38, 0x8b, 0xba, 0x73, 0x89, 0xb4, 0xb7, 0xa1, - 0xf5, 0x4b, 0x29, 0x5a, 0x03, 0x7b, 0x4c, 0xd2, 0x5c, 0x79, 0xf6, 0x88, 0xd6, 0x61, 0x71, 0x1a, - 0x44, 0x93, 0x42, 0xb7, 0x79, 0xd9, 0xaa, 0x3c, 0xb4, 0xb6, 0x56, 0x7e, 0x9c, 0x7c, 0xfd, 0x60, - 0xd7, 0xa0, 0x6a, 0x86, 0xed, 0x7e, 0xb2, 0xa0, 0xb1, 0xa3, 0x14, 0xc9, 0xdc, 0xfc, 0x47, 0x13, - 0x66, 0x4d, 0xec, 0x52, 0x93, 0x8c, 0x26, 0x82, 0xf3, 0x43, 0xa7, 0x6a, 0xa8, 0x7e, 0xf9, 0xdb, - 0x4c, 0x97, 0x64, 0x55, 0xba, 0x9f, 0x2d, 0x80, 0xdd, 0x59, 0x78, 0x4e, 0xd5, 0x1a, 0xd8, 0x38, - 0xcb, 0x33, 0x13, 0x63, 0x8a, 0xd1, 0x3d, 0x58, 0x4f, 0x26, 0xc3, 0x88, 0x86, 0x83, 0x4c, 0x6e, - 0x3c, 0x89, 0x14, 0x1d, 0x06, 0xb2, 0xd0, 0x86, 0x4c, 0xec, 0x39, 0x49, 0x0f, 0x8a, 0x08, 0xba, - 0x01, 0xf5, 0x69, 0x30, 0x89, 0xd4, 0x20, 0xa4, 0x38, 0x17, 0x5b, 0xd3, 0x60, 0x97, 0x62, 0xd4, - 0x81, 0xc6, 0x21, 0x65, 0x23, 0x22, 0x12, 0x41, 0x99, 0xd2, 0x82, 0x9b, 0xfd, 0x32, 0xba, 0xa4, - 0xd8, 0xee, 0xbe, 0xb7, 0x01, 0xf6, 0x48, 0x44, 0x46, 0x57, 0xfb, 0x38, 0xaf, 0xf8, 0x26, 0x40, - 0x78, 0x14, 0x50, 0x66, 0xbc, 0x35, 0x3a, 0xeb, 0x9a, 0x68, 0x77, 0xef, 0x40, 0xcb, 0x84, 0x03, - 0x8c, 0x05, 0x91, 0x32, 0x97, 0xd8, 0xd4, 0x70, 0xc7, 0x30, 0xb4, 0x01, 0x2b, 0x17, 0x26, 0x0e, - 0xb2, 0x06, 0xc6, 0xda, 0xd6, 0x05, 0xdd, 0xfb, 0x83, 0x39, 0x4b, 0xbf, 0x35, 0xe7, 0x00, 0x56, - 0x4b, 0x15, 0x6f, 0x8e, 0xc7, 0xd2, 0x59, 0xd6, 0x77, 0xbc, 0x51, 0xdc, 0xf1, 0xc5, 0xac, 0xde, - 0x8b, 0xa2, 0xfe, 0xd9, 0xf1, 0x58, 0x9a, 0x6b, 0x6e, 0x25, 0x65, 0x96, 0xcf, 0xca, 0x18, 0x89, - 0x06, 0x14, 0x3b, 0xb5, 0x8e, 0xd5, 0xab, 0xea, 0x59, 0x33, 0xf2, 0x14, 0xb7, 0x1f, 0x03, 0x9a, - 0xff, 0xc6, 0x7f, 0x9c, 0x75, 0xb5, 0x7b, 0x62, 0xc1, 0xf2, 0x4b, 0x22, 0xa6, 0x34, 0x24, 0x73, - 0xab, 0xb8, 0x0d, 0x4d, 0x69, 0x42, 0xe5, 0xb3, 0x6e, 0xe4, 0x4c, 0x9b, 0x7f, 0x17, 0xd6, 0x8a, - 0x14, 0xc2, 0x70, 0xc2, 0xb3, 0x1b, 0x30, 0x1b, 0x5a, 0xcd, 0xf9, 0x7e, 0x8e, 0xaf, 0x58, 0x41, - 0xf5, 0x8a, 0x15, 0x5c, 0x12, 0xb8, 0xf8, 0xe4, 0xd1, 0x97, 0x33, 0xd7, 0x3a, 0x3d, 0x73, 0xad, - 0xef, 0x67, 0xae, 0xf5, 0xf1, 0xdc, 0x5d, 0x38, 0x3d, 0x77, 0x17, 0xbe, 0x9d, 0xbb, 0x0b, 0xaf, - 0xbb, 0x23, 0xaa, 0x8e, 0x26, 0x43, 0x2f, 0xe4, 0xb1, 0xcf, 0x99, 0xe4, 0x4c, 0xf8, 0x47, 0xc7, - 0x41, 0xea, 0xbf, 0xf5, 0xb3, 0x7f, 0x58, 0xa6, 0x58, 0x0e, 0x97, 0xf4, 0xff, 0xeb, 0xc1, 0xcf, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x13, 0x60, 0x52, 0x18, 0x0c, 0x05, 0x00, 0x00, + // 672 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xbf, 0x6e, 0x13, 0x4f, + 0x10, 0xc7, 0x73, 0x3e, 0xff, 0x1d, 0xdb, 0x49, 0xb4, 0x8a, 0x7e, 0xbf, 0xc3, 0x08, 0x63, 0x8c, + 0x22, 0x85, 0xc6, 0x47, 0xa0, 0x41, 0x09, 0x05, 0x26, 0x49, 0x01, 0x28, 0x12, 0x32, 0x54, 0x34, + 0xd6, 0xfa, 0x76, 0x63, 0x2f, 0x3e, 0xef, 0x9e, 0x76, 0xd7, 0x4e, 0xae, 0xa3, 0x47, 0x42, 0x14, + 0x34, 0x34, 0x79, 0x05, 0x5e, 0x83, 0x32, 0x12, 0x0d, 0x25, 0x4a, 0xde, 0x80, 0x27, 0x40, 0x77, + 0x7b, 0x8e, 0x8f, 0x73, 0x00, 0x21, 0x3a, 0xef, 0x77, 0x76, 0x3c, 0x9f, 0xf9, 0xce, 0xdc, 0x02, + 0x22, 0x8c, 0xb8, 0xb3, 0x6d, 0x57, 0x69, 0xac, 0x69, 0x27, 0x90, 0x42, 0x0b, 0x54, 0x24, 0x8c, + 0x74, 0x66, 0xdb, 0x8d, 0xff, 0x3d, 0xa1, 0x26, 0x42, 0xb9, 0x42, 0x4e, 0xa2, 0x2b, 0x42, 0x4e, + 0xcc, 0x85, 0xc6, 0x46, 0x92, 0x34, 0xa4, 0x9c, 0x2a, 0xa6, 0x8c, 0xda, 0xfe, 0x68, 0x41, 0xa9, + 0xeb, 0x33, 0xac, 0xa8, 0x42, 0xab, 0x90, 0x63, 0xc4, 0xb1, 0x5a, 0xd6, 0x56, 0xa5, 0x97, 0x63, + 0x04, 0xfd, 0x07, 0x45, 0x21, 0xd9, 0x90, 0x71, 0x27, 0x17, 0x6b, 0xc9, 0x29, 0xd2, 0x47, 0x98, + 0x13, 0x9f, 0x3a, 0xb6, 0xd1, 0xcd, 0x09, 0x35, 0x01, 0x3c, 0xc1, 0xb5, 0x14, 0xbe, 0x4f, 0xa5, + 0x93, 0x8f, 0x63, 0x29, 0x25, 0x8a, 0xd3, 0x93, 0x80, 0x49, 0xac, 0x99, 0xe0, 0x4e, 0xa1, 0x65, + 0x6d, 0xe5, 0x7b, 0x29, 0x65, 0x67, 0xf5, 0xfb, 0xe9, 0x97, 0x77, 0x76, 0x19, 0xf2, 0x86, 0xa3, + 0xfd, 0x26, 0x07, 0x95, 0xae, 0x52, 0x54, 0x46, 0xd1, 0x25, 0xba, 0x6b, 0x50, 0x1e, 0xd3, 0xb0, + 0xaf, 0xc3, 0x80, 0x26, 0x7c, 0xa5, 0x31, 0x0d, 0x5f, 0x86, 0x81, 0x01, 0x91, 0x94, 0x50, 0xae, + 0x19, 0xf6, 0x63, 0xc8, 0x5a, 0x2f, 0xa5, 0xa0, 0x5d, 0x28, 0x4f, 0xa8, 0xc6, 0x04, 0x6b, 0xec, + 0xe4, 0x5b, 0xf6, 0x56, 0xf5, 0xde, 0xcd, 0x8e, 0xb1, 0xaf, 0x73, 0x59, 0xaf, 0x73, 0x98, 0xdc, + 0x38, 0xe0, 0x5a, 0x86, 0xbd, 0xcb, 0x84, 0x4c, 0x97, 0x85, 0x6c, 0x97, 0x8d, 0x5d, 0xa8, 0xff, + 0x94, 0x8a, 0xd6, 0xc1, 0x1e, 0xd3, 0x30, 0x21, 0x8f, 0x7e, 0xa2, 0x0d, 0x28, 0xcc, 0xb0, 0x3f, + 0x9d, 0x73, 0x9b, 0xc3, 0x4e, 0xee, 0x81, 0x95, 0xb1, 0x20, 0xd7, 0xfe, 0x60, 0x41, 0xb5, 0xab, + 0x35, 0x8d, 0x26, 0xfd, 0x97, 0x26, 0x5c, 0x16, 0xb1, 0x53, 0x45, 0x22, 0x35, 0x90, 0x42, 0x1c, + 0x25, 0xe3, 0x31, 0x87, 0x3f, 0xf5, 0x94, 0xc1, 0xb2, 0xdb, 0x9f, 0x2c, 0x80, 0xbd, 0xc5, 0x60, + 0xb3, 0x54, 0xeb, 0x60, 0x93, 0x08, 0xdf, 0x74, 0x4c, 0x18, 0x41, 0x77, 0x61, 0x23, 0x98, 0x0e, + 0x7c, 0xe6, 0xf5, 0x23, 0xdc, 0xc9, 0xd4, 0xd7, 0x6c, 0x80, 0xd5, 0x9c, 0x0d, 0x99, 0xd8, 0x33, + 0x1a, 0x1e, 0xce, 0x23, 0xe8, 0x3a, 0x54, 0x66, 0x78, 0xea, 0xeb, 0xbe, 0xc7, 0x48, 0x02, 0x5b, + 0x8e, 0x85, 0x3d, 0x46, 0x50, 0x0b, 0xaa, 0x47, 0x8c, 0x0f, 0xa9, 0x0c, 0x24, 0xe3, 0x3a, 0x06, + 0xae, 0xf5, 0xd2, 0x52, 0x86, 0x38, 0xdf, 0x7e, 0x6b, 0x03, 0xec, 0x53, 0x9f, 0x0e, 0xaf, 0xf6, + 0x71, 0x99, 0xf8, 0x06, 0x80, 0x37, 0xc2, 0x8c, 0x1b, 0x6f, 0x0d, 0x67, 0x25, 0x56, 0x62, 0x77, + 0x6f, 0x43, 0xdd, 0x84, 0x31, 0x21, 0x92, 0x2a, 0x95, 0x20, 0xd6, 0x62, 0xb1, 0x6b, 0x34, 0xb4, + 0x09, 0xab, 0x0b, 0x13, 0xfb, 0x51, 0x01, 0x63, 0x6d, 0x7d, 0xa1, 0xee, 0xff, 0xc6, 0x9c, 0xe2, + 0x2f, 0xcd, 0x39, 0x84, 0xb5, 0x54, 0xc6, 0xeb, 0xe3, 0xb1, 0x72, 0x4a, 0xf1, 0x1e, 0x6f, 0xce, + 0xf7, 0x78, 0xd1, 0x6b, 0xe7, 0xf9, 0x3c, 0xff, 0xe9, 0xf1, 0x58, 0x99, 0x6d, 0xae, 0x07, 0x69, + 0x2d, 0xe9, 0x95, 0x73, 0xea, 0xf7, 0x19, 0x71, 0xca, 0xf1, 0x87, 0x59, 0x49, 0x94, 0x27, 0xa4, + 0xf1, 0x08, 0xd0, 0xf2, 0x7f, 0xfc, 0xc3, 0x5a, 0x17, 0xda, 0xa7, 0x16, 0x94, 0x5e, 0x50, 0x39, + 0x63, 0x1e, 0x5d, 0x1a, 0xc5, 0x2d, 0xa8, 0x29, 0x13, 0x4a, 0xaf, 0x75, 0x35, 0xd1, 0x62, 0xf3, + 0xef, 0xc0, 0xfa, 0xfc, 0x0a, 0xe5, 0x24, 0x10, 0xd1, 0x0e, 0x98, 0x09, 0xad, 0x25, 0xfa, 0x41, + 0x22, 0x5f, 0x31, 0x82, 0xfc, 0x15, 0x23, 0xc8, 0x00, 0x16, 0x1f, 0x3f, 0xfc, 0x7c, 0xde, 0xb4, + 0xce, 0xce, 0x9b, 0xd6, 0xb7, 0xf3, 0xa6, 0xf5, 0xfe, 0xa2, 0xb9, 0x72, 0x76, 0xd1, 0x5c, 0xf9, + 0x7a, 0xd1, 0x5c, 0x79, 0xd5, 0x1e, 0x32, 0x3d, 0x9a, 0x0e, 0x3a, 0x9e, 0x98, 0xb8, 0x82, 0x2b, + 0xc1, 0xa5, 0x3b, 0x3a, 0xc6, 0xa1, 0x7b, 0xe2, 0x46, 0xef, 0x6b, 0x44, 0xac, 0x06, 0xc5, 0xf8, + 0x6d, 0xbd, 0xff, 0x23, 0x00, 0x00, 0xff, 0xff, 0x5d, 0x24, 0xdd, 0x73, 0xa8, 0x05, 0x00, 0x00, +} + +func (m *Aliases) 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 *Aliases) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Aliases) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Expiration != 0 { + i = encodeVarintState(dAtA, i, uint64(m.Expiration)) + i-- + dAtA[i] = 0x28 + } + if len(m.Controller) > 0 { + i -= len(m.Controller) + copy(dAtA[i:], m.Controller) + i = encodeVarintState(dAtA, i, uint64(len(m.Controller))) + i-- + dAtA[i] = 0x22 + } + if len(m.Handle) > 0 { + i -= len(m.Handle) + copy(dAtA[i:], m.Handle) + i = encodeVarintState(dAtA, i, uint64(len(m.Handle))) + i-- + dAtA[i] = 0x1a + } + if len(m.Origin) > 0 { + i -= len(m.Origin) + copy(dAtA[i:], m.Origin) + i = encodeVarintState(dAtA, i, uint64(len(m.Origin))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintState(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *Assertion) Marshal() (dAtA []byte, err error) { @@ -843,6 +985,34 @@ func encodeVarintState(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } +func (m *Aliases) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } + l = len(m.Origin) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } + l = len(m.Handle) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } + l = len(m.Controller) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } + if m.Expiration != 0 { + n += 1 + sovState(uint64(m.Expiration)) + } + return n +} + func (m *Assertion) Size() (n int) { if m == nil { return 0 @@ -1009,6 +1179,203 @@ func sovState(x uint64) (n int) { func sozState(x uint64) (n int) { return sovState(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *Aliases) 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 ErrIntOverflowState + } + 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: Aliases: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Aliases: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + 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 ErrInvalidLengthState + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + 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 ErrInvalidLengthState + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Origin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Handle", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + 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 ErrInvalidLengthState + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Handle = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + 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 ErrInvalidLengthState + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Controller = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) + } + m.Expiration = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Expiration |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipState(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthState + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Assertion) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0