diff --git a/.github/workflows/run-goreleaser.yml b/.github/workflows/run-goreleaser.yml index 922b8da9d..62d613367 100644 --- a/.github/workflows/run-goreleaser.yml +++ b/.github/workflows/run-goreleaser.yml @@ -26,6 +26,7 @@ jobs: - uses: actions/setup-go@v5 with: go-version: "1.22" + check-latest: true - name: Clean up dist directory run: rm -rf dist diff --git a/Makefile b/Makefile index 514762be5..94e3268b0 100644 --- a/Makefile +++ b/Makefile @@ -297,7 +297,7 @@ sh-testnet: mod-tidy ### templ & vault ### ############################################################################### -.PHONY: dwn motr templ +.PHONY: dwn motr templ pkl nebula motr: @echo "(motr) Building motr gateway" @@ -312,10 +312,14 @@ templ: go install github.com/a-h/templ/cmd/templ@latest templ generate +nebula: + @echo "(nebula) Building nebula" + cd pkg/nebula && bun run build + pkl: @echo "(pkl) Building PKL" - go run github.com/apple/pkl-go/cmd/pkl-gen-go ./app/config/pkl/dwn.pkl - go run github.com/apple/pkl-go/cmd/pkl-gen-go ./app/config/pkl/orm.pkl + go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/dwn.pkl + go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/orm.pkl start-caddy: @echo "(start-caddy) Starting caddy" diff --git a/api/did/v1/query.pulsar.go b/api/did/v1/query.pulsar.go index 9b9743ba9..27ed636fe 100644 --- a/api/did/v1/query.pulsar.go +++ b/api/did/v1/query.pulsar.go @@ -1495,6 +1495,2252 @@ func (x *fastReflection_QueryResolveResponse) ProtoMethods() *protoiface.Methods } } +var ( + md_QuerySignRequest protoreflect.MessageDescriptor + fd_QuerySignRequest_did protoreflect.FieldDescriptor + fd_QuerySignRequest_origin protoreflect.FieldDescriptor + fd_QuerySignRequest_key protoreflect.FieldDescriptor + fd_QuerySignRequest_asset protoreflect.FieldDescriptor + fd_QuerySignRequest_message protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_query_proto_init() + md_QuerySignRequest = File_did_v1_query_proto.Messages().ByName("QuerySignRequest") + fd_QuerySignRequest_did = md_QuerySignRequest.Fields().ByName("did") + fd_QuerySignRequest_origin = md_QuerySignRequest.Fields().ByName("origin") + fd_QuerySignRequest_key = md_QuerySignRequest.Fields().ByName("key") + fd_QuerySignRequest_asset = md_QuerySignRequest.Fields().ByName("asset") + fd_QuerySignRequest_message = md_QuerySignRequest.Fields().ByName("message") +} + +var _ protoreflect.Message = (*fastReflection_QuerySignRequest)(nil) + +type fastReflection_QuerySignRequest QuerySignRequest + +func (x *QuerySignRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QuerySignRequest)(x) +} + +func (x *QuerySignRequest) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_query_proto_msgTypes[3] + 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_QuerySignRequest_messageType fastReflection_QuerySignRequest_messageType +var _ protoreflect.MessageType = fastReflection_QuerySignRequest_messageType{} + +type fastReflection_QuerySignRequest_messageType struct{} + +func (x fastReflection_QuerySignRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QuerySignRequest)(nil) +} +func (x fastReflection_QuerySignRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QuerySignRequest) +} +func (x fastReflection_QuerySignRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySignRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QuerySignRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySignRequest +} + +// 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_QuerySignRequest) Type() protoreflect.MessageType { + return _fastReflection_QuerySignRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QuerySignRequest) New() protoreflect.Message { + return new(fastReflection_QuerySignRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QuerySignRequest) Interface() protoreflect.ProtoMessage { + return (*QuerySignRequest)(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_QuerySignRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Did != "" { + value := protoreflect.ValueOfString(x.Did) + if !f(fd_QuerySignRequest_did, value) { + return + } + } + if x.Origin != "" { + value := protoreflect.ValueOfString(x.Origin) + if !f(fd_QuerySignRequest_origin, value) { + return + } + } + if x.Key != "" { + value := protoreflect.ValueOfString(x.Key) + if !f(fd_QuerySignRequest_key, value) { + return + } + } + if x.Asset != "" { + value := protoreflect.ValueOfString(x.Asset) + if !f(fd_QuerySignRequest_asset, value) { + return + } + } + if x.Message != "" { + value := protoreflect.ValueOfString(x.Message) + if !f(fd_QuerySignRequest_message, 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_QuerySignRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.QuerySignRequest.did": + return x.Did != "" + case "did.v1.QuerySignRequest.origin": + return x.Origin != "" + case "did.v1.QuerySignRequest.key": + return x.Key != "" + case "did.v1.QuerySignRequest.asset": + return x.Asset != "" + case "did.v1.QuerySignRequest.message": + return x.Message != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QuerySignRequest")) + } + panic(fmt.Errorf("message did.v1.QuerySignRequest 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_QuerySignRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.QuerySignRequest.did": + x.Did = "" + case "did.v1.QuerySignRequest.origin": + x.Origin = "" + case "did.v1.QuerySignRequest.key": + x.Key = "" + case "did.v1.QuerySignRequest.asset": + x.Asset = "" + case "did.v1.QuerySignRequest.message": + x.Message = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QuerySignRequest")) + } + panic(fmt.Errorf("message did.v1.QuerySignRequest 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_QuerySignRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.QuerySignRequest.did": + value := x.Did + return protoreflect.ValueOfString(value) + case "did.v1.QuerySignRequest.origin": + value := x.Origin + return protoreflect.ValueOfString(value) + case "did.v1.QuerySignRequest.key": + value := x.Key + return protoreflect.ValueOfString(value) + case "did.v1.QuerySignRequest.asset": + value := x.Asset + return protoreflect.ValueOfString(value) + case "did.v1.QuerySignRequest.message": + value := x.Message + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QuerySignRequest")) + } + panic(fmt.Errorf("message did.v1.QuerySignRequest 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_QuerySignRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.QuerySignRequest.did": + x.Did = value.Interface().(string) + case "did.v1.QuerySignRequest.origin": + x.Origin = value.Interface().(string) + case "did.v1.QuerySignRequest.key": + x.Key = value.Interface().(string) + case "did.v1.QuerySignRequest.asset": + x.Asset = value.Interface().(string) + case "did.v1.QuerySignRequest.message": + x.Message = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QuerySignRequest")) + } + panic(fmt.Errorf("message did.v1.QuerySignRequest 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_QuerySignRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.QuerySignRequest.did": + panic(fmt.Errorf("field did of message did.v1.QuerySignRequest is not mutable")) + case "did.v1.QuerySignRequest.origin": + panic(fmt.Errorf("field origin of message did.v1.QuerySignRequest is not mutable")) + case "did.v1.QuerySignRequest.key": + panic(fmt.Errorf("field key of message did.v1.QuerySignRequest is not mutable")) + case "did.v1.QuerySignRequest.asset": + panic(fmt.Errorf("field asset of message did.v1.QuerySignRequest is not mutable")) + case "did.v1.QuerySignRequest.message": + panic(fmt.Errorf("field message of message did.v1.QuerySignRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QuerySignRequest")) + } + panic(fmt.Errorf("message did.v1.QuerySignRequest 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_QuerySignRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.QuerySignRequest.did": + return protoreflect.ValueOfString("") + case "did.v1.QuerySignRequest.origin": + return protoreflect.ValueOfString("") + case "did.v1.QuerySignRequest.key": + return protoreflect.ValueOfString("") + case "did.v1.QuerySignRequest.asset": + return protoreflect.ValueOfString("") + case "did.v1.QuerySignRequest.message": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QuerySignRequest")) + } + panic(fmt.Errorf("message did.v1.QuerySignRequest 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_QuerySignRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.QuerySignRequest", 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_QuerySignRequest) 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_QuerySignRequest) 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_QuerySignRequest) 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_QuerySignRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QuerySignRequest) + 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.Did) + 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.Key) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Asset) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Message) + 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().(*QuerySignRequest) + 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.Message) > 0 { + i -= len(x.Message) + copy(dAtA[i:], x.Message) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Message))) + i-- + dAtA[i] = 0x2a + } + if len(x.Asset) > 0 { + i -= len(x.Asset) + copy(dAtA[i:], x.Asset) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Asset))) + i-- + dAtA[i] = 0x22 + } + if len(x.Key) > 0 { + i -= len(x.Key) + copy(dAtA[i:], x.Key) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) + 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.Did) > 0 { + i -= len(x.Did) + copy(dAtA[i:], x.Did) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Did))) + 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().(*QuerySignRequest) + 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: QuerySignRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySignRequest: 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 Did", 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.Did = 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 Key", 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.Key = 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 Asset", 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.Asset = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Message", 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.Message = 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_QuerySignResponse protoreflect.MessageDescriptor + fd_QuerySignResponse_signature protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_query_proto_init() + md_QuerySignResponse = File_did_v1_query_proto.Messages().ByName("QuerySignResponse") + fd_QuerySignResponse_signature = md_QuerySignResponse.Fields().ByName("signature") +} + +var _ protoreflect.Message = (*fastReflection_QuerySignResponse)(nil) + +type fastReflection_QuerySignResponse QuerySignResponse + +func (x *QuerySignResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QuerySignResponse)(x) +} + +func (x *QuerySignResponse) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_query_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QuerySignResponse_messageType fastReflection_QuerySignResponse_messageType +var _ protoreflect.MessageType = fastReflection_QuerySignResponse_messageType{} + +type fastReflection_QuerySignResponse_messageType struct{} + +func (x fastReflection_QuerySignResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QuerySignResponse)(nil) +} +func (x fastReflection_QuerySignResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QuerySignResponse) +} +func (x fastReflection_QuerySignResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySignResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QuerySignResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySignResponse +} + +// 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_QuerySignResponse) Type() protoreflect.MessageType { + return _fastReflection_QuerySignResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QuerySignResponse) New() protoreflect.Message { + return new(fastReflection_QuerySignResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QuerySignResponse) Interface() protoreflect.ProtoMessage { + return (*QuerySignResponse)(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_QuerySignResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Signature != "" { + value := protoreflect.ValueOfString(x.Signature) + if !f(fd_QuerySignResponse_signature, 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_QuerySignResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.QuerySignResponse.signature": + return x.Signature != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QuerySignResponse")) + } + panic(fmt.Errorf("message did.v1.QuerySignResponse 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_QuerySignResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.QuerySignResponse.signature": + x.Signature = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QuerySignResponse")) + } + panic(fmt.Errorf("message did.v1.QuerySignResponse 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_QuerySignResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.QuerySignResponse.signature": + value := x.Signature + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QuerySignResponse")) + } + panic(fmt.Errorf("message did.v1.QuerySignResponse 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_QuerySignResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.QuerySignResponse.signature": + x.Signature = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QuerySignResponse")) + } + panic(fmt.Errorf("message did.v1.QuerySignResponse 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_QuerySignResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.QuerySignResponse.signature": + panic(fmt.Errorf("field signature of message did.v1.QuerySignResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QuerySignResponse")) + } + panic(fmt.Errorf("message did.v1.QuerySignResponse 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_QuerySignResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.QuerySignResponse.signature": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QuerySignResponse")) + } + panic(fmt.Errorf("message did.v1.QuerySignResponse 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_QuerySignResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.QuerySignResponse", 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_QuerySignResponse) 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_QuerySignResponse) 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_QuerySignResponse) 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_QuerySignResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QuerySignResponse) + 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.Signature) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QuerySignResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Signature) > 0 { + i -= len(x.Signature) + copy(dAtA[i:], x.Signature) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signature))) + i-- + dAtA[i] = 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().(*QuerySignResponse) + 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: QuerySignResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySignResponse: 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 Signature", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Signature = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryVerifyRequest protoreflect.MessageDescriptor + fd_QueryVerifyRequest_did protoreflect.FieldDescriptor + fd_QueryVerifyRequest_origin protoreflect.FieldDescriptor + fd_QueryVerifyRequest_key protoreflect.FieldDescriptor + fd_QueryVerifyRequest_asset protoreflect.FieldDescriptor + fd_QueryVerifyRequest_message protoreflect.FieldDescriptor + fd_QueryVerifyRequest_signature protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_query_proto_init() + md_QueryVerifyRequest = File_did_v1_query_proto.Messages().ByName("QueryVerifyRequest") + fd_QueryVerifyRequest_did = md_QueryVerifyRequest.Fields().ByName("did") + fd_QueryVerifyRequest_origin = md_QueryVerifyRequest.Fields().ByName("origin") + fd_QueryVerifyRequest_key = md_QueryVerifyRequest.Fields().ByName("key") + fd_QueryVerifyRequest_asset = md_QueryVerifyRequest.Fields().ByName("asset") + fd_QueryVerifyRequest_message = md_QueryVerifyRequest.Fields().ByName("message") + fd_QueryVerifyRequest_signature = md_QueryVerifyRequest.Fields().ByName("signature") +} + +var _ protoreflect.Message = (*fastReflection_QueryVerifyRequest)(nil) + +type fastReflection_QueryVerifyRequest QueryVerifyRequest + +func (x *QueryVerifyRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryVerifyRequest)(x) +} + +func (x *QueryVerifyRequest) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_query_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryVerifyRequest_messageType fastReflection_QueryVerifyRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryVerifyRequest_messageType{} + +type fastReflection_QueryVerifyRequest_messageType struct{} + +func (x fastReflection_QueryVerifyRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryVerifyRequest)(nil) +} +func (x fastReflection_QueryVerifyRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryVerifyRequest) +} +func (x fastReflection_QueryVerifyRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryVerifyRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryVerifyRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryVerifyRequest +} + +// 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_QueryVerifyRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryVerifyRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryVerifyRequest) New() protoreflect.Message { + return new(fastReflection_QueryVerifyRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryVerifyRequest) Interface() protoreflect.ProtoMessage { + return (*QueryVerifyRequest)(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_QueryVerifyRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Did != "" { + value := protoreflect.ValueOfString(x.Did) + if !f(fd_QueryVerifyRequest_did, value) { + return + } + } + if x.Origin != "" { + value := protoreflect.ValueOfString(x.Origin) + if !f(fd_QueryVerifyRequest_origin, value) { + return + } + } + if x.Key != "" { + value := protoreflect.ValueOfString(x.Key) + if !f(fd_QueryVerifyRequest_key, value) { + return + } + } + if x.Asset != "" { + value := protoreflect.ValueOfString(x.Asset) + if !f(fd_QueryVerifyRequest_asset, value) { + return + } + } + if x.Message != "" { + value := protoreflect.ValueOfString(x.Message) + if !f(fd_QueryVerifyRequest_message, value) { + return + } + } + if x.Signature != "" { + value := protoreflect.ValueOfString(x.Signature) + if !f(fd_QueryVerifyRequest_signature, 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_QueryVerifyRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.QueryVerifyRequest.did": + return x.Did != "" + case "did.v1.QueryVerifyRequest.origin": + return x.Origin != "" + case "did.v1.QueryVerifyRequest.key": + return x.Key != "" + case "did.v1.QueryVerifyRequest.asset": + return x.Asset != "" + case "did.v1.QueryVerifyRequest.message": + return x.Message != "" + case "did.v1.QueryVerifyRequest.signature": + return x.Signature != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryVerifyRequest")) + } + panic(fmt.Errorf("message did.v1.QueryVerifyRequest 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_QueryVerifyRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.QueryVerifyRequest.did": + x.Did = "" + case "did.v1.QueryVerifyRequest.origin": + x.Origin = "" + case "did.v1.QueryVerifyRequest.key": + x.Key = "" + case "did.v1.QueryVerifyRequest.asset": + x.Asset = "" + case "did.v1.QueryVerifyRequest.message": + x.Message = "" + case "did.v1.QueryVerifyRequest.signature": + x.Signature = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryVerifyRequest")) + } + panic(fmt.Errorf("message did.v1.QueryVerifyRequest 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_QueryVerifyRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.QueryVerifyRequest.did": + value := x.Did + return protoreflect.ValueOfString(value) + case "did.v1.QueryVerifyRequest.origin": + value := x.Origin + return protoreflect.ValueOfString(value) + case "did.v1.QueryVerifyRequest.key": + value := x.Key + return protoreflect.ValueOfString(value) + case "did.v1.QueryVerifyRequest.asset": + value := x.Asset + return protoreflect.ValueOfString(value) + case "did.v1.QueryVerifyRequest.message": + value := x.Message + return protoreflect.ValueOfString(value) + case "did.v1.QueryVerifyRequest.signature": + value := x.Signature + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryVerifyRequest")) + } + panic(fmt.Errorf("message did.v1.QueryVerifyRequest 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_QueryVerifyRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.QueryVerifyRequest.did": + x.Did = value.Interface().(string) + case "did.v1.QueryVerifyRequest.origin": + x.Origin = value.Interface().(string) + case "did.v1.QueryVerifyRequest.key": + x.Key = value.Interface().(string) + case "did.v1.QueryVerifyRequest.asset": + x.Asset = value.Interface().(string) + case "did.v1.QueryVerifyRequest.message": + x.Message = value.Interface().(string) + case "did.v1.QueryVerifyRequest.signature": + x.Signature = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryVerifyRequest")) + } + panic(fmt.Errorf("message did.v1.QueryVerifyRequest 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_QueryVerifyRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.QueryVerifyRequest.did": + panic(fmt.Errorf("field did of message did.v1.QueryVerifyRequest is not mutable")) + case "did.v1.QueryVerifyRequest.origin": + panic(fmt.Errorf("field origin of message did.v1.QueryVerifyRequest is not mutable")) + case "did.v1.QueryVerifyRequest.key": + panic(fmt.Errorf("field key of message did.v1.QueryVerifyRequest is not mutable")) + case "did.v1.QueryVerifyRequest.asset": + panic(fmt.Errorf("field asset of message did.v1.QueryVerifyRequest is not mutable")) + case "did.v1.QueryVerifyRequest.message": + panic(fmt.Errorf("field message of message did.v1.QueryVerifyRequest is not mutable")) + case "did.v1.QueryVerifyRequest.signature": + panic(fmt.Errorf("field signature of message did.v1.QueryVerifyRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryVerifyRequest")) + } + panic(fmt.Errorf("message did.v1.QueryVerifyRequest 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_QueryVerifyRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.QueryVerifyRequest.did": + return protoreflect.ValueOfString("") + case "did.v1.QueryVerifyRequest.origin": + return protoreflect.ValueOfString("") + case "did.v1.QueryVerifyRequest.key": + return protoreflect.ValueOfString("") + case "did.v1.QueryVerifyRequest.asset": + return protoreflect.ValueOfString("") + case "did.v1.QueryVerifyRequest.message": + return protoreflect.ValueOfString("") + case "did.v1.QueryVerifyRequest.signature": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryVerifyRequest")) + } + panic(fmt.Errorf("message did.v1.QueryVerifyRequest 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_QueryVerifyRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryVerifyRequest", 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_QueryVerifyRequest) 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_QueryVerifyRequest) 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_QueryVerifyRequest) 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_QueryVerifyRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryVerifyRequest) + 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.Did) + 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.Key) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Asset) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Message) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Signature) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryVerifyRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Signature) > 0 { + i -= len(x.Signature) + copy(dAtA[i:], x.Signature) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signature))) + i-- + dAtA[i] = 0x32 + } + if len(x.Message) > 0 { + i -= len(x.Message) + copy(dAtA[i:], x.Message) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Message))) + i-- + dAtA[i] = 0x2a + } + if len(x.Asset) > 0 { + i -= len(x.Asset) + copy(dAtA[i:], x.Asset) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Asset))) + i-- + dAtA[i] = 0x22 + } + if len(x.Key) > 0 { + i -= len(x.Key) + copy(dAtA[i:], x.Key) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) + 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.Did) > 0 { + i -= len(x.Did) + copy(dAtA[i:], x.Did) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Did))) + 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().(*QueryVerifyRequest) + 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: QueryVerifyRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryVerifyRequest: 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 Did", 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.Did = 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 Key", 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.Key = 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 Asset", 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.Asset = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Message", 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.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Signature = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryVerifyResponse protoreflect.MessageDescriptor + fd_QueryVerifyResponse_valid protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_query_proto_init() + md_QueryVerifyResponse = File_did_v1_query_proto.Messages().ByName("QueryVerifyResponse") + fd_QueryVerifyResponse_valid = md_QueryVerifyResponse.Fields().ByName("valid") +} + +var _ protoreflect.Message = (*fastReflection_QueryVerifyResponse)(nil) + +type fastReflection_QueryVerifyResponse QueryVerifyResponse + +func (x *QueryVerifyResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryVerifyResponse)(x) +} + +func (x *QueryVerifyResponse) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_query_proto_msgTypes[6] + 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_QueryVerifyResponse_messageType fastReflection_QueryVerifyResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryVerifyResponse_messageType{} + +type fastReflection_QueryVerifyResponse_messageType struct{} + +func (x fastReflection_QueryVerifyResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryVerifyResponse)(nil) +} +func (x fastReflection_QueryVerifyResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryVerifyResponse) +} +func (x fastReflection_QueryVerifyResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryVerifyResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryVerifyResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryVerifyResponse +} + +// 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_QueryVerifyResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryVerifyResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryVerifyResponse) New() protoreflect.Message { + return new(fastReflection_QueryVerifyResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryVerifyResponse) Interface() protoreflect.ProtoMessage { + return (*QueryVerifyResponse)(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_QueryVerifyResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Valid != false { + value := protoreflect.ValueOfBool(x.Valid) + if !f(fd_QueryVerifyResponse_valid, 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_QueryVerifyResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.QueryVerifyResponse.valid": + return x.Valid != false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryVerifyResponse")) + } + panic(fmt.Errorf("message did.v1.QueryVerifyResponse 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_QueryVerifyResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.QueryVerifyResponse.valid": + x.Valid = false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryVerifyResponse")) + } + panic(fmt.Errorf("message did.v1.QueryVerifyResponse 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_QueryVerifyResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.QueryVerifyResponse.valid": + value := x.Valid + return protoreflect.ValueOfBool(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryVerifyResponse")) + } + panic(fmt.Errorf("message did.v1.QueryVerifyResponse 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_QueryVerifyResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.QueryVerifyResponse.valid": + x.Valid = value.Bool() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryVerifyResponse")) + } + panic(fmt.Errorf("message did.v1.QueryVerifyResponse 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_QueryVerifyResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.QueryVerifyResponse.valid": + panic(fmt.Errorf("field valid of message did.v1.QueryVerifyResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryVerifyResponse")) + } + panic(fmt.Errorf("message did.v1.QueryVerifyResponse 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_QueryVerifyResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.QueryVerifyResponse.valid": + return protoreflect.ValueOfBool(false) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryVerifyResponse")) + } + panic(fmt.Errorf("message did.v1.QueryVerifyResponse 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_QueryVerifyResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryVerifyResponse", 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_QueryVerifyResponse) 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_QueryVerifyResponse) 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_QueryVerifyResponse) 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_QueryVerifyResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryVerifyResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Valid { + n += 2 + } + 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().(*QueryVerifyResponse) + 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.Valid { + i-- + if x.Valid { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + 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().(*QueryVerifyResponse) + 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: QueryVerifyResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryVerifyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Valid", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Valid = bool(v != 0) + 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.List = (*_Document_3_list)(nil) type _Document_3_list struct { @@ -1757,7 +4003,7 @@ func (x *Document) ProtoReflect() protoreflect.Message { } func (x *Document) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_query_proto_msgTypes[3] + mi := &file_did_v1_query_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2746,6 +4992,224 @@ func (x *QueryResolveResponse) GetDocument() *Document { return nil } +// QuerySignRequest is the request type for the Query/Sign RPC method. +type QuerySignRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` + Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` + Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` + Asset string `protobuf:"bytes,4,opt,name=asset,proto3" json:"asset,omitempty"` + Message string `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *QuerySignRequest) Reset() { + *x = QuerySignRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_query_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuerySignRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuerySignRequest) ProtoMessage() {} + +// Deprecated: Use QuerySignRequest.ProtoReflect.Descriptor instead. +func (*QuerySignRequest) Descriptor() ([]byte, []int) { + return file_did_v1_query_proto_rawDescGZIP(), []int{3} +} + +func (x *QuerySignRequest) GetDid() string { + if x != nil { + return x.Did + } + return "" +} + +func (x *QuerySignRequest) GetOrigin() string { + if x != nil { + return x.Origin + } + return "" +} + +func (x *QuerySignRequest) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *QuerySignRequest) GetAsset() string { + if x != nil { + return x.Asset + } + return "" +} + +func (x *QuerySignRequest) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +// QuerySignResponse is the response type for the Query/Sign RPC method. +type QuerySignResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // signature is the signature of the message + Signature string `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (x *QuerySignResponse) Reset() { + *x = QuerySignResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_query_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuerySignResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuerySignResponse) ProtoMessage() {} + +// Deprecated: Use QuerySignResponse.ProtoReflect.Descriptor instead. +func (*QuerySignResponse) Descriptor() ([]byte, []int) { + return file_did_v1_query_proto_rawDescGZIP(), []int{4} +} + +func (x *QuerySignResponse) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +// QueryVerifyRequest is the request type for the Query/Verify RPC method. +type QueryVerifyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` + Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` + Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` + Asset string `protobuf:"bytes,4,opt,name=asset,proto3" json:"asset,omitempty"` + Message string `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"` + Signature string `protobuf:"bytes,6,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (x *QueryVerifyRequest) Reset() { + *x = QueryVerifyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_query_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryVerifyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryVerifyRequest) ProtoMessage() {} + +// Deprecated: Use QueryVerifyRequest.ProtoReflect.Descriptor instead. +func (*QueryVerifyRequest) Descriptor() ([]byte, []int) { + return file_did_v1_query_proto_rawDescGZIP(), []int{5} +} + +func (x *QueryVerifyRequest) GetDid() string { + if x != nil { + return x.Did + } + return "" +} + +func (x *QueryVerifyRequest) GetOrigin() string { + if x != nil { + return x.Origin + } + return "" +} + +func (x *QueryVerifyRequest) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *QueryVerifyRequest) GetAsset() string { + if x != nil { + return x.Asset + } + return "" +} + +func (x *QueryVerifyRequest) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *QueryVerifyRequest) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +// QueryVerifyResponse is the response type for the Query/Verify RPC method. +type QueryVerifyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // valid is the validity of the signature + Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` +} + +func (x *QueryVerifyResponse) Reset() { + *x = QueryVerifyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_query_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryVerifyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryVerifyResponse) ProtoMessage() {} + +// Deprecated: Use QueryVerifyResponse.ProtoReflect.Descriptor instead. +func (*QueryVerifyResponse) Descriptor() ([]byte, []int) { + return file_did_v1_query_proto_rawDescGZIP(), []int{6} +} + +func (x *QueryVerifyResponse) GetValid() bool { + if x != nil { + return x.Valid + } + return false +} + // Document defines a DID document type Document struct { state protoimpl.MessageState @@ -2764,7 +5228,7 @@ type Document struct { func (x *Document) Reset() { *x = Document{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[3] + mi := &file_did_v1_query_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2778,7 +5242,7 @@ func (*Document) ProtoMessage() {} // Deprecated: Use Document.ProtoReflect.Descriptor instead. func (*Document) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{3} + return file_did_v1_query_proto_rawDescGZIP(), []int{7} } func (x *Document) GetId() string { @@ -2852,43 +5316,78 @@ var file_did_v1_query_proto_rawDesc = []byte{ 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x64, - 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x91, 0x02, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x75, - 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, - 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, - 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x33, 0x0a, 0x15, 0x63, 0x61, 0x70, 0x61, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x15, - 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x6e, 0x76, 0x6f, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, 0x61, 0x70, - 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x32, 0xa8, 0x01, 0x0a, 0x05, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x4c, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x7e, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 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, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x18, 0x0a, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x31, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x9e, 0x01, 0x0a, 0x12, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x64, 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, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, + 0x73, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x2b, 0x0a, 0x13, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x22, 0x91, 0x02, 0x0a, 0x08, 0x44, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x61, + 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, + 0x10, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x33, 0x0a, 0x15, 0x63, 0x61, 0x70, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, + 0x15, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x6e, 0x76, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, 0x61, + 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x32, 0xdc, 0x02, 0x0a, + 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x4c, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x0f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x09, 0x12, 0x07, 0x2f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x51, 0x0a, 0x07, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 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, 0x0f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x09, 0x12, 0x07, 0x2f, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x51, 0x0a, 0x07, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x12, 0x14, - 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x64, 0x69, 0x64, - 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, - 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, - 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, - 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, - 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x64, 0x69, + 0x64, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x12, 0x54, 0x0a, 0x04, 0x53, 0x69, 0x67, 0x6e, 0x12, + 0x18, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, + 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x64, 0x69, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x22, 0x0f, 0x2f, 0x64, + 0x69, 0x64, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x12, 0x5c, 0x0a, + 0x06, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x22, 0x11, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x7b, + 0x64, 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x42, 0x7a, 0x0a, 0x0a, 0x63, + 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, + 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, + 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2903,23 +5402,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, 4) +var file_did_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_did_v1_query_proto_goTypes = []interface{}{ (*QueryRequest)(nil), // 0: did.v1.QueryRequest (*QueryParamsResponse)(nil), // 1: did.v1.QueryParamsResponse (*QueryResolveResponse)(nil), // 2: did.v1.QueryResolveResponse - (*Document)(nil), // 3: did.v1.Document - (*Params)(nil), // 4: did.v1.Params + (*QuerySignRequest)(nil), // 3: did.v1.QuerySignRequest + (*QuerySignResponse)(nil), // 4: did.v1.QuerySignResponse + (*QueryVerifyRequest)(nil), // 5: did.v1.QueryVerifyRequest + (*QueryVerifyResponse)(nil), // 6: did.v1.QueryVerifyResponse + (*Document)(nil), // 7: did.v1.Document + (*Params)(nil), // 8: did.v1.Params } var file_did_v1_query_proto_depIdxs = []int32{ - 4, // 0: did.v1.QueryParamsResponse.params:type_name -> did.v1.Params - 3, // 1: did.v1.QueryResolveResponse.document:type_name -> did.v1.Document + 8, // 0: did.v1.QueryParamsResponse.params:type_name -> did.v1.Params + 7, // 1: did.v1.QueryResolveResponse.document:type_name -> did.v1.Document 0, // 2: did.v1.Query.Params:input_type -> did.v1.QueryRequest 0, // 3: did.v1.Query.Resolve:input_type -> did.v1.QueryRequest - 1, // 4: did.v1.Query.Params:output_type -> did.v1.QueryParamsResponse - 2, // 5: did.v1.Query.Resolve:output_type -> did.v1.QueryResolveResponse - 4, // [4:6] is the sub-list for method output_type - 2, // [2:4] is the sub-list for method input_type + 3, // 4: did.v1.Query.Sign:input_type -> did.v1.QuerySignRequest + 5, // 5: did.v1.Query.Verify:input_type -> did.v1.QueryVerifyRequest + 1, // 6: did.v1.Query.Params:output_type -> did.v1.QueryParamsResponse + 2, // 7: did.v1.Query.Resolve:output_type -> did.v1.QueryResolveResponse + 4, // 8: did.v1.Query.Sign:output_type -> did.v1.QuerySignResponse + 6, // 9: did.v1.Query.Verify:output_type -> did.v1.QueryVerifyResponse + 6, // [6:10] is the sub-list for method output_type + 2, // [2:6] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name @@ -2969,6 +5476,54 @@ func file_did_v1_query_proto_init() { } } file_did_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuerySignRequest); 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[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuerySignResponse); 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[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryVerifyRequest); 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[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryVerifyResponse); 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[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Document); i { case 0: return &v.state @@ -2987,7 +5542,7 @@ func file_did_v1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + 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 60ab53114..2c1db75cd 100644 --- a/api/did/v1/query_grpc.pb.go +++ b/api/did/v1/query_grpc.pb.go @@ -21,6 +21,8 @@ const _ = grpc.SupportPackageIsVersion7 const ( Query_Params_FullMethodName = "/did.v1.Query/Params" Query_Resolve_FullMethodName = "/did.v1.Query/Resolve" + Query_Sign_FullMethodName = "/did.v1.Query/Sign" + Query_Verify_FullMethodName = "/did.v1.Query/Verify" ) // QueryClient is the client API for Query service. @@ -31,6 +33,10 @@ type QueryClient interface { Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // Resolve queries the DID document by its id. Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) + // Sign signs a message with the DID document + Sign(ctx context.Context, in *QuerySignRequest, opts ...grpc.CallOption) (*QuerySignResponse, error) + // Verify verifies a message with the DID document + Verify(ctx context.Context, in *QueryVerifyRequest, opts ...grpc.CallOption) (*QueryVerifyResponse, error) } type queryClient struct { @@ -59,6 +65,24 @@ func (c *queryClient) Resolve(ctx context.Context, in *QueryRequest, opts ...grp return out, nil } +func (c *queryClient) Sign(ctx context.Context, in *QuerySignRequest, opts ...grpc.CallOption) (*QuerySignResponse, error) { + out := new(QuerySignResponse) + err := c.cc.Invoke(ctx, Query_Sign_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Verify(ctx context.Context, in *QueryVerifyRequest, opts ...grpc.CallOption) (*QueryVerifyResponse, error) { + out := new(QueryVerifyResponse) + err := c.cc.Invoke(ctx, Query_Verify_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer // for forward compatibility @@ -67,6 +91,10 @@ type QueryServer interface { Params(context.Context, *QueryRequest) (*QueryParamsResponse, error) // Resolve queries the DID document by its id. Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error) + // Sign signs a message with the DID document + Sign(context.Context, *QuerySignRequest) (*QuerySignResponse, error) + // Verify verifies a message with the DID document + Verify(context.Context, *QueryVerifyRequest) (*QueryVerifyResponse, error) mustEmbedUnimplementedQueryServer() } @@ -80,6 +108,12 @@ func (UnimplementedQueryServer) Params(context.Context, *QueryRequest) (*QueryPa func (UnimplementedQueryServer) Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Resolve not implemented") } +func (UnimplementedQueryServer) Sign(context.Context, *QuerySignRequest) (*QuerySignResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Sign not implemented") +} +func (UnimplementedQueryServer) Verify(context.Context, *QueryVerifyRequest) (*QueryVerifyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Verify not implemented") +} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. @@ -129,6 +163,42 @@ func _Query_Resolve_Handler(srv interface{}, ctx context.Context, dec func(inter return interceptor(ctx, in, info, handler) } +func _Query_Sign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySignRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Sign(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Sign_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Sign(ctx, req.(*QuerySignRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Verify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryVerifyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Verify(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Verify_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Verify(ctx, req.(*QueryVerifyRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Query_ServiceDesc is the grpc.ServiceDesc for Query service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -144,6 +214,14 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "Resolve", Handler: _Query_Resolve_Handler, }, + { + MethodName: "Sign", + Handler: _Query_Sign_Handler, + }, + { + MethodName: "Verify", + Handler: _Query_Verify_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "did/v1/query.proto", diff --git a/api/did/v1/state.pulsar.go b/api/did/v1/state.pulsar.go index 83408a5e2..c5f1b1c25 100644 --- a/api/did/v1/state.pulsar.go +++ b/api/did/v1/state.pulsar.go @@ -10,15 +10,101 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" + sort "sort" sync "sync" ) +var _ protoreflect.Map = (*_Authentication_6_map)(nil) + +type _Authentication_6_map struct { + m *map[string]string +} + +func (x *_Authentication_6_map) Len() int { + if x.m == nil { + return 0 + } + return len(*x.m) +} + +func (x *_Authentication_6_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { + if x.m == nil { + return + } + for k, v := range *x.m { + mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) + mapValue := protoreflect.ValueOfString(v) + if !f(mapKey, mapValue) { + break + } + } +} + +func (x *_Authentication_6_map) Has(key protoreflect.MapKey) bool { + if x.m == nil { + return false + } + keyUnwrapped := key.String() + concreteValue := keyUnwrapped + _, ok := (*x.m)[concreteValue] + return ok +} + +func (x *_Authentication_6_map) Clear(key protoreflect.MapKey) { + if x.m == nil { + return + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + delete(*x.m, concreteKey) +} + +func (x *_Authentication_6_map) Get(key protoreflect.MapKey) protoreflect.Value { + if x.m == nil { + return protoreflect.Value{} + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + v, ok := (*x.m)[concreteKey] + if !ok { + return protoreflect.Value{} + } + return protoreflect.ValueOfString(v) +} + +func (x *_Authentication_6_map) Set(key protoreflect.MapKey, value protoreflect.Value) { + if !key.IsValid() || !value.IsValid() { + panic("invalid key or value provided") + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.m)[concreteKey] = concreteValue +} + +func (x *_Authentication_6_map) Mutable(key protoreflect.MapKey) protoreflect.Value { + panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") +} + +func (x *_Authentication_6_map) NewValue() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Authentication_6_map) IsValid() bool { + return x.m != nil +} + var ( - md_Authentication protoreflect.MessageDescriptor - fd_Authentication_did protoreflect.FieldDescriptor - fd_Authentication_controller protoreflect.FieldDescriptor - fd_Authentication_subject protoreflect.FieldDescriptor - fd_Authentication_public_key protoreflect.FieldDescriptor + md_Authentication protoreflect.MessageDescriptor + fd_Authentication_did protoreflect.FieldDescriptor + fd_Authentication_controller protoreflect.FieldDescriptor + fd_Authentication_subject protoreflect.FieldDescriptor + fd_Authentication_public_key protoreflect.FieldDescriptor + fd_Authentication_credential_id protoreflect.FieldDescriptor + fd_Authentication_metadata protoreflect.FieldDescriptor + fd_Authentication_creation_block protoreflect.FieldDescriptor ) func init() { @@ -28,6 +114,9 @@ func init() { fd_Authentication_controller = md_Authentication.Fields().ByName("controller") fd_Authentication_subject = md_Authentication.Fields().ByName("subject") fd_Authentication_public_key = md_Authentication.Fields().ByName("public_key") + fd_Authentication_credential_id = md_Authentication.Fields().ByName("credential_id") + fd_Authentication_metadata = md_Authentication.Fields().ByName("metadata") + fd_Authentication_creation_block = md_Authentication.Fields().ByName("creation_block") } var _ protoreflect.Message = (*fastReflection_Authentication)(nil) @@ -119,6 +208,24 @@ func (x *fastReflection_Authentication) Range(f func(protoreflect.FieldDescripto return } } + if len(x.CredentialId) != 0 { + value := protoreflect.ValueOfBytes(x.CredentialId) + if !f(fd_Authentication_credential_id, value) { + return + } + } + if len(x.Metadata) != 0 { + value := protoreflect.ValueOfMap(&_Authentication_6_map{m: &x.Metadata}) + if !f(fd_Authentication_metadata, value) { + return + } + } + if x.CreationBlock != int64(0) { + value := protoreflect.ValueOfInt64(x.CreationBlock) + if !f(fd_Authentication_creation_block, value) { + return + } + } } // Has reports whether a field is populated. @@ -142,6 +249,12 @@ func (x *fastReflection_Authentication) Has(fd protoreflect.FieldDescriptor) boo return x.Subject != "" case "did.v1.Authentication.public_key": return x.PublicKey != nil + case "did.v1.Authentication.credential_id": + return len(x.CredentialId) != 0 + case "did.v1.Authentication.metadata": + return len(x.Metadata) != 0 + case "did.v1.Authentication.creation_block": + return x.CreationBlock != int64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Authentication")) @@ -166,6 +279,12 @@ func (x *fastReflection_Authentication) Clear(fd protoreflect.FieldDescriptor) { x.Subject = "" case "did.v1.Authentication.public_key": x.PublicKey = nil + case "did.v1.Authentication.credential_id": + x.CredentialId = nil + case "did.v1.Authentication.metadata": + x.Metadata = nil + case "did.v1.Authentication.creation_block": + x.CreationBlock = int64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Authentication")) @@ -194,6 +313,18 @@ func (x *fastReflection_Authentication) Get(descriptor protoreflect.FieldDescrip case "did.v1.Authentication.public_key": value := x.PublicKey return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "did.v1.Authentication.credential_id": + value := x.CredentialId + return protoreflect.ValueOfBytes(value) + case "did.v1.Authentication.metadata": + if len(x.Metadata) == 0 { + return protoreflect.ValueOfMap(&_Authentication_6_map{}) + } + mapValue := &_Authentication_6_map{m: &x.Metadata} + return protoreflect.ValueOfMap(mapValue) + case "did.v1.Authentication.creation_block": + value := x.CreationBlock + return protoreflect.ValueOfInt64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Authentication")) @@ -222,6 +353,14 @@ func (x *fastReflection_Authentication) Set(fd protoreflect.FieldDescriptor, val x.Subject = value.Interface().(string) case "did.v1.Authentication.public_key": x.PublicKey = value.Message().Interface().(*PubKey) + case "did.v1.Authentication.credential_id": + x.CredentialId = value.Bytes() + case "did.v1.Authentication.metadata": + mv := value.Map() + cmv := mv.(*_Authentication_6_map) + x.Metadata = *cmv.m + case "did.v1.Authentication.creation_block": + x.CreationBlock = value.Int() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Authentication")) @@ -247,12 +386,22 @@ func (x *fastReflection_Authentication) Mutable(fd protoreflect.FieldDescriptor) x.PublicKey = new(PubKey) } return protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) + case "did.v1.Authentication.metadata": + if x.Metadata == nil { + x.Metadata = make(map[string]string) + } + value := &_Authentication_6_map{m: &x.Metadata} + return protoreflect.ValueOfMap(value) case "did.v1.Authentication.did": panic(fmt.Errorf("field did of message did.v1.Authentication is not mutable")) case "did.v1.Authentication.controller": panic(fmt.Errorf("field controller of message did.v1.Authentication is not mutable")) case "did.v1.Authentication.subject": panic(fmt.Errorf("field subject of message did.v1.Authentication is not mutable")) + case "did.v1.Authentication.credential_id": + panic(fmt.Errorf("field credential_id of message did.v1.Authentication is not mutable")) + case "did.v1.Authentication.creation_block": + panic(fmt.Errorf("field creation_block of message did.v1.Authentication is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Authentication")) @@ -275,6 +424,13 @@ func (x *fastReflection_Authentication) NewField(fd protoreflect.FieldDescriptor case "did.v1.Authentication.public_key": m := new(PubKey) return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "did.v1.Authentication.credential_id": + return protoreflect.ValueOfBytes(nil) + case "did.v1.Authentication.metadata": + m := make(map[string]string) + return protoreflect.ValueOfMap(&_Authentication_6_map{m: &m}) + case "did.v1.Authentication.creation_block": + return protoreflect.ValueOfInt64(int64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Authentication")) @@ -360,6 +516,34 @@ func (x *fastReflection_Authentication) ProtoMethods() *protoiface.Methods { l = options.Size(x.PublicKey) n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.CredentialId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Metadata) > 0 { + SiZeMaP := func(k string, v string) { + mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + len(v) + runtime.Sov(uint64(len(v))) + n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) + } + if options.Deterministic { + sortme := make([]string, 0, len(x.Metadata)) + for k := range x.Metadata { + sortme = append(sortme, k) + } + sort.Strings(sortme) + for _, k := range sortme { + v := x.Metadata[k] + SiZeMaP(k, v) + } + } else { + for k, v := range x.Metadata { + SiZeMaP(k, v) + } + } + } + if x.CreationBlock != 0 { + n += 1 + runtime.Sov(uint64(x.CreationBlock)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -389,6 +573,61 @@ func (x *fastReflection_Authentication) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.CreationBlock != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.CreationBlock)) + i-- + dAtA[i] = 0x38 + } + if len(x.Metadata) > 0 { + MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) { + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x32 + return protoiface.MarshalOutput{}, nil + } + if options.Deterministic { + keysForMetadata := make([]string, 0, len(x.Metadata)) + for k := range x.Metadata { + keysForMetadata = append(keysForMetadata, string(k)) + } + sort.Slice(keysForMetadata, func(i, j int) bool { + return keysForMetadata[i] < keysForMetadata[j] + }) + for iNdEx := len(keysForMetadata) - 1; iNdEx >= 0; iNdEx-- { + v := x.Metadata[string(keysForMetadata[iNdEx])] + out, err := MaRsHaLmAp(keysForMetadata[iNdEx], v) + if err != nil { + return out, err + } + } + } else { + for k := range x.Metadata { + v := x.Metadata[k] + out, err := MaRsHaLmAp(k, v) + if err != nil { + return out, err + } + } + } + } + if len(x.CredentialId) > 0 { + i -= len(x.CredentialId) + copy(dAtA[i:], x.CredentialId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CredentialId))) + i-- + dAtA[i] = 0x2a + } if x.PublicKey != nil { encoded, err := options.Marshal(x.PublicKey) if err != nil { @@ -605,6 +844,186 @@ func (x *fastReflection_Authentication) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CredentialId", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + 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.CredentialId = append(x.CredentialId[:0], dAtA[iNdEx:postIndex]...) + if x.CredentialId == nil { + x.CredentialId = []byte{} + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Metadata == nil { + x.Metadata = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := 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) + if fieldNum == 1 { + var stringLenmapkey 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++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postStringIndexmapkey > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue 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++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postStringIndexmapvalue > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + 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) > postIndex { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + x.Metadata[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreationBlock", wireType) + } + x.CreationBlock = 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.CreationBlock |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -641,15 +1060,16 @@ func (x *fastReflection_Authentication) ProtoMethods() *protoiface.Methods { } var ( - md_Controller protoreflect.MessageDescriptor - fd_Controller_number protoreflect.FieldDescriptor - fd_Controller_did protoreflect.FieldDescriptor - fd_Controller_sonr_address protoreflect.FieldDescriptor - fd_Controller_eth_address protoreflect.FieldDescriptor - fd_Controller_btc_address protoreflect.FieldDescriptor - fd_Controller_public_key protoreflect.FieldDescriptor - fd_Controller_ks_val protoreflect.FieldDescriptor - fd_Controller_claimed protoreflect.FieldDescriptor + md_Controller protoreflect.MessageDescriptor + fd_Controller_number protoreflect.FieldDescriptor + fd_Controller_did protoreflect.FieldDescriptor + fd_Controller_sonr_address protoreflect.FieldDescriptor + fd_Controller_eth_address protoreflect.FieldDescriptor + fd_Controller_btc_address protoreflect.FieldDescriptor + fd_Controller_public_key protoreflect.FieldDescriptor + fd_Controller_ks_val protoreflect.FieldDescriptor + fd_Controller_claimed_block protoreflect.FieldDescriptor + fd_Controller_creation_block protoreflect.FieldDescriptor ) func init() { @@ -662,7 +1082,8 @@ func init() { fd_Controller_btc_address = md_Controller.Fields().ByName("btc_address") fd_Controller_public_key = md_Controller.Fields().ByName("public_key") fd_Controller_ks_val = md_Controller.Fields().ByName("ks_val") - fd_Controller_claimed = md_Controller.Fields().ByName("claimed") + fd_Controller_claimed_block = md_Controller.Fields().ByName("claimed_block") + fd_Controller_creation_block = md_Controller.Fields().ByName("creation_block") } var _ protoreflect.Message = (*fastReflection_Controller)(nil) @@ -772,9 +1193,15 @@ func (x *fastReflection_Controller) Range(f func(protoreflect.FieldDescriptor, p return } } - if x.Claimed != false { - value := protoreflect.ValueOfBool(x.Claimed) - if !f(fd_Controller_claimed, value) { + if x.ClaimedBlock != int64(0) { + value := protoreflect.ValueOfInt64(x.ClaimedBlock) + if !f(fd_Controller_claimed_block, value) { + return + } + } + if x.CreationBlock != int64(0) { + value := protoreflect.ValueOfInt64(x.CreationBlock) + if !f(fd_Controller_creation_block, value) { return } } @@ -807,8 +1234,10 @@ func (x *fastReflection_Controller) Has(fd protoreflect.FieldDescriptor) bool { return x.PublicKey != nil case "did.v1.Controller.ks_val": return x.KsVal != "" - case "did.v1.Controller.claimed": - return x.Claimed != false + case "did.v1.Controller.claimed_block": + return x.ClaimedBlock != int64(0) + case "did.v1.Controller.creation_block": + return x.CreationBlock != int64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) @@ -839,8 +1268,10 @@ func (x *fastReflection_Controller) Clear(fd protoreflect.FieldDescriptor) { x.PublicKey = nil case "did.v1.Controller.ks_val": x.KsVal = "" - case "did.v1.Controller.claimed": - x.Claimed = false + case "did.v1.Controller.claimed_block": + x.ClaimedBlock = int64(0) + case "did.v1.Controller.creation_block": + x.CreationBlock = int64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) @@ -878,9 +1309,12 @@ func (x *fastReflection_Controller) Get(descriptor protoreflect.FieldDescriptor) case "did.v1.Controller.ks_val": value := x.KsVal return protoreflect.ValueOfString(value) - case "did.v1.Controller.claimed": - value := x.Claimed - return protoreflect.ValueOfBool(value) + case "did.v1.Controller.claimed_block": + value := x.ClaimedBlock + return protoreflect.ValueOfInt64(value) + case "did.v1.Controller.creation_block": + value := x.CreationBlock + return protoreflect.ValueOfInt64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) @@ -915,8 +1349,10 @@ func (x *fastReflection_Controller) Set(fd protoreflect.FieldDescriptor, value p x.PublicKey = value.Message().Interface().(*PubKey) case "did.v1.Controller.ks_val": x.KsVal = value.Interface().(string) - case "did.v1.Controller.claimed": - x.Claimed = value.Bool() + case "did.v1.Controller.claimed_block": + x.ClaimedBlock = value.Int() + case "did.v1.Controller.creation_block": + x.CreationBlock = value.Int() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) @@ -954,8 +1390,10 @@ func (x *fastReflection_Controller) Mutable(fd protoreflect.FieldDescriptor) pro panic(fmt.Errorf("field btc_address of message did.v1.Controller is not mutable")) case "did.v1.Controller.ks_val": panic(fmt.Errorf("field ks_val of message did.v1.Controller is not mutable")) - case "did.v1.Controller.claimed": - panic(fmt.Errorf("field claimed of message did.v1.Controller is not mutable")) + case "did.v1.Controller.claimed_block": + panic(fmt.Errorf("field claimed_block of message did.v1.Controller is not mutable")) + case "did.v1.Controller.creation_block": + panic(fmt.Errorf("field creation_block of message did.v1.Controller is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) @@ -984,8 +1422,10 @@ func (x *fastReflection_Controller) NewField(fd protoreflect.FieldDescriptor) pr return protoreflect.ValueOfMessage(m.ProtoReflect()) case "did.v1.Controller.ks_val": return protoreflect.ValueOfString("") - case "did.v1.Controller.claimed": - return protoreflect.ValueOfBool(false) + case "did.v1.Controller.claimed_block": + return protoreflect.ValueOfInt64(int64(0)) + case "did.v1.Controller.creation_block": + return protoreflect.ValueOfInt64(int64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) @@ -1082,8 +1522,11 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.Claimed { - n += 2 + if x.ClaimedBlock != 0 { + n += 1 + runtime.Sov(uint64(x.ClaimedBlock)) + } + if x.CreationBlock != 0 { + n += 1 + runtime.Sov(uint64(x.CreationBlock)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -1114,13 +1557,13 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Claimed { + if x.CreationBlock != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.CreationBlock)) i-- - if x.Claimed { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + dAtA[i] = 0x48 + } + if x.ClaimedBlock != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ClaimedBlock)) i-- dAtA[i] = 0x40 } @@ -1444,9 +1887,9 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 8: if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Claimed", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ClaimedBlock", wireType) } - var v int + x.ClaimedBlock = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -1456,12 +1899,30 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + x.ClaimedBlock |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreationBlock", wireType) + } + x.CreationBlock = 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.CreationBlock |= int64(b&0x7F) << shift if b < 0x80 { break } } - x.Claimed = bool(v != 0) default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1497,6 +1958,88 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { } } +var _ protoreflect.Map = (*_Verification_8_map)(nil) + +type _Verification_8_map struct { + m *map[string]string +} + +func (x *_Verification_8_map) Len() int { + if x.m == nil { + return 0 + } + return len(*x.m) +} + +func (x *_Verification_8_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { + if x.m == nil { + return + } + for k, v := range *x.m { + mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) + mapValue := protoreflect.ValueOfString(v) + if !f(mapKey, mapValue) { + break + } + } +} + +func (x *_Verification_8_map) Has(key protoreflect.MapKey) bool { + if x.m == nil { + return false + } + keyUnwrapped := key.String() + concreteValue := keyUnwrapped + _, ok := (*x.m)[concreteValue] + return ok +} + +func (x *_Verification_8_map) Clear(key protoreflect.MapKey) { + if x.m == nil { + return + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + delete(*x.m, concreteKey) +} + +func (x *_Verification_8_map) Get(key protoreflect.MapKey) protoreflect.Value { + if x.m == nil { + return protoreflect.Value{} + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + v, ok := (*x.m)[concreteKey] + if !ok { + return protoreflect.Value{} + } + return protoreflect.ValueOfString(v) +} + +func (x *_Verification_8_map) Set(key protoreflect.MapKey, value protoreflect.Value) { + if !key.IsValid() || !value.IsValid() { + panic("invalid key or value provided") + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.m)[concreteKey] = concreteValue +} + +func (x *_Verification_8_map) Mutable(key protoreflect.MapKey) protoreflect.Value { + panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") +} + +func (x *_Verification_8_map) NewValue() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Verification_8_map) IsValid() bool { + return x.m != nil +} + var ( md_Verification protoreflect.MessageDescriptor fd_Verification_did protoreflect.FieldDescriptor @@ -1506,6 +2049,8 @@ var ( fd_Verification_subject protoreflect.FieldDescriptor fd_Verification_public_key protoreflect.FieldDescriptor fd_Verification_verification_type protoreflect.FieldDescriptor + fd_Verification_metadata protoreflect.FieldDescriptor + fd_Verification_creation_block protoreflect.FieldDescriptor ) func init() { @@ -1518,6 +2063,8 @@ func init() { fd_Verification_subject = md_Verification.Fields().ByName("subject") fd_Verification_public_key = md_Verification.Fields().ByName("public_key") fd_Verification_verification_type = md_Verification.Fields().ByName("verification_type") + fd_Verification_metadata = md_Verification.Fields().ByName("metadata") + fd_Verification_creation_block = md_Verification.Fields().ByName("creation_block") } var _ protoreflect.Message = (*fastReflection_Verification)(nil) @@ -1627,6 +2174,18 @@ func (x *fastReflection_Verification) Range(f func(protoreflect.FieldDescriptor, return } } + if len(x.Metadata) != 0 { + value := protoreflect.ValueOfMap(&_Verification_8_map{m: &x.Metadata}) + if !f(fd_Verification_metadata, value) { + return + } + } + if x.CreationBlock != int64(0) { + value := protoreflect.ValueOfInt64(x.CreationBlock) + if !f(fd_Verification_creation_block, value) { + return + } + } } // Has reports whether a field is populated. @@ -1656,6 +2215,10 @@ func (x *fastReflection_Verification) Has(fd protoreflect.FieldDescriptor) bool return x.PublicKey != nil case "did.v1.Verification.verification_type": return x.VerificationType != "" + case "did.v1.Verification.metadata": + return len(x.Metadata) != 0 + case "did.v1.Verification.creation_block": + return x.CreationBlock != int64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Verification")) @@ -1686,6 +2249,10 @@ func (x *fastReflection_Verification) Clear(fd protoreflect.FieldDescriptor) { x.PublicKey = nil case "did.v1.Verification.verification_type": x.VerificationType = "" + case "did.v1.Verification.metadata": + x.Metadata = nil + case "did.v1.Verification.creation_block": + x.CreationBlock = int64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Verification")) @@ -1723,6 +2290,15 @@ func (x *fastReflection_Verification) Get(descriptor protoreflect.FieldDescripto case "did.v1.Verification.verification_type": value := x.VerificationType return protoreflect.ValueOfString(value) + case "did.v1.Verification.metadata": + if len(x.Metadata) == 0 { + return protoreflect.ValueOfMap(&_Verification_8_map{}) + } + mapValue := &_Verification_8_map{m: &x.Metadata} + return protoreflect.ValueOfMap(mapValue) + case "did.v1.Verification.creation_block": + value := x.CreationBlock + return protoreflect.ValueOfInt64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Verification")) @@ -1757,6 +2333,12 @@ func (x *fastReflection_Verification) Set(fd protoreflect.FieldDescriptor, value x.PublicKey = value.Message().Interface().(*PubKey) case "did.v1.Verification.verification_type": x.VerificationType = value.Interface().(string) + case "did.v1.Verification.metadata": + mv := value.Map() + cmv := mv.(*_Verification_8_map) + x.Metadata = *cmv.m + case "did.v1.Verification.creation_block": + x.CreationBlock = value.Int() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Verification")) @@ -1782,6 +2364,12 @@ func (x *fastReflection_Verification) Mutable(fd protoreflect.FieldDescriptor) p x.PublicKey = new(PubKey) } return protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) + case "did.v1.Verification.metadata": + if x.Metadata == nil { + x.Metadata = make(map[string]string) + } + value := &_Verification_8_map{m: &x.Metadata} + return protoreflect.ValueOfMap(value) case "did.v1.Verification.did": panic(fmt.Errorf("field did of message did.v1.Verification is not mutable")) case "did.v1.Verification.controller": @@ -1794,6 +2382,8 @@ func (x *fastReflection_Verification) Mutable(fd protoreflect.FieldDescriptor) p panic(fmt.Errorf("field subject of message did.v1.Verification is not mutable")) case "did.v1.Verification.verification_type": panic(fmt.Errorf("field verification_type of message did.v1.Verification is not mutable")) + case "did.v1.Verification.creation_block": + panic(fmt.Errorf("field creation_block of message did.v1.Verification is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Verification")) @@ -1822,6 +2412,11 @@ func (x *fastReflection_Verification) NewField(fd protoreflect.FieldDescriptor) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "did.v1.Verification.verification_type": return protoreflect.ValueOfString("") + case "did.v1.Verification.metadata": + m := make(map[string]string) + return protoreflect.ValueOfMap(&_Verification_8_map{m: &m}) + case "did.v1.Verification.creation_block": + return protoreflect.ValueOfInt64(int64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Verification")) @@ -1919,6 +2514,30 @@ func (x *fastReflection_Verification) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + if len(x.Metadata) > 0 { + SiZeMaP := func(k string, v string) { + mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + len(v) + runtime.Sov(uint64(len(v))) + n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) + } + if options.Deterministic { + sortme := make([]string, 0, len(x.Metadata)) + for k := range x.Metadata { + sortme = append(sortme, k) + } + sort.Strings(sortme) + for _, k := range sortme { + v := x.Metadata[k] + SiZeMaP(k, v) + } + } else { + for k, v := range x.Metadata { + SiZeMaP(k, v) + } + } + } + if x.CreationBlock != 0 { + n += 1 + runtime.Sov(uint64(x.CreationBlock)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1948,6 +2567,54 @@ func (x *fastReflection_Verification) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.CreationBlock != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.CreationBlock)) + i-- + dAtA[i] = 0x48 + } + if len(x.Metadata) > 0 { + MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) { + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x42 + return protoiface.MarshalOutput{}, nil + } + if options.Deterministic { + keysForMetadata := make([]string, 0, len(x.Metadata)) + for k := range x.Metadata { + keysForMetadata = append(keysForMetadata, string(k)) + } + sort.Slice(keysForMetadata, func(i, j int) bool { + return keysForMetadata[i] < keysForMetadata[j] + }) + for iNdEx := len(keysForMetadata) - 1; iNdEx >= 0; iNdEx-- { + v := x.Metadata[string(keysForMetadata[iNdEx])] + out, err := MaRsHaLmAp(keysForMetadata[iNdEx], v) + if err != nil { + return out, err + } + } + } else { + for k := range x.Metadata { + v := x.Metadata[k] + out, err := MaRsHaLmAp(k, v) + if err != nil { + return out, err + } + } + } + } if len(x.VerificationType) > 0 { i -= len(x.VerificationType) copy(dAtA[i:], x.VerificationType) @@ -2281,6 +2948,684 @@ func (x *fastReflection_Verification) ProtoMethods() *protoiface.Methods { } x.VerificationType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Metadata == nil { + x.Metadata = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := 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) + if fieldNum == 1 { + var stringLenmapkey 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++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postStringIndexmapkey > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue 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++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postStringIndexmapvalue > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + 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) > postIndex { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + x.Metadata[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreationBlock", wireType) + } + x.CreationBlock = 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.CreationBlock |= int64(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 ( + md_Keyshares protoreflect.MessageDescriptor + fd_Keyshares_validator_cid protoreflect.FieldDescriptor + fd_Keyshares_user_cid protoreflect.FieldDescriptor + fd_Keyshares_last_updated_block protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_state_proto_init() + md_Keyshares = File_did_v1_state_proto.Messages().ByName("Keyshares") + fd_Keyshares_validator_cid = md_Keyshares.Fields().ByName("validator_cid") + fd_Keyshares_user_cid = md_Keyshares.Fields().ByName("user_cid") + fd_Keyshares_last_updated_block = md_Keyshares.Fields().ByName("last_updated_block") +} + +var _ protoreflect.Message = (*fastReflection_Keyshares)(nil) + +type fastReflection_Keyshares Keyshares + +func (x *Keyshares) ProtoReflect() protoreflect.Message { + return (*fastReflection_Keyshares)(x) +} + +func (x *Keyshares) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_state_proto_msgTypes[3] + 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_Keyshares_messageType fastReflection_Keyshares_messageType +var _ protoreflect.MessageType = fastReflection_Keyshares_messageType{} + +type fastReflection_Keyshares_messageType struct{} + +func (x fastReflection_Keyshares_messageType) Zero() protoreflect.Message { + return (*fastReflection_Keyshares)(nil) +} +func (x fastReflection_Keyshares_messageType) New() protoreflect.Message { + return new(fastReflection_Keyshares) +} +func (x fastReflection_Keyshares_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Keyshares +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Keyshares) Descriptor() protoreflect.MessageDescriptor { + return md_Keyshares +} + +// 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_Keyshares) Type() protoreflect.MessageType { + return _fastReflection_Keyshares_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Keyshares) New() protoreflect.Message { + return new(fastReflection_Keyshares) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Keyshares) Interface() protoreflect.ProtoMessage { + return (*Keyshares)(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_Keyshares) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ValidatorCid != "" { + value := protoreflect.ValueOfString(x.ValidatorCid) + if !f(fd_Keyshares_validator_cid, value) { + return + } + } + if x.UserCid != "" { + value := protoreflect.ValueOfString(x.UserCid) + if !f(fd_Keyshares_user_cid, value) { + return + } + } + if x.LastUpdatedBlock != int64(0) { + value := protoreflect.ValueOfInt64(x.LastUpdatedBlock) + if !f(fd_Keyshares_last_updated_block, 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_Keyshares) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.Keyshares.validator_cid": + return x.ValidatorCid != "" + case "did.v1.Keyshares.user_cid": + return x.UserCid != "" + case "did.v1.Keyshares.last_updated_block": + return x.LastUpdatedBlock != int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Keyshares")) + } + panic(fmt.Errorf("message did.v1.Keyshares 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_Keyshares) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.Keyshares.validator_cid": + x.ValidatorCid = "" + case "did.v1.Keyshares.user_cid": + x.UserCid = "" + case "did.v1.Keyshares.last_updated_block": + x.LastUpdatedBlock = int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Keyshares")) + } + panic(fmt.Errorf("message did.v1.Keyshares 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_Keyshares) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.Keyshares.validator_cid": + value := x.ValidatorCid + return protoreflect.ValueOfString(value) + case "did.v1.Keyshares.user_cid": + value := x.UserCid + return protoreflect.ValueOfString(value) + case "did.v1.Keyshares.last_updated_block": + value := x.LastUpdatedBlock + return protoreflect.ValueOfInt64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Keyshares")) + } + panic(fmt.Errorf("message did.v1.Keyshares 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_Keyshares) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.Keyshares.validator_cid": + x.ValidatorCid = value.Interface().(string) + case "did.v1.Keyshares.user_cid": + x.UserCid = value.Interface().(string) + case "did.v1.Keyshares.last_updated_block": + x.LastUpdatedBlock = value.Int() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Keyshares")) + } + panic(fmt.Errorf("message did.v1.Keyshares 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_Keyshares) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.Keyshares.validator_cid": + panic(fmt.Errorf("field validator_cid of message did.v1.Keyshares is not mutable")) + case "did.v1.Keyshares.user_cid": + panic(fmt.Errorf("field user_cid of message did.v1.Keyshares is not mutable")) + case "did.v1.Keyshares.last_updated_block": + panic(fmt.Errorf("field last_updated_block of message did.v1.Keyshares is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Keyshares")) + } + panic(fmt.Errorf("message did.v1.Keyshares 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_Keyshares) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.Keyshares.validator_cid": + return protoreflect.ValueOfString("") + case "did.v1.Keyshares.user_cid": + return protoreflect.ValueOfString("") + case "did.v1.Keyshares.last_updated_block": + return protoreflect.ValueOfInt64(int64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Keyshares")) + } + panic(fmt.Errorf("message did.v1.Keyshares 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_Keyshares) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.Keyshares", 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_Keyshares) 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_Keyshares) 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_Keyshares) 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_Keyshares) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Keyshares) + 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.ValidatorCid) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.UserCid) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.LastUpdatedBlock != 0 { + n += 1 + runtime.Sov(uint64(x.LastUpdatedBlock)) + } + 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().(*Keyshares) + 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.LastUpdatedBlock != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.LastUpdatedBlock)) + i-- + dAtA[i] = 0x18 + } + if len(x.UserCid) > 0 { + i -= len(x.UserCid) + copy(dAtA[i:], x.UserCid) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.UserCid))) + i-- + dAtA[i] = 0x12 + } + if len(x.ValidatorCid) > 0 { + i -= len(x.ValidatorCid) + copy(dAtA[i:], x.ValidatorCid) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorCid))) + 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().(*Keyshares) + 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: Keyshares: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Keyshares: 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 ValidatorCid", 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.ValidatorCid = 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 UserCid", 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.UserCid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastUpdatedBlock", wireType) + } + x.LastUpdatedBlock = 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.LastUpdatedBlock |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2342,7 +3687,7 @@ func (x *PubKey) ProtoReflect() protoreflect.Message { } func (x *PubKey) 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 { @@ -2988,7 +4333,7 @@ func (x *JSONWebKey) ProtoReflect() protoreflect.Message { } func (x *JSONWebKey) 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 { @@ -3724,7 +5069,7 @@ func (x *RawKey) ProtoReflect() protoreflect.Message { } func (x *RawKey) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_state_proto_msgTypes[5] + mi := &file_did_v1_state_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4338,6 +5683,12 @@ type Authentication struct { Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` // PubKey is the verification method PublicKey *PubKey `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // CredentialID is the byte representation of the credential ID + CredentialId []byte `protobuf:"bytes,5,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"` + // Metadata of the authentication + Metadata map[string]string `protobuf:"bytes,6,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // CreationBlock is the block number of the creation of the authentication + CreationBlock int64 `protobuf:"varint,7,opt,name=creation_block,json=creationBlock,proto3" json:"creation_block,omitempty"` } func (x *Authentication) Reset() { @@ -4388,6 +5739,27 @@ func (x *Authentication) GetPublicKey() *PubKey { return nil } +func (x *Authentication) GetCredentialId() []byte { + if x != nil { + return x.CredentialId + } + return nil +} + +func (x *Authentication) GetMetadata() map[string]string { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Authentication) GetCreationBlock() int64 { + if x != nil { + return x.CreationBlock + } + return 0 +} + // Controller represents a Sonr DWN Vault type Controller struct { state protoimpl.MessageState @@ -4406,10 +5778,12 @@ type Controller struct { BtcAddress string `protobuf:"bytes,5,opt,name=btc_address,json=btcAddress,proto3" json:"btc_address,omitempty"` // PubKey is the verification method PublicKey *PubKey `protobuf:"bytes,6,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - // Val Keyshare + // Pointer to the Keyshares KsVal string `protobuf:"bytes,7,opt,name=ks_val,json=ksVal,proto3" json:"ks_val,omitempty"` - // The Status of the claims for the controller - Claimed bool `protobuf:"varint,8,opt,name=claimed,proto3" json:"claimed,omitempty"` + // The block number of when a user claimed the controller + ClaimedBlock int64 `protobuf:"varint,8,opt,name=claimed_block,json=claimedBlock,proto3" json:"claimed_block,omitempty"` + // CreationBlock is the block number of the creation of the controller + CreationBlock int64 `protobuf:"varint,9,opt,name=creation_block,json=creationBlock,proto3" json:"creation_block,omitempty"` } func (x *Controller) Reset() { @@ -4481,14 +5855,21 @@ func (x *Controller) GetKsVal() string { return "" } -func (x *Controller) GetClaimed() bool { +func (x *Controller) GetClaimedBlock() int64 { if x != nil { - return x.Claimed + return x.ClaimedBlock } - return false + return 0 } -// Verification reprsents a method of verifying membership in a DID +func (x *Controller) GetCreationBlock() int64 { + if x != nil { + return x.CreationBlock + } + return 0 +} + +// Verification represents a verification method type Verification struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -4506,9 +5887,12 @@ type Verification struct { Subject string `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"` // The public key of the verification PublicKey *PubKey `protobuf:"bytes,6,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - // The Verification Type (Authentication, Assertion, CapabilityDelegation, - // CapabilityInvocation) + // The verification method type VerificationType string `protobuf:"bytes,7,opt,name=verification_type,json=verificationType,proto3" json:"verification_type,omitempty"` + // Metadata of the verification + Metadata map[string]string `protobuf:"bytes,8,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // CreationBlock is the block number of the creation of the controller + CreationBlock int64 `protobuf:"varint,9,opt,name=creation_block,json=creationBlock,proto3" json:"creation_block,omitempty"` } func (x *Verification) Reset() { @@ -4580,6 +5964,71 @@ func (x *Verification) GetVerificationType() string { return "" } +func (x *Verification) GetMetadata() map[string]string { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Verification) GetCreationBlock() int64 { + if x != nil { + return x.CreationBlock + } + return 0 +} + +type Keyshares struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ValidatorCid string `protobuf:"bytes,1,opt,name=validator_cid,json=validatorCid,proto3" json:"validator_cid,omitempty"` + UserCid string `protobuf:"bytes,2,opt,name=user_cid,json=userCid,proto3" json:"user_cid,omitempty"` + LastUpdatedBlock int64 `protobuf:"varint,3,opt,name=last_updated_block,json=lastUpdatedBlock,proto3" json:"last_updated_block,omitempty"` +} + +func (x *Keyshares) Reset() { + *x = Keyshares{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_state_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Keyshares) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Keyshares) ProtoMessage() {} + +// Deprecated: Use Keyshares.ProtoReflect.Descriptor instead. +func (*Keyshares) Descriptor() ([]byte, []int) { + return file_did_v1_state_proto_rawDescGZIP(), []int{3} +} + +func (x *Keyshares) GetValidatorCid() string { + if x != nil { + return x.ValidatorCid + } + return "" +} + +func (x *Keyshares) GetUserCid() string { + if x != nil { + return x.UserCid + } + return "" +} + +func (x *Keyshares) GetLastUpdatedBlock() int64 { + if x != nil { + return x.LastUpdatedBlock + } + return 0 +} + // PubKey defines a public key for a did type PubKey struct { state protoimpl.MessageState @@ -4595,7 +6044,7 @@ type PubKey struct { func (x *PubKey) Reset() { *x = PubKey{} 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) } @@ -4609,7 +6058,7 @@ func (*PubKey) ProtoMessage() {} // Deprecated: Use PubKey.ProtoReflect.Descriptor instead. func (*PubKey) Descriptor() ([]byte, []int) { - return file_did_v1_state_proto_rawDescGZIP(), []int{3} + return file_did_v1_state_proto_rawDescGZIP(), []int{4} } func (x *PubKey) GetRole() string { @@ -4657,7 +6106,7 @@ type JSONWebKey struct { func (x *JSONWebKey) Reset() { *x = JSONWebKey{} 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) } @@ -4671,7 +6120,7 @@ func (*JSONWebKey) ProtoMessage() {} // Deprecated: Use JSONWebKey.ProtoReflect.Descriptor instead. func (*JSONWebKey) Descriptor() ([]byte, []int) { - return file_did_v1_state_proto_rawDescGZIP(), []int{4} + return file_did_v1_state_proto_rawDescGZIP(), []int{5} } func (x *JSONWebKey) GetKty() string { @@ -4730,7 +6179,7 @@ type RawKey struct { func (x *RawKey) Reset() { *x = RawKey{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_state_proto_msgTypes[5] + mi := &file_did_v1_state_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4744,7 +6193,7 @@ func (*RawKey) ProtoMessage() {} // Deprecated: Use RawKey.ProtoReflect.Descriptor instead. func (*RawKey) Descriptor() ([]byte, []int) { - return file_did_v1_state_proto_rawDescGZIP(), []int{5} + return file_did_v1_state_proto_rawDescGZIP(), []int{6} } func (x *RawKey) GetAlgorithm() string { @@ -4781,7 +6230,7 @@ var file_did_v1_state_proto_rawDesc = []byte{ 0x0a, 0x12, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x70, 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, 0x22, 0xb6, 0x01, 0x0a, 0x0e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x81, 0x03, 0x0a, 0x0e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, @@ -4790,83 +6239,117 @@ var file_did_v1_state_proto_rawDesc = []byte{ 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x4b, 0x65, 0x79, 0x3a, 0x29, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x23, 0x0a, 0x05, 0x0a, 0x03, 0x64, - 0x69, 0x64, 0x12, 0x18, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x2c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x10, 0x01, 0x18, 0x01, 0x18, 0x01, 0x22, 0xd6, - 0x02, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x16, 0x0a, - 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x6e, 0x72, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, - 0x6f, 0x6e, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x74, - 0x68, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x65, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x62, - 0x74, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x62, 0x74, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2d, 0x0a, 0x0a, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, - 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x6b, - 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x73, 0x56, - 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x07, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x3a, 0x59, 0xf2, 0x9e, - 0xd3, 0x8e, 0x03, 0x53, 0x0a, 0x0a, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x10, 0x01, - 0x12, 0x12, 0x0a, 0x0c, 0x73, 0x6f, 0x6e, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x10, 0x01, 0x18, 0x01, 0x12, 0x11, 0x0a, 0x0b, 0x65, 0x74, 0x68, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x10, 0x02, 0x18, 0x01, 0x12, 0x11, 0x0a, 0x0b, 0x62, 0x74, 0x63, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x03, 0x18, 0x01, 0x12, 0x09, 0x0a, 0x03, 0x64, 0x69, - 0x64, 0x10, 0x04, 0x18, 0x01, 0x18, 0x02, 0x22, 0xe0, 0x02, 0x0a, 0x0c, 0x56, 0x65, 0x72, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x69, - 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x64, 0x69, 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, - 0x75, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, - 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2d, 0x0a, 0x0a, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, - 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x65, - 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x71, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x6b, 0x0a, - 0x05, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x0e, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, - 0x2c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x10, 0x01, 0x18, 0x01, 0x12, 0x22, 0x0a, 0x1c, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2c, 0x64, 0x69, 0x64, 0x5f, 0x6d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x10, 0x02, 0x18, 0x01, - 0x12, 0x26, 0x0a, 0x20, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x69, 0x73, - 0x73, 0x75, 0x65, 0x72, 0x10, 0x03, 0x18, 0x01, 0x18, 0x04, 0x22, 0x86, 0x01, 0x0a, 0x06, 0x50, - 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 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, 0x27, 0x0a, 0x07, 0x72, 0x61, 0x77, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x61, 0x77, 0x4b, 0x65, 0x79, 0x52, 0x06, 0x72, 0x61, 0x77, 0x4b, 0x65, 0x79, 0x12, 0x24, 0x0a, - 0x03, 0x6a, 0x77, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x57, 0x65, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x03, - 0x6a, 0x77, 0x6b, 0x22, 0x68, 0x0a, 0x0a, 0x4a, 0x53, 0x4f, 0x4e, 0x57, 0x65, 0x62, 0x4b, 0x65, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x72, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x63, 0x72, 0x76, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, - 0x79, 0x12, 0x0c, 0x0a, 0x01, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x6e, 0x12, - 0x0c, 0x0a, 0x01, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x65, 0x22, 0x6a, 0x0a, - 0x06, 0x52, 0x61, 0x77, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, - 0x69, 0x74, 0x68, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x6c, 0x67, 0x6f, - 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, - 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, - 0x67, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x75, 0x72, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x63, 0x75, 0x72, 0x76, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 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, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, - 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, - 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, - 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x69, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 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, 0x25, 0x0a, 0x0e, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 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, 0x29, + 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x23, 0x0a, 0x05, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x12, 0x18, 0x0a, + 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2c, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x10, 0x01, 0x18, 0x01, 0x18, 0x01, 0x22, 0x88, 0x03, 0x0a, 0x0a, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, + 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x6e, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x6e, 0x72, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x74, 0x68, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x74, 0x68, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x74, 0x63, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x74, 0x63, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x73, 0x5f, 0x76, 0x61, 0x6c, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x73, 0x56, 0x61, 0x6c, 0x12, 0x23, 0x0a, + 0x0d, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x3a, 0x59, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, + 0x53, 0x0a, 0x0a, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x10, 0x01, 0x12, 0x12, 0x0a, + 0x0c, 0x73, 0x6f, 0x6e, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x01, 0x18, + 0x01, 0x12, 0x11, 0x0a, 0x0b, 0x65, 0x74, 0x68, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x10, 0x02, 0x18, 0x01, 0x12, 0x11, 0x0a, 0x0b, 0x62, 0x74, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x10, 0x03, 0x18, 0x01, 0x12, 0x09, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x10, 0x04, + 0x18, 0x01, 0x18, 0x02, 0x22, 0x84, 0x04, 0x0a, 0x0c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x69, 0x64, 0x5f, 0x6d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x69, 0x64, + 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x12, 0x18, + 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, + 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x09, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 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, 0x25, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 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, 0x71, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x6b, + 0x0a, 0x05, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x0e, 0x69, 0x73, 0x73, 0x75, 0x65, + 0x72, 0x2c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x10, 0x01, 0x18, 0x01, 0x12, 0x22, 0x0a, + 0x1c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2c, 0x64, 0x69, 0x64, 0x5f, + 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x10, 0x02, 0x18, + 0x01, 0x12, 0x26, 0x0a, 0x20, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x69, + 0x73, 0x73, 0x75, 0x65, 0x72, 0x10, 0x03, 0x18, 0x01, 0x18, 0x04, 0x22, 0x79, 0x0a, 0x09, 0x4b, + 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x69, 0x64, 0x12, 0x19, 0x0a, + 0x08, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x75, 0x73, 0x65, 0x72, 0x43, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x12, 0x6c, 0x61, 0x73, 0x74, + 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x86, 0x01, 0x0a, 0x06, 0x50, 0x75, 0x62, 0x4b, 0x65, + 0x79, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x72, 0x6f, 0x6c, 0x65, 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, 0x27, 0x0a, 0x07, 0x72, 0x61, 0x77, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x77, 0x4b, 0x65, + 0x79, 0x52, 0x06, 0x72, 0x61, 0x77, 0x4b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x03, 0x6a, 0x77, 0x6b, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x4a, 0x53, 0x4f, 0x4e, 0x57, 0x65, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x03, 0x6a, 0x77, 0x6b, 0x22, + 0x68, 0x0a, 0x0a, 0x4a, 0x53, 0x4f, 0x4e, 0x57, 0x65, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x74, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x63, 0x72, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x72, + 0x76, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x78, 0x12, + 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x79, 0x12, 0x0c, 0x0a, + 0x01, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x6e, 0x12, 0x0c, 0x0a, 0x01, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x65, 0x22, 0x6a, 0x0a, 0x06, 0x52, 0x61, 0x77, + 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, + 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, + 0x05, 0x63, 0x75, 0x72, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x75, + 0x72, 0x76, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x03, 0x6b, 0x65, 0x79, 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, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, + 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, + 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4881,26 +6364,31 @@ 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, 6) +var file_did_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_did_v1_state_proto_goTypes = []interface{}{ (*Authentication)(nil), // 0: did.v1.Authentication (*Controller)(nil), // 1: did.v1.Controller (*Verification)(nil), // 2: did.v1.Verification - (*PubKey)(nil), // 3: did.v1.PubKey - (*JSONWebKey)(nil), // 4: did.v1.JSONWebKey - (*RawKey)(nil), // 5: did.v1.RawKey + (*Keyshares)(nil), // 3: did.v1.Keyshares + (*PubKey)(nil), // 4: did.v1.PubKey + (*JSONWebKey)(nil), // 5: did.v1.JSONWebKey + (*RawKey)(nil), // 6: did.v1.RawKey + nil, // 7: did.v1.Authentication.MetadataEntry + nil, // 8: did.v1.Verification.MetadataEntry } var file_did_v1_state_proto_depIdxs = []int32{ - 3, // 0: did.v1.Authentication.public_key:type_name -> did.v1.PubKey - 3, // 1: did.v1.Controller.public_key:type_name -> did.v1.PubKey - 3, // 2: did.v1.Verification.public_key:type_name -> did.v1.PubKey - 5, // 3: did.v1.PubKey.raw_key:type_name -> did.v1.RawKey - 4, // 4: did.v1.PubKey.jwk:type_name -> did.v1.JSONWebKey - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 4, // 0: did.v1.Authentication.public_key:type_name -> did.v1.PubKey + 7, // 1: did.v1.Authentication.metadata:type_name -> did.v1.Authentication.MetadataEntry + 4, // 2: did.v1.Controller.public_key:type_name -> did.v1.PubKey + 4, // 3: did.v1.Verification.public_key:type_name -> did.v1.PubKey + 8, // 4: did.v1.Verification.metadata:type_name -> did.v1.Verification.MetadataEntry + 6, // 5: did.v1.PubKey.raw_key:type_name -> did.v1.RawKey + 5, // 6: did.v1.PubKey.jwk:type_name -> did.v1.JSONWebKey + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_did_v1_state_proto_init() } @@ -4946,7 +6434,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.(*PubKey); i { + switch v := v.(*Keyshares); i { case 0: return &v.state case 1: @@ -4958,7 +6446,7 @@ func file_did_v1_state_proto_init() { } } file_did_v1_state_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JSONWebKey); i { + switch v := v.(*PubKey); i { case 0: return &v.state case 1: @@ -4970,6 +6458,18 @@ func file_did_v1_state_proto_init() { } } file_did_v1_state_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JSONWebKey); 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[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RawKey); i { case 0: return &v.state @@ -4988,7 +6488,7 @@ func file_did_v1_state_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_state_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 9, NumExtensions: 0, NumServices: 0, }, diff --git a/api/macaroon/v1/tx.pulsar.go b/api/macaroon/v1/tx.pulsar.go index 66e98b8ce..ca34b72e5 100644 --- a/api/macaroon/v1/tx.pulsar.go +++ b/api/macaroon/v1/tx.pulsar.go @@ -2290,7 +2290,7 @@ func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { return file_macaroon_v1_tx_proto_rawDescGZIP(), []int{1} } -// MsgIssueMacaroon is the message type for the AuthorizeService RPC. +// MsgIssueMacaroon is the message type for the IssueMacaroon RPC. type MsgIssueMacaroon struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2354,7 +2354,7 @@ func (x *MsgIssueMacaroon) GetToken() string { return "" } -// MsgIssueMacaroonResponse is the response type for the AuthorizeService +// MsgIssueMacaroonResponse is the response type for the IssueMacaroon // RPC. type MsgIssueMacaroonResponse struct { state protoimpl.MessageState @@ -2443,29 +2443,29 @@ var file_macaroon_v1_tx_proto_rawDesc = []byte{ 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xba, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xb7, 0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x52, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1c, 0x2e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x24, 0x2e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x10, 0x41, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1d, - 0x2e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x49, 0x73, 0x73, 0x75, 0x65, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x1a, 0x25, 0x2e, - 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, - 0x73, 0x73, 0x75, 0x65, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x9a, 0x01, 0x0a, 0x0f, - 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, - 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, - 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f, - 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, - 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0b, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x56, - 0x31, 0xca, 0x02, 0x0b, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x17, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x4d, 0x61, 0x63, 0x61, - 0x72, 0x6f, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x0d, 0x49, 0x73, + 0x73, 0x75, 0x65, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x6d, 0x61, + 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x73, 0x73, + 0x75, 0x65, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x1a, 0x25, 0x2e, 0x6d, 0x61, 0x63, + 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x73, 0x73, 0x75, + 0x65, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x9a, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, + 0x2e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x3b, + 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, + 0xaa, 0x02, 0x0b, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x0b, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x17, 0x4d, + 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, + 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2493,9 +2493,9 @@ var file_macaroon_v1_tx_proto_depIdxs = []int32{ 5, // 0: macaroon.v1.MsgUpdateParams.params:type_name -> macaroon.v1.Params 4, // 1: macaroon.v1.MsgIssueMacaroon.permissions:type_name -> macaroon.v1.MsgIssueMacaroon.PermissionsEntry 0, // 2: macaroon.v1.Msg.UpdateParams:input_type -> macaroon.v1.MsgUpdateParams - 2, // 3: macaroon.v1.Msg.AuthorizeService:input_type -> macaroon.v1.MsgIssueMacaroon + 2, // 3: macaroon.v1.Msg.IssueMacaroon:input_type -> macaroon.v1.MsgIssueMacaroon 1, // 4: macaroon.v1.Msg.UpdateParams:output_type -> macaroon.v1.MsgUpdateParamsResponse - 3, // 5: macaroon.v1.Msg.AuthorizeService:output_type -> macaroon.v1.MsgIssueMacaroonResponse + 3, // 5: macaroon.v1.Msg.IssueMacaroon:output_type -> macaroon.v1.MsgIssueMacaroonResponse 4, // [4:6] is the sub-list for method output_type 2, // [2:4] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name diff --git a/api/macaroon/v1/tx_grpc.pb.go b/api/macaroon/v1/tx_grpc.pb.go index 5bf0578f5..930026957 100644 --- a/api/macaroon/v1/tx_grpc.pb.go +++ b/api/macaroon/v1/tx_grpc.pb.go @@ -19,8 +19,8 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Msg_UpdateParams_FullMethodName = "/macaroon.v1.Msg/UpdateParams" - Msg_AuthorizeService_FullMethodName = "/macaroon.v1.Msg/AuthorizeService" + Msg_UpdateParams_FullMethodName = "/macaroon.v1.Msg/UpdateParams" + Msg_IssueMacaroon_FullMethodName = "/macaroon.v1.Msg/IssueMacaroon" ) // MsgClient is the client API for Msg service. @@ -31,9 +31,9 @@ type MsgClient interface { // // Since: cosmos-sdk 0.47 UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) - // AuthorizeService asserts the given controller is the owner of the given + // IssueMacaroon asserts the given controller is the owner of the given // address. - AuthorizeService(ctx context.Context, in *MsgIssueMacaroon, opts ...grpc.CallOption) (*MsgIssueMacaroonResponse, error) + IssueMacaroon(ctx context.Context, in *MsgIssueMacaroon, opts ...grpc.CallOption) (*MsgIssueMacaroonResponse, error) } type msgClient struct { @@ -53,9 +53,9 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } -func (c *msgClient) AuthorizeService(ctx context.Context, in *MsgIssueMacaroon, opts ...grpc.CallOption) (*MsgIssueMacaroonResponse, error) { +func (c *msgClient) IssueMacaroon(ctx context.Context, in *MsgIssueMacaroon, opts ...grpc.CallOption) (*MsgIssueMacaroonResponse, error) { out := new(MsgIssueMacaroonResponse) - err := c.cc.Invoke(ctx, Msg_AuthorizeService_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Msg_IssueMacaroon_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -70,9 +70,9 @@ type MsgServer interface { // // Since: cosmos-sdk 0.47 UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) - // AuthorizeService asserts the given controller is the owner of the given + // IssueMacaroon asserts the given controller is the owner of the given // address. - AuthorizeService(context.Context, *MsgIssueMacaroon) (*MsgIssueMacaroonResponse, error) + IssueMacaroon(context.Context, *MsgIssueMacaroon) (*MsgIssueMacaroonResponse, error) mustEmbedUnimplementedMsgServer() } @@ -83,8 +83,8 @@ type UnimplementedMsgServer struct { func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } -func (UnimplementedMsgServer) AuthorizeService(context.Context, *MsgIssueMacaroon) (*MsgIssueMacaroonResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AuthorizeService not implemented") +func (UnimplementedMsgServer) IssueMacaroon(context.Context, *MsgIssueMacaroon) (*MsgIssueMacaroonResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method IssueMacaroon not implemented") } func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} @@ -117,20 +117,20 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } -func _Msg_AuthorizeService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Msg_IssueMacaroon_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgIssueMacaroon) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).AuthorizeService(ctx, in) + return srv.(MsgServer).IssueMacaroon(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Msg_AuthorizeService_FullMethodName, + FullMethod: Msg_IssueMacaroon_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).AuthorizeService(ctx, req.(*MsgIssueMacaroon)) + return srv.(MsgServer).IssueMacaroon(ctx, req.(*MsgIssueMacaroon)) } return interceptor(ctx, in, info, handler) } @@ -147,8 +147,8 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ Handler: _Msg_UpdateParams_Handler, }, { - MethodName: "AuthorizeService", - Handler: _Msg_AuthorizeService_Handler, + MethodName: "IssueMacaroon", + Handler: _Msg_IssueMacaroon_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/api/vault/v1/state.cosmos_orm.go b/api/vault/v1/state.cosmos_orm.go index 0e6141446..c4d222026 100644 --- a/api/vault/v1/state.cosmos_orm.go +++ b/api/vault/v1/state.cosmos_orm.go @@ -11,12 +11,20 @@ import ( type DWNTable interface { Insert(ctx context.Context, dWN *DWN) error + InsertReturningId(ctx context.Context, dWN *DWN) (uint64, error) + LastInsertedSequence(ctx context.Context) (uint64, error) Update(ctx context.Context, dWN *DWN) error Save(ctx context.Context, dWN *DWN) error Delete(ctx context.Context, dWN *DWN) error - Has(ctx context.Context, account []byte) (found bool, err error) + Has(ctx context.Context, id uint64) (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, account []byte) (*DWN, error) + Get(ctx context.Context, id uint64) (*DWN, error) + HasByAlias(ctx context.Context, alias string) (found bool, err error) + // GetByAlias returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByAlias(ctx context.Context, alias string) (*DWN, error) + HasByCid(ctx context.Context, cid string) (found bool, err error) + // GetByCid returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByCid(ctx context.Context, cid string) (*DWN, error) List(ctx context.Context, prefixKey DWNIndexKey, opts ...ormlist.Option) (DWNIterator, error) ListRange(ctx context.Context, from, to DWNIndexKey, opts ...ormlist.Option) (DWNIterator, error) DeleteBy(ctx context.Context, prefixKey DWNIndexKey) error @@ -42,36 +50,49 @@ type DWNIndexKey interface { } // primary key starting index.. -type DWNPrimaryKey = DWNAccountIndexKey +type DWNPrimaryKey = DWNIdIndexKey -type DWNAccountIndexKey struct { +type DWNIdIndexKey struct { vs []interface{} } -func (x DWNAccountIndexKey) id() uint32 { return 0 } -func (x DWNAccountIndexKey) values() []interface{} { return x.vs } -func (x DWNAccountIndexKey) dWNIndexKey() {} +func (x DWNIdIndexKey) id() uint32 { return 0 } +func (x DWNIdIndexKey) values() []interface{} { return x.vs } +func (x DWNIdIndexKey) dWNIndexKey() {} -func (this DWNAccountIndexKey) WithAccount(account []byte) DWNAccountIndexKey { - this.vs = []interface{}{account} +func (this DWNIdIndexKey) WithId(id uint64) DWNIdIndexKey { + this.vs = []interface{}{id} return this } -type DWNAmountIndexKey struct { +type DWNAliasIndexKey struct { vs []interface{} } -func (x DWNAmountIndexKey) id() uint32 { return 1 } -func (x DWNAmountIndexKey) values() []interface{} { return x.vs } -func (x DWNAmountIndexKey) dWNIndexKey() {} +func (x DWNAliasIndexKey) id() uint32 { return 1 } +func (x DWNAliasIndexKey) values() []interface{} { return x.vs } +func (x DWNAliasIndexKey) dWNIndexKey() {} -func (this DWNAmountIndexKey) WithAmount(amount uint64) DWNAmountIndexKey { - this.vs = []interface{}{amount} +func (this DWNAliasIndexKey) WithAlias(alias string) DWNAliasIndexKey { + this.vs = []interface{}{alias} + return this +} + +type DWNCidIndexKey struct { + vs []interface{} +} + +func (x DWNCidIndexKey) id() uint32 { return 2 } +func (x DWNCidIndexKey) values() []interface{} { return x.vs } +func (x DWNCidIndexKey) dWNIndexKey() {} + +func (this DWNCidIndexKey) WithCid(cid string) DWNCidIndexKey { + this.vs = []interface{}{cid} return this } type dWNTable struct { - table ormtable.Table + table ormtable.AutoIncrementTable } func (this dWNTable) Insert(ctx context.Context, dWN *DWN) error { @@ -90,13 +111,61 @@ func (this dWNTable) Delete(ctx context.Context, dWN *DWN) error { return this.table.Delete(ctx, dWN) } -func (this dWNTable) Has(ctx context.Context, account []byte) (found bool, err error) { - return this.table.PrimaryKey().Has(ctx, account) +func (this dWNTable) InsertReturningId(ctx context.Context, dWN *DWN) (uint64, error) { + return this.table.InsertReturningPKey(ctx, dWN) } -func (this dWNTable) Get(ctx context.Context, account []byte) (*DWN, error) { +func (this dWNTable) LastInsertedSequence(ctx context.Context) (uint64, error) { + return this.table.LastInsertedSequence(ctx) +} + +func (this dWNTable) Has(ctx context.Context, id uint64) (found bool, err error) { + return this.table.PrimaryKey().Has(ctx, id) +} + +func (this dWNTable) Get(ctx context.Context, id uint64) (*DWN, error) { var dWN DWN - found, err := this.table.PrimaryKey().Get(ctx, &dWN, account) + found, err := this.table.PrimaryKey().Get(ctx, &dWN, id) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &dWN, nil +} + +func (this dWNTable) HasByAlias(ctx context.Context, alias string) (found bool, err error) { + return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, + alias, + ) +} + +func (this dWNTable) GetByAlias(ctx context.Context, alias string) (*DWN, error) { + var dWN DWN + found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &dWN, + alias, + ) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &dWN, nil +} + +func (this dWNTable) HasByCid(ctx context.Context, cid string) (found bool, err error) { + return this.table.GetIndexByID(2).(ormtable.UniqueIndex).Has(ctx, + cid, + ) +} + +func (this dWNTable) GetByCid(ctx context.Context, cid string) (*DWN, error) { + var dWN DWN + found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &dWN, + cid, + ) if err != nil { return nil, err } @@ -133,7 +202,7 @@ func NewDWNTable(db ormtable.Schema) (DWNTable, error) { if table == nil { return nil, ormerrors.TableNotFound.Wrap(string((&DWN{}).ProtoReflect().Descriptor().FullName())) } - return dWNTable{table}, nil + return dWNTable{table.(ormtable.AutoIncrementTable)}, nil } type StateStore interface { diff --git a/api/vault/v1/state.pulsar.go b/api/vault/v1/state.pulsar.go index b99a0cbe6..2287907c4 100644 --- a/api/vault/v1/state.pulsar.go +++ b/api/vault/v1/state.pulsar.go @@ -14,16 +14,18 @@ import ( ) var ( - md_DWN protoreflect.MessageDescriptor - fd_DWN_account protoreflect.FieldDescriptor - fd_DWN_amount protoreflect.FieldDescriptor + md_DWN protoreflect.MessageDescriptor + fd_DWN_id protoreflect.FieldDescriptor + fd_DWN_alias protoreflect.FieldDescriptor + fd_DWN_cid protoreflect.FieldDescriptor ) func init() { file_vault_v1_state_proto_init() md_DWN = File_vault_v1_state_proto.Messages().ByName("DWN") - fd_DWN_account = md_DWN.Fields().ByName("account") - fd_DWN_amount = md_DWN.Fields().ByName("amount") + fd_DWN_id = md_DWN.Fields().ByName("id") + fd_DWN_alias = md_DWN.Fields().ByName("alias") + fd_DWN_cid = md_DWN.Fields().ByName("cid") } var _ protoreflect.Message = (*fastReflection_DWN)(nil) @@ -91,15 +93,21 @@ func (x *fastReflection_DWN) Interface() protoreflect.ProtoMessage { // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_DWN) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Account) != 0 { - value := protoreflect.ValueOfBytes(x.Account) - if !f(fd_DWN_account, value) { + if x.Id != uint64(0) { + value := protoreflect.ValueOfUint64(x.Id) + if !f(fd_DWN_id, value) { return } } - if x.Amount != uint64(0) { - value := protoreflect.ValueOfUint64(x.Amount) - if !f(fd_DWN_amount, value) { + if x.Alias != "" { + value := protoreflect.ValueOfString(x.Alias) + if !f(fd_DWN_alias, value) { + return + } + } + if x.Cid != "" { + value := protoreflect.ValueOfString(x.Cid) + if !f(fd_DWN_cid, value) { return } } @@ -118,10 +126,12 @@ func (x *fastReflection_DWN) Range(f func(protoreflect.FieldDescriptor, protoref // a repeated field is populated if it is non-empty. func (x *fastReflection_DWN) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "vault.v1.DWN.account": - return len(x.Account) != 0 - case "vault.v1.DWN.amount": - return x.Amount != uint64(0) + case "vault.v1.DWN.id": + return x.Id != uint64(0) + case "vault.v1.DWN.alias": + return x.Alias != "" + case "vault.v1.DWN.cid": + return x.Cid != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN")) @@ -138,10 +148,12 @@ func (x *fastReflection_DWN) Has(fd protoreflect.FieldDescriptor) bool { // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DWN) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "vault.v1.DWN.account": - x.Account = nil - case "vault.v1.DWN.amount": - x.Amount = uint64(0) + case "vault.v1.DWN.id": + x.Id = uint64(0) + case "vault.v1.DWN.alias": + x.Alias = "" + case "vault.v1.DWN.cid": + x.Cid = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN")) @@ -158,12 +170,15 @@ func (x *fastReflection_DWN) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_DWN) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "vault.v1.DWN.account": - value := x.Account - return protoreflect.ValueOfBytes(value) - case "vault.v1.DWN.amount": - value := x.Amount + case "vault.v1.DWN.id": + value := x.Id return protoreflect.ValueOfUint64(value) + case "vault.v1.DWN.alias": + value := x.Alias + return protoreflect.ValueOfString(value) + case "vault.v1.DWN.cid": + value := x.Cid + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN")) @@ -184,10 +199,12 @@ func (x *fastReflection_DWN) Get(descriptor protoreflect.FieldDescriptor) protor // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DWN) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "vault.v1.DWN.account": - x.Account = value.Bytes() - case "vault.v1.DWN.amount": - x.Amount = value.Uint() + case "vault.v1.DWN.id": + x.Id = value.Uint() + case "vault.v1.DWN.alias": + x.Alias = value.Interface().(string) + case "vault.v1.DWN.cid": + x.Cid = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN")) @@ -208,10 +225,12 @@ func (x *fastReflection_DWN) Set(fd protoreflect.FieldDescriptor, value protoref // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DWN) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "vault.v1.DWN.account": - panic(fmt.Errorf("field account of message vault.v1.DWN is not mutable")) - case "vault.v1.DWN.amount": - panic(fmt.Errorf("field amount of message vault.v1.DWN is not mutable")) + case "vault.v1.DWN.id": + panic(fmt.Errorf("field id of message vault.v1.DWN is not mutable")) + case "vault.v1.DWN.alias": + panic(fmt.Errorf("field alias of message vault.v1.DWN is not mutable")) + case "vault.v1.DWN.cid": + panic(fmt.Errorf("field cid of message vault.v1.DWN is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN")) @@ -225,10 +244,12 @@ func (x *fastReflection_DWN) Mutable(fd protoreflect.FieldDescriptor) protorefle // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_DWN) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "vault.v1.DWN.account": - return protoreflect.ValueOfBytes(nil) - case "vault.v1.DWN.amount": + case "vault.v1.DWN.id": return protoreflect.ValueOfUint64(uint64(0)) + case "vault.v1.DWN.alias": + return protoreflect.ValueOfString("") + case "vault.v1.DWN.cid": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN")) @@ -298,12 +319,16 @@ func (x *fastReflection_DWN) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Account) + if x.Id != 0 { + n += 1 + runtime.Sov(uint64(x.Id)) + } + l = len(x.Alias) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.Amount != 0 { - n += 1 + runtime.Sov(uint64(x.Amount)) + l = len(x.Cid) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -334,17 +359,24 @@ func (x *fastReflection_DWN) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Amount != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Amount)) + if len(x.Cid) > 0 { + i -= len(x.Cid) + copy(dAtA[i:], x.Cid) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Cid))) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x1a } - if len(x.Account) > 0 { - i -= len(x.Account) - copy(dAtA[i:], x.Account) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Account))) + if len(x.Alias) > 0 { + i -= len(x.Alias) + copy(dAtA[i:], x.Alias) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Alias))) i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 + } + if x.Id != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) + i-- + dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -396,10 +428,10 @@ func (x *fastReflection_DWN) ProtoMethods() *protoiface.Methods { } switch fieldNum { case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } - var byteLen int + x.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -409,31 +441,48 @@ func (x *fastReflection_DWN) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + x.Id |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Alias", 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 + byteLen + 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.Account = append(x.Account[:0], dAtA[iNdEx:postIndex]...) - if x.Account == nil { - x.Account = []byte{} - } + x.Alias = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) } - x.Amount = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -443,11 +492,24 @@ func (x *fastReflection_DWN) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.Amount |= uint64(b&0x7F) << shift + 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.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -501,8 +563,9 @@ type DWN struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Account []byte `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` - Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` + Cid string `protobuf:"bytes,3,opt,name=cid,proto3" json:"cid,omitempty"` } func (x *DWN) Reset() { @@ -525,42 +588,50 @@ func (*DWN) Descriptor() ([]byte, []int) { return file_vault_v1_state_proto_rawDescGZIP(), []int{0} } -func (x *DWN) GetAccount() []byte { +func (x *DWN) GetId() uint64 { if x != nil { - return x.Account - } - return nil -} - -func (x *DWN) GetAmount() uint64 { - if x != nil { - return x.Amount + return x.Id } return 0 } +func (x *DWN) GetAlias() string { + if x != nil { + return x.Alias + } + return "" +} + +func (x *DWN) GetCid() string { + if x != nil { + return x.Cid + } + return "" +} + var File_vault_v1_state_proto protoreflect.FileDescriptor var file_vault_v1_state_proto_rawDesc = []byte{ 0x0a, 0x14, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x76, 0x61, 0x75, 0x6c, 0x74, 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, 0x22, 0x58, 0x0a, 0x03, 0x44, 0x57, 0x4e, - 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x3a, 0x1f, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x19, 0x0a, 0x09, 0x0a, 0x07, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0a, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x10, - 0x01, 0x18, 0x01, 0x42, 0x88, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x61, 0x75, 0x6c, - 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, - 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x76, 0x31, 0xa2, - 0x02, 0x03, 0x56, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x56, 0x31, - 0xca, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x14, 0x56, 0x61, - 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x09, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x67, 0x0a, 0x03, 0x44, 0x57, 0x4e, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x3a, 0x28, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x22, + 0x0a, 0x06, 0x0a, 0x02, 0x69, 0x64, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, + 0x73, 0x10, 0x01, 0x18, 0x01, 0x12, 0x09, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x10, 0x02, 0x18, 0x01, + 0x18, 0x01, 0x42, 0x88, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, + 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, + 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x61, + 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x76, 0x31, 0xa2, 0x02, + 0x03, 0x56, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x56, 0x31, 0xca, + 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x14, 0x56, 0x61, 0x75, + 0x6c, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x09, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/app/proxy/proxycmd.go b/app/proxy/proxycmd.go index 180216a75..b98c9b894 100644 --- a/app/proxy/proxycmd.go +++ b/app/proxy/proxycmd.go @@ -9,9 +9,10 @@ import ( "github.com/labstack/echo/v4" "github.com/labstack/gommon/log" - "github.com/onsonr/sonr/nebula" - "github.com/onsonr/sonr/nebula/pages" "github.com/spf13/cobra" + + "github.com/onsonr/sonr/pkg/nebula" + "github.com/onsonr/sonr/pkg/nebula/pages" ) func NewProxyCmd() *cobra.Command { diff --git a/cmd/motr/proxy.go b/cmd/motr/proxy.go index 718397ff9..200db70ee 100644 --- a/cmd/motr/proxy.go +++ b/cmd/motr/proxy.go @@ -9,9 +9,10 @@ import ( "github.com/labstack/echo/v4" "github.com/labstack/gommon/log" - "github.com/onsonr/sonr/nebula" - "github.com/onsonr/sonr/nebula/pages" "github.com/spf13/cobra" + + "github.com/onsonr/sonr/pkg/nebula" + "github.com/onsonr/sonr/pkg/nebula/pages" ) func NewProxyCmd() *cobra.Command { diff --git a/devbox.json b/devbox.json index ddd6b7abc..2f0712ade 100644 --- a/devbox.json +++ b/devbox.json @@ -26,15 +26,36 @@ }, "shell": { "scripts": { - "build:docker": ["make local-image"], - "build:motr": ["cd nebula && bun run build", "make motr"], - "build:nebula": ["cd nebula && bun run build"], - "build:sonrd": ["make dwn", "make build"], - "gen:proto": ["make proto-gen"], - "gen:pkl": ["make pkl"], - "gen:templ": ["make templ"], - "start:motr": ["make templ", "make motr", "make start-motr"], - "start:testnet": ["make templ", "make install", "make sh-testnet"] + "build:docker": [ + "make local-image" + ], + "build:motr": [ + "make nebula", + "make motr" + ], + "build:sonrd": [ + "make dwn", + "make build" + ], + "gen:proto": [ + "make proto-gen" + ], + "gen:pkl": [ + "make pkl" + ], + "gen:templ": [ + "make templ" + ], + "start:motr": [ + "make templ", + "make motr", + "make start-motr" + ], + "start:testnet": [ + "make templ", + "make install", + "make sh-testnet" + ] } } } diff --git a/nebula/blocks/footer_templ.go b/nebula/blocks/footer_templ.go deleted file mode 100644 index 51e614c0f..000000000 --- a/nebula/blocks/footer_templ.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by templ - DO NOT EDIT. - -// templ: version: v0.2.778 -package blocks - -//lint:file-ignore SA4006 This context is only used if a nested component is present. - -import "github.com/a-h/templ" -import templruntime "github.com/a-h/templ/runtime" - -func FooterMarketingNav() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var1 := templ.GetChildren(ctx) - if templ_7745c5c3_Var1 == nil { - templ_7745c5c3_Var1 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -var _ = templruntime.GeneratedTemplate diff --git a/nebula/blocks/layout.templ b/nebula/blocks/layout.templ deleted file mode 100644 index 6ba65ffc9..000000000 --- a/nebula/blocks/layout.templ +++ /dev/null @@ -1,21 +0,0 @@ -package blocks - -templ Layout(title string, remote bool) { - - -
- @Alpine(remote) - @Htmx(remote) - @Styles(remote) - - - -Turbocharge your creative process with a powerful AI design platform that gives creatives the power of creating without limits.
Assets packed with power beyond your imagination.
Assets packed with power beyond your imagination.
Assets packed with power beyond your imagination.
Assets packed with power beyond your imagination.
- Turbocharge your creative process with a powerful AI design platform that gives creatives the power of creating without limits. + { hero.Subtitle }
Assets packed with power beyond your imagination.
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var5 string + templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Subtitle) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/sections/hero.templ`, Line: 35, Col: 22} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Assets packed with power beyond your imagination.
Assets packed with power beyond your imagination.
Assets packed with power beyond your imagination.
Assets packed with power beyond your imagination.