diff --git a/api/did/v1/state.pulsar.go b/api/did/v1/state.pulsar.go index 026d2fde6..f24ba4f8c 100644 --- a/api/did/v1/state.pulsar.go +++ b/api/did/v1/state.pulsar.go @@ -4038,12 +4038,142 @@ func (x *fastReflection_Delegation) ProtoMethods() *protoiface.Methods { } } +var _ protoreflect.Map = (*_Service_5_map)(nil) + +type _Service_5_map struct { + m *map[string]string +} + +func (x *_Service_5_map) Len() int { + if x.m == nil { + return 0 + } + return len(*x.m) +} + +func (x *_Service_5_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 *_Service_5_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 *_Service_5_map) Clear(key protoreflect.MapKey) { + if x.m == nil { + return + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + delete(*x.m, concreteKey) +} + +func (x *_Service_5_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 *_Service_5_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 *_Service_5_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 *_Service_5_map) NewValue() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Service_5_map) IsValid() bool { + return x.m != nil +} + +var _ protoreflect.List = (*_Service_6_list)(nil) + +type _Service_6_list struct { + list *[]PermissionScope +} + +func (x *_Service_6_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Service_6_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)((*x.list)[i])) +} + +func (x *_Service_6_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Enum() + concreteValue := (PermissionScope)(valueUnwrapped) + (*x.list)[i] = concreteValue +} + +func (x *_Service_6_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Enum() + concreteValue := (PermissionScope)(valueUnwrapped) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Service_6_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Service at list field Scopes as it is not of Message kind")) +} + +func (x *_Service_6_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_Service_6_list) NewElement() protoreflect.Value { + v := 0 + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(v)) +} + +func (x *_Service_6_list) IsValid() bool { + return x.list != nil +} + var ( - md_Service protoreflect.MessageDescriptor - fd_Service_id protoreflect.FieldDescriptor - fd_Service_service_type protoreflect.FieldDescriptor - fd_Service_service_endpoint protoreflect.FieldDescriptor - fd_Service_controller_did protoreflect.FieldDescriptor + md_Service protoreflect.MessageDescriptor + fd_Service_id protoreflect.FieldDescriptor + fd_Service_service_type protoreflect.FieldDescriptor + fd_Service_controller_did protoreflect.FieldDescriptor + fd_Service_origin_uri protoreflect.FieldDescriptor + fd_Service_service_endpoints protoreflect.FieldDescriptor + fd_Service_scopes protoreflect.FieldDescriptor ) func init() { @@ -4051,8 +4181,10 @@ func init() { md_Service = File_did_v1_state_proto.Messages().ByName("Service") fd_Service_id = md_Service.Fields().ByName("id") fd_Service_service_type = md_Service.Fields().ByName("service_type") - fd_Service_service_endpoint = md_Service.Fields().ByName("service_endpoint") fd_Service_controller_did = md_Service.Fields().ByName("controller_did") + fd_Service_origin_uri = md_Service.Fields().ByName("origin_uri") + fd_Service_service_endpoints = md_Service.Fields().ByName("service_endpoints") + fd_Service_scopes = md_Service.Fields().ByName("scopes") } var _ protoreflect.Message = (*fastReflection_Service)(nil) @@ -4132,18 +4264,30 @@ func (x *fastReflection_Service) Range(f func(protoreflect.FieldDescriptor, prot return } } - if x.ServiceEndpoint != "" { - value := protoreflect.ValueOfString(x.ServiceEndpoint) - if !f(fd_Service_service_endpoint, value) { - return - } - } if x.ControllerDid != "" { value := protoreflect.ValueOfString(x.ControllerDid) if !f(fd_Service_controller_did, value) { return } } + if x.OriginUri != "" { + value := protoreflect.ValueOfString(x.OriginUri) + if !f(fd_Service_origin_uri, value) { + return + } + } + if len(x.ServiceEndpoints) != 0 { + value := protoreflect.ValueOfMap(&_Service_5_map{m: &x.ServiceEndpoints}) + if !f(fd_Service_service_endpoints, value) { + return + } + } + if len(x.Scopes) != 0 { + value := protoreflect.ValueOfList(&_Service_6_list{list: &x.Scopes}) + if !f(fd_Service_scopes, value) { + return + } + } } // Has reports whether a field is populated. @@ -4163,10 +4307,14 @@ func (x *fastReflection_Service) Has(fd protoreflect.FieldDescriptor) bool { return x.Id != "" case "did.v1.Service.service_type": return x.ServiceType != "" - case "did.v1.Service.service_endpoint": - return x.ServiceEndpoint != "" case "did.v1.Service.controller_did": return x.ControllerDid != "" + case "did.v1.Service.origin_uri": + return x.OriginUri != "" + case "did.v1.Service.service_endpoints": + return len(x.ServiceEndpoints) != 0 + case "did.v1.Service.scopes": + return len(x.Scopes) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) @@ -4187,10 +4335,14 @@ func (x *fastReflection_Service) Clear(fd protoreflect.FieldDescriptor) { x.Id = "" case "did.v1.Service.service_type": x.ServiceType = "" - case "did.v1.Service.service_endpoint": - x.ServiceEndpoint = "" case "did.v1.Service.controller_did": x.ControllerDid = "" + case "did.v1.Service.origin_uri": + x.OriginUri = "" + case "did.v1.Service.service_endpoints": + x.ServiceEndpoints = nil + case "did.v1.Service.scopes": + x.Scopes = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) @@ -4213,12 +4365,24 @@ func (x *fastReflection_Service) Get(descriptor protoreflect.FieldDescriptor) pr case "did.v1.Service.service_type": value := x.ServiceType return protoreflect.ValueOfString(value) - case "did.v1.Service.service_endpoint": - value := x.ServiceEndpoint - return protoreflect.ValueOfString(value) case "did.v1.Service.controller_did": value := x.ControllerDid return protoreflect.ValueOfString(value) + case "did.v1.Service.origin_uri": + value := x.OriginUri + return protoreflect.ValueOfString(value) + case "did.v1.Service.service_endpoints": + if len(x.ServiceEndpoints) == 0 { + return protoreflect.ValueOfMap(&_Service_5_map{}) + } + mapValue := &_Service_5_map{m: &x.ServiceEndpoints} + return protoreflect.ValueOfMap(mapValue) + case "did.v1.Service.scopes": + if len(x.Scopes) == 0 { + return protoreflect.ValueOfList(&_Service_6_list{}) + } + listValue := &_Service_6_list{list: &x.Scopes} + return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) @@ -4243,10 +4407,18 @@ func (x *fastReflection_Service) Set(fd protoreflect.FieldDescriptor, value prot x.Id = value.Interface().(string) case "did.v1.Service.service_type": x.ServiceType = value.Interface().(string) - case "did.v1.Service.service_endpoint": - x.ServiceEndpoint = value.Interface().(string) case "did.v1.Service.controller_did": x.ControllerDid = value.Interface().(string) + case "did.v1.Service.origin_uri": + x.OriginUri = value.Interface().(string) + case "did.v1.Service.service_endpoints": + mv := value.Map() + cmv := mv.(*_Service_5_map) + x.ServiceEndpoints = *cmv.m + case "did.v1.Service.scopes": + lv := value.List() + clv := lv.(*_Service_6_list) + x.Scopes = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) @@ -4267,14 +4439,26 @@ func (x *fastReflection_Service) Set(fd protoreflect.FieldDescriptor, value prot // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Service) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "did.v1.Service.service_endpoints": + if x.ServiceEndpoints == nil { + x.ServiceEndpoints = make(map[string]string) + } + value := &_Service_5_map{m: &x.ServiceEndpoints} + return protoreflect.ValueOfMap(value) + case "did.v1.Service.scopes": + if x.Scopes == nil { + x.Scopes = []PermissionScope{} + } + value := &_Service_6_list{list: &x.Scopes} + return protoreflect.ValueOfList(value) case "did.v1.Service.id": panic(fmt.Errorf("field id of message did.v1.Service is not mutable")) case "did.v1.Service.service_type": panic(fmt.Errorf("field service_type of message did.v1.Service is not mutable")) - case "did.v1.Service.service_endpoint": - panic(fmt.Errorf("field service_endpoint of message did.v1.Service is not mutable")) case "did.v1.Service.controller_did": panic(fmt.Errorf("field controller_did of message did.v1.Service is not mutable")) + case "did.v1.Service.origin_uri": + panic(fmt.Errorf("field origin_uri of message did.v1.Service is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) @@ -4292,10 +4476,16 @@ func (x *fastReflection_Service) NewField(fd protoreflect.FieldDescriptor) proto return protoreflect.ValueOfString("") case "did.v1.Service.service_type": return protoreflect.ValueOfString("") - case "did.v1.Service.service_endpoint": - return protoreflect.ValueOfString("") case "did.v1.Service.controller_did": return protoreflect.ValueOfString("") + case "did.v1.Service.origin_uri": + return protoreflect.ValueOfString("") + case "did.v1.Service.service_endpoints": + m := make(map[string]string) + return protoreflect.ValueOfMap(&_Service_5_map{m: &m}) + case "did.v1.Service.scopes": + list := []PermissionScope{} + return protoreflect.ValueOfList(&_Service_6_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) @@ -4373,14 +4563,42 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.ServiceEndpoint) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } l = len(x.ControllerDid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.OriginUri) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.ServiceEndpoints) > 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.ServiceEndpoints)) + for k := range x.ServiceEndpoints { + sortme = append(sortme, k) + } + sort.Strings(sortme) + for _, k := range sortme { + v := x.ServiceEndpoints[k] + SiZeMaP(k, v) + } + } else { + for k, v := range x.ServiceEndpoints { + SiZeMaP(k, v) + } + } + } + if len(x.Scopes) > 0 { + l = 0 + for _, e := range x.Scopes { + l += runtime.Sov(uint64(e)) + } + n += 1 + runtime.Sov(uint64(l)) + l + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -4410,18 +4628,82 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.Scopes) > 0 { + var pksize2 int + for _, num := range x.Scopes { + pksize2 += runtime.Sov(uint64(num)) + } + i -= pksize2 + j1 := i + for _, num1 := range x.Scopes { + num := uint64(num1) + for num >= 1<<7 { + dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA[j1] = uint8(num) + j1++ + } + i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) + i-- + dAtA[i] = 0x32 + } + if len(x.ServiceEndpoints) > 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] = 0x2a + return protoiface.MarshalOutput{}, nil + } + if options.Deterministic { + keysForServiceEndpoints := make([]string, 0, len(x.ServiceEndpoints)) + for k := range x.ServiceEndpoints { + keysForServiceEndpoints = append(keysForServiceEndpoints, string(k)) + } + sort.Slice(keysForServiceEndpoints, func(i, j int) bool { + return keysForServiceEndpoints[i] < keysForServiceEndpoints[j] + }) + for iNdEx := len(keysForServiceEndpoints) - 1; iNdEx >= 0; iNdEx-- { + v := x.ServiceEndpoints[string(keysForServiceEndpoints[iNdEx])] + out, err := MaRsHaLmAp(keysForServiceEndpoints[iNdEx], v) + if err != nil { + return out, err + } + } + } else { + for k := range x.ServiceEndpoints { + v := x.ServiceEndpoints[k] + out, err := MaRsHaLmAp(k, v) + if err != nil { + return out, err + } + } + } + } + if len(x.OriginUri) > 0 { + i -= len(x.OriginUri) + copy(dAtA[i:], x.OriginUri) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginUri))) + i-- + dAtA[i] = 0x22 + } if len(x.ControllerDid) > 0 { i -= len(x.ControllerDid) copy(dAtA[i:], x.ControllerDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ControllerDid))) i-- - dAtA[i] = 0x22 - } - if len(x.ServiceEndpoint) > 0 { - i -= len(x.ServiceEndpoint) - copy(dAtA[i:], x.ServiceEndpoint) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ServiceEndpoint))) - i-- dAtA[i] = 0x1a } if len(x.ServiceType) > 0 { @@ -4552,38 +4834,6 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { x.ServiceType = 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 ServiceEndpoint", 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.ServiceEndpoint = 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 ControllerDid", wireType) } @@ -4615,6 +4865,234 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { } x.ControllerDid = 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 OriginUri", 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.OriginUri = 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 ServiceEndpoints", 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.ServiceEndpoints == nil { + x.ServiceEndpoints = 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.ServiceEndpoints[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType == 0 { + var v PermissionScope + 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 |= PermissionScope(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Scopes = append(x.Scopes, v) + } else if wireType == 2 { + var packedLen 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++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + packedLen + 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 + } + var elementCount int + if elementCount != 0 && len(x.Scopes) == 0 { + x.Scopes = make([]PermissionScope, 0, elementCount) + } + for iNdEx < postIndex { + var v PermissionScope + 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 |= PermissionScope(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Scopes = append(x.Scopes, v) + } + } else { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) + } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -5065,10 +5543,14 @@ type Service struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The type of the service ServiceType string `protobuf:"bytes,2,opt,name=service_type,json=serviceType,proto3" json:"service_type,omitempty"` - // The service endpoint - ServiceEndpoint string `protobuf:"bytes,3,opt,name=service_endpoint,json=serviceEndpoint,proto3" json:"service_endpoint,omitempty"` // The controller DID of the service - ControllerDid string `protobuf:"bytes,4,opt,name=controller_did,json=controllerDid,proto3" json:"controller_did,omitempty"` + ControllerDid string `protobuf:"bytes,3,opt,name=controller_did,json=controllerDid,proto3" json:"controller_did,omitempty"` + // The domain name of the service + OriginUri string `protobuf:"bytes,4,opt,name=origin_uri,json=originUri,proto3" json:"origin_uri,omitempty"` + // The service endpoint + ServiceEndpoints map[string]string `protobuf:"bytes,5,rep,name=service_endpoints,json=serviceEndpoints,proto3" json:"service_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Scopes is the Authorization Grants of the service + Scopes []PermissionScope `protobuf:"varint,6,rep,packed,name=scopes,proto3,enum=did.v1.PermissionScope" json:"scopes,omitempty"` } func (x *Service) Reset() { @@ -5105,13 +5587,6 @@ func (x *Service) GetServiceType() string { return "" } -func (x *Service) GetServiceEndpoint() string { - if x != nil { - return x.ServiceEndpoint - } - return "" -} - func (x *Service) GetControllerDid() string { if x != nil { return x.ControllerDid @@ -5119,6 +5594,27 @@ func (x *Service) GetControllerDid() string { return "" } +func (x *Service) GetOriginUri() string { + if x != nil { + return x.OriginUri + } + return "" +} + +func (x *Service) GetServiceEndpoints() map[string]string { + if x != nil { + return x.ServiceEndpoints + } + return nil +} + +func (x *Service) GetScopes() []PermissionScope { + if x != nil { + return x.Scopes + } + return nil +} + var File_did_v1_state_proto protoreflect.FileDescriptor var file_did_v1_state_proto_rawDesc = []byte{ @@ -5126,98 +5622,111 @@ var file_did_v1_state_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, - 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa7, 0x01, 0x0a, 0x07, - 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, - 0x16, 0x0a, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x65, 0x78, 0x70, - 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x1c, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x16, 0x0a, - 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x0c, 0x0a, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x10, - 0x01, 0x18, 0x01, 0x18, 0x01, 0x22, 0x80, 0x02, 0x0a, 0x09, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, - 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x3b, - 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, - 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x22, 0x94, 0x01, 0x0a, 0x0b, 0x41, 0x74, 0x74, - 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, - 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, + 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x64, 0x69, 0x64, + 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xa7, 0x01, 0x0a, 0x07, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x65, + 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x1c, 0xf2, 0x9e, 0xd3, + 0x8e, 0x03, 0x16, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x0c, 0x0a, 0x06, 0x68, 0x61, 0x6e, + 0x64, 0x6c, 0x65, 0x10, 0x01, 0x18, 0x01, 0x18, 0x01, 0x22, 0x80, 0x02, 0x0a, 0x09, 0x41, 0x73, + 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x12, 0x3b, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, + 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x3a, - 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x22, - 0xaf, 0x01, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, - 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, - 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6d, - 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, - 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x69, 0x64, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x69, 0x64, 0x12, - 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, - 0x74, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x04, 0x22, 0x8b, 0x03, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, - 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x44, 0x69, 0x64, 0x12, 0x30, 0x0a, - 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6d, 0x75, 0x6c, 0x74, - 0x69, 0x62, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x12, - 0x4d, 0x0a, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6a, 0x77, - 0x6b, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b, 0x73, 0x12, 0x1d, - 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x1a, 0x40, 0x0a, - 0x12, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, - 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x05, 0x22, - 0x9e, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x29, - 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x44, 0x69, 0x64, - 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x06, - 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, - 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, - 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, - 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, - 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x1a, + 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x0e, 0xf2, 0x9e, + 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x22, 0x94, 0x01, 0x0a, + 0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, + 0x6b, 0x65, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, + 0x6f, 0x6f, 0x66, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, + 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x03, 0x22, 0xaf, 0x01, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x64, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, + 0x65, 0x79, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x12, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4d, 0x75, 0x6c, + 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x5f, + 0x63, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x61, 0x75, 0x6c, 0x74, + 0x43, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, + 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, + 0x70, 0x72, 0x69, 0x6e, 0x74, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x04, 0x22, 0x8b, 0x03, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x44, 0x69, + 0x64, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, + 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x12, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x62, + 0x61, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, + 0x79, 0x5f, 0x6a, 0x77, 0x6b, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, + 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, + 0x6b, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, + 0x64, 0x1a, 0x40, 0x0a, 0x12, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, + 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x05, 0x22, 0xdc, 0x02, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x5f, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x44, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x55, 0x72, 0x69, 0x12, 0x52, 0x0a, 0x11, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x06, + 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x64, + 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x1a, 0x43, 0x0a, + 0x15, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x06, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, + 0x72, 0x2f, 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, + 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, + 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -5232,25 +5741,29 @@ 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, 8) +var file_did_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_did_v1_state_proto_goTypes = []interface{}{ - (*Aliases)(nil), // 0: did.v1.Aliases - (*Assertion)(nil), // 1: did.v1.Assertion - (*Attestation)(nil), // 2: did.v1.Attestation - (*Controller)(nil), // 3: did.v1.Controller - (*Delegation)(nil), // 4: did.v1.Delegation - (*Service)(nil), // 5: did.v1.Service - nil, // 6: did.v1.Assertion.MetadataEntry - nil, // 7: did.v1.Delegation.PublicKeyJwksEntry + (*Aliases)(nil), // 0: did.v1.Aliases + (*Assertion)(nil), // 1: did.v1.Assertion + (*Attestation)(nil), // 2: did.v1.Attestation + (*Controller)(nil), // 3: did.v1.Controller + (*Delegation)(nil), // 4: did.v1.Delegation + (*Service)(nil), // 5: did.v1.Service + nil, // 6: did.v1.Assertion.MetadataEntry + nil, // 7: did.v1.Delegation.PublicKeyJwksEntry + nil, // 8: did.v1.Service.ServiceEndpointsEntry + (PermissionScope)(0), // 9: did.v1.PermissionScope } var file_did_v1_state_proto_depIdxs = []int32{ 6, // 0: did.v1.Assertion.metadata:type_name -> did.v1.Assertion.MetadataEntry 7, // 1: did.v1.Delegation.public_key_jwks:type_name -> did.v1.Delegation.PublicKeyJwksEntry - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 8, // 2: did.v1.Service.service_endpoints:type_name -> did.v1.Service.ServiceEndpointsEntry + 9, // 3: did.v1.Service.scopes:type_name -> did.v1.PermissionScope + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_did_v1_state_proto_init() } @@ -5259,6 +5772,7 @@ func file_did_v1_state_proto_init() { return } file_did_v1_genesis_proto_init() + file_did_v1_enums_proto_init() if !protoimpl.UnsafeEnabled { file_did_v1_state_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Aliases); i { @@ -5339,7 +5853,7 @@ func file_did_v1_state_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_state_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 9, NumExtensions: 0, NumServices: 0, }, diff --git a/api/did/v1/tx.pulsar.go b/api/did/v1/tx.pulsar.go index 3dad1b969..dffc38735 100644 --- a/api/did/v1/tx.pulsar.go +++ b/api/did/v1/tx.pulsar.go @@ -12,6 +12,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" + sort "sort" sync "sync" ) @@ -870,170 +871,32 @@ func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Meth } } -var _ protoreflect.List = (*_MsgInitializeController_2_list)(nil) - -type _MsgInitializeController_2_list struct { - list *[][]byte -} - -func (x *_MsgInitializeController_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgInitializeController_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfBytes((*x.list)[i]) -} - -func (x *_MsgInitializeController_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_MsgInitializeController_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgInitializeController_2_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message MsgInitializeController at list field Assertions as it is not of Message kind")) -} - -func (x *_MsgInitializeController_2_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_MsgInitializeController_2_list) NewElement() protoreflect.Value { - var v []byte - return protoreflect.ValueOfBytes(v) -} - -func (x *_MsgInitializeController_2_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_MsgInitializeController_3_list)(nil) - -type _MsgInitializeController_3_list struct { - list *[][]byte -} - -func (x *_MsgInitializeController_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgInitializeController_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfBytes((*x.list)[i]) -} - -func (x *_MsgInitializeController_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_MsgInitializeController_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgInitializeController_3_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message MsgInitializeController at list field Keyshares as it is not of Message kind")) -} - -func (x *_MsgInitializeController_3_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_MsgInitializeController_3_list) NewElement() protoreflect.Value { - var v []byte - return protoreflect.ValueOfBytes(v) -} - -func (x *_MsgInitializeController_3_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_MsgInitializeController_4_list)(nil) - -type _MsgInitializeController_4_list struct { - list *[][]byte -} - -func (x *_MsgInitializeController_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgInitializeController_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfBytes((*x.list)[i]) -} - -func (x *_MsgInitializeController_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_MsgInitializeController_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgInitializeController_4_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message MsgInitializeController at list field Verifications as it is not of Message kind")) -} - -func (x *_MsgInitializeController_4_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_MsgInitializeController_4_list) NewElement() protoreflect.Value { - var v []byte - return protoreflect.ValueOfBytes(v) -} - -func (x *_MsgInitializeController_4_list) IsValid() bool { - return x.list != nil -} - var ( - md_MsgInitializeController protoreflect.MessageDescriptor - fd_MsgInitializeController_authority protoreflect.FieldDescriptor - fd_MsgInitializeController_assertions protoreflect.FieldDescriptor - fd_MsgInitializeController_keyshares protoreflect.FieldDescriptor - fd_MsgInitializeController_verifications protoreflect.FieldDescriptor + md_MsgAuthenticate protoreflect.MessageDescriptor + fd_MsgAuthenticate_authority protoreflect.FieldDescriptor + fd_MsgAuthenticate_controller protoreflect.FieldDescriptor + fd_MsgAuthenticate_address protoreflect.FieldDescriptor + fd_MsgAuthenticate_origin protoreflect.FieldDescriptor ) func init() { file_did_v1_tx_proto_init() - md_MsgInitializeController = File_did_v1_tx_proto.Messages().ByName("MsgInitializeController") - fd_MsgInitializeController_authority = md_MsgInitializeController.Fields().ByName("authority") - fd_MsgInitializeController_assertions = md_MsgInitializeController.Fields().ByName("assertions") - fd_MsgInitializeController_keyshares = md_MsgInitializeController.Fields().ByName("keyshares") - fd_MsgInitializeController_verifications = md_MsgInitializeController.Fields().ByName("verifications") + md_MsgAuthenticate = File_did_v1_tx_proto.Messages().ByName("MsgAuthenticate") + fd_MsgAuthenticate_authority = md_MsgAuthenticate.Fields().ByName("authority") + fd_MsgAuthenticate_controller = md_MsgAuthenticate.Fields().ByName("controller") + fd_MsgAuthenticate_address = md_MsgAuthenticate.Fields().ByName("address") + fd_MsgAuthenticate_origin = md_MsgAuthenticate.Fields().ByName("origin") } -var _ protoreflect.Message = (*fastReflection_MsgInitializeController)(nil) +var _ protoreflect.Message = (*fastReflection_MsgAuthenticate)(nil) -type fastReflection_MsgInitializeController MsgInitializeController +type fastReflection_MsgAuthenticate MsgAuthenticate -func (x *MsgInitializeController) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgInitializeController)(x) +func (x *MsgAuthenticate) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgAuthenticate)(x) } -func (x *MsgInitializeController) slowProtoReflect() protoreflect.Message { +func (x *MsgAuthenticate) slowProtoReflect() protoreflect.Message { mi := &file_did_v1_tx_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1045,43 +908,43 @@ func (x *MsgInitializeController) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgInitializeController_messageType fastReflection_MsgInitializeController_messageType -var _ protoreflect.MessageType = fastReflection_MsgInitializeController_messageType{} +var _fastReflection_MsgAuthenticate_messageType fastReflection_MsgAuthenticate_messageType +var _ protoreflect.MessageType = fastReflection_MsgAuthenticate_messageType{} -type fastReflection_MsgInitializeController_messageType struct{} +type fastReflection_MsgAuthenticate_messageType struct{} -func (x fastReflection_MsgInitializeController_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgInitializeController)(nil) +func (x fastReflection_MsgAuthenticate_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgAuthenticate)(nil) } -func (x fastReflection_MsgInitializeController_messageType) New() protoreflect.Message { - return new(fastReflection_MsgInitializeController) +func (x fastReflection_MsgAuthenticate_messageType) New() protoreflect.Message { + return new(fastReflection_MsgAuthenticate) } -func (x fastReflection_MsgInitializeController_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgInitializeController +func (x fastReflection_MsgAuthenticate_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAuthenticate } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgInitializeController) Descriptor() protoreflect.MessageDescriptor { - return md_MsgInitializeController +func (x *fastReflection_MsgAuthenticate) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAuthenticate } // 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_MsgInitializeController) Type() protoreflect.MessageType { - return _fastReflection_MsgInitializeController_messageType +func (x *fastReflection_MsgAuthenticate) Type() protoreflect.MessageType { + return _fastReflection_MsgAuthenticate_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgInitializeController) New() protoreflect.Message { - return new(fastReflection_MsgInitializeController) +func (x *fastReflection_MsgAuthenticate) New() protoreflect.Message { + return new(fastReflection_MsgAuthenticate) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgInitializeController) Interface() protoreflect.ProtoMessage { - return (*MsgInitializeController)(x) +func (x *fastReflection_MsgAuthenticate) Interface() protoreflect.ProtoMessage { + return (*MsgAuthenticate)(x) } // Range iterates over every populated field in an undefined order, @@ -1089,1102 +952,28 @@ func (x *fastReflection_MsgInitializeController) Interface() protoreflect.ProtoM // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgInitializeController) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgAuthenticate) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Authority != "" { value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgInitializeController_authority, value) { - return - } - } - if len(x.Assertions) != 0 { - value := protoreflect.ValueOfList(&_MsgInitializeController_2_list{list: &x.Assertions}) - if !f(fd_MsgInitializeController_assertions, value) { - return - } - } - if len(x.Keyshares) != 0 { - value := protoreflect.ValueOfList(&_MsgInitializeController_3_list{list: &x.Keyshares}) - if !f(fd_MsgInitializeController_keyshares, value) { - return - } - } - if len(x.Verifications) != 0 { - value := protoreflect.ValueOfList(&_MsgInitializeController_4_list{list: &x.Verifications}) - if !f(fd_MsgInitializeController_verifications, 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_MsgInitializeController) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.MsgInitializeController.authority": - return x.Authority != "" - case "did.v1.MsgInitializeController.assertions": - return len(x.Assertions) != 0 - case "did.v1.MsgInitializeController.keyshares": - return len(x.Keyshares) != 0 - case "did.v1.MsgInitializeController.verifications": - return len(x.Verifications) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgInitializeController")) - } - panic(fmt.Errorf("message did.v1.MsgInitializeController 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_MsgInitializeController) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.MsgInitializeController.authority": - x.Authority = "" - case "did.v1.MsgInitializeController.assertions": - x.Assertions = nil - case "did.v1.MsgInitializeController.keyshares": - x.Keyshares = nil - case "did.v1.MsgInitializeController.verifications": - x.Verifications = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgInitializeController")) - } - panic(fmt.Errorf("message did.v1.MsgInitializeController 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_MsgInitializeController) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.MsgInitializeController.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - case "did.v1.MsgInitializeController.assertions": - if len(x.Assertions) == 0 { - return protoreflect.ValueOfList(&_MsgInitializeController_2_list{}) - } - listValue := &_MsgInitializeController_2_list{list: &x.Assertions} - return protoreflect.ValueOfList(listValue) - case "did.v1.MsgInitializeController.keyshares": - if len(x.Keyshares) == 0 { - return protoreflect.ValueOfList(&_MsgInitializeController_3_list{}) - } - listValue := &_MsgInitializeController_3_list{list: &x.Keyshares} - return protoreflect.ValueOfList(listValue) - case "did.v1.MsgInitializeController.verifications": - if len(x.Verifications) == 0 { - return protoreflect.ValueOfList(&_MsgInitializeController_4_list{}) - } - listValue := &_MsgInitializeController_4_list{list: &x.Verifications} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgInitializeController")) - } - panic(fmt.Errorf("message did.v1.MsgInitializeController 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_MsgInitializeController) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.MsgInitializeController.authority": - x.Authority = value.Interface().(string) - case "did.v1.MsgInitializeController.assertions": - lv := value.List() - clv := lv.(*_MsgInitializeController_2_list) - x.Assertions = *clv.list - case "did.v1.MsgInitializeController.keyshares": - lv := value.List() - clv := lv.(*_MsgInitializeController_3_list) - x.Keyshares = *clv.list - case "did.v1.MsgInitializeController.verifications": - lv := value.List() - clv := lv.(*_MsgInitializeController_4_list) - x.Verifications = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgInitializeController")) - } - panic(fmt.Errorf("message did.v1.MsgInitializeController 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_MsgInitializeController) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgInitializeController.assertions": - if x.Assertions == nil { - x.Assertions = [][]byte{} - } - value := &_MsgInitializeController_2_list{list: &x.Assertions} - return protoreflect.ValueOfList(value) - case "did.v1.MsgInitializeController.keyshares": - if x.Keyshares == nil { - x.Keyshares = [][]byte{} - } - value := &_MsgInitializeController_3_list{list: &x.Keyshares} - return protoreflect.ValueOfList(value) - case "did.v1.MsgInitializeController.verifications": - if x.Verifications == nil { - x.Verifications = [][]byte{} - } - value := &_MsgInitializeController_4_list{list: &x.Verifications} - return protoreflect.ValueOfList(value) - case "did.v1.MsgInitializeController.authority": - panic(fmt.Errorf("field authority of message did.v1.MsgInitializeController is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgInitializeController")) - } - panic(fmt.Errorf("message did.v1.MsgInitializeController 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_MsgInitializeController) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgInitializeController.authority": - return protoreflect.ValueOfString("") - case "did.v1.MsgInitializeController.assertions": - list := [][]byte{} - return protoreflect.ValueOfList(&_MsgInitializeController_2_list{list: &list}) - case "did.v1.MsgInitializeController.keyshares": - list := [][]byte{} - return protoreflect.ValueOfList(&_MsgInitializeController_3_list{list: &list}) - case "did.v1.MsgInitializeController.verifications": - list := [][]byte{} - return protoreflect.ValueOfList(&_MsgInitializeController_4_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgInitializeController")) - } - panic(fmt.Errorf("message did.v1.MsgInitializeController 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_MsgInitializeController) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgInitializeController", 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_MsgInitializeController) 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_MsgInitializeController) 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_MsgInitializeController) 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_MsgInitializeController) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgInitializeController) - 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.Authority) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Assertions) > 0 { - for _, b := range x.Assertions { - l = len(b) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.Keyshares) > 0 { - for _, b := range x.Keyshares { - l = len(b) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.Verifications) > 0 { - for _, b := range x.Verifications { - l = len(b) - 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().(*MsgInitializeController) - 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.Verifications) > 0 { - for iNdEx := len(x.Verifications) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Verifications[iNdEx]) - copy(dAtA[i:], x.Verifications[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Verifications[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(x.Keyshares) > 0 { - for iNdEx := len(x.Keyshares) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Keyshares[iNdEx]) - copy(dAtA[i:], x.Keyshares[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Keyshares[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.Assertions) > 0 { - for iNdEx := len(x.Assertions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Assertions[iNdEx]) - copy(dAtA[i:], x.Assertions[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Assertions[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) - 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().(*MsgInitializeController) - 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: MsgInitializeController: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitializeController: 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 Authority", 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.Authority = 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 Assertions", 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.Assertions = append(x.Assertions, make([]byte, postIndex-iNdEx)) - copy(x.Assertions[len(x.Assertions)-1], 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 Keyshares", 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.Keyshares = append(x.Keyshares, make([]byte, postIndex-iNdEx)) - copy(x.Keyshares[len(x.Keyshares)-1], 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 Verifications", 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.Verifications = append(x.Verifications, make([]byte, postIndex-iNdEx)) - copy(x.Verifications[len(x.Verifications)-1], 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_MsgInitializeControllerResponse protoreflect.MessageDescriptor - fd_MsgInitializeControllerResponse_controller protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_tx_proto_init() - md_MsgInitializeControllerResponse = File_did_v1_tx_proto.Messages().ByName("MsgInitializeControllerResponse") - fd_MsgInitializeControllerResponse_controller = md_MsgInitializeControllerResponse.Fields().ByName("controller") -} - -var _ protoreflect.Message = (*fastReflection_MsgInitializeControllerResponse)(nil) - -type fastReflection_MsgInitializeControllerResponse MsgInitializeControllerResponse - -func (x *MsgInitializeControllerResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgInitializeControllerResponse)(x) -} - -func (x *MsgInitializeControllerResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_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_MsgInitializeControllerResponse_messageType fastReflection_MsgInitializeControllerResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgInitializeControllerResponse_messageType{} - -type fastReflection_MsgInitializeControllerResponse_messageType struct{} - -func (x fastReflection_MsgInitializeControllerResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgInitializeControllerResponse)(nil) -} -func (x fastReflection_MsgInitializeControllerResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgInitializeControllerResponse) -} -func (x fastReflection_MsgInitializeControllerResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgInitializeControllerResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgInitializeControllerResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgInitializeControllerResponse -} - -// 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_MsgInitializeControllerResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgInitializeControllerResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgInitializeControllerResponse) New() protoreflect.Message { - return new(fastReflection_MsgInitializeControllerResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgInitializeControllerResponse) Interface() protoreflect.ProtoMessage { - return (*MsgInitializeControllerResponse)(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_MsgInitializeControllerResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_MsgInitializeControllerResponse_controller, 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_MsgInitializeControllerResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.MsgInitializeControllerResponse.controller": - return x.Controller != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgInitializeControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgInitializeControllerResponse 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_MsgInitializeControllerResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.MsgInitializeControllerResponse.controller": - x.Controller = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgInitializeControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgInitializeControllerResponse 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_MsgInitializeControllerResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.MsgInitializeControllerResponse.controller": - value := x.Controller - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgInitializeControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgInitializeControllerResponse 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_MsgInitializeControllerResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.MsgInitializeControllerResponse.controller": - x.Controller = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgInitializeControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgInitializeControllerResponse 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_MsgInitializeControllerResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgInitializeControllerResponse.controller": - panic(fmt.Errorf("field controller of message did.v1.MsgInitializeControllerResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgInitializeControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgInitializeControllerResponse 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_MsgInitializeControllerResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgInitializeControllerResponse.controller": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgInitializeControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgInitializeControllerResponse 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_MsgInitializeControllerResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgInitializeControllerResponse", 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_MsgInitializeControllerResponse) 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_MsgInitializeControllerResponse) 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_MsgInitializeControllerResponse) 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_MsgInitializeControllerResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgInitializeControllerResponse) - 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.Controller) - 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().(*MsgInitializeControllerResponse) - 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.Controller) > 0 { - i -= len(x.Controller) - copy(dAtA[i:], x.Controller) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) - 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().(*MsgInitializeControllerResponse) - 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: MsgInitializeControllerResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitializeControllerResponse: 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 Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - 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_MsgAuthenticateController protoreflect.MessageDescriptor - fd_MsgAuthenticateController_authority protoreflect.FieldDescriptor - fd_MsgAuthenticateController_controller protoreflect.FieldDescriptor - fd_MsgAuthenticateController_address protoreflect.FieldDescriptor - fd_MsgAuthenticateController_origin protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_tx_proto_init() - md_MsgAuthenticateController = File_did_v1_tx_proto.Messages().ByName("MsgAuthenticateController") - fd_MsgAuthenticateController_authority = md_MsgAuthenticateController.Fields().ByName("authority") - fd_MsgAuthenticateController_controller = md_MsgAuthenticateController.Fields().ByName("controller") - fd_MsgAuthenticateController_address = md_MsgAuthenticateController.Fields().ByName("address") - fd_MsgAuthenticateController_origin = md_MsgAuthenticateController.Fields().ByName("origin") -} - -var _ protoreflect.Message = (*fastReflection_MsgAuthenticateController)(nil) - -type fastReflection_MsgAuthenticateController MsgAuthenticateController - -func (x *MsgAuthenticateController) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgAuthenticateController)(x) -} - -func (x *MsgAuthenticateController) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_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_MsgAuthenticateController_messageType fastReflection_MsgAuthenticateController_messageType -var _ protoreflect.MessageType = fastReflection_MsgAuthenticateController_messageType{} - -type fastReflection_MsgAuthenticateController_messageType struct{} - -func (x fastReflection_MsgAuthenticateController_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgAuthenticateController)(nil) -} -func (x fastReflection_MsgAuthenticateController_messageType) New() protoreflect.Message { - return new(fastReflection_MsgAuthenticateController) -} -func (x fastReflection_MsgAuthenticateController_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAuthenticateController -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgAuthenticateController) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAuthenticateController -} - -// 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_MsgAuthenticateController) Type() protoreflect.MessageType { - return _fastReflection_MsgAuthenticateController_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgAuthenticateController) New() protoreflect.Message { - return new(fastReflection_MsgAuthenticateController) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgAuthenticateController) Interface() protoreflect.ProtoMessage { - return (*MsgAuthenticateController)(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_MsgAuthenticateController) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgAuthenticateController_authority, value) { + if !f(fd_MsgAuthenticate_authority, value) { return } } if x.Controller != "" { value := protoreflect.ValueOfString(x.Controller) - if !f(fd_MsgAuthenticateController_controller, value) { + if !f(fd_MsgAuthenticate_controller, value) { return } } if x.Address != "" { value := protoreflect.ValueOfString(x.Address) - if !f(fd_MsgAuthenticateController_address, value) { + if !f(fd_MsgAuthenticate_address, value) { return } } if x.Origin != "" { value := protoreflect.ValueOfString(x.Origin) - if !f(fd_MsgAuthenticateController_origin, value) { + if !f(fd_MsgAuthenticate_origin, value) { return } } @@ -2201,21 +990,21 @@ func (x *fastReflection_MsgAuthenticateController) Range(f func(protoreflect.Fie // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgAuthenticateController) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgAuthenticate) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.MsgAuthenticateController.authority": + case "did.v1.MsgAuthenticate.authority": return x.Authority != "" - case "did.v1.MsgAuthenticateController.controller": + case "did.v1.MsgAuthenticate.controller": return x.Controller != "" - case "did.v1.MsgAuthenticateController.address": + case "did.v1.MsgAuthenticate.address": return x.Address != "" - case "did.v1.MsgAuthenticateController.origin": + case "did.v1.MsgAuthenticate.origin": return x.Origin != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateController")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticate")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateController does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthenticate does not contain field %s", fd.FullName())) } } @@ -2225,21 +1014,21 @@ func (x *fastReflection_MsgAuthenticateController) Has(fd protoreflect.FieldDesc // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthenticateController) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgAuthenticate) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.MsgAuthenticateController.authority": + case "did.v1.MsgAuthenticate.authority": x.Authority = "" - case "did.v1.MsgAuthenticateController.controller": + case "did.v1.MsgAuthenticate.controller": x.Controller = "" - case "did.v1.MsgAuthenticateController.address": + case "did.v1.MsgAuthenticate.address": x.Address = "" - case "did.v1.MsgAuthenticateController.origin": + case "did.v1.MsgAuthenticate.origin": x.Origin = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateController")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticate")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateController does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthenticate does not contain field %s", fd.FullName())) } } @@ -2249,25 +1038,25 @@ func (x *fastReflection_MsgAuthenticateController) Clear(fd protoreflect.FieldDe // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgAuthenticateController) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgAuthenticate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.MsgAuthenticateController.authority": + case "did.v1.MsgAuthenticate.authority": value := x.Authority return protoreflect.ValueOfString(value) - case "did.v1.MsgAuthenticateController.controller": + case "did.v1.MsgAuthenticate.controller": value := x.Controller return protoreflect.ValueOfString(value) - case "did.v1.MsgAuthenticateController.address": + case "did.v1.MsgAuthenticate.address": value := x.Address return protoreflect.ValueOfString(value) - case "did.v1.MsgAuthenticateController.origin": + case "did.v1.MsgAuthenticate.origin": value := x.Origin return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateController")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticate")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateController does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthenticate does not contain field %s", descriptor.FullName())) } } @@ -2281,21 +1070,21 @@ func (x *fastReflection_MsgAuthenticateController) Get(descriptor protoreflect.F // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthenticateController) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgAuthenticate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.MsgAuthenticateController.authority": + case "did.v1.MsgAuthenticate.authority": x.Authority = value.Interface().(string) - case "did.v1.MsgAuthenticateController.controller": + case "did.v1.MsgAuthenticate.controller": x.Controller = value.Interface().(string) - case "did.v1.MsgAuthenticateController.address": + case "did.v1.MsgAuthenticate.address": x.Address = value.Interface().(string) - case "did.v1.MsgAuthenticateController.origin": + case "did.v1.MsgAuthenticate.origin": x.Origin = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateController")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticate")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateController does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthenticate does not contain field %s", fd.FullName())) } } @@ -2309,52 +1098,52 @@ func (x *fastReflection_MsgAuthenticateController) Set(fd protoreflect.FieldDesc // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthenticateController) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgAuthenticate) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.MsgAuthenticateController.authority": - panic(fmt.Errorf("field authority of message did.v1.MsgAuthenticateController is not mutable")) - case "did.v1.MsgAuthenticateController.controller": - panic(fmt.Errorf("field controller of message did.v1.MsgAuthenticateController is not mutable")) - case "did.v1.MsgAuthenticateController.address": - panic(fmt.Errorf("field address of message did.v1.MsgAuthenticateController is not mutable")) - case "did.v1.MsgAuthenticateController.origin": - panic(fmt.Errorf("field origin of message did.v1.MsgAuthenticateController is not mutable")) + case "did.v1.MsgAuthenticate.authority": + panic(fmt.Errorf("field authority of message did.v1.MsgAuthenticate is not mutable")) + case "did.v1.MsgAuthenticate.controller": + panic(fmt.Errorf("field controller of message did.v1.MsgAuthenticate is not mutable")) + case "did.v1.MsgAuthenticate.address": + panic(fmt.Errorf("field address of message did.v1.MsgAuthenticate is not mutable")) + case "did.v1.MsgAuthenticate.origin": + panic(fmt.Errorf("field origin of message did.v1.MsgAuthenticate is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateController")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticate")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateController does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthenticate 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_MsgAuthenticateController) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgAuthenticate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.MsgAuthenticateController.authority": + case "did.v1.MsgAuthenticate.authority": return protoreflect.ValueOfString("") - case "did.v1.MsgAuthenticateController.controller": + case "did.v1.MsgAuthenticate.controller": return protoreflect.ValueOfString("") - case "did.v1.MsgAuthenticateController.address": + case "did.v1.MsgAuthenticate.address": return protoreflect.ValueOfString("") - case "did.v1.MsgAuthenticateController.origin": + case "did.v1.MsgAuthenticate.origin": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateController")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticate")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateController does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthenticate 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_MsgAuthenticateController) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgAuthenticate) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgAuthenticateController", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgAuthenticate", d.FullName())) } panic("unreachable") } @@ -2362,7 +1151,7 @@ func (x *fastReflection_MsgAuthenticateController) WhichOneof(d protoreflect.One // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgAuthenticateController) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgAuthenticate) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2373,7 +1162,7 @@ func (x *fastReflection_MsgAuthenticateController) GetUnknown() protoreflect.Raw // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthenticateController) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgAuthenticate) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2385,7 +1174,7 @@ func (x *fastReflection_MsgAuthenticateController) SetUnknown(fields protoreflec // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_MsgAuthenticateController) IsValid() bool { +func (x *fastReflection_MsgAuthenticate) IsValid() bool { return x != nil } @@ -2395,9 +1184,9 @@ func (x *fastReflection_MsgAuthenticateController) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgAuthenticateController) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgAuthenticate) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgAuthenticateController) + x := input.Message.Interface().(*MsgAuthenticate) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2435,7 +1224,7 @@ func (x *fastReflection_MsgAuthenticateController) ProtoMethods() *protoiface.Me } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgAuthenticateController) + x := input.Message.Interface().(*MsgAuthenticate) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2493,7 +1282,7 @@ func (x *fastReflection_MsgAuthenticateController) ProtoMethods() *protoiface.Me }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgAuthenticateController) + x := input.Message.Interface().(*MsgAuthenticate) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2525,10 +1314,10 @@ func (x *fastReflection_MsgAuthenticateController) ProtoMethods() *protoiface.Me fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthenticateController: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthenticate: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthenticateController: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthenticate: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2695,24 +1484,24 @@ func (x *fastReflection_MsgAuthenticateController) ProtoMethods() *protoiface.Me } var ( - md_MsgAuthenticateControllerResponse protoreflect.MessageDescriptor + md_MsgAuthenticateResponse protoreflect.MessageDescriptor ) func init() { file_did_v1_tx_proto_init() - md_MsgAuthenticateControllerResponse = File_did_v1_tx_proto.Messages().ByName("MsgAuthenticateControllerResponse") + md_MsgAuthenticateResponse = File_did_v1_tx_proto.Messages().ByName("MsgAuthenticateResponse") } -var _ protoreflect.Message = (*fastReflection_MsgAuthenticateControllerResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgAuthenticateResponse)(nil) -type fastReflection_MsgAuthenticateControllerResponse MsgAuthenticateControllerResponse +type fastReflection_MsgAuthenticateResponse MsgAuthenticateResponse -func (x *MsgAuthenticateControllerResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgAuthenticateControllerResponse)(x) +func (x *MsgAuthenticateResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgAuthenticateResponse)(x) } -func (x *MsgAuthenticateControllerResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[5] +func (x *MsgAuthenticateResponse) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_tx_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2723,43 +1512,43 @@ func (x *MsgAuthenticateControllerResponse) slowProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -var _fastReflection_MsgAuthenticateControllerResponse_messageType fastReflection_MsgAuthenticateControllerResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgAuthenticateControllerResponse_messageType{} +var _fastReflection_MsgAuthenticateResponse_messageType fastReflection_MsgAuthenticateResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgAuthenticateResponse_messageType{} -type fastReflection_MsgAuthenticateControllerResponse_messageType struct{} +type fastReflection_MsgAuthenticateResponse_messageType struct{} -func (x fastReflection_MsgAuthenticateControllerResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgAuthenticateControllerResponse)(nil) +func (x fastReflection_MsgAuthenticateResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgAuthenticateResponse)(nil) } -func (x fastReflection_MsgAuthenticateControllerResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgAuthenticateControllerResponse) +func (x fastReflection_MsgAuthenticateResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgAuthenticateResponse) } -func (x fastReflection_MsgAuthenticateControllerResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAuthenticateControllerResponse +func (x fastReflection_MsgAuthenticateResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAuthenticateResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgAuthenticateControllerResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAuthenticateControllerResponse +func (x *fastReflection_MsgAuthenticateResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAuthenticateResponse } // 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_MsgAuthenticateControllerResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgAuthenticateControllerResponse_messageType +func (x *fastReflection_MsgAuthenticateResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgAuthenticateResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgAuthenticateControllerResponse) New() protoreflect.Message { - return new(fastReflection_MsgAuthenticateControllerResponse) +func (x *fastReflection_MsgAuthenticateResponse) New() protoreflect.Message { + return new(fastReflection_MsgAuthenticateResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgAuthenticateControllerResponse) Interface() protoreflect.ProtoMessage { - return (*MsgAuthenticateControllerResponse)(x) +func (x *fastReflection_MsgAuthenticateResponse) Interface() protoreflect.ProtoMessage { + return (*MsgAuthenticateResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -2767,7 +1556,7 @@ func (x *fastReflection_MsgAuthenticateControllerResponse) Interface() protorefl // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgAuthenticateControllerResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgAuthenticateResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -2781,13 +1570,13 @@ func (x *fastReflection_MsgAuthenticateControllerResponse) Range(f func(protoref // 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_MsgAuthenticateControllerResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgAuthenticateResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateControllerResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateResponse")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateControllerResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthenticateResponse does not contain field %s", fd.FullName())) } } @@ -2797,13 +1586,13 @@ func (x *fastReflection_MsgAuthenticateControllerResponse) Has(fd protoreflect.F // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthenticateControllerResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgAuthenticateResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateControllerResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateResponse")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateControllerResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthenticateResponse does not contain field %s", fd.FullName())) } } @@ -2813,13 +1602,13 @@ func (x *fastReflection_MsgAuthenticateControllerResponse) Clear(fd protoreflect // 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_MsgAuthenticateControllerResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgAuthenticateResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateControllerResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateResponse")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateControllerResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthenticateResponse does not contain field %s", descriptor.FullName())) } } @@ -2833,13 +1622,13 @@ func (x *fastReflection_MsgAuthenticateControllerResponse) Get(descriptor protor // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthenticateControllerResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgAuthenticateResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateControllerResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateResponse")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateControllerResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthenticateResponse does not contain field %s", fd.FullName())) } } @@ -2853,36 +1642,36 @@ func (x *fastReflection_MsgAuthenticateControllerResponse) Set(fd protoreflect.F // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthenticateControllerResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgAuthenticateResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateControllerResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateResponse")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateControllerResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthenticateResponse 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_MsgAuthenticateControllerResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgAuthenticateResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateControllerResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateResponse")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateControllerResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthenticateResponse 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_MsgAuthenticateControllerResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgAuthenticateResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgAuthenticateControllerResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgAuthenticateResponse", d.FullName())) } panic("unreachable") } @@ -2890,7 +1679,7 @@ func (x *fastReflection_MsgAuthenticateControllerResponse) WhichOneof(d protoref // 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_MsgAuthenticateControllerResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgAuthenticateResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2901,7 +1690,7 @@ func (x *fastReflection_MsgAuthenticateControllerResponse) GetUnknown() protoref // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthenticateControllerResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgAuthenticateResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2913,7 +1702,7 @@ func (x *fastReflection_MsgAuthenticateControllerResponse) SetUnknown(fields pro // 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_MsgAuthenticateControllerResponse) IsValid() bool { +func (x *fastReflection_MsgAuthenticateResponse) IsValid() bool { return x != nil } @@ -2923,9 +1712,9 @@ func (x *fastReflection_MsgAuthenticateControllerResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgAuthenticateControllerResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgAuthenticateResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgAuthenticateControllerResponse) + x := input.Message.Interface().(*MsgAuthenticateResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2947,7 +1736,7 @@ func (x *fastReflection_MsgAuthenticateControllerResponse) ProtoMethods() *proto } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgAuthenticateControllerResponse) + x := input.Message.Interface().(*MsgAuthenticateResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2977,7 +1766,7 @@ func (x *fastReflection_MsgAuthenticateControllerResponse) ProtoMethods() *proto }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgAuthenticateControllerResponse) + x := input.Message.Interface().(*MsgAuthenticateResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3009,10 +1798,10 @@ func (x *fastReflection_MsgAuthenticateControllerResponse) ProtoMethods() *proto fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthenticateControllerResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthenticateResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthenticateControllerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthenticateResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -3050,6 +1839,2590 @@ func (x *fastReflection_MsgAuthenticateControllerResponse) ProtoMethods() *proto } } +var _ protoreflect.List = (*_MsgRegisterController_2_list)(nil) + +type _MsgRegisterController_2_list struct { + list *[][]byte +} + +func (x *_MsgRegisterController_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgRegisterController_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfBytes((*x.list)[i]) +} + +func (x *_MsgRegisterController_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_MsgRegisterController_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgRegisterController_2_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgRegisterController at list field Assertions as it is not of Message kind")) +} + +func (x *_MsgRegisterController_2_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_MsgRegisterController_2_list) NewElement() protoreflect.Value { + var v []byte + return protoreflect.ValueOfBytes(v) +} + +func (x *_MsgRegisterController_2_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_MsgRegisterController_3_list)(nil) + +type _MsgRegisterController_3_list struct { + list *[][]byte +} + +func (x *_MsgRegisterController_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgRegisterController_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfBytes((*x.list)[i]) +} + +func (x *_MsgRegisterController_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_MsgRegisterController_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgRegisterController_3_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgRegisterController at list field Keyshares as it is not of Message kind")) +} + +func (x *_MsgRegisterController_3_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_MsgRegisterController_3_list) NewElement() protoreflect.Value { + var v []byte + return protoreflect.ValueOfBytes(v) +} + +func (x *_MsgRegisterController_3_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_MsgRegisterController_4_list)(nil) + +type _MsgRegisterController_4_list struct { + list *[][]byte +} + +func (x *_MsgRegisterController_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgRegisterController_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfBytes((*x.list)[i]) +} + +func (x *_MsgRegisterController_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_MsgRegisterController_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgRegisterController_4_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgRegisterController at list field Verifications as it is not of Message kind")) +} + +func (x *_MsgRegisterController_4_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_MsgRegisterController_4_list) NewElement() protoreflect.Value { + var v []byte + return protoreflect.ValueOfBytes(v) +} + +func (x *_MsgRegisterController_4_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgRegisterController protoreflect.MessageDescriptor + fd_MsgRegisterController_authority protoreflect.FieldDescriptor + fd_MsgRegisterController_assertions protoreflect.FieldDescriptor + fd_MsgRegisterController_keyshares protoreflect.FieldDescriptor + fd_MsgRegisterController_verifications protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_tx_proto_init() + md_MsgRegisterController = File_did_v1_tx_proto.Messages().ByName("MsgRegisterController") + fd_MsgRegisterController_authority = md_MsgRegisterController.Fields().ByName("authority") + fd_MsgRegisterController_assertions = md_MsgRegisterController.Fields().ByName("assertions") + fd_MsgRegisterController_keyshares = md_MsgRegisterController.Fields().ByName("keyshares") + fd_MsgRegisterController_verifications = md_MsgRegisterController.Fields().ByName("verifications") +} + +var _ protoreflect.Message = (*fastReflection_MsgRegisterController)(nil) + +type fastReflection_MsgRegisterController MsgRegisterController + +func (x *MsgRegisterController) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRegisterController)(x) +} + +func (x *MsgRegisterController) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_tx_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_MsgRegisterController_messageType fastReflection_MsgRegisterController_messageType +var _ protoreflect.MessageType = fastReflection_MsgRegisterController_messageType{} + +type fastReflection_MsgRegisterController_messageType struct{} + +func (x fastReflection_MsgRegisterController_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRegisterController)(nil) +} +func (x fastReflection_MsgRegisterController_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRegisterController) +} +func (x fastReflection_MsgRegisterController_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterController +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRegisterController) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterController +} + +// 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_MsgRegisterController) Type() protoreflect.MessageType { + return _fastReflection_MsgRegisterController_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRegisterController) New() protoreflect.Message { + return new(fastReflection_MsgRegisterController) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRegisterController) Interface() protoreflect.ProtoMessage { + return (*MsgRegisterController)(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_MsgRegisterController) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgRegisterController_authority, value) { + return + } + } + if len(x.Assertions) != 0 { + value := protoreflect.ValueOfList(&_MsgRegisterController_2_list{list: &x.Assertions}) + if !f(fd_MsgRegisterController_assertions, value) { + return + } + } + if len(x.Keyshares) != 0 { + value := protoreflect.ValueOfList(&_MsgRegisterController_3_list{list: &x.Keyshares}) + if !f(fd_MsgRegisterController_keyshares, value) { + return + } + } + if len(x.Verifications) != 0 { + value := protoreflect.ValueOfList(&_MsgRegisterController_4_list{list: &x.Verifications}) + if !f(fd_MsgRegisterController_verifications, 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_MsgRegisterController) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.MsgRegisterController.authority": + return x.Authority != "" + case "did.v1.MsgRegisterController.assertions": + return len(x.Assertions) != 0 + case "did.v1.MsgRegisterController.keyshares": + return len(x.Keyshares) != 0 + case "did.v1.MsgRegisterController.verifications": + return len(x.Verifications) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterController 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_MsgRegisterController) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.MsgRegisterController.authority": + x.Authority = "" + case "did.v1.MsgRegisterController.assertions": + x.Assertions = nil + case "did.v1.MsgRegisterController.keyshares": + x.Keyshares = nil + case "did.v1.MsgRegisterController.verifications": + x.Verifications = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterController 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_MsgRegisterController) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.MsgRegisterController.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "did.v1.MsgRegisterController.assertions": + if len(x.Assertions) == 0 { + return protoreflect.ValueOfList(&_MsgRegisterController_2_list{}) + } + listValue := &_MsgRegisterController_2_list{list: &x.Assertions} + return protoreflect.ValueOfList(listValue) + case "did.v1.MsgRegisterController.keyshares": + if len(x.Keyshares) == 0 { + return protoreflect.ValueOfList(&_MsgRegisterController_3_list{}) + } + listValue := &_MsgRegisterController_3_list{list: &x.Keyshares} + return protoreflect.ValueOfList(listValue) + case "did.v1.MsgRegisterController.verifications": + if len(x.Verifications) == 0 { + return protoreflect.ValueOfList(&_MsgRegisterController_4_list{}) + } + listValue := &_MsgRegisterController_4_list{list: &x.Verifications} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterController 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_MsgRegisterController) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.MsgRegisterController.authority": + x.Authority = value.Interface().(string) + case "did.v1.MsgRegisterController.assertions": + lv := value.List() + clv := lv.(*_MsgRegisterController_2_list) + x.Assertions = *clv.list + case "did.v1.MsgRegisterController.keyshares": + lv := value.List() + clv := lv.(*_MsgRegisterController_3_list) + x.Keyshares = *clv.list + case "did.v1.MsgRegisterController.verifications": + lv := value.List() + clv := lv.(*_MsgRegisterController_4_list) + x.Verifications = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterController 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_MsgRegisterController) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgRegisterController.assertions": + if x.Assertions == nil { + x.Assertions = [][]byte{} + } + value := &_MsgRegisterController_2_list{list: &x.Assertions} + return protoreflect.ValueOfList(value) + case "did.v1.MsgRegisterController.keyshares": + if x.Keyshares == nil { + x.Keyshares = [][]byte{} + } + value := &_MsgRegisterController_3_list{list: &x.Keyshares} + return protoreflect.ValueOfList(value) + case "did.v1.MsgRegisterController.verifications": + if x.Verifications == nil { + x.Verifications = [][]byte{} + } + value := &_MsgRegisterController_4_list{list: &x.Verifications} + return protoreflect.ValueOfList(value) + case "did.v1.MsgRegisterController.authority": + panic(fmt.Errorf("field authority of message did.v1.MsgRegisterController is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterController 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_MsgRegisterController) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgRegisterController.authority": + return protoreflect.ValueOfString("") + case "did.v1.MsgRegisterController.assertions": + list := [][]byte{} + return protoreflect.ValueOfList(&_MsgRegisterController_2_list{list: &list}) + case "did.v1.MsgRegisterController.keyshares": + list := [][]byte{} + return protoreflect.ValueOfList(&_MsgRegisterController_3_list{list: &list}) + case "did.v1.MsgRegisterController.verifications": + list := [][]byte{} + return protoreflect.ValueOfList(&_MsgRegisterController_4_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterController 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_MsgRegisterController) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgRegisterController", 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_MsgRegisterController) 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_MsgRegisterController) 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_MsgRegisterController) 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_MsgRegisterController) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRegisterController) + 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.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Assertions) > 0 { + for _, b := range x.Assertions { + l = len(b) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.Keyshares) > 0 { + for _, b := range x.Keyshares { + l = len(b) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.Verifications) > 0 { + for _, b := range x.Verifications { + l = len(b) + 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().(*MsgRegisterController) + 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.Verifications) > 0 { + for iNdEx := len(x.Verifications) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Verifications[iNdEx]) + copy(dAtA[i:], x.Verifications[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Verifications[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(x.Keyshares) > 0 { + for iNdEx := len(x.Keyshares) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Keyshares[iNdEx]) + copy(dAtA[i:], x.Keyshares[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Keyshares[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.Assertions) > 0 { + for iNdEx := len(x.Assertions) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Assertions[iNdEx]) + copy(dAtA[i:], x.Assertions[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Assertions[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + 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().(*MsgRegisterController) + 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: MsgRegisterController: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterController: 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 Authority", 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.Authority = 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 Assertions", 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.Assertions = append(x.Assertions, make([]byte, postIndex-iNdEx)) + copy(x.Assertions[len(x.Assertions)-1], 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 Keyshares", 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.Keyshares = append(x.Keyshares, make([]byte, postIndex-iNdEx)) + copy(x.Keyshares[len(x.Keyshares)-1], 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 Verifications", 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.Verifications = append(x.Verifications, make([]byte, postIndex-iNdEx)) + copy(x.Verifications[len(x.Verifications)-1], 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 _ protoreflect.Map = (*_MsgRegisterControllerResponse_2_map)(nil) + +type _MsgRegisterControllerResponse_2_map struct { + m *map[string]string +} + +func (x *_MsgRegisterControllerResponse_2_map) Len() int { + if x.m == nil { + return 0 + } + return len(*x.m) +} + +func (x *_MsgRegisterControllerResponse_2_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 *_MsgRegisterControllerResponse_2_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 *_MsgRegisterControllerResponse_2_map) Clear(key protoreflect.MapKey) { + if x.m == nil { + return + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + delete(*x.m, concreteKey) +} + +func (x *_MsgRegisterControllerResponse_2_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 *_MsgRegisterControllerResponse_2_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 *_MsgRegisterControllerResponse_2_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 *_MsgRegisterControllerResponse_2_map) NewValue() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_MsgRegisterControllerResponse_2_map) IsValid() bool { + return x.m != nil +} + +var ( + md_MsgRegisterControllerResponse protoreflect.MessageDescriptor + fd_MsgRegisterControllerResponse_controller protoreflect.FieldDescriptor + fd_MsgRegisterControllerResponse_accounts protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_tx_proto_init() + md_MsgRegisterControllerResponse = File_did_v1_tx_proto.Messages().ByName("MsgRegisterControllerResponse") + fd_MsgRegisterControllerResponse_controller = md_MsgRegisterControllerResponse.Fields().ByName("controller") + fd_MsgRegisterControllerResponse_accounts = md_MsgRegisterControllerResponse.Fields().ByName("accounts") +} + +var _ protoreflect.Message = (*fastReflection_MsgRegisterControllerResponse)(nil) + +type fastReflection_MsgRegisterControllerResponse MsgRegisterControllerResponse + +func (x *MsgRegisterControllerResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRegisterControllerResponse)(x) +} + +func (x *MsgRegisterControllerResponse) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_tx_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_MsgRegisterControllerResponse_messageType fastReflection_MsgRegisterControllerResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgRegisterControllerResponse_messageType{} + +type fastReflection_MsgRegisterControllerResponse_messageType struct{} + +func (x fastReflection_MsgRegisterControllerResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRegisterControllerResponse)(nil) +} +func (x fastReflection_MsgRegisterControllerResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRegisterControllerResponse) +} +func (x fastReflection_MsgRegisterControllerResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterControllerResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRegisterControllerResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterControllerResponse +} + +// 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_MsgRegisterControllerResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgRegisterControllerResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRegisterControllerResponse) New() protoreflect.Message { + return new(fastReflection_MsgRegisterControllerResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRegisterControllerResponse) Interface() protoreflect.ProtoMessage { + return (*MsgRegisterControllerResponse)(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_MsgRegisterControllerResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Controller != "" { + value := protoreflect.ValueOfString(x.Controller) + if !f(fd_MsgRegisterControllerResponse_controller, value) { + return + } + } + if len(x.Accounts) != 0 { + value := protoreflect.ValueOfMap(&_MsgRegisterControllerResponse_2_map{m: &x.Accounts}) + if !f(fd_MsgRegisterControllerResponse_accounts, 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_MsgRegisterControllerResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.MsgRegisterControllerResponse.controller": + return x.Controller != "" + case "did.v1.MsgRegisterControllerResponse.accounts": + return len(x.Accounts) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterControllerResponse")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterControllerResponse 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_MsgRegisterControllerResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.MsgRegisterControllerResponse.controller": + x.Controller = "" + case "did.v1.MsgRegisterControllerResponse.accounts": + x.Accounts = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterControllerResponse")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterControllerResponse 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_MsgRegisterControllerResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.MsgRegisterControllerResponse.controller": + value := x.Controller + return protoreflect.ValueOfString(value) + case "did.v1.MsgRegisterControllerResponse.accounts": + if len(x.Accounts) == 0 { + return protoreflect.ValueOfMap(&_MsgRegisterControllerResponse_2_map{}) + } + mapValue := &_MsgRegisterControllerResponse_2_map{m: &x.Accounts} + return protoreflect.ValueOfMap(mapValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterControllerResponse")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterControllerResponse 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_MsgRegisterControllerResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.MsgRegisterControllerResponse.controller": + x.Controller = value.Interface().(string) + case "did.v1.MsgRegisterControllerResponse.accounts": + mv := value.Map() + cmv := mv.(*_MsgRegisterControllerResponse_2_map) + x.Accounts = *cmv.m + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterControllerResponse")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterControllerResponse 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_MsgRegisterControllerResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgRegisterControllerResponse.accounts": + if x.Accounts == nil { + x.Accounts = make(map[string]string) + } + value := &_MsgRegisterControllerResponse_2_map{m: &x.Accounts} + return protoreflect.ValueOfMap(value) + case "did.v1.MsgRegisterControllerResponse.controller": + panic(fmt.Errorf("field controller of message did.v1.MsgRegisterControllerResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterControllerResponse")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterControllerResponse 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_MsgRegisterControllerResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgRegisterControllerResponse.controller": + return protoreflect.ValueOfString("") + case "did.v1.MsgRegisterControllerResponse.accounts": + m := make(map[string]string) + return protoreflect.ValueOfMap(&_MsgRegisterControllerResponse_2_map{m: &m}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterControllerResponse")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterControllerResponse 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_MsgRegisterControllerResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgRegisterControllerResponse", 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_MsgRegisterControllerResponse) 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_MsgRegisterControllerResponse) 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_MsgRegisterControllerResponse) 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_MsgRegisterControllerResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRegisterControllerResponse) + 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.Controller) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Accounts) > 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.Accounts)) + for k := range x.Accounts { + sortme = append(sortme, k) + } + sort.Strings(sortme) + for _, k := range sortme { + v := x.Accounts[k] + SiZeMaP(k, v) + } + } else { + for k, v := range x.Accounts { + SiZeMaP(k, v) + } + } + } + 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().(*MsgRegisterControllerResponse) + 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.Accounts) > 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] = 0x12 + return protoiface.MarshalOutput{}, nil + } + if options.Deterministic { + keysForAccounts := make([]string, 0, len(x.Accounts)) + for k := range x.Accounts { + keysForAccounts = append(keysForAccounts, string(k)) + } + sort.Slice(keysForAccounts, func(i, j int) bool { + return keysForAccounts[i] < keysForAccounts[j] + }) + for iNdEx := len(keysForAccounts) - 1; iNdEx >= 0; iNdEx-- { + v := x.Accounts[string(keysForAccounts[iNdEx])] + out, err := MaRsHaLmAp(keysForAccounts[iNdEx], v) + if err != nil { + return out, err + } + } + } else { + for k := range x.Accounts { + v := x.Accounts[k] + out, err := MaRsHaLmAp(k, v) + if err != nil { + return out, err + } + } + } + } + if len(x.Controller) > 0 { + i -= len(x.Controller) + copy(dAtA[i:], x.Controller) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) + i-- + dAtA[i] = 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().(*MsgRegisterControllerResponse) + 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: MsgRegisterControllerResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterControllerResponse: 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 Controller", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Controller = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Accounts", 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.Accounts == nil { + x.Accounts = 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.Accounts[mapkey] = mapvalue + 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 _ protoreflect.List = (*_MsgRegisterService_3_list)(nil) + +type _MsgRegisterService_3_list struct { + list *[]PermissionScope +} + +func (x *_MsgRegisterService_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgRegisterService_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)((*x.list)[i])) +} + +func (x *_MsgRegisterService_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Enum() + concreteValue := (PermissionScope)(valueUnwrapped) + (*x.list)[i] = concreteValue +} + +func (x *_MsgRegisterService_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Enum() + concreteValue := (PermissionScope)(valueUnwrapped) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgRegisterService_3_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgRegisterService at list field Scopes as it is not of Message kind")) +} + +func (x *_MsgRegisterService_3_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_MsgRegisterService_3_list) NewElement() protoreflect.Value { + v := 0 + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(v)) +} + +func (x *_MsgRegisterService_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgRegisterService protoreflect.MessageDescriptor + fd_MsgRegisterService_authority protoreflect.FieldDescriptor + fd_MsgRegisterService_origin_uri protoreflect.FieldDescriptor + fd_MsgRegisterService_scopes protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_tx_proto_init() + md_MsgRegisterService = File_did_v1_tx_proto.Messages().ByName("MsgRegisterService") + fd_MsgRegisterService_authority = md_MsgRegisterService.Fields().ByName("authority") + fd_MsgRegisterService_origin_uri = md_MsgRegisterService.Fields().ByName("origin_uri") + fd_MsgRegisterService_scopes = md_MsgRegisterService.Fields().ByName("scopes") +} + +var _ protoreflect.Message = (*fastReflection_MsgRegisterService)(nil) + +type fastReflection_MsgRegisterService MsgRegisterService + +func (x *MsgRegisterService) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRegisterService)(x) +} + +func (x *MsgRegisterService) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_tx_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_MsgRegisterService_messageType fastReflection_MsgRegisterService_messageType +var _ protoreflect.MessageType = fastReflection_MsgRegisterService_messageType{} + +type fastReflection_MsgRegisterService_messageType struct{} + +func (x fastReflection_MsgRegisterService_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRegisterService)(nil) +} +func (x fastReflection_MsgRegisterService_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRegisterService) +} +func (x fastReflection_MsgRegisterService_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterService +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRegisterService) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterService +} + +// 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_MsgRegisterService) Type() protoreflect.MessageType { + return _fastReflection_MsgRegisterService_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRegisterService) New() protoreflect.Message { + return new(fastReflection_MsgRegisterService) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRegisterService) Interface() protoreflect.ProtoMessage { + return (*MsgRegisterService)(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_MsgRegisterService) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgRegisterService_authority, value) { + return + } + } + if x.OriginUri != "" { + value := protoreflect.ValueOfString(x.OriginUri) + if !f(fd_MsgRegisterService_origin_uri, value) { + return + } + } + if len(x.Scopes) != 0 { + value := protoreflect.ValueOfList(&_MsgRegisterService_3_list{list: &x.Scopes}) + if !f(fd_MsgRegisterService_scopes, 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_MsgRegisterService) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.MsgRegisterService.authority": + return x.Authority != "" + case "did.v1.MsgRegisterService.origin_uri": + return x.OriginUri != "" + case "did.v1.MsgRegisterService.scopes": + return len(x.Scopes) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterService 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_MsgRegisterService) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.MsgRegisterService.authority": + x.Authority = "" + case "did.v1.MsgRegisterService.origin_uri": + x.OriginUri = "" + case "did.v1.MsgRegisterService.scopes": + x.Scopes = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterService 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_MsgRegisterService) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.MsgRegisterService.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "did.v1.MsgRegisterService.origin_uri": + value := x.OriginUri + return protoreflect.ValueOfString(value) + case "did.v1.MsgRegisterService.scopes": + if len(x.Scopes) == 0 { + return protoreflect.ValueOfList(&_MsgRegisterService_3_list{}) + } + listValue := &_MsgRegisterService_3_list{list: &x.Scopes} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterService 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_MsgRegisterService) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.MsgRegisterService.authority": + x.Authority = value.Interface().(string) + case "did.v1.MsgRegisterService.origin_uri": + x.OriginUri = value.Interface().(string) + case "did.v1.MsgRegisterService.scopes": + lv := value.List() + clv := lv.(*_MsgRegisterService_3_list) + x.Scopes = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterService 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_MsgRegisterService) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgRegisterService.scopes": + if x.Scopes == nil { + x.Scopes = []PermissionScope{} + } + value := &_MsgRegisterService_3_list{list: &x.Scopes} + return protoreflect.ValueOfList(value) + case "did.v1.MsgRegisterService.authority": + panic(fmt.Errorf("field authority of message did.v1.MsgRegisterService is not mutable")) + case "did.v1.MsgRegisterService.origin_uri": + panic(fmt.Errorf("field origin_uri of message did.v1.MsgRegisterService is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterService 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_MsgRegisterService) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgRegisterService.authority": + return protoreflect.ValueOfString("") + case "did.v1.MsgRegisterService.origin_uri": + return protoreflect.ValueOfString("") + case "did.v1.MsgRegisterService.scopes": + list := []PermissionScope{} + return protoreflect.ValueOfList(&_MsgRegisterService_3_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterService 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_MsgRegisterService) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgRegisterService", 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_MsgRegisterService) 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_MsgRegisterService) 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_MsgRegisterService) 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_MsgRegisterService) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRegisterService) + 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.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.OriginUri) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Scopes) > 0 { + l = 0 + for _, e := range x.Scopes { + l += runtime.Sov(uint64(e)) + } + n += 1 + runtime.Sov(uint64(l)) + 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().(*MsgRegisterService) + 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.Scopes) > 0 { + var pksize2 int + for _, num := range x.Scopes { + pksize2 += runtime.Sov(uint64(num)) + } + i -= pksize2 + j1 := i + for _, num1 := range x.Scopes { + num := uint64(num1) + for num >= 1<<7 { + dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA[j1] = uint8(num) + j1++ + } + i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) + i-- + dAtA[i] = 0x1a + } + if len(x.OriginUri) > 0 { + i -= len(x.OriginUri) + copy(dAtA[i:], x.OriginUri) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginUri))) + i-- + dAtA[i] = 0x12 + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + 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().(*MsgRegisterService) + 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: MsgRegisterService: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterService: 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 Authority", 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.Authority = 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 OriginUri", 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.OriginUri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType == 0 { + var v PermissionScope + 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 |= PermissionScope(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Scopes = append(x.Scopes, v) + } else if wireType == 2 { + var packedLen 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++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + packedLen + 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 + } + var elementCount int + if elementCount != 0 && len(x.Scopes) == 0 { + x.Scopes = make([]PermissionScope, 0, elementCount) + } + for iNdEx < postIndex { + var v PermissionScope + 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 |= PermissionScope(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Scopes = append(x.Scopes, v) + } + } else { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) + } + 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_MsgRegisterServiceResponse protoreflect.MessageDescriptor + fd_MsgRegisterServiceResponse_success protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_tx_proto_init() + md_MsgRegisterServiceResponse = File_did_v1_tx_proto.Messages().ByName("MsgRegisterServiceResponse") + fd_MsgRegisterServiceResponse_success = md_MsgRegisterServiceResponse.Fields().ByName("success") +} + +var _ protoreflect.Message = (*fastReflection_MsgRegisterServiceResponse)(nil) + +type fastReflection_MsgRegisterServiceResponse MsgRegisterServiceResponse + +func (x *MsgRegisterServiceResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRegisterServiceResponse)(x) +} + +func (x *MsgRegisterServiceResponse) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_tx_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgRegisterServiceResponse_messageType fastReflection_MsgRegisterServiceResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgRegisterServiceResponse_messageType{} + +type fastReflection_MsgRegisterServiceResponse_messageType struct{} + +func (x fastReflection_MsgRegisterServiceResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRegisterServiceResponse)(nil) +} +func (x fastReflection_MsgRegisterServiceResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRegisterServiceResponse) +} +func (x fastReflection_MsgRegisterServiceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterServiceResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRegisterServiceResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterServiceResponse +} + +// 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_MsgRegisterServiceResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgRegisterServiceResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRegisterServiceResponse) New() protoreflect.Message { + return new(fastReflection_MsgRegisterServiceResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRegisterServiceResponse) Interface() protoreflect.ProtoMessage { + return (*MsgRegisterServiceResponse)(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_MsgRegisterServiceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Success != false { + value := protoreflect.ValueOfBool(x.Success) + if !f(fd_MsgRegisterServiceResponse_success, 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_MsgRegisterServiceResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.MsgRegisterServiceResponse.success": + return x.Success != false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterServiceResponse")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterServiceResponse 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_MsgRegisterServiceResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.MsgRegisterServiceResponse.success": + x.Success = false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterServiceResponse")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterServiceResponse 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_MsgRegisterServiceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.MsgRegisterServiceResponse.success": + value := x.Success + return protoreflect.ValueOfBool(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterServiceResponse")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterServiceResponse 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_MsgRegisterServiceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.MsgRegisterServiceResponse.success": + x.Success = value.Bool() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterServiceResponse")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterServiceResponse 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_MsgRegisterServiceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgRegisterServiceResponse.success": + panic(fmt.Errorf("field success of message did.v1.MsgRegisterServiceResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterServiceResponse")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterServiceResponse 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_MsgRegisterServiceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgRegisterServiceResponse.success": + return protoreflect.ValueOfBool(false) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterServiceResponse")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterServiceResponse 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_MsgRegisterServiceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgRegisterServiceResponse", 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_MsgRegisterServiceResponse) 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_MsgRegisterServiceResponse) 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_MsgRegisterServiceResponse) 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_MsgRegisterServiceResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRegisterServiceResponse) + 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.Success { + 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().(*MsgRegisterServiceResponse) + 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.Success { + i-- + if x.Success { + 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().(*MsgRegisterServiceResponse) + 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: MsgRegisterServiceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterServiceResponse: 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 Success", 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.Success = 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, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -3143,109 +4516,8 @@ func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { return file_did_v1_tx_proto_rawDescGZIP(), []int{1} } -// MsgInitializeController is the message type for the InitializeController RPC. -type MsgInitializeController struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // authority is the address of the governance account. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // Assertions is the list of assertions to initialize the controller with. - Assertions [][]byte `protobuf:"bytes,2,rep,name=assertions,proto3" json:"assertions,omitempty"` - // Keyshares is the list of keyshares to initialize the controller with. - Keyshares [][]byte `protobuf:"bytes,3,rep,name=keyshares,proto3" json:"keyshares,omitempty"` - // Verifications is the list of verifications to initialize the controller with. - Verifications [][]byte `protobuf:"bytes,4,rep,name=verifications,proto3" json:"verifications,omitempty"` -} - -func (x *MsgInitializeController) Reset() { - *x = MsgInitializeController{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgInitializeController) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgInitializeController) ProtoMessage() {} - -// Deprecated: Use MsgInitializeController.ProtoReflect.Descriptor instead. -func (*MsgInitializeController) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{2} -} - -func (x *MsgInitializeController) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *MsgInitializeController) GetAssertions() [][]byte { - if x != nil { - return x.Assertions - } - return nil -} - -func (x *MsgInitializeController) GetKeyshares() [][]byte { - if x != nil { - return x.Keyshares - } - return nil -} - -func (x *MsgInitializeController) GetVerifications() [][]byte { - if x != nil { - return x.Verifications - } - return nil -} - -// MsgInitializeControllerResponse is the response type for the InitializeController RPC. -type MsgInitializeControllerResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Controller is the address of the initialized controller. - Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` -} - -func (x *MsgInitializeControllerResponse) Reset() { - *x = MsgInitializeControllerResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgInitializeControllerResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgInitializeControllerResponse) ProtoMessage() {} - -// Deprecated: Use MsgInitializeControllerResponse.ProtoReflect.Descriptor instead. -func (*MsgInitializeControllerResponse) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{3} -} - -func (x *MsgInitializeControllerResponse) GetController() string { - if x != nil { - return x.Controller - } - return "" -} - // MsgAuthenticate is the message type for the Authenticate RPC. -type MsgAuthenticateController struct { +type MsgAuthenticate struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -3260,8 +4532,99 @@ type MsgAuthenticateController struct { Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"` } -func (x *MsgAuthenticateController) Reset() { - *x = MsgAuthenticateController{} +func (x *MsgAuthenticate) Reset() { + *x = MsgAuthenticate{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgAuthenticate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgAuthenticate) ProtoMessage() {} + +// Deprecated: Use MsgAuthenticate.ProtoReflect.Descriptor instead. +func (*MsgAuthenticate) Descriptor() ([]byte, []int) { + return file_did_v1_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgAuthenticate) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgAuthenticate) GetController() string { + if x != nil { + return x.Controller + } + return "" +} + +func (x *MsgAuthenticate) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *MsgAuthenticate) GetOrigin() string { + if x != nil { + return x.Origin + } + return "" +} + +// MsgAuthenticateResponse is the response type for the Authenticate RPC. +type MsgAuthenticateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgAuthenticateResponse) Reset() { + *x = MsgAuthenticateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgAuthenticateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgAuthenticateResponse) ProtoMessage() {} + +// Deprecated: Use MsgAuthenticateResponse.ProtoReflect.Descriptor instead. +func (*MsgAuthenticateResponse) Descriptor() ([]byte, []int) { + return file_did_v1_tx_proto_rawDescGZIP(), []int{3} +} + +// MsgRegisterController is the message type for the InitializeController RPC. +type MsgRegisterController struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // Assertions is the list of assertions to initialize the controller with. + Assertions [][]byte `protobuf:"bytes,2,rep,name=assertions,proto3" json:"assertions,omitempty"` + // Keyshares is the list of keyshares to initialize the controller with. + Keyshares [][]byte `protobuf:"bytes,3,rep,name=keyshares,proto3" json:"keyshares,omitempty"` + // Verifications is the list of verifications to initialize the controller with. + Verifications [][]byte `protobuf:"bytes,4,rep,name=verifications,proto3" json:"verifications,omitempty"` +} + +func (x *MsgRegisterController) Reset() { + *x = MsgRegisterController{} if protoimpl.UnsafeEnabled { mi := &file_did_v1_tx_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3269,54 +4632,59 @@ func (x *MsgAuthenticateController) Reset() { } } -func (x *MsgAuthenticateController) String() string { +func (x *MsgRegisterController) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgAuthenticateController) ProtoMessage() {} +func (*MsgRegisterController) ProtoMessage() {} -// Deprecated: Use MsgAuthenticateController.ProtoReflect.Descriptor instead. -func (*MsgAuthenticateController) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgRegisterController.ProtoReflect.Descriptor instead. +func (*MsgRegisterController) Descriptor() ([]byte, []int) { return file_did_v1_tx_proto_rawDescGZIP(), []int{4} } -func (x *MsgAuthenticateController) GetAuthority() string { +func (x *MsgRegisterController) GetAuthority() string { if x != nil { return x.Authority } return "" } -func (x *MsgAuthenticateController) GetController() string { +func (x *MsgRegisterController) GetAssertions() [][]byte { if x != nil { - return x.Controller + return x.Assertions } - return "" + return nil } -func (x *MsgAuthenticateController) GetAddress() string { +func (x *MsgRegisterController) GetKeyshares() [][]byte { if x != nil { - return x.Address + return x.Keyshares } - return "" + return nil } -func (x *MsgAuthenticateController) GetOrigin() string { +func (x *MsgRegisterController) GetVerifications() [][]byte { if x != nil { - return x.Origin + return x.Verifications } - return "" + return nil } -// MsgAuthenticateControllerResponse is the response type for the Authenticate RPC. -type MsgAuthenticateControllerResponse struct { +// MsgRegisterControllerResponse is the response type for the InitializeController RPC. +type MsgRegisterControllerResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Controller is the address of the initialized controller. + Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` + // Accounts are a Address Map and Supported coin Denoms for the controller + Accounts map[string]string `protobuf:"bytes,2,rep,name=accounts,proto3" json:"accounts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -func (x *MsgAuthenticateControllerResponse) Reset() { - *x = MsgAuthenticateControllerResponse{} +func (x *MsgRegisterControllerResponse) Reset() { + *x = MsgRegisterControllerResponse{} if protoimpl.UnsafeEnabled { mi := &file_did_v1_tx_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3324,100 +4692,231 @@ func (x *MsgAuthenticateControllerResponse) Reset() { } } -func (x *MsgAuthenticateControllerResponse) String() string { +func (x *MsgRegisterControllerResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgAuthenticateControllerResponse) ProtoMessage() {} +func (*MsgRegisterControllerResponse) ProtoMessage() {} -// Deprecated: Use MsgAuthenticateControllerResponse.ProtoReflect.Descriptor instead. -func (*MsgAuthenticateControllerResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgRegisterControllerResponse.ProtoReflect.Descriptor instead. +func (*MsgRegisterControllerResponse) Descriptor() ([]byte, []int) { return file_did_v1_tx_proto_rawDescGZIP(), []int{5} } +func (x *MsgRegisterControllerResponse) GetController() string { + if x != nil { + return x.Controller + } + return "" +} + +func (x *MsgRegisterControllerResponse) GetAccounts() map[string]string { + if x != nil { + return x.Accounts + } + return nil +} + +// MsgRegisterService is the message type for the RegisterService RPC. +type MsgRegisterService struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // origin is the origin of the request in wildcard form. + OriginUri string `protobuf:"bytes,2,opt,name=origin_uri,json=originUri,proto3" json:"origin_uri,omitempty"` + // PermissionScope is the scope of the service. + Scopes []PermissionScope `protobuf:"varint,3,rep,packed,name=scopes,proto3,enum=did.v1.PermissionScope" json:"scopes,omitempty"` +} + +func (x *MsgRegisterService) Reset() { + *x = MsgRegisterService{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_tx_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRegisterService) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRegisterService) ProtoMessage() {} + +// Deprecated: Use MsgRegisterService.ProtoReflect.Descriptor instead. +func (*MsgRegisterService) Descriptor() ([]byte, []int) { + return file_did_v1_tx_proto_rawDescGZIP(), []int{6} +} + +func (x *MsgRegisterService) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgRegisterService) GetOriginUri() string { + if x != nil { + return x.OriginUri + } + return "" +} + +func (x *MsgRegisterService) GetScopes() []PermissionScope { + if x != nil { + return x.Scopes + } + return nil +} + +// MsgRegisterServiceResponse is the response type for the RegisterService RPC. +type MsgRegisterServiceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` +} + +func (x *MsgRegisterServiceResponse) Reset() { + *x = MsgRegisterServiceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_tx_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRegisterServiceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRegisterServiceResponse) ProtoMessage() {} + +// Deprecated: Use MsgRegisterServiceResponse.ProtoReflect.Descriptor instead. +func (*MsgRegisterServiceResponse) Descriptor() ([]byte, []int) { + return file_did_v1_tx_proto_rawDescGZIP(), []int{7} +} + +func (x *MsgRegisterServiceResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + var File_did_v1_tx_proto protoreflect.FileDescriptor var file_did_v1_tx_proto_rawDesc = []byte{ 0x0a, 0x0f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x14, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, - 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x01, 0x0a, 0x0f, 0x4d, 0x73, - 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2c, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc5, - 0x01, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, - 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, - 0x12, 0x24, 0x0a, 0x0d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x5b, 0x0a, 0x1f, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, - 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, - 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x22, 0xe9, 0x01, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x65, - 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, + 0x74, 0x6f, 0x1a, 0x12, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x75, 0x6d, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, + 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, + 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x01, + 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, - 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, - 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x3a, - 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, - 0x23, 0x0a, 0x21, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x9e, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x48, 0x0a, 0x0c, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x17, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x1f, 0x2e, 0x64, 0x69, 0x64, 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, 0x5e, 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x1a, 0x27, 0x2e, - 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, - 0x6c, 0x69, 0x7a, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x16, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, - 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x12, 0x21, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, - 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x1a, 0x29, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, - 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x77, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, - 0x72, 0x2f, 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, - 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, - 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2c, 0x0a, 0x06, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, + 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0xdf, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, + 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x38, + 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x65, + 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0xc3, 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, + 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x12, + 0x24, 0x0a, 0x0d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0xe7, 0x01, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, + 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, + 0x72, 0x12, 0x4f, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x1a, 0x3b, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0xac, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1d, + 0x0a, 0x0a, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x55, 0x72, 0x69, 0x12, 0x2f, 0x0a, + 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x17, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x3a, 0x0e, + 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x36, + 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 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, 0x32, 0xcf, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x48, + 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x17, + 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x1f, 0x2e, 0x64, 0x69, 0x64, 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, 0x48, 0x0a, 0x0c, 0x41, 0x75, 0x74, 0x68, + 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x17, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x1a, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x75, + 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x1a, 0x25, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, + 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x22, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x77, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, + 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, + 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, + 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3432,29 +4931,37 @@ func file_did_v1_tx_proto_rawDescGZIP() []byte { return file_did_v1_tx_proto_rawDescData } -var file_did_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_did_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_did_v1_tx_proto_goTypes = []interface{}{ - (*MsgUpdateParams)(nil), // 0: did.v1.MsgUpdateParams - (*MsgUpdateParamsResponse)(nil), // 1: did.v1.MsgUpdateParamsResponse - (*MsgInitializeController)(nil), // 2: did.v1.MsgInitializeController - (*MsgInitializeControllerResponse)(nil), // 3: did.v1.MsgInitializeControllerResponse - (*MsgAuthenticateController)(nil), // 4: did.v1.MsgAuthenticateController - (*MsgAuthenticateControllerResponse)(nil), // 5: did.v1.MsgAuthenticateControllerResponse - (*Params)(nil), // 6: did.v1.Params + (*MsgUpdateParams)(nil), // 0: did.v1.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 1: did.v1.MsgUpdateParamsResponse + (*MsgAuthenticate)(nil), // 2: did.v1.MsgAuthenticate + (*MsgAuthenticateResponse)(nil), // 3: did.v1.MsgAuthenticateResponse + (*MsgRegisterController)(nil), // 4: did.v1.MsgRegisterController + (*MsgRegisterControllerResponse)(nil), // 5: did.v1.MsgRegisterControllerResponse + (*MsgRegisterService)(nil), // 6: did.v1.MsgRegisterService + (*MsgRegisterServiceResponse)(nil), // 7: did.v1.MsgRegisterServiceResponse + nil, // 8: did.v1.MsgRegisterControllerResponse.AccountsEntry + (*Params)(nil), // 9: did.v1.Params + (PermissionScope)(0), // 10: did.v1.PermissionScope } var file_did_v1_tx_proto_depIdxs = []int32{ - 6, // 0: did.v1.MsgUpdateParams.params:type_name -> did.v1.Params - 0, // 1: did.v1.Msg.UpdateParams:input_type -> did.v1.MsgUpdateParams - 2, // 2: did.v1.Msg.RegisterController:input_type -> did.v1.MsgInitializeController - 4, // 3: did.v1.Msg.AuthenticateController:input_type -> did.v1.MsgAuthenticateController - 1, // 4: did.v1.Msg.UpdateParams:output_type -> did.v1.MsgUpdateParamsResponse - 3, // 5: did.v1.Msg.RegisterController:output_type -> did.v1.MsgInitializeControllerResponse - 5, // 6: did.v1.Msg.AuthenticateController:output_type -> did.v1.MsgAuthenticateControllerResponse - 4, // [4:7] is the sub-list for method output_type - 1, // [1:4] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 9, // 0: did.v1.MsgUpdateParams.params:type_name -> did.v1.Params + 8, // 1: did.v1.MsgRegisterControllerResponse.accounts:type_name -> did.v1.MsgRegisterControllerResponse.AccountsEntry + 10, // 2: did.v1.MsgRegisterService.scopes:type_name -> did.v1.PermissionScope + 0, // 3: did.v1.Msg.UpdateParams:input_type -> did.v1.MsgUpdateParams + 2, // 4: did.v1.Msg.Authenticate:input_type -> did.v1.MsgAuthenticate + 4, // 5: did.v1.Msg.RegisterController:input_type -> did.v1.MsgRegisterController + 6, // 6: did.v1.Msg.RegisterService:input_type -> did.v1.MsgRegisterService + 1, // 7: did.v1.Msg.UpdateParams:output_type -> did.v1.MsgUpdateParamsResponse + 3, // 8: did.v1.Msg.Authenticate:output_type -> did.v1.MsgAuthenticateResponse + 5, // 9: did.v1.Msg.RegisterController:output_type -> did.v1.MsgRegisterControllerResponse + 7, // 10: did.v1.Msg.RegisterService:output_type -> did.v1.MsgRegisterServiceResponse + 7, // [7:11] is the sub-list for method output_type + 3, // [3:7] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_did_v1_tx_proto_init() } @@ -3462,6 +4969,7 @@ func file_did_v1_tx_proto_init() { if File_did_v1_tx_proto != nil { return } + file_did_v1_enums_proto_init() file_did_v1_genesis_proto_init() if !protoimpl.UnsafeEnabled { file_did_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { @@ -3489,7 +4997,7 @@ func file_did_v1_tx_proto_init() { } } file_did_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgInitializeController); i { + switch v := v.(*MsgAuthenticate); i { case 0: return &v.state case 1: @@ -3501,7 +5009,7 @@ func file_did_v1_tx_proto_init() { } } file_did_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgInitializeControllerResponse); i { + switch v := v.(*MsgAuthenticateResponse); i { case 0: return &v.state case 1: @@ -3513,7 +5021,7 @@ func file_did_v1_tx_proto_init() { } } file_did_v1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgAuthenticateController); i { + switch v := v.(*MsgRegisterController); i { case 0: return &v.state case 1: @@ -3525,7 +5033,31 @@ func file_did_v1_tx_proto_init() { } } file_did_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgAuthenticateControllerResponse); i { + switch v := v.(*MsgRegisterControllerResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRegisterService); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRegisterServiceResponse); i { case 0: return &v.state case 1: @@ -3543,7 +5075,7 @@ func file_did_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 9, NumExtensions: 0, NumServices: 1, }, diff --git a/api/did/v1/tx_grpc.pb.go b/api/did/v1/tx_grpc.pb.go index 21ed312a1..d54dc834a 100644 --- a/api/did/v1/tx_grpc.pb.go +++ b/api/did/v1/tx_grpc.pb.go @@ -19,9 +19,10 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Msg_UpdateParams_FullMethodName = "/did.v1.Msg/UpdateParams" - Msg_RegisterController_FullMethodName = "/did.v1.Msg/RegisterController" - Msg_AuthenticateController_FullMethodName = "/did.v1.Msg/AuthenticateController" + Msg_UpdateParams_FullMethodName = "/did.v1.Msg/UpdateParams" + Msg_Authenticate_FullMethodName = "/did.v1.Msg/Authenticate" + Msg_RegisterController_FullMethodName = "/did.v1.Msg/RegisterController" + Msg_RegisterService_FullMethodName = "/did.v1.Msg/RegisterService" ) // MsgClient is the client API for Msg service. @@ -32,10 +33,12 @@ type MsgClient interface { // // Since: cosmos-sdk 0.47 UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + // Authenticate asserts the given controller is the owner of the given address. + Authenticate(ctx context.Context, in *MsgAuthenticate, opts ...grpc.CallOption) (*MsgAuthenticateResponse, error) // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. - RegisterController(ctx context.Context, in *MsgInitializeController, opts ...grpc.CallOption) (*MsgInitializeControllerResponse, error) - // AuthenticateController asserts the given controller is the owner of the given address. - AuthenticateController(ctx context.Context, in *MsgAuthenticateController, opts ...grpc.CallOption) (*MsgAuthenticateControllerResponse, error) + RegisterController(ctx context.Context, in *MsgRegisterController, opts ...grpc.CallOption) (*MsgRegisterControllerResponse, error) + // RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key. + RegisterService(ctx context.Context, in *MsgRegisterService, opts ...grpc.CallOption) (*MsgRegisterServiceResponse, error) } type msgClient struct { @@ -55,8 +58,17 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } -func (c *msgClient) RegisterController(ctx context.Context, in *MsgInitializeController, opts ...grpc.CallOption) (*MsgInitializeControllerResponse, error) { - out := new(MsgInitializeControllerResponse) +func (c *msgClient) Authenticate(ctx context.Context, in *MsgAuthenticate, opts ...grpc.CallOption) (*MsgAuthenticateResponse, error) { + out := new(MsgAuthenticateResponse) + err := c.cc.Invoke(ctx, Msg_Authenticate_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) RegisterController(ctx context.Context, in *MsgRegisterController, opts ...grpc.CallOption) (*MsgRegisterControllerResponse, error) { + out := new(MsgRegisterControllerResponse) err := c.cc.Invoke(ctx, Msg_RegisterController_FullMethodName, in, out, opts...) if err != nil { return nil, err @@ -64,9 +76,9 @@ func (c *msgClient) RegisterController(ctx context.Context, in *MsgInitializeCon return out, nil } -func (c *msgClient) AuthenticateController(ctx context.Context, in *MsgAuthenticateController, opts ...grpc.CallOption) (*MsgAuthenticateControllerResponse, error) { - out := new(MsgAuthenticateControllerResponse) - err := c.cc.Invoke(ctx, Msg_AuthenticateController_FullMethodName, in, out, opts...) +func (c *msgClient) RegisterService(ctx context.Context, in *MsgRegisterService, opts ...grpc.CallOption) (*MsgRegisterServiceResponse, error) { + out := new(MsgRegisterServiceResponse) + err := c.cc.Invoke(ctx, Msg_RegisterService_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -81,10 +93,12 @@ type MsgServer interface { // // Since: cosmos-sdk 0.47 UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + // Authenticate asserts the given controller is the owner of the given address. + Authenticate(context.Context, *MsgAuthenticate) (*MsgAuthenticateResponse, error) // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. - RegisterController(context.Context, *MsgInitializeController) (*MsgInitializeControllerResponse, error) - // AuthenticateController asserts the given controller is the owner of the given address. - AuthenticateController(context.Context, *MsgAuthenticateController) (*MsgAuthenticateControllerResponse, error) + RegisterController(context.Context, *MsgRegisterController) (*MsgRegisterControllerResponse, error) + // RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key. + RegisterService(context.Context, *MsgRegisterService) (*MsgRegisterServiceResponse, error) mustEmbedUnimplementedMsgServer() } @@ -95,11 +109,14 @@ type UnimplementedMsgServer struct { func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } -func (UnimplementedMsgServer) RegisterController(context.Context, *MsgInitializeController) (*MsgInitializeControllerResponse, error) { +func (UnimplementedMsgServer) Authenticate(context.Context, *MsgAuthenticate) (*MsgAuthenticateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Authenticate not implemented") +} +func (UnimplementedMsgServer) RegisterController(context.Context, *MsgRegisterController) (*MsgRegisterControllerResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegisterController not implemented") } -func (UnimplementedMsgServer) AuthenticateController(context.Context, *MsgAuthenticateController) (*MsgAuthenticateControllerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AuthenticateController not implemented") +func (UnimplementedMsgServer) RegisterService(context.Context, *MsgRegisterService) (*MsgRegisterServiceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterService not implemented") } func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} @@ -132,8 +149,26 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Msg_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAuthenticate) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Authenticate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_Authenticate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Authenticate(ctx, req.(*MsgAuthenticate)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_RegisterController_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgInitializeController) + in := new(MsgRegisterController) if err := dec(in); err != nil { return nil, err } @@ -145,25 +180,25 @@ func _Msg_RegisterController_Handler(srv interface{}, ctx context.Context, dec f FullMethod: Msg_RegisterController_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RegisterController(ctx, req.(*MsgInitializeController)) + return srv.(MsgServer).RegisterController(ctx, req.(*MsgRegisterController)) } return interceptor(ctx, in, info, handler) } -func _Msg_AuthenticateController_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgAuthenticateController) +func _Msg_RegisterService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRegisterService) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).AuthenticateController(ctx, in) + return srv.(MsgServer).RegisterService(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Msg_AuthenticateController_FullMethodName, + FullMethod: Msg_RegisterService_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).AuthenticateController(ctx, req.(*MsgAuthenticateController)) + return srv.(MsgServer).RegisterService(ctx, req.(*MsgRegisterService)) } return interceptor(ctx, in, info, handler) } @@ -179,13 +214,17 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, + { + MethodName: "Authenticate", + Handler: _Msg_Authenticate_Handler, + }, { MethodName: "RegisterController", Handler: _Msg_RegisterController_Handler, }, { - MethodName: "AuthenticateController", - Handler: _Msg_AuthenticateController_Handler, + MethodName: "RegisterService", + Handler: _Msg_RegisterService_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/client/go.mod b/client/go.mod new file mode 100644 index 000000000..a07a4b514 --- /dev/null +++ b/client/go.mod @@ -0,0 +1,3 @@ +module client + +go 1.22.0 diff --git a/proto/did/v1/state.proto b/proto/did/v1/state.proto index d821c75ab..924fcb99c 100644 --- a/proto/did/v1/state.proto +++ b/proto/did/v1/state.proto @@ -5,6 +5,7 @@ option go_package = "github.com/onsonr/hway/x/did/types"; import "cosmos/orm/v1/orm.proto"; import "did/v1/genesis.proto"; +import "did/v1/enums.proto"; // Aliases represents the `alsoKnownAs` property associated with a DID Controller message Aliases { @@ -146,9 +147,15 @@ message Service { // The type of the service string service_type = 2; - // The service endpoint - string service_endpoint = 3; - // The controller DID of the service - string controller_did = 4; + string controller_did = 3; + + // The domain name of the service + string origin_uri = 4; + + // The service endpoint + map service_endpoints = 5; + + // Scopes is the Authorization Grants of the service + repeated PermissionScope scopes = 6; } diff --git a/proto/did/v1/tx.proto b/proto/did/v1/tx.proto index a707feb32..c0a6ce695 100644 --- a/proto/did/v1/tx.proto +++ b/proto/did/v1/tx.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package did.v1; import "cosmos/msg/v1/msg.proto"; +import "did/v1/enums.proto"; import "did/v1/genesis.proto"; import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; @@ -16,11 +17,14 @@ service Msg { // Since: cosmos-sdk 0.47 rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); - // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. - rpc RegisterController(MsgInitializeController) returns (MsgInitializeControllerResponse); + // Authenticate asserts the given controller is the owner of the given address. + rpc Authenticate(MsgAuthenticate) returns (MsgAuthenticateResponse); - // AuthenticateController asserts the given controller is the owner of the given address. - rpc AuthenticateController(MsgAuthenticateController) returns (MsgAuthenticateControllerResponse); + // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. + rpc RegisterController(MsgRegisterController) returns (MsgRegisterControllerResponse); + + // RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key. + rpc RegisterService(MsgRegisterService) returns (MsgRegisterServiceResponse); } // MsgUpdateParams is the Msg/UpdateParams request type. @@ -44,31 +48,8 @@ message MsgUpdateParams { // Since: cosmos-sdk 0.47 message MsgUpdateParamsResponse {} -// MsgInitializeController is the message type for the InitializeController RPC. -message MsgInitializeController { - option (cosmos.msg.v1.signer) = "authority"; - - // authority is the address of the governance account. - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // Assertions is the list of assertions to initialize the controller with. - repeated bytes assertions = 2; - - // Keyshares is the list of keyshares to initialize the controller with. - repeated bytes keyshares = 3; - - // Verifications is the list of verifications to initialize the controller with. - repeated bytes verifications = 4; -} - -// MsgInitializeControllerResponse is the response type for the InitializeController RPC. -message MsgInitializeControllerResponse { - // Controller is the address of the initialized controller. - string controller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - // MsgAuthenticate is the message type for the Authenticate RPC. -message MsgAuthenticateController { +message MsgAuthenticate { option (cosmos.msg.v1.signer) = "authority"; // authority is the address of the governance account. @@ -84,6 +65,50 @@ message MsgAuthenticateController { string origin = 4; } -// MsgAuthenticateControllerResponse is the response type for the Authenticate RPC. -message MsgAuthenticateControllerResponse {} +// MsgAuthenticateResponse is the response type for the Authenticate RPC. +message MsgAuthenticateResponse {} +// MsgRegisterController is the message type for the InitializeController RPC. +message MsgRegisterController { + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // Assertions is the list of assertions to initialize the controller with. + repeated bytes assertions = 2; + + // Keyshares is the list of keyshares to initialize the controller with. + repeated bytes keyshares = 3; + + // Verifications is the list of verifications to initialize the controller with. + repeated bytes verifications = 4; +} + +// MsgRegisterControllerResponse is the response type for the InitializeController RPC. +message MsgRegisterControllerResponse { + // Controller is the address of the initialized controller. + string controller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // Accounts are a Address Map and Supported coin Denoms for the controller + map accounts = 2; +} + +// MsgRegisterService is the message type for the RegisterService RPC. +message MsgRegisterService { + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // origin is the origin of the request in wildcard form. + string origin_uri = 2; + + // PermissionScope is the scope of the service. + repeated PermissionScope scopes = 3; +} + +// MsgRegisterServiceResponse is the response type for the RegisterService RPC. +message MsgRegisterServiceResponse { + bool success = 1; +} diff --git a/x/did/keeper/server.go b/x/did/keeper/server.go index 708528065..5888ae209 100644 --- a/x/did/keeper/server.go +++ b/x/did/keeper/server.go @@ -29,16 +29,23 @@ func (ms msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams return nil, ms.k.Params.Set(ctx, msg.Params) } -// AuthenticateController implements types.MsgServer. -func (ms msgServer) AuthenticateController(ctx context.Context, msg *types.MsgAuthenticateController) (*types.MsgAuthenticateControllerResponse, error) { - // ctx := sdk.UnwrapSDKContext(goCtx) - panic("AuthenticateController is unimplemented") - return &types.MsgAuthenticateControllerResponse{}, nil -} - // RegisterController implements types.MsgServer. -func (ms msgServer) RegisterController(ctx context.Context, msg *types.MsgInitializeController) (*types.MsgInitializeControllerResponse, error) { +func (ms msgServer) RegisterController(ctx context.Context, msg *types.MsgRegisterController) (*types.MsgRegisterControllerResponse, error) { // ctx := sdk.UnwrapSDKContext(goCtx) panic("RegisterController is unimplemented") - return &types.MsgInitializeControllerResponse{}, nil + return &types.MsgRegisterControllerResponse{}, nil +} + +// Authenticate implements types.MsgServer. +func (ms msgServer) Authenticate(ctx context.Context, msg *types.MsgAuthenticate) (*types.MsgAuthenticateResponse, error) { + // ctx := sdk.UnwrapSDKContext(goCtx) + panic("Authenticate is unimplemented") + return &types.MsgAuthenticateResponse{}, nil +} + +// RegisterService implements types.MsgServer. +func (ms msgServer) RegisterService(ctx context.Context, msg *types.MsgRegisterService) (*types.MsgRegisterServiceResponse, error) { + // ctx := sdk.UnwrapSDKContext(goCtx) + panic("RegisterService is unimplemented") + return &types.MsgRegisterServiceResponse{}, nil } diff --git a/x/did/types/state.pb.go b/x/did/types/state.pb.go index 02b7b8441..426fd4d0e 100644 --- a/x/did/types/state.pb.go +++ b/x/did/types/state.pb.go @@ -466,10 +466,14 @@ type Service struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The type of the service ServiceType string `protobuf:"bytes,2,opt,name=service_type,json=serviceType,proto3" json:"service_type,omitempty"` - // The service endpoint - ServiceEndpoint string `protobuf:"bytes,3,opt,name=service_endpoint,json=serviceEndpoint,proto3" json:"service_endpoint,omitempty"` // The controller DID of the service - ControllerDid string `protobuf:"bytes,4,opt,name=controller_did,json=controllerDid,proto3" json:"controller_did,omitempty"` + ControllerDid string `protobuf:"bytes,3,opt,name=controller_did,json=controllerDid,proto3" json:"controller_did,omitempty"` + // The domain name of the service + OriginUri string `protobuf:"bytes,4,opt,name=origin_uri,json=originUri,proto3" json:"origin_uri,omitempty"` + // The service endpoint + ServiceEndpoints map[string]string `protobuf:"bytes,5,rep,name=service_endpoints,json=serviceEndpoints,proto3" json:"service_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Scopes is the Authorization Grants of the service + Scopes []PermissionScope `protobuf:"varint,6,rep,packed,name=scopes,proto3,enum=did.v1.PermissionScope" json:"scopes,omitempty"` } func (m *Service) Reset() { *m = Service{} } @@ -519,13 +523,6 @@ func (m *Service) GetServiceType() string { return "" } -func (m *Service) GetServiceEndpoint() string { - if m != nil { - return m.ServiceEndpoint - } - return "" -} - func (m *Service) GetControllerDid() string { if m != nil { return m.ControllerDid @@ -533,6 +530,27 @@ func (m *Service) GetControllerDid() string { return "" } +func (m *Service) GetOriginUri() string { + if m != nil { + return m.OriginUri + } + return "" +} + +func (m *Service) GetServiceEndpoints() map[string]string { + if m != nil { + return m.ServiceEndpoints + } + return nil +} + +func (m *Service) GetScopes() []PermissionScope { + if m != nil { + return m.Scopes + } + return nil +} + func init() { proto.RegisterType((*Aliases)(nil), "did.v1.Aliases") proto.RegisterType((*Assertion)(nil), "did.v1.Assertion") @@ -542,55 +560,61 @@ func init() { proto.RegisterType((*Delegation)(nil), "did.v1.Delegation") proto.RegisterMapType((map[string]string)(nil), "did.v1.Delegation.PublicKeyJwksEntry") proto.RegisterType((*Service)(nil), "did.v1.Service") + proto.RegisterMapType((map[string]string)(nil), "did.v1.Service.ServiceEndpointsEntry") } func init() { proto.RegisterFile("did/v1/state.proto", fileDescriptor_f44bb702879c34b4) } var fileDescriptor_f44bb702879c34b4 = []byte{ - // 685 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0x3f, 0x6f, 0x13, 0x4d, - 0x10, 0xc6, 0x73, 0x3e, 0xff, 0x1d, 0xdb, 0x89, 0xb5, 0x8a, 0xf2, 0xde, 0x6b, 0xc0, 0x18, 0xa3, - 0x48, 0xa1, 0xb1, 0x09, 0x34, 0x28, 0xa1, 0xc0, 0x24, 0x29, 0x00, 0x45, 0x42, 0x86, 0x8a, 0xc6, - 0x5a, 0x7b, 0x37, 0xf6, 0xe2, 0xf3, 0xee, 0x69, 0x77, 0xed, 0xe4, 0x3a, 0x7a, 0x24, 0x44, 0x41, - 0x9d, 0x96, 0x92, 0xaf, 0x41, 0x19, 0x89, 0x86, 0x12, 0x25, 0xdf, 0x80, 0x4f, 0x80, 0xf6, 0xf6, - 0x1c, 0x1f, 0x76, 0x00, 0x21, 0xba, 0xec, 0x33, 0x33, 0x99, 0xdf, 0x3c, 0x33, 0x3e, 0x40, 0x84, - 0x91, 0xd6, 0x74, 0xbb, 0xa5, 0x34, 0xd6, 0xb4, 0x19, 0x48, 0xa1, 0x05, 0xca, 0x12, 0x46, 0x9a, - 0xd3, 0xed, 0xea, 0x7f, 0x7d, 0xa1, 0xc6, 0x42, 0xb5, 0x84, 0x1c, 0x9b, 0x14, 0x21, 0xc7, 0x36, - 0xa1, 0xba, 0x1e, 0x17, 0x0d, 0x28, 0xa7, 0x8a, 0x29, 0xab, 0x36, 0x3e, 0x3a, 0x90, 0x6b, 0xfb, - 0x0c, 0x2b, 0xaa, 0xd0, 0x2a, 0xa4, 0x18, 0xf1, 0x9c, 0xba, 0xb3, 0x55, 0xe8, 0xa4, 0x18, 0x41, - 0x1b, 0x90, 0x15, 0x92, 0x0d, 0x18, 0xf7, 0x52, 0x91, 0x16, 0xbf, 0x8c, 0x3e, 0xc4, 0x9c, 0xf8, - 0xd4, 0x73, 0xad, 0x6e, 0x5f, 0xa8, 0x06, 0xd0, 0x17, 0x5c, 0x4b, 0xe1, 0xfb, 0x54, 0x7a, 0xe9, - 0x28, 0x96, 0x50, 0x4c, 0x9c, 0x9e, 0x04, 0x4c, 0x62, 0xcd, 0x04, 0xf7, 0x32, 0x75, 0x67, 0x2b, - 0xdd, 0x49, 0x28, 0x3b, 0xd7, 0xbf, 0x9f, 0x7e, 0x79, 0xe7, 0x6e, 0x40, 0xda, 0x70, 0xa0, 0xd2, - 0xac, 0x4b, 0xc5, 0xf1, 0x1c, 0xcf, 0x69, 0xbc, 0x49, 0x41, 0xa1, 0xad, 0x14, 0x95, 0x26, 0x77, - 0x89, 0xf5, 0x7f, 0xc8, 0x8f, 0x68, 0xd8, 0xd5, 0x61, 0x40, 0x63, 0xda, 0xdc, 0x88, 0x86, 0x2f, - 0xc3, 0xc0, 0x62, 0x49, 0x4a, 0x28, 0xd7, 0x0c, 0xfb, 0x11, 0x72, 0xa9, 0x93, 0x50, 0xd0, 0x2e, - 0xe4, 0xc7, 0x54, 0x63, 0x82, 0x35, 0xf6, 0xd2, 0x75, 0x77, 0xab, 0x78, 0xef, 0x66, 0xd3, 0x9a, - 0xd9, 0xbc, 0xec, 0xd7, 0x3c, 0x8c, 0x33, 0x0e, 0xb8, 0x96, 0x61, 0xe7, 0xb2, 0x60, 0x61, 0xe6, - 0xcc, 0xe2, 0xcc, 0xd5, 0x5d, 0x28, 0xff, 0x54, 0x8a, 0x2a, 0xe0, 0x8e, 0x68, 0x18, 0x93, 0x9b, - 0x3f, 0xd1, 0x3a, 0x64, 0xa6, 0xd8, 0x9f, 0xcc, 0xb8, 0xed, 0x63, 0x27, 0xf5, 0xc0, 0xd9, 0x59, - 0x8d, 0x0c, 0xc9, 0x5b, 0x43, 0xbc, 0x54, 0xe3, 0x83, 0x03, 0xc5, 0xb6, 0xd6, 0xd4, 0xec, 0xfd, - 0x2f, 0x4d, 0xb8, 0x6c, 0xe2, 0x26, 0x9a, 0x18, 0x35, 0x90, 0x42, 0x1c, 0xc5, 0xcb, 0xb2, 0x8f, - 0x3f, 0xcd, 0xb4, 0x80, 0xe5, 0x36, 0x3e, 0x39, 0x00, 0x7b, 0xf3, 0x35, 0x2f, 0x52, 0x55, 0xc0, - 0x25, 0x06, 0xdf, 0x4e, 0x4c, 0x18, 0x41, 0x77, 0x61, 0x3d, 0x98, 0xf4, 0x7c, 0xd6, 0xef, 0x1a, - 0xdc, 0xf1, 0xc4, 0xd7, 0xac, 0x87, 0xd5, 0x8c, 0x0d, 0xd9, 0xd8, 0x33, 0x1a, 0x1e, 0xce, 0x22, - 0xe8, 0x1a, 0x14, 0xa6, 0x78, 0xe2, 0xeb, 0x6e, 0x9f, 0x91, 0x18, 0x36, 0x1f, 0x09, 0x7b, 0x8c, - 0xa0, 0x3a, 0x14, 0x8f, 0x18, 0x1f, 0x50, 0x19, 0x48, 0xc6, 0x75, 0x04, 0x5c, 0xea, 0x24, 0xa5, - 0x05, 0xe2, 0x74, 0xe3, 0xad, 0x0b, 0xb0, 0x4f, 0x7d, 0x3a, 0xb8, 0xda, 0xc7, 0x65, 0xe2, 0x1b, - 0x00, 0xfd, 0x21, 0x66, 0xdc, 0x7a, 0x6b, 0x39, 0x0b, 0x91, 0x12, 0xb9, 0x7b, 0x1b, 0xca, 0x36, - 0x8c, 0x09, 0x91, 0x54, 0xa9, 0x18, 0xb1, 0x14, 0x89, 0x6d, 0xab, 0xa1, 0x4d, 0x58, 0x9d, 0x9b, - 0xd8, 0x35, 0x0d, 0xac, 0xb5, 0xe5, 0xb9, 0xba, 0xff, 0x1b, 0x73, 0xb2, 0xbf, 0x34, 0xe7, 0x10, - 0xd6, 0x12, 0x15, 0xaf, 0x8f, 0x47, 0xca, 0xcb, 0x45, 0x77, 0xbc, 0x39, 0xbb, 0xe3, 0xf9, 0xac, - 0xcd, 0xe7, 0xb3, 0xfa, 0xa7, 0xc7, 0x23, 0x65, 0xaf, 0xb9, 0x1c, 0x24, 0xb5, 0x78, 0x56, 0xce, - 0xa9, 0xdf, 0x65, 0xc4, 0xcb, 0x47, 0x3f, 0xd3, 0x42, 0xac, 0x3c, 0x21, 0xd5, 0x47, 0x80, 0x96, - 0xff, 0xc7, 0x3f, 0x9c, 0x75, 0xa6, 0x71, 0xea, 0x40, 0xee, 0x05, 0x95, 0x53, 0xd6, 0xa7, 0x4b, - 0xab, 0xb8, 0x05, 0x25, 0x65, 0x43, 0xc9, 0xb3, 0x2e, 0xc6, 0x5a, 0x64, 0xfe, 0x1d, 0xa8, 0xcc, - 0x52, 0x28, 0x27, 0x81, 0x30, 0x37, 0x60, 0x37, 0xb4, 0x16, 0xeb, 0x07, 0xb1, 0x7c, 0xc5, 0x0a, - 0xd2, 0x57, 0xac, 0x60, 0x01, 0x30, 0xfb, 0xf8, 0xe1, 0xe7, 0xf3, 0x9a, 0x73, 0x76, 0x5e, 0x73, - 0xbe, 0x9d, 0xd7, 0x9c, 0xf7, 0x17, 0xb5, 0x95, 0xb3, 0x8b, 0xda, 0xca, 0xd7, 0x8b, 0xda, 0xca, - 0xab, 0xc6, 0x80, 0xe9, 0xe1, 0xa4, 0xd7, 0xec, 0x8b, 0x71, 0x4b, 0x70, 0x25, 0xb8, 0x6c, 0x0d, - 0x8f, 0x71, 0xd8, 0x3a, 0x69, 0x99, 0xaf, 0xad, 0x21, 0x56, 0xbd, 0x6c, 0xf4, 0xa5, 0xbd, 0xff, - 0x23, 0x00, 0x00, 0xff, 0xff, 0x12, 0x6f, 0x94, 0xba, 0xb6, 0x05, 0x00, 0x00, + // 755 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0x3f, 0x6f, 0x3b, 0x35, + 0x18, 0xc7, 0x7b, 0xb9, 0xfc, 0x7d, 0xf2, 0x87, 0x60, 0x95, 0x5f, 0x8f, 0x40, 0x43, 0x08, 0xaa, + 0x94, 0x29, 0x47, 0xcb, 0x82, 0x5a, 0x06, 0x42, 0xdb, 0x01, 0x50, 0xa5, 0x2a, 0x85, 0x85, 0x25, + 0xba, 0x9c, 0xdd, 0xc4, 0xe4, 0xce, 0x3e, 0xd9, 0x4e, 0xda, 0xdb, 0xd8, 0x91, 0x10, 0x03, 0x33, + 0x2b, 0x23, 0x6f, 0x83, 0xb1, 0x12, 0x0b, 0x03, 0x03, 0x6a, 0xdf, 0x01, 0xaf, 0x00, 0xdd, 0xd9, + 0xd7, 0x5c, 0x93, 0x02, 0xfa, 0xa9, 0x53, 0xe2, 0xcf, 0xf3, 0xd8, 0xcf, 0xf7, 0xf9, 0xfa, 0x49, + 0x0c, 0x08, 0x53, 0xec, 0xae, 0x0e, 0x5d, 0xa9, 0x3c, 0x45, 0x86, 0x91, 0xe0, 0x8a, 0xa3, 0x32, + 0xa6, 0x78, 0xb8, 0x3a, 0xec, 0xec, 0xf9, 0x5c, 0x86, 0x5c, 0xba, 0x5c, 0x84, 0x49, 0x0a, 0x17, + 0xa1, 0x4e, 0xe8, 0xec, 0x9a, 0x4d, 0x33, 0xc2, 0x88, 0xa4, 0xd2, 0xd0, 0xec, 0x28, 0xc2, 0x96, + 0xa1, 0x61, 0xfd, 0x5f, 0x2c, 0xa8, 0x8c, 0x02, 0xea, 0x49, 0x22, 0x51, 0x0b, 0x0a, 0x14, 0x3b, + 0x56, 0xcf, 0x1a, 0xd4, 0xc6, 0x05, 0x8a, 0xd1, 0x2b, 0x28, 0x73, 0x41, 0x67, 0x94, 0x39, 0x85, + 0x94, 0x99, 0x55, 0xc2, 0xe7, 0x1e, 0xc3, 0x01, 0x71, 0x6c, 0xcd, 0xf5, 0x0a, 0x75, 0x01, 0x7c, + 0xce, 0x94, 0xe0, 0x41, 0x40, 0x84, 0x53, 0x4c, 0x63, 0x39, 0x92, 0xc4, 0xc9, 0x6d, 0x44, 0x85, + 0xa7, 0x28, 0x67, 0x4e, 0xa9, 0x67, 0x0d, 0x8a, 0xe3, 0x1c, 0x39, 0x7e, 0xf7, 0xef, 0x9f, 0x7f, + 0xff, 0xc1, 0x7e, 0x05, 0xc5, 0x44, 0x07, 0x6a, 0x64, 0x55, 0xda, 0x96, 0x63, 0x39, 0x56, 0xff, + 0xbb, 0x02, 0xd4, 0x46, 0x52, 0x12, 0x91, 0xe4, 0x6e, 0x69, 0x7d, 0x1b, 0xaa, 0x0b, 0x12, 0x4f, + 0x54, 0x1c, 0x11, 0xa3, 0xb6, 0xb2, 0x20, 0xf1, 0x57, 0x71, 0xa4, 0x65, 0x09, 0x82, 0x09, 0x53, + 0xd4, 0x0b, 0x52, 0xc9, 0x8d, 0x71, 0x8e, 0xa0, 0x13, 0xa8, 0x86, 0x44, 0x79, 0xd8, 0x53, 0x9e, + 0x53, 0xec, 0xd9, 0x83, 0xfa, 0xd1, 0x7b, 0x43, 0x6d, 0xf0, 0xf0, 0xb1, 0xde, 0xf0, 0xc2, 0x64, + 0x9c, 0x33, 0x25, 0xe2, 0xf1, 0xe3, 0x86, 0x8d, 0x9e, 0x4b, 0x9b, 0x3d, 0x77, 0x4e, 0xa0, 0xf9, + 0x64, 0x2b, 0x6a, 0x83, 0xbd, 0x20, 0xb1, 0x51, 0x9e, 0x7c, 0x45, 0xbb, 0x50, 0x5a, 0x79, 0xc1, + 0x32, 0xd3, 0xad, 0x17, 0xc7, 0x85, 0x8f, 0xad, 0xe3, 0x56, 0x6a, 0x48, 0x55, 0x1b, 0xe2, 0x14, + 0xfa, 0x3f, 0x59, 0x50, 0x1f, 0x29, 0x45, 0x92, 0x59, 0x78, 0x4d, 0x13, 0x1e, 0x8b, 0xd8, 0xb9, + 0x22, 0x09, 0x8d, 0x04, 0xe7, 0xd7, 0xe6, 0xb2, 0xf4, 0xe2, 0xff, 0x7a, 0xda, 0x90, 0x65, 0xf7, + 0x7f, 0xb5, 0x00, 0x4e, 0xd7, 0xd7, 0xbc, 0xa9, 0xaa, 0x0d, 0x36, 0x4e, 0xe4, 0xeb, 0x8e, 0x31, + 0xc5, 0xe8, 0x43, 0xd8, 0x8d, 0x96, 0xd3, 0x80, 0xfa, 0x93, 0x44, 0x6e, 0xb8, 0x0c, 0x14, 0x9d, + 0x7a, 0x32, 0xd3, 0x86, 0x74, 0xec, 0x4b, 0x12, 0x5f, 0x64, 0x11, 0xf4, 0x0e, 0xd4, 0x56, 0xde, + 0x32, 0x50, 0x13, 0x9f, 0x62, 0x23, 0xb6, 0x9a, 0x82, 0x53, 0x8a, 0x51, 0x0f, 0xea, 0xd7, 0x94, + 0xcd, 0x88, 0x88, 0x04, 0x65, 0x2a, 0x15, 0xdc, 0x18, 0xe7, 0xd1, 0x86, 0xe2, 0x62, 0xff, 0x7b, + 0x1b, 0xe0, 0x8c, 0x04, 0x64, 0xf6, 0xbc, 0x8f, 0xdb, 0x8a, 0xf7, 0x01, 0xfc, 0xb9, 0x47, 0x99, + 0xf6, 0x56, 0xeb, 0xac, 0xa5, 0x24, 0x75, 0xf7, 0x03, 0x68, 0xea, 0xb0, 0x87, 0xb1, 0x20, 0x52, + 0x1a, 0x89, 0x8d, 0x14, 0x8e, 0x34, 0x43, 0x07, 0xd0, 0x5a, 0x9b, 0x38, 0x49, 0x0a, 0x68, 0x6b, + 0x9b, 0x6b, 0x7a, 0xf6, 0x1f, 0xe6, 0x94, 0xff, 0xd5, 0x9c, 0x0b, 0x78, 0x23, 0xb7, 0xe3, 0xdb, + 0x9b, 0x85, 0x74, 0x2a, 0xe9, 0x1c, 0x1f, 0x64, 0x73, 0xbc, 0xee, 0x75, 0x78, 0x99, 0xed, 0xff, + 0xe2, 0x66, 0x21, 0xf5, 0x34, 0x37, 0xa3, 0x3c, 0x33, 0xbd, 0x32, 0x46, 0x82, 0x09, 0xc5, 0x4e, + 0x35, 0xfd, 0x99, 0xd6, 0x0c, 0xf9, 0x1c, 0x77, 0x3e, 0x05, 0xb4, 0x7d, 0xc6, 0x0b, 0xc6, 0xba, + 0xd4, 0xff, 0xb3, 0x00, 0x95, 0x2b, 0x22, 0x56, 0xd4, 0x27, 0x5b, 0x57, 0xf1, 0x3e, 0x34, 0xa4, + 0x0e, 0xe5, 0xc7, 0xba, 0x6e, 0x58, 0x6a, 0xfe, 0xb6, 0xaf, 0xf6, 0x73, 0xbe, 0xee, 0x03, 0xe8, + 0xff, 0xaf, 0xc9, 0x52, 0x50, 0x73, 0x41, 0x35, 0x4d, 0xbe, 0x16, 0x14, 0x8d, 0xe1, 0xcd, 0xac, + 0x10, 0x61, 0x38, 0xe2, 0x94, 0x29, 0xe9, 0x94, 0x9e, 0xda, 0x68, 0x44, 0x66, 0x9f, 0xe7, 0x59, + 0x9e, 0xb6, 0xb1, 0x2d, 0x37, 0x30, 0x72, 0xa1, 0x2c, 0x7d, 0x1e, 0x11, 0xe9, 0x94, 0x7b, 0xf6, + 0xa0, 0x75, 0xb4, 0x97, 0x1d, 0x74, 0x49, 0x44, 0x48, 0xa5, 0xa4, 0x9c, 0x5d, 0x25, 0xf1, 0xb1, + 0x49, 0xeb, 0x9c, 0xc2, 0x5b, 0xcf, 0x9e, 0xfd, 0x02, 0x7b, 0xcb, 0x9f, 0x7d, 0xf2, 0xdb, 0x7d, + 0xd7, 0xba, 0xbb, 0xef, 0x5a, 0x7f, 0xdd, 0x77, 0xad, 0x1f, 0x1f, 0xba, 0x3b, 0x77, 0x0f, 0xdd, + 0x9d, 0x3f, 0x1e, 0xba, 0x3b, 0xdf, 0xf4, 0x67, 0x54, 0xcd, 0x97, 0xd3, 0xa1, 0xcf, 0x43, 0x97, + 0x33, 0xc9, 0x99, 0x70, 0xe7, 0x37, 0x5e, 0xec, 0xde, 0xba, 0xc9, 0x4b, 0x91, 0xf8, 0x2d, 0xa7, + 0xe5, 0xf4, 0x9d, 0xf8, 0xe8, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6b, 0x5a, 0x9d, 0xc9, 0x88, + 0x06, 0x00, 0x00, } func (m *Aliases) Marshal() (dAtA []byte, err error) { @@ -944,18 +968,55 @@ func (m *Service) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Scopes) > 0 { + dAtA2 := make([]byte, len(m.Scopes)*10) + var j1 int + for _, num := range m.Scopes { + for num >= 1<<7 { + dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA2[j1] = uint8(num) + j1++ + } + i -= j1 + copy(dAtA[i:], dAtA2[:j1]) + i = encodeVarintState(dAtA, i, uint64(j1)) + i-- + dAtA[i] = 0x32 + } + if len(m.ServiceEndpoints) > 0 { + for k := range m.ServiceEndpoints { + v := m.ServiceEndpoints[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintState(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintState(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintState(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x2a + } + } + if len(m.OriginUri) > 0 { + i -= len(m.OriginUri) + copy(dAtA[i:], m.OriginUri) + i = encodeVarintState(dAtA, i, uint64(len(m.OriginUri))) + i-- + dAtA[i] = 0x22 + } if len(m.ControllerDid) > 0 { i -= len(m.ControllerDid) copy(dAtA[i:], m.ControllerDid) i = encodeVarintState(dAtA, i, uint64(len(m.ControllerDid))) i-- - dAtA[i] = 0x22 - } - if len(m.ServiceEndpoint) > 0 { - i -= len(m.ServiceEndpoint) - copy(dAtA[i:], m.ServiceEndpoint) - i = encodeVarintState(dAtA, i, uint64(len(m.ServiceEndpoint))) - i-- dAtA[i] = 0x1a } if len(m.ServiceType) > 0 { @@ -1163,14 +1224,29 @@ func (m *Service) Size() (n int) { if l > 0 { n += 1 + l + sovState(uint64(l)) } - l = len(m.ServiceEndpoint) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } l = len(m.ControllerDid) if l > 0 { n += 1 + l + sovState(uint64(l)) } + l = len(m.OriginUri) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } + if len(m.ServiceEndpoints) > 0 { + for k, v := range m.ServiceEndpoints { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovState(uint64(len(k))) + 1 + len(v) + sovState(uint64(len(v))) + n += mapEntrySize + 1 + sovState(uint64(mapEntrySize)) + } + } + if len(m.Scopes) > 0 { + l = 0 + for _, e := range m.Scopes { + l += sovState(uint64(e)) + } + n += 1 + sovState(uint64(l)) + l + } return n } @@ -2588,38 +2664,6 @@ func (m *Service) Unmarshal(dAtA []byte) error { m.ServiceType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServiceEndpoint", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ServiceEndpoint = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ControllerDid", wireType) } @@ -2651,6 +2695,234 @@ func (m *Service) Unmarshal(dAtA []byte) error { } m.ControllerDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OriginUri", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OriginUri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServiceEndpoints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ServiceEndpoints == nil { + m.ServiceEndpoints = 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 ErrIntOverflowState + } + if iNdEx >= l { + return 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 ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthState + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthState + } + if postStringIndexmapkey > l { + return 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 ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthState + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthState + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipState(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthState + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.ServiceEndpoints[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType == 0 { + var v PermissionScope + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= PermissionScope(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Scopes = append(m.Scopes, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.Scopes) == 0 { + m.Scopes = make([]PermissionScope, 0, elementCount) + } + for iNdEx < postIndex { + var v PermissionScope + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= PermissionScope(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Scopes = append(m.Scopes, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) + } default: iNdEx = preIndex skippy, err := skipState(dAtA[iNdEx:]) diff --git a/x/did/types/tx.pb.go b/x/did/types/tx.pb.go index 90965a275..3e99e2775 100644 --- a/x/did/types/tx.pb.go +++ b/x/did/types/tx.pb.go @@ -129,127 +129,8 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo -// MsgInitializeController is the message type for the InitializeController RPC. -type MsgInitializeController struct { - // authority is the address of the governance account. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // Assertions is the list of assertions to initialize the controller with. - Assertions [][]byte `protobuf:"bytes,2,rep,name=assertions,proto3" json:"assertions,omitempty"` - // Keyshares is the list of keyshares to initialize the controller with. - Keyshares [][]byte `protobuf:"bytes,3,rep,name=keyshares,proto3" json:"keyshares,omitempty"` - // Verifications is the list of verifications to initialize the controller with. - Verifications [][]byte `protobuf:"bytes,4,rep,name=verifications,proto3" json:"verifications,omitempty"` -} - -func (m *MsgInitializeController) Reset() { *m = MsgInitializeController{} } -func (m *MsgInitializeController) String() string { return proto.CompactTextString(m) } -func (*MsgInitializeController) ProtoMessage() {} -func (*MsgInitializeController) Descriptor() ([]byte, []int) { - return fileDescriptor_d73284df019ff211, []int{2} -} -func (m *MsgInitializeController) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgInitializeController) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgInitializeController.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgInitializeController) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgInitializeController.Merge(m, src) -} -func (m *MsgInitializeController) XXX_Size() int { - return m.Size() -} -func (m *MsgInitializeController) XXX_DiscardUnknown() { - xxx_messageInfo_MsgInitializeController.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgInitializeController proto.InternalMessageInfo - -func (m *MsgInitializeController) GetAuthority() string { - if m != nil { - return m.Authority - } - return "" -} - -func (m *MsgInitializeController) GetAssertions() [][]byte { - if m != nil { - return m.Assertions - } - return nil -} - -func (m *MsgInitializeController) GetKeyshares() [][]byte { - if m != nil { - return m.Keyshares - } - return nil -} - -func (m *MsgInitializeController) GetVerifications() [][]byte { - if m != nil { - return m.Verifications - } - return nil -} - -// MsgInitializeControllerResponse is the response type for the InitializeController RPC. -type MsgInitializeControllerResponse struct { - // Controller is the address of the initialized controller. - Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` -} - -func (m *MsgInitializeControllerResponse) Reset() { *m = MsgInitializeControllerResponse{} } -func (m *MsgInitializeControllerResponse) String() string { return proto.CompactTextString(m) } -func (*MsgInitializeControllerResponse) ProtoMessage() {} -func (*MsgInitializeControllerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d73284df019ff211, []int{3} -} -func (m *MsgInitializeControllerResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgInitializeControllerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgInitializeControllerResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgInitializeControllerResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgInitializeControllerResponse.Merge(m, src) -} -func (m *MsgInitializeControllerResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgInitializeControllerResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgInitializeControllerResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgInitializeControllerResponse proto.InternalMessageInfo - -func (m *MsgInitializeControllerResponse) GetController() string { - if m != nil { - return m.Controller - } - return "" -} - // MsgAuthenticate is the message type for the Authenticate RPC. -type MsgAuthenticateController struct { +type MsgAuthenticate struct { // authority is the address of the governance account. Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // Controller is the address of the controller to authenticate. @@ -260,18 +141,18 @@ type MsgAuthenticateController struct { Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"` } -func (m *MsgAuthenticateController) Reset() { *m = MsgAuthenticateController{} } -func (m *MsgAuthenticateController) String() string { return proto.CompactTextString(m) } -func (*MsgAuthenticateController) ProtoMessage() {} -func (*MsgAuthenticateController) Descriptor() ([]byte, []int) { - return fileDescriptor_d73284df019ff211, []int{4} +func (m *MsgAuthenticate) Reset() { *m = MsgAuthenticate{} } +func (m *MsgAuthenticate) String() string { return proto.CompactTextString(m) } +func (*MsgAuthenticate) ProtoMessage() {} +func (*MsgAuthenticate) Descriptor() ([]byte, []int) { + return fileDescriptor_d73284df019ff211, []int{2} } -func (m *MsgAuthenticateController) XXX_Unmarshal(b []byte) error { +func (m *MsgAuthenticate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgAuthenticateController) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgAuthenticate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgAuthenticateController.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgAuthenticate.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -281,62 +162,62 @@ func (m *MsgAuthenticateController) XXX_Marshal(b []byte, deterministic bool) ([ return b[:n], nil } } -func (m *MsgAuthenticateController) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgAuthenticateController.Merge(m, src) +func (m *MsgAuthenticate) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAuthenticate.Merge(m, src) } -func (m *MsgAuthenticateController) XXX_Size() int { +func (m *MsgAuthenticate) XXX_Size() int { return m.Size() } -func (m *MsgAuthenticateController) XXX_DiscardUnknown() { - xxx_messageInfo_MsgAuthenticateController.DiscardUnknown(m) +func (m *MsgAuthenticate) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAuthenticate.DiscardUnknown(m) } -var xxx_messageInfo_MsgAuthenticateController proto.InternalMessageInfo +var xxx_messageInfo_MsgAuthenticate proto.InternalMessageInfo -func (m *MsgAuthenticateController) GetAuthority() string { +func (m *MsgAuthenticate) GetAuthority() string { if m != nil { return m.Authority } return "" } -func (m *MsgAuthenticateController) GetController() string { +func (m *MsgAuthenticate) GetController() string { if m != nil { return m.Controller } return "" } -func (m *MsgAuthenticateController) GetAddress() string { +func (m *MsgAuthenticate) GetAddress() string { if m != nil { return m.Address } return "" } -func (m *MsgAuthenticateController) GetOrigin() string { +func (m *MsgAuthenticate) GetOrigin() string { if m != nil { return m.Origin } return "" } -// MsgAuthenticateControllerResponse is the response type for the Authenticate RPC. -type MsgAuthenticateControllerResponse struct { +// MsgAuthenticateResponse is the response type for the Authenticate RPC. +type MsgAuthenticateResponse struct { } -func (m *MsgAuthenticateControllerResponse) Reset() { *m = MsgAuthenticateControllerResponse{} } -func (m *MsgAuthenticateControllerResponse) String() string { return proto.CompactTextString(m) } -func (*MsgAuthenticateControllerResponse) ProtoMessage() {} -func (*MsgAuthenticateControllerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d73284df019ff211, []int{5} +func (m *MsgAuthenticateResponse) Reset() { *m = MsgAuthenticateResponse{} } +func (m *MsgAuthenticateResponse) String() string { return proto.CompactTextString(m) } +func (*MsgAuthenticateResponse) ProtoMessage() {} +func (*MsgAuthenticateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d73284df019ff211, []int{3} } -func (m *MsgAuthenticateControllerResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgAuthenticateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgAuthenticateControllerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgAuthenticateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgAuthenticateControllerResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgAuthenticateResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -346,64 +227,313 @@ func (m *MsgAuthenticateControllerResponse) XXX_Marshal(b []byte, deterministic return b[:n], nil } } -func (m *MsgAuthenticateControllerResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgAuthenticateControllerResponse.Merge(m, src) +func (m *MsgAuthenticateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAuthenticateResponse.Merge(m, src) } -func (m *MsgAuthenticateControllerResponse) XXX_Size() int { +func (m *MsgAuthenticateResponse) XXX_Size() int { return m.Size() } -func (m *MsgAuthenticateControllerResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgAuthenticateControllerResponse.DiscardUnknown(m) +func (m *MsgAuthenticateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAuthenticateResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgAuthenticateControllerResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgAuthenticateResponse proto.InternalMessageInfo + +// MsgRegisterController is the message type for the InitializeController RPC. +type MsgRegisterController struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // Assertions is the list of assertions to initialize the controller with. + Assertions [][]byte `protobuf:"bytes,2,rep,name=assertions,proto3" json:"assertions,omitempty"` + // Keyshares is the list of keyshares to initialize the controller with. + Keyshares [][]byte `protobuf:"bytes,3,rep,name=keyshares,proto3" json:"keyshares,omitempty"` + // Verifications is the list of verifications to initialize the controller with. + Verifications [][]byte `protobuf:"bytes,4,rep,name=verifications,proto3" json:"verifications,omitempty"` +} + +func (m *MsgRegisterController) Reset() { *m = MsgRegisterController{} } +func (m *MsgRegisterController) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterController) ProtoMessage() {} +func (*MsgRegisterController) Descriptor() ([]byte, []int) { + return fileDescriptor_d73284df019ff211, []int{4} +} +func (m *MsgRegisterController) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterController) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterController.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRegisterController) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterController.Merge(m, src) +} +func (m *MsgRegisterController) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterController) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterController.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterController proto.InternalMessageInfo + +func (m *MsgRegisterController) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgRegisterController) GetAssertions() [][]byte { + if m != nil { + return m.Assertions + } + return nil +} + +func (m *MsgRegisterController) GetKeyshares() [][]byte { + if m != nil { + return m.Keyshares + } + return nil +} + +func (m *MsgRegisterController) GetVerifications() [][]byte { + if m != nil { + return m.Verifications + } + return nil +} + +// MsgRegisterControllerResponse is the response type for the InitializeController RPC. +type MsgRegisterControllerResponse struct { + // Controller is the address of the initialized controller. + Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` + // Accounts are a Address Map and Supported coin Denoms for the controller + Accounts map[string]string `protobuf:"bytes,2,rep,name=accounts,proto3" json:"accounts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *MsgRegisterControllerResponse) Reset() { *m = MsgRegisterControllerResponse{} } +func (m *MsgRegisterControllerResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterControllerResponse) ProtoMessage() {} +func (*MsgRegisterControllerResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d73284df019ff211, []int{5} +} +func (m *MsgRegisterControllerResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterControllerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterControllerResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRegisterControllerResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterControllerResponse.Merge(m, src) +} +func (m *MsgRegisterControllerResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterControllerResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterControllerResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterControllerResponse proto.InternalMessageInfo + +func (m *MsgRegisterControllerResponse) GetController() string { + if m != nil { + return m.Controller + } + return "" +} + +func (m *MsgRegisterControllerResponse) GetAccounts() map[string]string { + if m != nil { + return m.Accounts + } + return nil +} + +// MsgRegisterService is the message type for the RegisterService RPC. +type MsgRegisterService struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // origin is the origin of the request in wildcard form. + OriginUri string `protobuf:"bytes,2,opt,name=origin_uri,json=originUri,proto3" json:"origin_uri,omitempty"` + // PermissionScope is the scope of the service. + Scopes []PermissionScope `protobuf:"varint,3,rep,packed,name=scopes,proto3,enum=did.v1.PermissionScope" json:"scopes,omitempty"` +} + +func (m *MsgRegisterService) Reset() { *m = MsgRegisterService{} } +func (m *MsgRegisterService) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterService) ProtoMessage() {} +func (*MsgRegisterService) Descriptor() ([]byte, []int) { + return fileDescriptor_d73284df019ff211, []int{6} +} +func (m *MsgRegisterService) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterService.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRegisterService) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterService.Merge(m, src) +} +func (m *MsgRegisterService) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterService) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterService.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterService proto.InternalMessageInfo + +func (m *MsgRegisterService) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgRegisterService) GetOriginUri() string { + if m != nil { + return m.OriginUri + } + return "" +} + +func (m *MsgRegisterService) GetScopes() []PermissionScope { + if m != nil { + return m.Scopes + } + return nil +} + +// MsgRegisterServiceResponse is the response type for the RegisterService RPC. +type MsgRegisterServiceResponse struct { + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` +} + +func (m *MsgRegisterServiceResponse) Reset() { *m = MsgRegisterServiceResponse{} } +func (m *MsgRegisterServiceResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterServiceResponse) ProtoMessage() {} +func (*MsgRegisterServiceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d73284df019ff211, []int{7} +} +func (m *MsgRegisterServiceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterServiceResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRegisterServiceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterServiceResponse.Merge(m, src) +} +func (m *MsgRegisterServiceResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterServiceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterServiceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterServiceResponse proto.InternalMessageInfo + +func (m *MsgRegisterServiceResponse) GetSuccess() bool { + if m != nil { + return m.Success + } + return false +} func init() { proto.RegisterType((*MsgUpdateParams)(nil), "did.v1.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "did.v1.MsgUpdateParamsResponse") - proto.RegisterType((*MsgInitializeController)(nil), "did.v1.MsgInitializeController") - proto.RegisterType((*MsgInitializeControllerResponse)(nil), "did.v1.MsgInitializeControllerResponse") - proto.RegisterType((*MsgAuthenticateController)(nil), "did.v1.MsgAuthenticateController") - proto.RegisterType((*MsgAuthenticateControllerResponse)(nil), "did.v1.MsgAuthenticateControllerResponse") + proto.RegisterType((*MsgAuthenticate)(nil), "did.v1.MsgAuthenticate") + proto.RegisterType((*MsgAuthenticateResponse)(nil), "did.v1.MsgAuthenticateResponse") + proto.RegisterType((*MsgRegisterController)(nil), "did.v1.MsgRegisterController") + proto.RegisterType((*MsgRegisterControllerResponse)(nil), "did.v1.MsgRegisterControllerResponse") + proto.RegisterMapType((map[string]string)(nil), "did.v1.MsgRegisterControllerResponse.AccountsEntry") + proto.RegisterType((*MsgRegisterService)(nil), "did.v1.MsgRegisterService") + proto.RegisterType((*MsgRegisterServiceResponse)(nil), "did.v1.MsgRegisterServiceResponse") } func init() { proto.RegisterFile("did/v1/tx.proto", fileDescriptor_d73284df019ff211) } var fileDescriptor_d73284df019ff211 = []byte{ - // 525 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xc1, 0x6b, 0x13, 0x4f, - 0x14, 0xce, 0x26, 0xf9, 0xe5, 0x47, 0x9e, 0xb5, 0x85, 0xa1, 0x34, 0x9b, 0x45, 0x36, 0x6d, 0x14, - 0x8c, 0x45, 0xb3, 0x34, 0x82, 0x88, 0x78, 0x69, 0xbc, 0xe8, 0x21, 0x20, 0x2b, 0x5e, 0x14, 0x94, - 0x69, 0x76, 0x3a, 0x19, 0x4c, 0x66, 0xc2, 0xbc, 0x49, 0x6c, 0x3c, 0x89, 0x17, 0xaf, 0xfe, 0x05, - 0xfe, 0x0d, 0x3d, 0xf8, 0x2f, 0x08, 0x3d, 0x16, 0x4f, 0x9e, 0x44, 0x92, 0x43, 0xf1, 0xbf, 0x90, - 0xdd, 0xcd, 0x26, 0x9b, 0xb6, 0x21, 0x22, 0xde, 0x76, 0xde, 0xf7, 0xbd, 0x6f, 0xbf, 0xef, 0xcd, - 0x63, 0x60, 0x23, 0x10, 0x81, 0x37, 0xdc, 0xf3, 0xcc, 0x51, 0xbd, 0xaf, 0x95, 0x51, 0xa4, 0x10, - 0x88, 0xa0, 0x3e, 0xdc, 0x73, 0x4a, 0x6d, 0x85, 0x3d, 0x85, 0x5e, 0x0f, 0x79, 0x88, 0xf7, 0x90, - 0xc7, 0x04, 0x67, 0x73, 0xda, 0xc1, 0x99, 0x64, 0x28, 0x30, 0xa9, 0x72, 0xc5, 0x55, 0xf4, 0xe9, - 0x85, 0x5f, 0xd3, 0x6a, 0x39, 0x16, 0x79, 0x1d, 0x03, 0xf1, 0x21, 0x86, 0xaa, 0x1f, 0x2d, 0xd8, - 0x68, 0x21, 0x7f, 0xde, 0x0f, 0xa8, 0x61, 0x4f, 0xa9, 0xa6, 0x3d, 0x24, 0xf7, 0xa0, 0x48, 0x07, - 0xa6, 0xa3, 0xb4, 0x30, 0x23, 0xdb, 0xda, 0xb6, 0x6a, 0xc5, 0xa6, 0xfd, 0xed, 0xcb, 0x9d, 0xcd, - 0x69, 0xe3, 0x7e, 0x10, 0x68, 0x86, 0xf8, 0xcc, 0x68, 0x21, 0xb9, 0x3f, 0xa7, 0x92, 0xdb, 0x50, - 0xe8, 0x47, 0x0a, 0x76, 0x76, 0xdb, 0xaa, 0x5d, 0x69, 0xac, 0xd7, 0xe3, 0x10, 0xf5, 0x58, 0xb7, - 0x99, 0x3f, 0xf9, 0x51, 0xc9, 0xf8, 0x53, 0xce, 0x83, 0xf5, 0x0f, 0x67, 0xc7, 0xbb, 0xf3, 0xee, - 0x6a, 0x19, 0x4a, 0xe7, 0x8c, 0xf8, 0x0c, 0xfb, 0x4a, 0x22, 0xab, 0x7e, 0xb5, 0x22, 0xec, 0x89, - 0x14, 0x46, 0xd0, 0xae, 0x78, 0xc7, 0x1e, 0x29, 0x69, 0xb4, 0xea, 0x76, 0x99, 0xfe, 0x6b, 0xb3, - 0x2e, 0x00, 0x45, 0x64, 0xda, 0x08, 0x25, 0x43, 0xc3, 0xb9, 0xda, 0x9a, 0x9f, 0xaa, 0x90, 0x6b, - 0x50, 0x7c, 0xc3, 0x46, 0xd8, 0xa1, 0x9a, 0xa1, 0x9d, 0x8b, 0xe0, 0x79, 0x81, 0xdc, 0x80, 0xab, - 0x43, 0xa6, 0xc5, 0xa1, 0x68, 0xd3, 0x58, 0x20, 0x1f, 0x31, 0x16, 0x8b, 0x17, 0x22, 0xbe, 0x84, - 0xca, 0x92, 0x18, 0x49, 0x54, 0x72, 0x1f, 0xa0, 0x3d, 0xab, 0xae, 0xcc, 0x93, 0xe2, 0x56, 0x7f, - 0x59, 0x50, 0x6e, 0x21, 0xdf, 0x1f, 0x98, 0x0e, 0x93, 0x26, 0xf4, 0xf0, 0x2f, 0xc6, 0xb4, 0xe8, - 0x27, 0xfb, 0xe7, 0x7e, 0x48, 0x03, 0xfe, 0xa7, 0x31, 0x68, 0xe7, 0x56, 0xb4, 0x25, 0x44, 0xb2, - 0x05, 0x05, 0xa5, 0x05, 0x17, 0xd2, 0xce, 0x87, 0x2d, 0xfe, 0xf4, 0x74, 0x61, 0x90, 0xd7, 0x61, - 0x67, 0x69, 0xd4, 0x64, 0x94, 0x8d, 0xcf, 0x59, 0xc8, 0xb5, 0x90, 0x93, 0xc7, 0xb0, 0xb6, 0xb0, - 0xde, 0xa5, 0x64, 0x2d, 0xcf, 0xad, 0x9b, 0x53, 0x59, 0x02, 0xcc, 0x2e, 0xe7, 0x15, 0x10, 0x9f, - 0x71, 0x81, 0x86, 0xe9, 0xd4, 0x68, 0xd3, 0x6d, 0x97, 0xdd, 0xad, 0x73, 0x73, 0x05, 0x61, 0xa6, - 0x7f, 0x08, 0x5b, 0x4b, 0xae, 0x6f, 0x27, 0x25, 0x71, 0x39, 0xc5, 0xb9, 0xb5, 0x92, 0x92, 0xfc, - 0xc7, 0xf9, 0xef, 0xfd, 0xd9, 0xf1, 0xae, 0xd5, 0x7c, 0x78, 0x32, 0x76, 0xad, 0xd3, 0xb1, 0x6b, - 0xfd, 0x1c, 0xbb, 0xd6, 0xa7, 0x89, 0x9b, 0x39, 0x9d, 0xb8, 0x99, 0xef, 0x13, 0x37, 0xf3, 0xa2, - 0xca, 0x85, 0xe9, 0x0c, 0x0e, 0xea, 0x6d, 0xd5, 0xf3, 0x94, 0x44, 0x25, 0xb5, 0xd7, 0x79, 0x4b, - 0x47, 0xde, 0x91, 0x17, 0xbe, 0x3a, 0x66, 0xd4, 0x67, 0x78, 0x50, 0x88, 0x1e, 0x90, 0xbb, 0xbf, - 0x03, 0x00, 0x00, 0xff, 0xff, 0x74, 0x50, 0x71, 0x32, 0xbb, 0x04, 0x00, 0x00, + // 664 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xcf, 0x4f, 0x13, 0x41, + 0x14, 0xee, 0x50, 0x28, 0xf4, 0xf1, 0xcb, 0x4c, 0xd0, 0x96, 0x8d, 0x2c, 0xa4, 0xd1, 0x84, 0x10, + 0xed, 0x86, 0x92, 0x10, 0x82, 0x5e, 0xc0, 0x98, 0x70, 0x21, 0xea, 0x12, 0x2e, 0x5c, 0xc8, 0xb2, + 0x3b, 0x6e, 0x27, 0xb0, 0x33, 0xcd, 0xcc, 0x6c, 0xa5, 0x37, 0xe3, 0xc5, 0xab, 0x7f, 0x88, 0x07, + 0x0e, 0xfe, 0x07, 0x5e, 0xb8, 0x49, 0x3c, 0x79, 0x52, 0x03, 0x07, 0xfe, 0x0d, 0x33, 0x9d, 0x69, + 0xbb, 0x85, 0x82, 0xca, 0x6d, 0xe6, 0x7d, 0xef, 0x7d, 0xf3, 0x7d, 0xf3, 0xde, 0xec, 0xc2, 0x74, + 0x44, 0x23, 0xaf, 0xb9, 0xec, 0xa9, 0xe3, 0x6a, 0x43, 0x70, 0xc5, 0x71, 0x21, 0xa2, 0x51, 0xb5, + 0xb9, 0xec, 0x94, 0x42, 0x2e, 0x13, 0x2e, 0xbd, 0x44, 0xc6, 0x1a, 0x4f, 0x64, 0x6c, 0x12, 0x1c, + 0x6c, 0x2b, 0x08, 0x4b, 0x13, 0x69, 0x63, 0x33, 0x36, 0x16, 0x13, 0x46, 0x24, 0xed, 0x46, 0x63, + 0x1e, 0xf3, 0xf6, 0xd2, 0xd3, 0x2b, 0x1b, 0x9d, 0x35, 0xc4, 0xfb, 0x06, 0x30, 0x1b, 0x03, 0x55, + 0x3e, 0x22, 0x98, 0xde, 0x96, 0xf1, 0x6e, 0x23, 0x0a, 0x14, 0x79, 0x1d, 0x88, 0x20, 0x91, 0x78, + 0x15, 0x8a, 0x41, 0xaa, 0xea, 0x5c, 0x50, 0xd5, 0x2a, 0xa3, 0x05, 0xb4, 0x58, 0xdc, 0x2c, 0x7f, + 0xff, 0xf2, 0x74, 0xc6, 0x16, 0x6e, 0x44, 0x91, 0x20, 0x52, 0xee, 0x28, 0x41, 0x59, 0xec, 0xf7, + 0x52, 0xf1, 0x13, 0x28, 0x34, 0xda, 0x0c, 0xe5, 0xa1, 0x05, 0xb4, 0x38, 0x5e, 0x9b, 0xaa, 0x1a, + 0x63, 0x55, 0xc3, 0xbb, 0x39, 0x7c, 0xfa, 0x73, 0x3e, 0xe7, 0xdb, 0x9c, 0xf5, 0xa9, 0x0f, 0x97, + 0x27, 0x4b, 0xbd, 0xea, 0xca, 0x2c, 0x94, 0xae, 0x08, 0xf1, 0x89, 0x6c, 0x70, 0x26, 0x49, 0xe5, + 0x97, 0x11, 0xb9, 0x91, 0xaa, 0x3a, 0x61, 0x8a, 0x86, 0x81, 0x22, 0x77, 0x16, 0xb9, 0x06, 0x10, + 0x72, 0xa6, 0x04, 0x3f, 0x3a, 0x22, 0xa2, 0x2d, 0xf4, 0xb6, 0xc2, 0x4c, 0x2e, 0xae, 0xc1, 0x68, + 0x60, 0xc0, 0x72, 0xfe, 0x2f, 0x65, 0x9d, 0x44, 0xfc, 0x00, 0x0a, 0x5c, 0xd0, 0x98, 0xb2, 0xf2, + 0xb0, 0x2e, 0xf1, 0xed, 0xee, 0x06, 0xf3, 0x59, 0x83, 0x5d, 0xf3, 0x5f, 0x11, 0xdc, 0xdf, 0x96, + 0xb1, 0x4f, 0x62, 0x2a, 0x15, 0x11, 0x2f, 0x7a, 0x82, 0xee, 0x7a, 0x05, 0x2e, 0x40, 0x20, 0x25, + 0x11, 0x8a, 0x72, 0xa6, 0x7b, 0x95, 0x5f, 0x9c, 0xf0, 0x33, 0x11, 0xfc, 0x10, 0x8a, 0x87, 0xa4, + 0x25, 0xeb, 0x81, 0x20, 0xda, 0xaa, 0x86, 0x7b, 0x01, 0xfc, 0x08, 0x26, 0x9b, 0x44, 0xd0, 0xb7, + 0x5a, 0x65, 0x9b, 0x60, 0xb8, 0x9d, 0xd1, 0x1f, 0xbc, 0x66, 0xf0, 0x12, 0xc1, 0xdc, 0x40, 0x17, + 0x1d, 0x9f, 0x57, 0x1a, 0x83, 0xfe, 0xa3, 0x31, 0xaf, 0x60, 0x2c, 0x08, 0x43, 0x9e, 0x32, 0x65, + 0xdc, 0x8c, 0xd7, 0x56, 0x3a, 0x93, 0x77, 0xeb, 0x91, 0xd5, 0x0d, 0x5b, 0xf5, 0x92, 0x29, 0xd1, + 0xf2, 0xbb, 0x24, 0xce, 0x33, 0x98, 0xec, 0x83, 0xf0, 0x3d, 0xc8, 0x1f, 0x12, 0x7b, 0xc7, 0xbe, + 0x5e, 0xe2, 0x19, 0x18, 0x69, 0x06, 0x47, 0x29, 0x31, 0x13, 0xe4, 0x9b, 0xcd, 0xfa, 0xd0, 0x1a, + 0xaa, 0x7c, 0x46, 0x80, 0x33, 0xc7, 0xee, 0x10, 0xd1, 0xa4, 0xe1, 0xdd, 0xe7, 0x75, 0x0e, 0xc0, + 0xcc, 0xcc, 0x7e, 0x2a, 0xa8, 0x3d, 0xad, 0x68, 0x22, 0xbb, 0x82, 0x62, 0x0f, 0x0a, 0x32, 0xe4, + 0x0d, 0xdb, 0xa8, 0xa9, 0x5a, 0xa9, 0xfb, 0xe6, 0x88, 0x48, 0xa8, 0x94, 0x94, 0xb3, 0x1d, 0x8d, + 0xfb, 0x36, 0xed, 0x5a, 0x63, 0x56, 0xc1, 0xb9, 0xae, 0xb6, 0xdb, 0x94, 0x32, 0x8c, 0xca, 0x34, + 0x0c, 0xf5, 0xcc, 0x6b, 0xcd, 0x63, 0x7e, 0x67, 0x5b, 0xfb, 0x36, 0x04, 0xf9, 0x6d, 0x19, 0xe3, + 0x2d, 0x98, 0xe8, 0xfb, 0x78, 0x94, 0x32, 0x57, 0x9f, 0x05, 0x9c, 0xf9, 0x1b, 0x80, 0xee, 0x59, + 0x5b, 0x30, 0xd1, 0xf7, 0xc2, 0xb3, 0x4c, 0x59, 0xa0, 0x8f, 0x69, 0xd0, 0x93, 0xc1, 0x7b, 0x80, + 0x07, 0x3c, 0x97, 0xb9, 0x5b, 0x87, 0xc2, 0x79, 0xfc, 0x4f, 0x33, 0x83, 0xdf, 0xc0, 0xf4, 0xd5, + 0xd6, 0x3a, 0x03, 0x2a, 0x2d, 0xe6, 0x54, 0x6e, 0xc6, 0x3a, 0x94, 0xce, 0xc8, 0xfb, 0xcb, 0x93, + 0x25, 0xb4, 0xf9, 0xfc, 0xf4, 0xdc, 0x45, 0x67, 0xe7, 0x2e, 0xfa, 0x7d, 0xee, 0xa2, 0x4f, 0x17, + 0x6e, 0xee, 0xec, 0xc2, 0xcd, 0xfd, 0xb8, 0x70, 0x73, 0x7b, 0x95, 0x98, 0xaa, 0x7a, 0x7a, 0x50, + 0x0d, 0x79, 0xe2, 0x71, 0x26, 0x39, 0x13, 0x5e, 0xfd, 0x5d, 0xd0, 0xf2, 0x8e, 0x3d, 0xfd, 0x13, + 0x50, 0xad, 0x06, 0x91, 0x07, 0x85, 0xf6, 0xf7, 0x7c, 0xe5, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x1b, 0x6e, 0x1f, 0x6c, 0x5e, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -422,10 +552,12 @@ type MsgClient interface { // // Since: cosmos-sdk 0.47 UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + // Authenticate asserts the given controller is the owner of the given address. + Authenticate(ctx context.Context, in *MsgAuthenticate, opts ...grpc.CallOption) (*MsgAuthenticateResponse, error) // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. - RegisterController(ctx context.Context, in *MsgInitializeController, opts ...grpc.CallOption) (*MsgInitializeControllerResponse, error) - // AuthenticateController asserts the given controller is the owner of the given address. - AuthenticateController(ctx context.Context, in *MsgAuthenticateController, opts ...grpc.CallOption) (*MsgAuthenticateControllerResponse, error) + RegisterController(ctx context.Context, in *MsgRegisterController, opts ...grpc.CallOption) (*MsgRegisterControllerResponse, error) + // RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key. + RegisterService(ctx context.Context, in *MsgRegisterService, opts ...grpc.CallOption) (*MsgRegisterServiceResponse, error) } type msgClient struct { @@ -445,8 +577,17 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } -func (c *msgClient) RegisterController(ctx context.Context, in *MsgInitializeController, opts ...grpc.CallOption) (*MsgInitializeControllerResponse, error) { - out := new(MsgInitializeControllerResponse) +func (c *msgClient) Authenticate(ctx context.Context, in *MsgAuthenticate, opts ...grpc.CallOption) (*MsgAuthenticateResponse, error) { + out := new(MsgAuthenticateResponse) + err := c.cc.Invoke(ctx, "/did.v1.Msg/Authenticate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) RegisterController(ctx context.Context, in *MsgRegisterController, opts ...grpc.CallOption) (*MsgRegisterControllerResponse, error) { + out := new(MsgRegisterControllerResponse) err := c.cc.Invoke(ctx, "/did.v1.Msg/RegisterController", in, out, opts...) if err != nil { return nil, err @@ -454,9 +595,9 @@ func (c *msgClient) RegisterController(ctx context.Context, in *MsgInitializeCon return out, nil } -func (c *msgClient) AuthenticateController(ctx context.Context, in *MsgAuthenticateController, opts ...grpc.CallOption) (*MsgAuthenticateControllerResponse, error) { - out := new(MsgAuthenticateControllerResponse) - err := c.cc.Invoke(ctx, "/did.v1.Msg/AuthenticateController", in, out, opts...) +func (c *msgClient) RegisterService(ctx context.Context, in *MsgRegisterService, opts ...grpc.CallOption) (*MsgRegisterServiceResponse, error) { + out := new(MsgRegisterServiceResponse) + err := c.cc.Invoke(ctx, "/did.v1.Msg/RegisterService", in, out, opts...) if err != nil { return nil, err } @@ -469,10 +610,12 @@ type MsgServer interface { // // Since: cosmos-sdk 0.47 UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + // Authenticate asserts the given controller is the owner of the given address. + Authenticate(context.Context, *MsgAuthenticate) (*MsgAuthenticateResponse, error) // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. - RegisterController(context.Context, *MsgInitializeController) (*MsgInitializeControllerResponse, error) - // AuthenticateController asserts the given controller is the owner of the given address. - AuthenticateController(context.Context, *MsgAuthenticateController) (*MsgAuthenticateControllerResponse, error) + RegisterController(context.Context, *MsgRegisterController) (*MsgRegisterControllerResponse, error) + // RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key. + RegisterService(context.Context, *MsgRegisterService) (*MsgRegisterServiceResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -482,11 +625,14 @@ type UnimplementedMsgServer struct { func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } -func (*UnimplementedMsgServer) RegisterController(ctx context.Context, req *MsgInitializeController) (*MsgInitializeControllerResponse, error) { +func (*UnimplementedMsgServer) Authenticate(ctx context.Context, req *MsgAuthenticate) (*MsgAuthenticateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Authenticate not implemented") +} +func (*UnimplementedMsgServer) RegisterController(ctx context.Context, req *MsgRegisterController) (*MsgRegisterControllerResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegisterController not implemented") } -func (*UnimplementedMsgServer) AuthenticateController(ctx context.Context, req *MsgAuthenticateController) (*MsgAuthenticateControllerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AuthenticateController not implemented") +func (*UnimplementedMsgServer) RegisterService(ctx context.Context, req *MsgRegisterService) (*MsgRegisterServiceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterService not implemented") } func RegisterMsgServer(s grpc1.Server, srv MsgServer) { @@ -511,8 +657,26 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Msg_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAuthenticate) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Authenticate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/did.v1.Msg/Authenticate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Authenticate(ctx, req.(*MsgAuthenticate)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_RegisterController_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgInitializeController) + in := new(MsgRegisterController) if err := dec(in); err != nil { return nil, err } @@ -524,25 +688,25 @@ func _Msg_RegisterController_Handler(srv interface{}, ctx context.Context, dec f FullMethod: "/did.v1.Msg/RegisterController", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RegisterController(ctx, req.(*MsgInitializeController)) + return srv.(MsgServer).RegisterController(ctx, req.(*MsgRegisterController)) } return interceptor(ctx, in, info, handler) } -func _Msg_AuthenticateController_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgAuthenticateController) +func _Msg_RegisterService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRegisterService) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).AuthenticateController(ctx, in) + return srv.(MsgServer).RegisterService(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/did.v1.Msg/AuthenticateController", + FullMethod: "/did.v1.Msg/RegisterService", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).AuthenticateController(ctx, req.(*MsgAuthenticateController)) + return srv.(MsgServer).RegisterService(ctx, req.(*MsgRegisterService)) } return interceptor(ctx, in, info, handler) } @@ -555,13 +719,17 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, + { + MethodName: "Authenticate", + Handler: _Msg_Authenticate_Handler, + }, { MethodName: "RegisterController", Handler: _Msg_RegisterController_Handler, }, { - MethodName: "AuthenticateController", - Handler: _Msg_AuthenticateController_Handler, + MethodName: "RegisterService", + Handler: _Msg_RegisterService_Handler, }, }, Streams: []grpc.StreamDesc{}, @@ -631,7 +799,7 @@ func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgInitializeController) Marshal() (dAtA []byte, err error) { +func (m *MsgAuthenticate) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -641,12 +809,86 @@ func (m *MsgInitializeController) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgInitializeController) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgAuthenticate) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgInitializeController) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgAuthenticate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Origin) > 0 { + i -= len(m.Origin) + copy(dAtA[i:], m.Origin) + i = encodeVarintTx(dAtA, i, uint64(len(m.Origin))) + i-- + dAtA[i] = 0x22 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x1a + } + if len(m.Controller) > 0 { + i -= len(m.Controller) + copy(dAtA[i:], m.Controller) + i = encodeVarintTx(dAtA, i, uint64(len(m.Controller))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgAuthenticateResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgAuthenticateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAuthenticateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgRegisterController) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgRegisterController) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRegisterController) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -688,7 +930,7 @@ func (m *MsgInitializeController) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgInitializeControllerResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgRegisterControllerResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -698,16 +940,35 @@ func (m *MsgInitializeControllerResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgInitializeControllerResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgRegisterControllerResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgInitializeControllerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgRegisterControllerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + if len(m.Accounts) > 0 { + for k := range m.Accounts { + v := m.Accounts[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintTx(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintTx(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintTx(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x12 + } + } if len(m.Controller) > 0 { i -= len(m.Controller) copy(dAtA[i:], m.Controller) @@ -718,7 +979,7 @@ func (m *MsgInitializeControllerResponse) MarshalToSizedBuffer(dAtA []byte) (int return len(dAtA) - i, nil } -func (m *MsgAuthenticateController) Marshal() (dAtA []byte, err error) { +func (m *MsgRegisterService) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -728,34 +989,38 @@ func (m *MsgAuthenticateController) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgAuthenticateController) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgRegisterService) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgAuthenticateController) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgRegisterService) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Origin) > 0 { - i -= len(m.Origin) - copy(dAtA[i:], m.Origin) - i = encodeVarintTx(dAtA, i, uint64(len(m.Origin))) - i-- - dAtA[i] = 0x22 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + if len(m.Scopes) > 0 { + dAtA3 := make([]byte, len(m.Scopes)*10) + var j2 int + for _, num := range m.Scopes { + for num >= 1<<7 { + dAtA3[j2] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j2++ + } + dAtA3[j2] = uint8(num) + j2++ + } + i -= j2 + copy(dAtA[i:], dAtA3[:j2]) + i = encodeVarintTx(dAtA, i, uint64(j2)) i-- dAtA[i] = 0x1a } - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintTx(dAtA, i, uint64(len(m.Controller))) + if len(m.OriginUri) > 0 { + i -= len(m.OriginUri) + copy(dAtA[i:], m.OriginUri) + i = encodeVarintTx(dAtA, i, uint64(len(m.OriginUri))) i-- dAtA[i] = 0x12 } @@ -769,7 +1034,7 @@ func (m *MsgAuthenticateController) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } -func (m *MsgAuthenticateControllerResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgRegisterServiceResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -779,16 +1044,26 @@ func (m *MsgAuthenticateControllerResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgAuthenticateControllerResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgRegisterServiceResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgAuthenticateControllerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgRegisterServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + if m.Success { + i-- + if m.Success { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } return len(dAtA) - i, nil } @@ -827,7 +1102,41 @@ func (m *MsgUpdateParamsResponse) Size() (n int) { return n } -func (m *MsgInitializeController) Size() (n int) { +func (m *MsgAuthenticate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Controller) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Origin) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgAuthenticateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgRegisterController) Size() (n int) { if m == nil { return 0 } @@ -858,7 +1167,7 @@ func (m *MsgInitializeController) Size() (n int) { return n } -func (m *MsgInitializeControllerResponse) Size() (n int) { +func (m *MsgRegisterControllerResponse) Size() (n int) { if m == nil { return 0 } @@ -868,10 +1177,18 @@ func (m *MsgInitializeControllerResponse) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } + if len(m.Accounts) > 0 { + for k, v := range m.Accounts { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTx(uint64(len(k))) + 1 + len(v) + sovTx(uint64(len(v))) + n += mapEntrySize + 1 + sovTx(uint64(mapEntrySize)) + } + } return n } -func (m *MsgAuthenticateController) Size() (n int) { +func (m *MsgRegisterService) Size() (n int) { if m == nil { return 0 } @@ -881,27 +1198,29 @@ func (m *MsgAuthenticateController) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Controller) + l = len(m.OriginUri) if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Origin) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if len(m.Scopes) > 0 { + l = 0 + for _, e := range m.Scopes { + l += sovTx(uint64(e)) + } + n += 1 + sovTx(uint64(l)) + l } return n } -func (m *MsgAuthenticateControllerResponse) Size() (n int) { +func (m *MsgRegisterServiceResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l + if m.Success { + n += 2 + } return n } @@ -1076,7 +1395,7 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgInitializeController) Unmarshal(dAtA []byte) error { +func (m *MsgAuthenticate) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1099,270 +1418,10 @@ func (m *MsgInitializeController) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgInitializeController: wiretype end group for non-group") + return fmt.Errorf("proto: MsgAuthenticate: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgInitializeController: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Assertions", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Assertions = append(m.Assertions, make([]byte, postIndex-iNdEx)) - copy(m.Assertions[len(m.Assertions)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Keyshares", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Keyshares = append(m.Keyshares, make([]byte, postIndex-iNdEx)) - copy(m.Keyshares[len(m.Keyshares)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Verifications", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Verifications = append(m.Verifications, make([]byte, postIndex-iNdEx)) - copy(m.Verifications[len(m.Verifications)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgInitializeControllerResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgInitializeControllerResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgInitializeControllerResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgAuthenticateController) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgAuthenticateController: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAuthenticateController: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgAuthenticate: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1514,7 +1573,7 @@ func (m *MsgAuthenticateController) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgAuthenticateControllerResponse) Unmarshal(dAtA []byte) error { +func (m *MsgAuthenticateResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1537,10 +1596,10 @@ func (m *MsgAuthenticateControllerResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgAuthenticateControllerResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgAuthenticateResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAuthenticateControllerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgAuthenticateResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -1564,6 +1623,646 @@ func (m *MsgAuthenticateControllerResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgRegisterController) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRegisterController: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterController: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Assertions", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Assertions = append(m.Assertions, make([]byte, postIndex-iNdEx)) + copy(m.Assertions[len(m.Assertions)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Keyshares", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Keyshares = append(m.Keyshares, make([]byte, postIndex-iNdEx)) + copy(m.Keyshares[len(m.Keyshares)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Verifications", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Verifications = append(m.Verifications, make([]byte, postIndex-iNdEx)) + copy(m.Verifications[len(m.Verifications)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRegisterControllerResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRegisterControllerResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterControllerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Controller = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Accounts == nil { + m.Accounts = 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 ErrIntOverflowTx + } + if iNdEx >= l { + return 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 ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTx + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthTx + } + if postStringIndexmapkey > l { + return 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 ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthTx + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthTx + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Accounts[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRegisterService) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRegisterService: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterService: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OriginUri", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OriginUri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType == 0 { + var v PermissionScope + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= PermissionScope(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Scopes = append(m.Scopes, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.Scopes) == 0 { + m.Scopes = make([]PermissionScope, 0, elementCount) + } + for iNdEx < postIndex { + var v PermissionScope + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= PermissionScope(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Scopes = append(m.Scopes, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRegisterServiceResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRegisterServiceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Success = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0