diff --git a/.envrc b/.envrc deleted file mode 100644 index 0ff5d0ea0..000000000 --- a/.envrc +++ /dev/null @@ -1,10 +0,0 @@ -# Automatically sets up your devbox environment whenever you cd into this -# directory via our direnv integration: -# -# Enter Nushell -eval "$(devbox generate direnv --print-envrc)" - -# check out https://www.jetpack.io/devbox/docs/ide_configuration/direnv/ -# for more details -# - diff --git a/api/did/v1/accounts.pulsar.go b/api/did/v1/accounts.pulsar.go index b808919bb..fd493d1c7 100644 --- a/api/did/v1/accounts.pulsar.go +++ b/api/did/v1/accounts.pulsar.go @@ -2,11 +2,1440 @@ package didv1 import ( + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" reflect "reflect" + sync "sync" ) +var ( + md_BtcAccount protoreflect.MessageDescriptor +) + +func init() { + file_did_v1_accounts_proto_init() + md_BtcAccount = File_did_v1_accounts_proto.Messages().ByName("BtcAccount") +} + +var _ protoreflect.Message = (*fastReflection_BtcAccount)(nil) + +type fastReflection_BtcAccount BtcAccount + +func (x *BtcAccount) ProtoReflect() protoreflect.Message { + return (*fastReflection_BtcAccount)(x) +} + +func (x *BtcAccount) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_accounts_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_BtcAccount_messageType fastReflection_BtcAccount_messageType +var _ protoreflect.MessageType = fastReflection_BtcAccount_messageType{} + +type fastReflection_BtcAccount_messageType struct{} + +func (x fastReflection_BtcAccount_messageType) Zero() protoreflect.Message { + return (*fastReflection_BtcAccount)(nil) +} +func (x fastReflection_BtcAccount_messageType) New() protoreflect.Message { + return new(fastReflection_BtcAccount) +} +func (x fastReflection_BtcAccount_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_BtcAccount +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_BtcAccount) Descriptor() protoreflect.MessageDescriptor { + return md_BtcAccount +} + +// 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_BtcAccount) Type() protoreflect.MessageType { + return _fastReflection_BtcAccount_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_BtcAccount) New() protoreflect.Message { + return new(fastReflection_BtcAccount) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_BtcAccount) Interface() protoreflect.ProtoMessage { + return (*BtcAccount)(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_BtcAccount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_BtcAccount) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.BtcAccount")) + } + panic(fmt.Errorf("message did.v1.BtcAccount 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_BtcAccount) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.BtcAccount")) + } + panic(fmt.Errorf("message did.v1.BtcAccount 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_BtcAccount) 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.BtcAccount")) + } + panic(fmt.Errorf("message did.v1.BtcAccount 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_BtcAccount) 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.BtcAccount")) + } + panic(fmt.Errorf("message did.v1.BtcAccount 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_BtcAccount) 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.BtcAccount")) + } + panic(fmt.Errorf("message did.v1.BtcAccount 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_BtcAccount) 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.BtcAccount")) + } + panic(fmt.Errorf("message did.v1.BtcAccount 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_BtcAccount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.BtcAccount", 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_BtcAccount) 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_BtcAccount) 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_BtcAccount) 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_BtcAccount) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*BtcAccount) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*BtcAccount) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*BtcAccount) + 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: BtcAccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BtcAccount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_EthAccount protoreflect.MessageDescriptor +) + +func init() { + file_did_v1_accounts_proto_init() + md_EthAccount = File_did_v1_accounts_proto.Messages().ByName("EthAccount") +} + +var _ protoreflect.Message = (*fastReflection_EthAccount)(nil) + +type fastReflection_EthAccount EthAccount + +func (x *EthAccount) ProtoReflect() protoreflect.Message { + return (*fastReflection_EthAccount)(x) +} + +func (x *EthAccount) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_accounts_proto_msgTypes[1] + 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_EthAccount_messageType fastReflection_EthAccount_messageType +var _ protoreflect.MessageType = fastReflection_EthAccount_messageType{} + +type fastReflection_EthAccount_messageType struct{} + +func (x fastReflection_EthAccount_messageType) Zero() protoreflect.Message { + return (*fastReflection_EthAccount)(nil) +} +func (x fastReflection_EthAccount_messageType) New() protoreflect.Message { + return new(fastReflection_EthAccount) +} +func (x fastReflection_EthAccount_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_EthAccount +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_EthAccount) Descriptor() protoreflect.MessageDescriptor { + return md_EthAccount +} + +// 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_EthAccount) Type() protoreflect.MessageType { + return _fastReflection_EthAccount_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_EthAccount) New() protoreflect.Message { + return new(fastReflection_EthAccount) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_EthAccount) Interface() protoreflect.ProtoMessage { + return (*EthAccount)(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_EthAccount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_EthAccount) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.EthAccount")) + } + panic(fmt.Errorf("message did.v1.EthAccount 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_EthAccount) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.EthAccount")) + } + panic(fmt.Errorf("message did.v1.EthAccount 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_EthAccount) 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.EthAccount")) + } + panic(fmt.Errorf("message did.v1.EthAccount 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_EthAccount) 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.EthAccount")) + } + panic(fmt.Errorf("message did.v1.EthAccount 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_EthAccount) 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.EthAccount")) + } + panic(fmt.Errorf("message did.v1.EthAccount 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_EthAccount) 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.EthAccount")) + } + panic(fmt.Errorf("message did.v1.EthAccount 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_EthAccount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.EthAccount", 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_EthAccount) 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_EthAccount) 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_EthAccount) 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_EthAccount) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*EthAccount) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*EthAccount) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*EthAccount) + 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: EthAccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EthAccount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_IBCAccount protoreflect.MessageDescriptor +) + +func init() { + file_did_v1_accounts_proto_init() + md_IBCAccount = File_did_v1_accounts_proto.Messages().ByName("IBCAccount") +} + +var _ protoreflect.Message = (*fastReflection_IBCAccount)(nil) + +type fastReflection_IBCAccount IBCAccount + +func (x *IBCAccount) ProtoReflect() protoreflect.Message { + return (*fastReflection_IBCAccount)(x) +} + +func (x *IBCAccount) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_accounts_proto_msgTypes[2] + 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_IBCAccount_messageType fastReflection_IBCAccount_messageType +var _ protoreflect.MessageType = fastReflection_IBCAccount_messageType{} + +type fastReflection_IBCAccount_messageType struct{} + +func (x fastReflection_IBCAccount_messageType) Zero() protoreflect.Message { + return (*fastReflection_IBCAccount)(nil) +} +func (x fastReflection_IBCAccount_messageType) New() protoreflect.Message { + return new(fastReflection_IBCAccount) +} +func (x fastReflection_IBCAccount_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_IBCAccount +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_IBCAccount) Descriptor() protoreflect.MessageDescriptor { + return md_IBCAccount +} + +// 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_IBCAccount) Type() protoreflect.MessageType { + return _fastReflection_IBCAccount_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_IBCAccount) New() protoreflect.Message { + return new(fastReflection_IBCAccount) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_IBCAccount) Interface() protoreflect.ProtoMessage { + return (*IBCAccount)(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_IBCAccount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_IBCAccount) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.IBCAccount")) + } + panic(fmt.Errorf("message did.v1.IBCAccount 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_IBCAccount) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.IBCAccount")) + } + panic(fmt.Errorf("message did.v1.IBCAccount 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_IBCAccount) 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.IBCAccount")) + } + panic(fmt.Errorf("message did.v1.IBCAccount 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_IBCAccount) 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.IBCAccount")) + } + panic(fmt.Errorf("message did.v1.IBCAccount 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_IBCAccount) 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.IBCAccount")) + } + panic(fmt.Errorf("message did.v1.IBCAccount 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_IBCAccount) 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.IBCAccount")) + } + panic(fmt.Errorf("message did.v1.IBCAccount 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_IBCAccount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.IBCAccount", 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_IBCAccount) 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_IBCAccount) 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_IBCAccount) 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_IBCAccount) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*IBCAccount) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*IBCAccount) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*IBCAccount) + 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: IBCAccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: IBCAccount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_SnrAccount protoreflect.MessageDescriptor +) + +func init() { + file_did_v1_accounts_proto_init() + md_SnrAccount = File_did_v1_accounts_proto.Messages().ByName("SnrAccount") +} + +var _ protoreflect.Message = (*fastReflection_SnrAccount)(nil) + +type fastReflection_SnrAccount SnrAccount + +func (x *SnrAccount) ProtoReflect() protoreflect.Message { + return (*fastReflection_SnrAccount)(x) +} + +func (x *SnrAccount) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_accounts_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_SnrAccount_messageType fastReflection_SnrAccount_messageType +var _ protoreflect.MessageType = fastReflection_SnrAccount_messageType{} + +type fastReflection_SnrAccount_messageType struct{} + +func (x fastReflection_SnrAccount_messageType) Zero() protoreflect.Message { + return (*fastReflection_SnrAccount)(nil) +} +func (x fastReflection_SnrAccount_messageType) New() protoreflect.Message { + return new(fastReflection_SnrAccount) +} +func (x fastReflection_SnrAccount_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_SnrAccount +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_SnrAccount) Descriptor() protoreflect.MessageDescriptor { + return md_SnrAccount +} + +// 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_SnrAccount) Type() protoreflect.MessageType { + return _fastReflection_SnrAccount_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_SnrAccount) New() protoreflect.Message { + return new(fastReflection_SnrAccount) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_SnrAccount) Interface() protoreflect.ProtoMessage { + return (*SnrAccount)(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_SnrAccount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_SnrAccount) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SnrAccount")) + } + panic(fmt.Errorf("message did.v1.SnrAccount 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_SnrAccount) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SnrAccount")) + } + panic(fmt.Errorf("message did.v1.SnrAccount 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_SnrAccount) 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.SnrAccount")) + } + panic(fmt.Errorf("message did.v1.SnrAccount 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_SnrAccount) 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.SnrAccount")) + } + panic(fmt.Errorf("message did.v1.SnrAccount 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_SnrAccount) 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.SnrAccount")) + } + panic(fmt.Errorf("message did.v1.SnrAccount 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_SnrAccount) 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.SnrAccount")) + } + panic(fmt.Errorf("message did.v1.SnrAccount 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_SnrAccount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.SnrAccount", 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_SnrAccount) 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_SnrAccount) 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_SnrAccount) 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_SnrAccount) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*SnrAccount) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*SnrAccount) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*SnrAccount) + 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: SnrAccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SnrAccount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -20,23 +1449,148 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type BtcAccount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *BtcAccount) Reset() { + *x = BtcAccount{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_accounts_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BtcAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BtcAccount) ProtoMessage() {} + +// Deprecated: Use BtcAccount.ProtoReflect.Descriptor instead. +func (*BtcAccount) Descriptor() ([]byte, []int) { + return file_did_v1_accounts_proto_rawDescGZIP(), []int{0} +} + +type EthAccount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *EthAccount) Reset() { + *x = EthAccount{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_accounts_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EthAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EthAccount) ProtoMessage() {} + +// Deprecated: Use EthAccount.ProtoReflect.Descriptor instead. +func (*EthAccount) Descriptor() ([]byte, []int) { + return file_did_v1_accounts_proto_rawDescGZIP(), []int{1} +} + +type IBCAccount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *IBCAccount) Reset() { + *x = IBCAccount{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_accounts_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IBCAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IBCAccount) ProtoMessage() {} + +// Deprecated: Use IBCAccount.ProtoReflect.Descriptor instead. +func (*IBCAccount) Descriptor() ([]byte, []int) { + return file_did_v1_accounts_proto_rawDescGZIP(), []int{2} +} + +type SnrAccount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SnrAccount) Reset() { + *x = SnrAccount{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_accounts_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SnrAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SnrAccount) ProtoMessage() {} + +// Deprecated: Use SnrAccount.ProtoReflect.Descriptor instead. +func (*SnrAccount) Descriptor() ([]byte, []int) { + return file_did_v1_accounts_proto_rawDescGZIP(), []int{3} +} + var File_did_v1_accounts_proto protoreflect.FileDescriptor var file_did_v1_accounts_proto_rawDesc = []byte{ 0x0a, 0x15, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, - 0x7d, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 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, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x22, + 0x0c, 0x0a, 0x0a, 0x42, 0x74, 0x63, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x0c, 0x0a, + 0x0a, 0x45, 0x74, 0x68, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x0c, 0x0a, 0x0a, 0x49, + 0x42, 0x43, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x0c, 0x0a, 0x0a, 0x53, 0x6e, 0x72, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x7d, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, + 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 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 file_did_v1_accounts_proto_goTypes = []interface{}{} +var ( + file_did_v1_accounts_proto_rawDescOnce sync.Once + file_did_v1_accounts_proto_rawDescData = file_did_v1_accounts_proto_rawDesc +) + +func file_did_v1_accounts_proto_rawDescGZIP() []byte { + file_did_v1_accounts_proto_rawDescOnce.Do(func() { + file_did_v1_accounts_proto_rawDescData = protoimpl.X.CompressGZIP(file_did_v1_accounts_proto_rawDescData) + }) + return file_did_v1_accounts_proto_rawDescData +} + +var file_did_v1_accounts_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_did_v1_accounts_proto_goTypes = []interface{}{ + (*BtcAccount)(nil), // 0: did.v1.BtcAccount + (*EthAccount)(nil), // 1: did.v1.EthAccount + (*IBCAccount)(nil), // 2: did.v1.IBCAccount + (*SnrAccount)(nil), // 3: did.v1.SnrAccount +} var file_did_v1_accounts_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type @@ -50,18 +1604,69 @@ func file_did_v1_accounts_proto_init() { if File_did_v1_accounts_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_did_v1_accounts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BtcAccount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_accounts_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EthAccount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_accounts_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IBCAccount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_accounts_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SnrAccount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_accounts_proto_rawDesc, NumEnums: 0, - NumMessages: 0, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, GoTypes: file_did_v1_accounts_proto_goTypes, DependencyIndexes: file_did_v1_accounts_proto_depIdxs, + MessageInfos: file_did_v1_accounts_proto_msgTypes, }.Build() File_did_v1_accounts_proto = out.File file_did_v1_accounts_proto_rawDesc = nil diff --git a/api/did/v1/enums.pulsar.go b/api/did/v1/enums.pulsar.go deleted file mode 100644 index 2d54b74b4..000000000 --- a/api/did/v1/enums.pulsar.go +++ /dev/null @@ -1,209 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package didv1 - -import ( - _ "cosmossdk.io/api/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: did/v1/enums.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// PermissionScope define the Capabilities Controllers can grant for Services -type PermissionScope int32 - -const ( - PermissionScope_PERMISSION_SCOPE_UNSPECIFIED PermissionScope = 0 - PermissionScope_PERMISSION_SCOPE_PROFILE_NAME PermissionScope = 1 - PermissionScope_PERMISSION_SCOPE_IDENTIFIERS_EMAIL PermissionScope = 2 - PermissionScope_PERMISSION_SCOPE_IDENTIFIERS_PHONE PermissionScope = 3 - PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_READ PermissionScope = 4 - PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_WRITE PermissionScope = 5 - PermissionScope_PERMISSION_SCOPE_WALLETS_READ PermissionScope = 6 - PermissionScope_PERMISSION_SCOPE_WALLETS_CREATE PermissionScope = 7 - PermissionScope_PERMISSION_SCOPE_WALLETS_SUBSCRIBE PermissionScope = 8 - PermissionScope_PERMISSION_SCOPE_WALLETS_UPDATE PermissionScope = 9 - PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_VERIFY PermissionScope = 10 - PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_BROADCAST PermissionScope = 11 - PermissionScope_PERMISSION_SCOPE_ADMIN_USER PermissionScope = 12 - PermissionScope_PERMISSION_SCOPE_ADMIN_VALIDATOR PermissionScope = 13 -) - -// Enum value maps for PermissionScope. -var ( - PermissionScope_name = map[int32]string{ - 0: "PERMISSION_SCOPE_UNSPECIFIED", - 1: "PERMISSION_SCOPE_PROFILE_NAME", - 2: "PERMISSION_SCOPE_IDENTIFIERS_EMAIL", - 3: "PERMISSION_SCOPE_IDENTIFIERS_PHONE", - 4: "PERMISSION_SCOPE_TRANSACTIONS_READ", - 5: "PERMISSION_SCOPE_TRANSACTIONS_WRITE", - 6: "PERMISSION_SCOPE_WALLETS_READ", - 7: "PERMISSION_SCOPE_WALLETS_CREATE", - 8: "PERMISSION_SCOPE_WALLETS_SUBSCRIBE", - 9: "PERMISSION_SCOPE_WALLETS_UPDATE", - 10: "PERMISSION_SCOPE_TRANSACTIONS_VERIFY", - 11: "PERMISSION_SCOPE_TRANSACTIONS_BROADCAST", - 12: "PERMISSION_SCOPE_ADMIN_USER", - 13: "PERMISSION_SCOPE_ADMIN_VALIDATOR", - } - PermissionScope_value = map[string]int32{ - "PERMISSION_SCOPE_UNSPECIFIED": 0, - "PERMISSION_SCOPE_PROFILE_NAME": 1, - "PERMISSION_SCOPE_IDENTIFIERS_EMAIL": 2, - "PERMISSION_SCOPE_IDENTIFIERS_PHONE": 3, - "PERMISSION_SCOPE_TRANSACTIONS_READ": 4, - "PERMISSION_SCOPE_TRANSACTIONS_WRITE": 5, - "PERMISSION_SCOPE_WALLETS_READ": 6, - "PERMISSION_SCOPE_WALLETS_CREATE": 7, - "PERMISSION_SCOPE_WALLETS_SUBSCRIBE": 8, - "PERMISSION_SCOPE_WALLETS_UPDATE": 9, - "PERMISSION_SCOPE_TRANSACTIONS_VERIFY": 10, - "PERMISSION_SCOPE_TRANSACTIONS_BROADCAST": 11, - "PERMISSION_SCOPE_ADMIN_USER": 12, - "PERMISSION_SCOPE_ADMIN_VALIDATOR": 13, - } -) - -func (x PermissionScope) Enum() *PermissionScope { - p := new(PermissionScope) - *p = x - return p -} - -func (x PermissionScope) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (PermissionScope) Descriptor() protoreflect.EnumDescriptor { - return file_did_v1_enums_proto_enumTypes[0].Descriptor() -} - -func (PermissionScope) Type() protoreflect.EnumType { - return &file_did_v1_enums_proto_enumTypes[0] -} - -func (x PermissionScope) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use PermissionScope.Descriptor instead. -func (PermissionScope) EnumDescriptor() ([]byte, []int) { - return file_did_v1_enums_proto_rawDescGZIP(), []int{0} -} - -var File_did_v1_enums_proto protoreflect.FileDescriptor - -var file_did_v1_enums_proto_rawDesc = []byte{ - 0x0a, 0x12, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, - 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2a, 0xaa, 0x04, 0x0a, 0x0f, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x45, 0x52, - 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x21, 0x0a, 0x1d, 0x50, - 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, - 0x50, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x26, - 0x0a, 0x22, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, - 0x50, 0x45, 0x5f, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x46, 0x49, 0x45, 0x52, 0x53, 0x5f, 0x45, - 0x4d, 0x41, 0x49, 0x4c, 0x10, 0x02, 0x12, 0x26, 0x0a, 0x22, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, - 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x49, 0x44, 0x45, 0x4e, 0x54, - 0x49, 0x46, 0x49, 0x45, 0x52, 0x53, 0x5f, 0x50, 0x48, 0x4f, 0x4e, 0x45, 0x10, 0x03, 0x12, 0x26, - 0x0a, 0x22, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, - 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, - 0x52, 0x45, 0x41, 0x44, 0x10, 0x04, 0x12, 0x27, 0x0a, 0x23, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, - 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, - 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x05, 0x12, - 0x21, 0x0a, 0x1d, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, - 0x4f, 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, 0x4c, 0x45, 0x54, 0x53, 0x5f, 0x52, 0x45, 0x41, 0x44, - 0x10, 0x06, 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, - 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, 0x4c, 0x45, 0x54, 0x53, 0x5f, 0x43, - 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x07, 0x12, 0x26, 0x0a, 0x22, 0x50, 0x45, 0x52, 0x4d, 0x49, - 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, 0x4c, - 0x45, 0x54, 0x53, 0x5f, 0x53, 0x55, 0x42, 0x53, 0x43, 0x52, 0x49, 0x42, 0x45, 0x10, 0x08, 0x12, - 0x23, 0x0a, 0x1f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, - 0x4f, 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, 0x4c, 0x45, 0x54, 0x53, 0x5f, 0x55, 0x50, 0x44, 0x41, - 0x54, 0x45, 0x10, 0x09, 0x12, 0x28, 0x0a, 0x24, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, - 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, - 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x10, 0x0a, 0x12, 0x2b, - 0x0a, 0x27, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, - 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, - 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x10, 0x0b, 0x12, 0x1f, 0x0a, 0x1b, 0x50, - 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, - 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, 0x0c, 0x12, 0x24, 0x0a, 0x20, - 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, - 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x4f, 0x52, - 0x10, 0x0d, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x42, 0x0a, 0x45, 0x6e, 0x75, 0x6d, 0x73, 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 ( - file_did_v1_enums_proto_rawDescOnce sync.Once - file_did_v1_enums_proto_rawDescData = file_did_v1_enums_proto_rawDesc -) - -func file_did_v1_enums_proto_rawDescGZIP() []byte { - file_did_v1_enums_proto_rawDescOnce.Do(func() { - file_did_v1_enums_proto_rawDescData = protoimpl.X.CompressGZIP(file_did_v1_enums_proto_rawDescData) - }) - return file_did_v1_enums_proto_rawDescData -} - -var file_did_v1_enums_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_did_v1_enums_proto_goTypes = []interface{}{ - (PermissionScope)(0), // 0: did.v1.PermissionScope -} -var file_did_v1_enums_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_did_v1_enums_proto_init() } -func file_did_v1_enums_proto_init() { - if File_did_v1_enums_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_did_v1_enums_proto_rawDesc, - NumEnums: 1, - NumMessages: 0, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_did_v1_enums_proto_goTypes, - DependencyIndexes: file_did_v1_enums_proto_depIdxs, - EnumInfos: file_did_v1_enums_proto_enumTypes, - }.Build() - File_did_v1_enums_proto = out.File - file_did_v1_enums_proto_rawDesc = nil - file_did_v1_enums_proto_goTypes = nil - file_did_v1_enums_proto_depIdxs = nil -} diff --git a/api/did/v1/genesis.pulsar.go b/api/did/v1/genesis.pulsar.go index 42017748b..c56d95123 100644 --- a/api/did/v1/genesis.pulsar.go +++ b/api/did/v1/genesis.pulsar.go @@ -3,6 +3,7 @@ package didv1 import ( _ "cosmossdk.io/api/amino" + binary "encoding/binary" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" @@ -10,6 +11,7 @@ import ( protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" + math "math" reflect "reflect" sync "sync" ) @@ -551,10 +553,62 @@ func (x *_Params_2_list) IsValid() bool { return x.list != nil } +var _ protoreflect.List = (*_Params_3_list)(nil) + +type _Params_3_list struct { + list *[]*KeyInfo +} + +func (x *_Params_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Params_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Params_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*KeyInfo) + (*x.list)[i] = concreteValue +} + +func (x *_Params_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*KeyInfo) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Params_3_list) AppendMutable() protoreflect.Value { + v := new(KeyInfo) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Params_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Params_3_list) NewElement() protoreflect.Value { + v := new(KeyInfo) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Params_3_list) IsValid() bool { + return x.list != nil +} + var ( - md_Params protoreflect.MessageDescriptor - fd_Params_whitelisted_assets protoreflect.FieldDescriptor - fd_Params_whitelisted_chains protoreflect.FieldDescriptor + md_Params protoreflect.MessageDescriptor + fd_Params_whitelisted_assets protoreflect.FieldDescriptor + fd_Params_whitelisted_chains protoreflect.FieldDescriptor + fd_Params_allowed_public_keys protoreflect.FieldDescriptor ) func init() { @@ -562,6 +616,7 @@ func init() { md_Params = File_did_v1_genesis_proto.Messages().ByName("Params") fd_Params_whitelisted_assets = md_Params.Fields().ByName("whitelisted_assets") fd_Params_whitelisted_chains = md_Params.Fields().ByName("whitelisted_chains") + fd_Params_allowed_public_keys = md_Params.Fields().ByName("allowed_public_keys") } var _ protoreflect.Message = (*fastReflection_Params)(nil) @@ -641,6 +696,12 @@ func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, proto return } } + if len(x.AllowedPublicKeys) != 0 { + value := protoreflect.ValueOfList(&_Params_3_list{list: &x.AllowedPublicKeys}) + if !f(fd_Params_allowed_public_keys, value) { + return + } + } } // Has reports whether a field is populated. @@ -660,6 +721,8 @@ func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { return len(x.WhitelistedAssets) != 0 case "did.v1.Params.whitelisted_chains": return len(x.WhitelistedChains) != 0 + case "did.v1.Params.allowed_public_keys": + return len(x.AllowedPublicKeys) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) @@ -680,6 +743,8 @@ func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { x.WhitelistedAssets = nil case "did.v1.Params.whitelisted_chains": x.WhitelistedChains = nil + case "did.v1.Params.allowed_public_keys": + x.AllowedPublicKeys = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) @@ -708,6 +773,12 @@ func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) pro } listValue := &_Params_2_list{list: &x.WhitelistedChains} return protoreflect.ValueOfList(listValue) + case "did.v1.Params.allowed_public_keys": + if len(x.AllowedPublicKeys) == 0 { + return protoreflect.ValueOfList(&_Params_3_list{}) + } + listValue := &_Params_3_list{list: &x.AllowedPublicKeys} + return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) @@ -736,6 +807,10 @@ func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value proto lv := value.List() clv := lv.(*_Params_2_list) x.WhitelistedChains = *clv.list + case "did.v1.Params.allowed_public_keys": + lv := value.List() + clv := lv.(*_Params_3_list) + x.AllowedPublicKeys = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) @@ -768,6 +843,12 @@ func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protore } value := &_Params_2_list{list: &x.WhitelistedChains} return protoreflect.ValueOfList(value) + case "did.v1.Params.allowed_public_keys": + if x.AllowedPublicKeys == nil { + x.AllowedPublicKeys = []*KeyInfo{} + } + value := &_Params_3_list{list: &x.AllowedPublicKeys} + return protoreflect.ValueOfList(value) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) @@ -787,6 +868,9 @@ func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protor case "did.v1.Params.whitelisted_chains": list := []*ChainInfo{} return protoreflect.ValueOfList(&_Params_2_list{list: &list}) + case "did.v1.Params.allowed_public_keys": + list := []*KeyInfo{} + return protoreflect.ValueOfList(&_Params_3_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) @@ -868,6 +952,12 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } + if len(x.AllowedPublicKeys) > 0 { + for _, e := range x.AllowedPublicKeys { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -897,6 +987,22 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.AllowedPublicKeys) > 0 { + for iNdEx := len(x.AllowedPublicKeys) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.AllowedPublicKeys[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + } if len(x.WhitelistedChains) > 0 { for iNdEx := len(x.WhitelistedChains) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.WhitelistedChains[iNdEx]) @@ -1046,6 +1152,4681 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AllowedPublicKeys", 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 + } + x.AllowedPublicKeys = append(x.AllowedPublicKeys, &KeyInfo{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AllowedPublicKeys[len(x.AllowedPublicKeys)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + 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_AssetInfo protoreflect.MessageDescriptor + fd_AssetInfo_id protoreflect.FieldDescriptor + fd_AssetInfo_denom protoreflect.FieldDescriptor + fd_AssetInfo_symbol protoreflect.FieldDescriptor + fd_AssetInfo_asset_type protoreflect.FieldDescriptor + fd_AssetInfo_origin_chain protoreflect.FieldDescriptor + fd_AssetInfo_origin_denom protoreflect.FieldDescriptor + fd_AssetInfo_decimals protoreflect.FieldDescriptor + fd_AssetInfo_description protoreflect.FieldDescriptor + fd_AssetInfo_image_url protoreflect.FieldDescriptor + fd_AssetInfo_coingecko_id protoreflect.FieldDescriptor + fd_AssetInfo_is_enabled protoreflect.FieldDescriptor + fd_AssetInfo_ibc_path protoreflect.FieldDescriptor + fd_AssetInfo_ibc_channel protoreflect.FieldDescriptor + fd_AssetInfo_ibc_port protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_genesis_proto_init() + md_AssetInfo = File_did_v1_genesis_proto.Messages().ByName("AssetInfo") + fd_AssetInfo_id = md_AssetInfo.Fields().ByName("id") + fd_AssetInfo_denom = md_AssetInfo.Fields().ByName("denom") + fd_AssetInfo_symbol = md_AssetInfo.Fields().ByName("symbol") + fd_AssetInfo_asset_type = md_AssetInfo.Fields().ByName("asset_type") + fd_AssetInfo_origin_chain = md_AssetInfo.Fields().ByName("origin_chain") + fd_AssetInfo_origin_denom = md_AssetInfo.Fields().ByName("origin_denom") + fd_AssetInfo_decimals = md_AssetInfo.Fields().ByName("decimals") + fd_AssetInfo_description = md_AssetInfo.Fields().ByName("description") + fd_AssetInfo_image_url = md_AssetInfo.Fields().ByName("image_url") + fd_AssetInfo_coingecko_id = md_AssetInfo.Fields().ByName("coingecko_id") + fd_AssetInfo_is_enabled = md_AssetInfo.Fields().ByName("is_enabled") + fd_AssetInfo_ibc_path = md_AssetInfo.Fields().ByName("ibc_path") + fd_AssetInfo_ibc_channel = md_AssetInfo.Fields().ByName("ibc_channel") + fd_AssetInfo_ibc_port = md_AssetInfo.Fields().ByName("ibc_port") +} + +var _ protoreflect.Message = (*fastReflection_AssetInfo)(nil) + +type fastReflection_AssetInfo AssetInfo + +func (x *AssetInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_AssetInfo)(x) +} + +func (x *AssetInfo) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_genesis_proto_msgTypes[2] + 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_AssetInfo_messageType fastReflection_AssetInfo_messageType +var _ protoreflect.MessageType = fastReflection_AssetInfo_messageType{} + +type fastReflection_AssetInfo_messageType struct{} + +func (x fastReflection_AssetInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_AssetInfo)(nil) +} +func (x fastReflection_AssetInfo_messageType) New() protoreflect.Message { + return new(fastReflection_AssetInfo) +} +func (x fastReflection_AssetInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AssetInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_AssetInfo) Descriptor() protoreflect.MessageDescriptor { + return md_AssetInfo +} + +// 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_AssetInfo) Type() protoreflect.MessageType { + return _fastReflection_AssetInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_AssetInfo) New() protoreflect.Message { + return new(fastReflection_AssetInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_AssetInfo) Interface() protoreflect.ProtoMessage { + return (*AssetInfo)(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_AssetInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != "" { + value := protoreflect.ValueOfString(x.Id) + if !f(fd_AssetInfo_id, value) { + return + } + } + if x.Denom != "" { + value := protoreflect.ValueOfString(x.Denom) + if !f(fd_AssetInfo_denom, value) { + return + } + } + if x.Symbol != "" { + value := protoreflect.ValueOfString(x.Symbol) + if !f(fd_AssetInfo_symbol, value) { + return + } + } + if x.AssetType != "" { + value := protoreflect.ValueOfString(x.AssetType) + if !f(fd_AssetInfo_asset_type, value) { + return + } + } + if x.OriginChain != "" { + value := protoreflect.ValueOfString(x.OriginChain) + if !f(fd_AssetInfo_origin_chain, value) { + return + } + } + if x.OriginDenom != "" { + value := protoreflect.ValueOfString(x.OriginDenom) + if !f(fd_AssetInfo_origin_denom, value) { + return + } + } + if x.Decimals != int32(0) { + value := protoreflect.ValueOfInt32(x.Decimals) + if !f(fd_AssetInfo_decimals, value) { + return + } + } + if x.Description != "" { + value := protoreflect.ValueOfString(x.Description) + if !f(fd_AssetInfo_description, value) { + return + } + } + if x.ImageUrl != "" { + value := protoreflect.ValueOfString(x.ImageUrl) + if !f(fd_AssetInfo_image_url, value) { + return + } + } + if x.CoingeckoId != "" { + value := protoreflect.ValueOfString(x.CoingeckoId) + if !f(fd_AssetInfo_coingecko_id, value) { + return + } + } + if x.IsEnabled != false { + value := protoreflect.ValueOfBool(x.IsEnabled) + if !f(fd_AssetInfo_is_enabled, value) { + return + } + } + if x.IbcPath != "" { + value := protoreflect.ValueOfString(x.IbcPath) + if !f(fd_AssetInfo_ibc_path, value) { + return + } + } + if x.IbcChannel != "" { + value := protoreflect.ValueOfString(x.IbcChannel) + if !f(fd_AssetInfo_ibc_channel, value) { + return + } + } + if x.IbcPort != "" { + value := protoreflect.ValueOfString(x.IbcPort) + if !f(fd_AssetInfo_ibc_port, 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_AssetInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.AssetInfo.id": + return x.Id != "" + case "did.v1.AssetInfo.denom": + return x.Denom != "" + case "did.v1.AssetInfo.symbol": + return x.Symbol != "" + case "did.v1.AssetInfo.asset_type": + return x.AssetType != "" + case "did.v1.AssetInfo.origin_chain": + return x.OriginChain != "" + case "did.v1.AssetInfo.origin_denom": + return x.OriginDenom != "" + case "did.v1.AssetInfo.decimals": + return x.Decimals != int32(0) + case "did.v1.AssetInfo.description": + return x.Description != "" + case "did.v1.AssetInfo.image_url": + return x.ImageUrl != "" + case "did.v1.AssetInfo.coingecko_id": + return x.CoingeckoId != "" + case "did.v1.AssetInfo.is_enabled": + return x.IsEnabled != false + case "did.v1.AssetInfo.ibc_path": + return x.IbcPath != "" + case "did.v1.AssetInfo.ibc_channel": + return x.IbcChannel != "" + case "did.v1.AssetInfo.ibc_port": + return x.IbcPort != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) + } + panic(fmt.Errorf("message did.v1.AssetInfo 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_AssetInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.AssetInfo.id": + x.Id = "" + case "did.v1.AssetInfo.denom": + x.Denom = "" + case "did.v1.AssetInfo.symbol": + x.Symbol = "" + case "did.v1.AssetInfo.asset_type": + x.AssetType = "" + case "did.v1.AssetInfo.origin_chain": + x.OriginChain = "" + case "did.v1.AssetInfo.origin_denom": + x.OriginDenom = "" + case "did.v1.AssetInfo.decimals": + x.Decimals = int32(0) + case "did.v1.AssetInfo.description": + x.Description = "" + case "did.v1.AssetInfo.image_url": + x.ImageUrl = "" + case "did.v1.AssetInfo.coingecko_id": + x.CoingeckoId = "" + case "did.v1.AssetInfo.is_enabled": + x.IsEnabled = false + case "did.v1.AssetInfo.ibc_path": + x.IbcPath = "" + case "did.v1.AssetInfo.ibc_channel": + x.IbcChannel = "" + case "did.v1.AssetInfo.ibc_port": + x.IbcPort = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) + } + panic(fmt.Errorf("message did.v1.AssetInfo 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_AssetInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.AssetInfo.id": + value := x.Id + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.denom": + value := x.Denom + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.symbol": + value := x.Symbol + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.asset_type": + value := x.AssetType + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.origin_chain": + value := x.OriginChain + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.origin_denom": + value := x.OriginDenom + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.decimals": + value := x.Decimals + return protoreflect.ValueOfInt32(value) + case "did.v1.AssetInfo.description": + value := x.Description + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.image_url": + value := x.ImageUrl + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.coingecko_id": + value := x.CoingeckoId + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.is_enabled": + value := x.IsEnabled + return protoreflect.ValueOfBool(value) + case "did.v1.AssetInfo.ibc_path": + value := x.IbcPath + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.ibc_channel": + value := x.IbcChannel + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.ibc_port": + value := x.IbcPort + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) + } + panic(fmt.Errorf("message did.v1.AssetInfo 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_AssetInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.AssetInfo.id": + x.Id = value.Interface().(string) + case "did.v1.AssetInfo.denom": + x.Denom = value.Interface().(string) + case "did.v1.AssetInfo.symbol": + x.Symbol = value.Interface().(string) + case "did.v1.AssetInfo.asset_type": + x.AssetType = value.Interface().(string) + case "did.v1.AssetInfo.origin_chain": + x.OriginChain = value.Interface().(string) + case "did.v1.AssetInfo.origin_denom": + x.OriginDenom = value.Interface().(string) + case "did.v1.AssetInfo.decimals": + x.Decimals = int32(value.Int()) + case "did.v1.AssetInfo.description": + x.Description = value.Interface().(string) + case "did.v1.AssetInfo.image_url": + x.ImageUrl = value.Interface().(string) + case "did.v1.AssetInfo.coingecko_id": + x.CoingeckoId = value.Interface().(string) + case "did.v1.AssetInfo.is_enabled": + x.IsEnabled = value.Bool() + case "did.v1.AssetInfo.ibc_path": + x.IbcPath = value.Interface().(string) + case "did.v1.AssetInfo.ibc_channel": + x.IbcChannel = value.Interface().(string) + case "did.v1.AssetInfo.ibc_port": + x.IbcPort = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) + } + panic(fmt.Errorf("message did.v1.AssetInfo 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_AssetInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.AssetInfo.id": + panic(fmt.Errorf("field id of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.denom": + panic(fmt.Errorf("field denom of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.symbol": + panic(fmt.Errorf("field symbol of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.asset_type": + panic(fmt.Errorf("field asset_type of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.origin_chain": + panic(fmt.Errorf("field origin_chain of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.origin_denom": + panic(fmt.Errorf("field origin_denom of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.decimals": + panic(fmt.Errorf("field decimals of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.description": + panic(fmt.Errorf("field description of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.image_url": + panic(fmt.Errorf("field image_url of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.coingecko_id": + panic(fmt.Errorf("field coingecko_id of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.is_enabled": + panic(fmt.Errorf("field is_enabled of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.ibc_path": + panic(fmt.Errorf("field ibc_path of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.ibc_channel": + panic(fmt.Errorf("field ibc_channel of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.ibc_port": + panic(fmt.Errorf("field ibc_port of message did.v1.AssetInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) + } + panic(fmt.Errorf("message did.v1.AssetInfo 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_AssetInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.AssetInfo.id": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.denom": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.symbol": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.asset_type": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.origin_chain": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.origin_denom": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.decimals": + return protoreflect.ValueOfInt32(int32(0)) + case "did.v1.AssetInfo.description": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.image_url": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.coingecko_id": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.is_enabled": + return protoreflect.ValueOfBool(false) + case "did.v1.AssetInfo.ibc_path": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.ibc_channel": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.ibc_port": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) + } + panic(fmt.Errorf("message did.v1.AssetInfo 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_AssetInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.AssetInfo", 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_AssetInfo) 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_AssetInfo) 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_AssetInfo) 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_AssetInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*AssetInfo) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Id) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Denom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Symbol) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.AssetType) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.OriginChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.OriginDenom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Decimals != 0 { + n += 1 + runtime.Sov(uint64(x.Decimals)) + } + l = len(x.Description) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ImageUrl) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.CoingeckoId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.IsEnabled { + n += 2 + } + l = len(x.IbcPath) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.IbcChannel) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.IbcPort) + 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().(*AssetInfo) + 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.IbcPort) > 0 { + i -= len(x.IbcPort) + copy(dAtA[i:], x.IbcPort) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.IbcPort))) + i-- + dAtA[i] = 0x72 + } + if len(x.IbcChannel) > 0 { + i -= len(x.IbcChannel) + copy(dAtA[i:], x.IbcChannel) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.IbcChannel))) + i-- + dAtA[i] = 0x6a + } + if len(x.IbcPath) > 0 { + i -= len(x.IbcPath) + copy(dAtA[i:], x.IbcPath) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.IbcPath))) + i-- + dAtA[i] = 0x62 + } + if x.IsEnabled { + i-- + if x.IsEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } + if len(x.CoingeckoId) > 0 { + i -= len(x.CoingeckoId) + copy(dAtA[i:], x.CoingeckoId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CoingeckoId))) + i-- + dAtA[i] = 0x52 + } + if len(x.ImageUrl) > 0 { + i -= len(x.ImageUrl) + copy(dAtA[i:], x.ImageUrl) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ImageUrl))) + i-- + dAtA[i] = 0x4a + } + if len(x.Description) > 0 { + i -= len(x.Description) + copy(dAtA[i:], x.Description) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) + i-- + dAtA[i] = 0x42 + } + if x.Decimals != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Decimals)) + i-- + dAtA[i] = 0x38 + } + if len(x.OriginDenom) > 0 { + i -= len(x.OriginDenom) + copy(dAtA[i:], x.OriginDenom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginDenom))) + i-- + dAtA[i] = 0x32 + } + if len(x.OriginChain) > 0 { + i -= len(x.OriginChain) + copy(dAtA[i:], x.OriginChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginChain))) + i-- + dAtA[i] = 0x2a + } + if len(x.AssetType) > 0 { + i -= len(x.AssetType) + copy(dAtA[i:], x.AssetType) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AssetType))) + i-- + dAtA[i] = 0x22 + } + if len(x.Symbol) > 0 { + i -= len(x.Symbol) + copy(dAtA[i:], x.Symbol) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Symbol))) + i-- + dAtA[i] = 0x1a + } + if len(x.Denom) > 0 { + i -= len(x.Denom) + copy(dAtA[i:], x.Denom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) + i-- + dAtA[i] = 0x12 + } + if len(x.Id) > 0 { + i -= len(x.Id) + copy(dAtA[i:], x.Id) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*AssetInfo) + 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: AssetInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AssetInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", 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.Denom = 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 Symbol", 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.Symbol = 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 AssetType", 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.AssetType = 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 OriginChain", 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.OriginChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OriginDenom", 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.OriginDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Decimals", wireType) + } + x.Decimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Decimals |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", 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.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ImageUrl", 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.ImageUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CoingeckoId", 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.CoingeckoId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IsEnabled", 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.IsEnabled = bool(v != 0) + case 12: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IbcPath", 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.IbcPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 13: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IbcChannel", 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.IbcChannel = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 14: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IbcPort", 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.IbcPort = 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 _ protoreflect.List = (*_ChainInfo_7_list)(nil) + +type _ChainInfo_7_list struct { + list *[]*ChainInfo_Endpoint +} + +func (x *_ChainInfo_7_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ChainInfo_7_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ChainInfo_7_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ChainInfo_Endpoint) + (*x.list)[i] = concreteValue +} + +func (x *_ChainInfo_7_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ChainInfo_Endpoint) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ChainInfo_7_list) AppendMutable() protoreflect.Value { + v := new(ChainInfo_Endpoint) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ChainInfo_7_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ChainInfo_7_list) NewElement() protoreflect.Value { + v := new(ChainInfo_Endpoint) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ChainInfo_7_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_ChainInfo_8_list)(nil) + +type _ChainInfo_8_list struct { + list *[]*ChainInfo_Endpoint +} + +func (x *_ChainInfo_8_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ChainInfo_8_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ChainInfo_8_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ChainInfo_Endpoint) + (*x.list)[i] = concreteValue +} + +func (x *_ChainInfo_8_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ChainInfo_Endpoint) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ChainInfo_8_list) AppendMutable() protoreflect.Value { + v := new(ChainInfo_Endpoint) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ChainInfo_8_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ChainInfo_8_list) NewElement() protoreflect.Value { + v := new(ChainInfo_Endpoint) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ChainInfo_8_list) IsValid() bool { + return x.list != nil +} + +var ( + md_ChainInfo protoreflect.MessageDescriptor + fd_ChainInfo_id protoreflect.FieldDescriptor + fd_ChainInfo_chain_id protoreflect.FieldDescriptor + fd_ChainInfo_name protoreflect.FieldDescriptor + fd_ChainInfo_symbol protoreflect.FieldDescriptor + fd_ChainInfo_bech32_prefix protoreflect.FieldDescriptor + fd_ChainInfo_genesis_time protoreflect.FieldDescriptor + fd_ChainInfo_grpc_endpoints protoreflect.FieldDescriptor + fd_ChainInfo_rest_endpoints protoreflect.FieldDescriptor + fd_ChainInfo_explorer protoreflect.FieldDescriptor + fd_ChainInfo_fee_info protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_genesis_proto_init() + md_ChainInfo = File_did_v1_genesis_proto.Messages().ByName("ChainInfo") + fd_ChainInfo_id = md_ChainInfo.Fields().ByName("id") + fd_ChainInfo_chain_id = md_ChainInfo.Fields().ByName("chain_id") + fd_ChainInfo_name = md_ChainInfo.Fields().ByName("name") + fd_ChainInfo_symbol = md_ChainInfo.Fields().ByName("symbol") + fd_ChainInfo_bech32_prefix = md_ChainInfo.Fields().ByName("bech32_prefix") + fd_ChainInfo_genesis_time = md_ChainInfo.Fields().ByName("genesis_time") + fd_ChainInfo_grpc_endpoints = md_ChainInfo.Fields().ByName("grpc_endpoints") + fd_ChainInfo_rest_endpoints = md_ChainInfo.Fields().ByName("rest_endpoints") + fd_ChainInfo_explorer = md_ChainInfo.Fields().ByName("explorer") + fd_ChainInfo_fee_info = md_ChainInfo.Fields().ByName("fee_info") +} + +var _ protoreflect.Message = (*fastReflection_ChainInfo)(nil) + +type fastReflection_ChainInfo ChainInfo + +func (x *ChainInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_ChainInfo)(x) +} + +func (x *ChainInfo) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_genesis_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_ChainInfo_messageType fastReflection_ChainInfo_messageType +var _ protoreflect.MessageType = fastReflection_ChainInfo_messageType{} + +type fastReflection_ChainInfo_messageType struct{} + +func (x fastReflection_ChainInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_ChainInfo)(nil) +} +func (x fastReflection_ChainInfo_messageType) New() protoreflect.Message { + return new(fastReflection_ChainInfo) +} +func (x fastReflection_ChainInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ChainInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ChainInfo) Descriptor() protoreflect.MessageDescriptor { + return md_ChainInfo +} + +// 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_ChainInfo) Type() protoreflect.MessageType { + return _fastReflection_ChainInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ChainInfo) New() protoreflect.Message { + return new(fastReflection_ChainInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ChainInfo) Interface() protoreflect.ProtoMessage { + return (*ChainInfo)(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_ChainInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != "" { + value := protoreflect.ValueOfString(x.Id) + if !f(fd_ChainInfo_id, value) { + return + } + } + if x.ChainId != "" { + value := protoreflect.ValueOfString(x.ChainId) + if !f(fd_ChainInfo_chain_id, value) { + return + } + } + if x.Name != "" { + value := protoreflect.ValueOfString(x.Name) + if !f(fd_ChainInfo_name, value) { + return + } + } + if x.Symbol != "" { + value := protoreflect.ValueOfString(x.Symbol) + if !f(fd_ChainInfo_symbol, value) { + return + } + } + if x.Bech32Prefix != "" { + value := protoreflect.ValueOfString(x.Bech32Prefix) + if !f(fd_ChainInfo_bech32_prefix, value) { + return + } + } + if x.GenesisTime != "" { + value := protoreflect.ValueOfString(x.GenesisTime) + if !f(fd_ChainInfo_genesis_time, value) { + return + } + } + if len(x.GrpcEndpoints) != 0 { + value := protoreflect.ValueOfList(&_ChainInfo_7_list{list: &x.GrpcEndpoints}) + if !f(fd_ChainInfo_grpc_endpoints, value) { + return + } + } + if len(x.RestEndpoints) != 0 { + value := protoreflect.ValueOfList(&_ChainInfo_8_list{list: &x.RestEndpoints}) + if !f(fd_ChainInfo_rest_endpoints, value) { + return + } + } + if x.Explorer != nil { + value := protoreflect.ValueOfMessage(x.Explorer.ProtoReflect()) + if !f(fd_ChainInfo_explorer, value) { + return + } + } + if x.FeeInfo != nil { + value := protoreflect.ValueOfMessage(x.FeeInfo.ProtoReflect()) + if !f(fd_ChainInfo_fee_info, 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_ChainInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.ChainInfo.id": + return x.Id != "" + case "did.v1.ChainInfo.chain_id": + return x.ChainId != "" + case "did.v1.ChainInfo.name": + return x.Name != "" + case "did.v1.ChainInfo.symbol": + return x.Symbol != "" + case "did.v1.ChainInfo.bech32_prefix": + return x.Bech32Prefix != "" + case "did.v1.ChainInfo.genesis_time": + return x.GenesisTime != "" + case "did.v1.ChainInfo.grpc_endpoints": + return len(x.GrpcEndpoints) != 0 + case "did.v1.ChainInfo.rest_endpoints": + return len(x.RestEndpoints) != 0 + case "did.v1.ChainInfo.explorer": + return x.Explorer != nil + case "did.v1.ChainInfo.fee_info": + return x.FeeInfo != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo 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_ChainInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.ChainInfo.id": + x.Id = "" + case "did.v1.ChainInfo.chain_id": + x.ChainId = "" + case "did.v1.ChainInfo.name": + x.Name = "" + case "did.v1.ChainInfo.symbol": + x.Symbol = "" + case "did.v1.ChainInfo.bech32_prefix": + x.Bech32Prefix = "" + case "did.v1.ChainInfo.genesis_time": + x.GenesisTime = "" + case "did.v1.ChainInfo.grpc_endpoints": + x.GrpcEndpoints = nil + case "did.v1.ChainInfo.rest_endpoints": + x.RestEndpoints = nil + case "did.v1.ChainInfo.explorer": + x.Explorer = nil + case "did.v1.ChainInfo.fee_info": + x.FeeInfo = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo 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_ChainInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.ChainInfo.id": + value := x.Id + return protoreflect.ValueOfString(value) + case "did.v1.ChainInfo.chain_id": + value := x.ChainId + return protoreflect.ValueOfString(value) + case "did.v1.ChainInfo.name": + value := x.Name + return protoreflect.ValueOfString(value) + case "did.v1.ChainInfo.symbol": + value := x.Symbol + return protoreflect.ValueOfString(value) + case "did.v1.ChainInfo.bech32_prefix": + value := x.Bech32Prefix + return protoreflect.ValueOfString(value) + case "did.v1.ChainInfo.genesis_time": + value := x.GenesisTime + return protoreflect.ValueOfString(value) + case "did.v1.ChainInfo.grpc_endpoints": + if len(x.GrpcEndpoints) == 0 { + return protoreflect.ValueOfList(&_ChainInfo_7_list{}) + } + listValue := &_ChainInfo_7_list{list: &x.GrpcEndpoints} + return protoreflect.ValueOfList(listValue) + case "did.v1.ChainInfo.rest_endpoints": + if len(x.RestEndpoints) == 0 { + return protoreflect.ValueOfList(&_ChainInfo_8_list{}) + } + listValue := &_ChainInfo_8_list{list: &x.RestEndpoints} + return protoreflect.ValueOfList(listValue) + case "did.v1.ChainInfo.explorer": + value := x.Explorer + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "did.v1.ChainInfo.fee_info": + value := x.FeeInfo + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo 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_ChainInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.ChainInfo.id": + x.Id = value.Interface().(string) + case "did.v1.ChainInfo.chain_id": + x.ChainId = value.Interface().(string) + case "did.v1.ChainInfo.name": + x.Name = value.Interface().(string) + case "did.v1.ChainInfo.symbol": + x.Symbol = value.Interface().(string) + case "did.v1.ChainInfo.bech32_prefix": + x.Bech32Prefix = value.Interface().(string) + case "did.v1.ChainInfo.genesis_time": + x.GenesisTime = value.Interface().(string) + case "did.v1.ChainInfo.grpc_endpoints": + lv := value.List() + clv := lv.(*_ChainInfo_7_list) + x.GrpcEndpoints = *clv.list + case "did.v1.ChainInfo.rest_endpoints": + lv := value.List() + clv := lv.(*_ChainInfo_8_list) + x.RestEndpoints = *clv.list + case "did.v1.ChainInfo.explorer": + x.Explorer = value.Message().Interface().(*ChainInfo_ExplorerInfo) + case "did.v1.ChainInfo.fee_info": + x.FeeInfo = value.Message().Interface().(*ChainInfo_FeeInfo) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo 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_ChainInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.ChainInfo.grpc_endpoints": + if x.GrpcEndpoints == nil { + x.GrpcEndpoints = []*ChainInfo_Endpoint{} + } + value := &_ChainInfo_7_list{list: &x.GrpcEndpoints} + return protoreflect.ValueOfList(value) + case "did.v1.ChainInfo.rest_endpoints": + if x.RestEndpoints == nil { + x.RestEndpoints = []*ChainInfo_Endpoint{} + } + value := &_ChainInfo_8_list{list: &x.RestEndpoints} + return protoreflect.ValueOfList(value) + case "did.v1.ChainInfo.explorer": + if x.Explorer == nil { + x.Explorer = new(ChainInfo_ExplorerInfo) + } + return protoreflect.ValueOfMessage(x.Explorer.ProtoReflect()) + case "did.v1.ChainInfo.fee_info": + if x.FeeInfo == nil { + x.FeeInfo = new(ChainInfo_FeeInfo) + } + return protoreflect.ValueOfMessage(x.FeeInfo.ProtoReflect()) + case "did.v1.ChainInfo.id": + panic(fmt.Errorf("field id of message did.v1.ChainInfo is not mutable")) + case "did.v1.ChainInfo.chain_id": + panic(fmt.Errorf("field chain_id of message did.v1.ChainInfo is not mutable")) + case "did.v1.ChainInfo.name": + panic(fmt.Errorf("field name of message did.v1.ChainInfo is not mutable")) + case "did.v1.ChainInfo.symbol": + panic(fmt.Errorf("field symbol of message did.v1.ChainInfo is not mutable")) + case "did.v1.ChainInfo.bech32_prefix": + panic(fmt.Errorf("field bech32_prefix of message did.v1.ChainInfo is not mutable")) + case "did.v1.ChainInfo.genesis_time": + panic(fmt.Errorf("field genesis_time of message did.v1.ChainInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo 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_ChainInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.ChainInfo.id": + return protoreflect.ValueOfString("") + case "did.v1.ChainInfo.chain_id": + return protoreflect.ValueOfString("") + case "did.v1.ChainInfo.name": + return protoreflect.ValueOfString("") + case "did.v1.ChainInfo.symbol": + return protoreflect.ValueOfString("") + case "did.v1.ChainInfo.bech32_prefix": + return protoreflect.ValueOfString("") + case "did.v1.ChainInfo.genesis_time": + return protoreflect.ValueOfString("") + case "did.v1.ChainInfo.grpc_endpoints": + list := []*ChainInfo_Endpoint{} + return protoreflect.ValueOfList(&_ChainInfo_7_list{list: &list}) + case "did.v1.ChainInfo.rest_endpoints": + list := []*ChainInfo_Endpoint{} + return protoreflect.ValueOfList(&_ChainInfo_8_list{list: &list}) + case "did.v1.ChainInfo.explorer": + m := new(ChainInfo_ExplorerInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "did.v1.ChainInfo.fee_info": + m := new(ChainInfo_FeeInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo 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_ChainInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.ChainInfo", 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_ChainInfo) 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_ChainInfo) 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_ChainInfo) 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_ChainInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ChainInfo) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Id) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ChainId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Name) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Symbol) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Bech32Prefix) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.GenesisTime) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.GrpcEndpoints) > 0 { + for _, e := range x.GrpcEndpoints { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.RestEndpoints) > 0 { + for _, e := range x.RestEndpoints { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Explorer != nil { + l = options.Size(x.Explorer) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.FeeInfo != nil { + l = options.Size(x.FeeInfo) + 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().(*ChainInfo) + 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.FeeInfo != nil { + encoded, err := options.Marshal(x.FeeInfo) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x52 + } + if x.Explorer != nil { + encoded, err := options.Marshal(x.Explorer) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x4a + } + if len(x.RestEndpoints) > 0 { + for iNdEx := len(x.RestEndpoints) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.RestEndpoints[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x42 + } + } + if len(x.GrpcEndpoints) > 0 { + for iNdEx := len(x.GrpcEndpoints) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.GrpcEndpoints[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x3a + } + } + if len(x.GenesisTime) > 0 { + i -= len(x.GenesisTime) + copy(dAtA[i:], x.GenesisTime) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GenesisTime))) + i-- + dAtA[i] = 0x32 + } + if len(x.Bech32Prefix) > 0 { + i -= len(x.Bech32Prefix) + copy(dAtA[i:], x.Bech32Prefix) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bech32Prefix))) + i-- + dAtA[i] = 0x2a + } + if len(x.Symbol) > 0 { + i -= len(x.Symbol) + copy(dAtA[i:], x.Symbol) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Symbol))) + i-- + dAtA[i] = 0x22 + } + if len(x.Name) > 0 { + i -= len(x.Name) + copy(dAtA[i:], x.Name) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) + i-- + dAtA[i] = 0x1a + } + if len(x.ChainId) > 0 { + i -= len(x.ChainId) + copy(dAtA[i:], x.ChainId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) + i-- + dAtA[i] = 0x12 + } + if len(x.Id) > 0 { + i -= len(x.Id) + copy(dAtA[i:], x.Id) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ChainInfo) + 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: ChainInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ChainInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", 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.ChainId = 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 Name", 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.Name = 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 Symbol", 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.Symbol = 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 Bech32Prefix", 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.Bech32Prefix = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GenesisTime", 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.GenesisTime = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GrpcEndpoints", 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 + } + x.GrpcEndpoints = append(x.GrpcEndpoints, &ChainInfo_Endpoint{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.GrpcEndpoints[len(x.GrpcEndpoints)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RestEndpoints", 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 + } + x.RestEndpoints = append(x.RestEndpoints, &ChainInfo_Endpoint{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RestEndpoints[len(x.RestEndpoints)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Explorer", 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.Explorer == nil { + x.Explorer = &ChainInfo_ExplorerInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Explorer); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeeInfo", 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.FeeInfo == nil { + x.FeeInfo = &ChainInfo_FeeInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.FeeInfo); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + 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_ChainInfo_Endpoint protoreflect.MessageDescriptor + fd_ChainInfo_Endpoint_url protoreflect.FieldDescriptor + fd_ChainInfo_Endpoint_is_primary protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_genesis_proto_init() + md_ChainInfo_Endpoint = File_did_v1_genesis_proto.Messages().ByName("ChainInfo").Messages().ByName("Endpoint") + fd_ChainInfo_Endpoint_url = md_ChainInfo_Endpoint.Fields().ByName("url") + fd_ChainInfo_Endpoint_is_primary = md_ChainInfo_Endpoint.Fields().ByName("is_primary") +} + +var _ protoreflect.Message = (*fastReflection_ChainInfo_Endpoint)(nil) + +type fastReflection_ChainInfo_Endpoint ChainInfo_Endpoint + +func (x *ChainInfo_Endpoint) ProtoReflect() protoreflect.Message { + return (*fastReflection_ChainInfo_Endpoint)(x) +} + +func (x *ChainInfo_Endpoint) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_genesis_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_ChainInfo_Endpoint_messageType fastReflection_ChainInfo_Endpoint_messageType +var _ protoreflect.MessageType = fastReflection_ChainInfo_Endpoint_messageType{} + +type fastReflection_ChainInfo_Endpoint_messageType struct{} + +func (x fastReflection_ChainInfo_Endpoint_messageType) Zero() protoreflect.Message { + return (*fastReflection_ChainInfo_Endpoint)(nil) +} +func (x fastReflection_ChainInfo_Endpoint_messageType) New() protoreflect.Message { + return new(fastReflection_ChainInfo_Endpoint) +} +func (x fastReflection_ChainInfo_Endpoint_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ChainInfo_Endpoint +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ChainInfo_Endpoint) Descriptor() protoreflect.MessageDescriptor { + return md_ChainInfo_Endpoint +} + +// 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_ChainInfo_Endpoint) Type() protoreflect.MessageType { + return _fastReflection_ChainInfo_Endpoint_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ChainInfo_Endpoint) New() protoreflect.Message { + return new(fastReflection_ChainInfo_Endpoint) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ChainInfo_Endpoint) Interface() protoreflect.ProtoMessage { + return (*ChainInfo_Endpoint)(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_ChainInfo_Endpoint) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Url != "" { + value := protoreflect.ValueOfString(x.Url) + if !f(fd_ChainInfo_Endpoint_url, value) { + return + } + } + if x.IsPrimary != false { + value := protoreflect.ValueOfBool(x.IsPrimary) + if !f(fd_ChainInfo_Endpoint_is_primary, 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_ChainInfo_Endpoint) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.ChainInfo.Endpoint.url": + return x.Url != "" + case "did.v1.ChainInfo.Endpoint.is_primary": + return x.IsPrimary != false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.Endpoint")) + } + panic(fmt.Errorf("message did.v1.ChainInfo.Endpoint 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_ChainInfo_Endpoint) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.ChainInfo.Endpoint.url": + x.Url = "" + case "did.v1.ChainInfo.Endpoint.is_primary": + x.IsPrimary = false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.Endpoint")) + } + panic(fmt.Errorf("message did.v1.ChainInfo.Endpoint 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_ChainInfo_Endpoint) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.ChainInfo.Endpoint.url": + value := x.Url + return protoreflect.ValueOfString(value) + case "did.v1.ChainInfo.Endpoint.is_primary": + value := x.IsPrimary + return protoreflect.ValueOfBool(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.Endpoint")) + } + panic(fmt.Errorf("message did.v1.ChainInfo.Endpoint 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_ChainInfo_Endpoint) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.ChainInfo.Endpoint.url": + x.Url = value.Interface().(string) + case "did.v1.ChainInfo.Endpoint.is_primary": + x.IsPrimary = value.Bool() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.Endpoint")) + } + panic(fmt.Errorf("message did.v1.ChainInfo.Endpoint 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_ChainInfo_Endpoint) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.ChainInfo.Endpoint.url": + panic(fmt.Errorf("field url of message did.v1.ChainInfo.Endpoint is not mutable")) + case "did.v1.ChainInfo.Endpoint.is_primary": + panic(fmt.Errorf("field is_primary of message did.v1.ChainInfo.Endpoint is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.Endpoint")) + } + panic(fmt.Errorf("message did.v1.ChainInfo.Endpoint 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_ChainInfo_Endpoint) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.ChainInfo.Endpoint.url": + return protoreflect.ValueOfString("") + case "did.v1.ChainInfo.Endpoint.is_primary": + return protoreflect.ValueOfBool(false) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.Endpoint")) + } + panic(fmt.Errorf("message did.v1.ChainInfo.Endpoint 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_ChainInfo_Endpoint) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.ChainInfo.Endpoint", 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_ChainInfo_Endpoint) 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_ChainInfo_Endpoint) 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_ChainInfo_Endpoint) 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_ChainInfo_Endpoint) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ChainInfo_Endpoint) + 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.Url) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.IsPrimary { + 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().(*ChainInfo_Endpoint) + 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.IsPrimary { + i-- + if x.IsPrimary { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(x.Url) > 0 { + i -= len(x.Url) + copy(dAtA[i:], x.Url) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Url))) + 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().(*ChainInfo_Endpoint) + 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: ChainInfo_Endpoint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ChainInfo_Endpoint: 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 Url", 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.Url = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IsPrimary", 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.IsPrimary = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_ChainInfo_ExplorerInfo protoreflect.MessageDescriptor + fd_ChainInfo_ExplorerInfo_name protoreflect.FieldDescriptor + fd_ChainInfo_ExplorerInfo_url protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_genesis_proto_init() + md_ChainInfo_ExplorerInfo = File_did_v1_genesis_proto.Messages().ByName("ChainInfo").Messages().ByName("ExplorerInfo") + fd_ChainInfo_ExplorerInfo_name = md_ChainInfo_ExplorerInfo.Fields().ByName("name") + fd_ChainInfo_ExplorerInfo_url = md_ChainInfo_ExplorerInfo.Fields().ByName("url") +} + +var _ protoreflect.Message = (*fastReflection_ChainInfo_ExplorerInfo)(nil) + +type fastReflection_ChainInfo_ExplorerInfo ChainInfo_ExplorerInfo + +func (x *ChainInfo_ExplorerInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_ChainInfo_ExplorerInfo)(x) +} + +func (x *ChainInfo_ExplorerInfo) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_genesis_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_ChainInfo_ExplorerInfo_messageType fastReflection_ChainInfo_ExplorerInfo_messageType +var _ protoreflect.MessageType = fastReflection_ChainInfo_ExplorerInfo_messageType{} + +type fastReflection_ChainInfo_ExplorerInfo_messageType struct{} + +func (x fastReflection_ChainInfo_ExplorerInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_ChainInfo_ExplorerInfo)(nil) +} +func (x fastReflection_ChainInfo_ExplorerInfo_messageType) New() protoreflect.Message { + return new(fastReflection_ChainInfo_ExplorerInfo) +} +func (x fastReflection_ChainInfo_ExplorerInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ChainInfo_ExplorerInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ChainInfo_ExplorerInfo) Descriptor() protoreflect.MessageDescriptor { + return md_ChainInfo_ExplorerInfo +} + +// 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_ChainInfo_ExplorerInfo) Type() protoreflect.MessageType { + return _fastReflection_ChainInfo_ExplorerInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ChainInfo_ExplorerInfo) New() protoreflect.Message { + return new(fastReflection_ChainInfo_ExplorerInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ChainInfo_ExplorerInfo) Interface() protoreflect.ProtoMessage { + return (*ChainInfo_ExplorerInfo)(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_ChainInfo_ExplorerInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Name != "" { + value := protoreflect.ValueOfString(x.Name) + if !f(fd_ChainInfo_ExplorerInfo_name, value) { + return + } + } + if x.Url != "" { + value := protoreflect.ValueOfString(x.Url) + if !f(fd_ChainInfo_ExplorerInfo_url, 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_ChainInfo_ExplorerInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.ChainInfo.ExplorerInfo.name": + return x.Name != "" + case "did.v1.ChainInfo.ExplorerInfo.url": + return x.Url != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.ExplorerInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo.ExplorerInfo 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_ChainInfo_ExplorerInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.ChainInfo.ExplorerInfo.name": + x.Name = "" + case "did.v1.ChainInfo.ExplorerInfo.url": + x.Url = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.ExplorerInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo.ExplorerInfo 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_ChainInfo_ExplorerInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.ChainInfo.ExplorerInfo.name": + value := x.Name + return protoreflect.ValueOfString(value) + case "did.v1.ChainInfo.ExplorerInfo.url": + value := x.Url + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.ExplorerInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo.ExplorerInfo 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_ChainInfo_ExplorerInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.ChainInfo.ExplorerInfo.name": + x.Name = value.Interface().(string) + case "did.v1.ChainInfo.ExplorerInfo.url": + x.Url = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.ExplorerInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo.ExplorerInfo 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_ChainInfo_ExplorerInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.ChainInfo.ExplorerInfo.name": + panic(fmt.Errorf("field name of message did.v1.ChainInfo.ExplorerInfo is not mutable")) + case "did.v1.ChainInfo.ExplorerInfo.url": + panic(fmt.Errorf("field url of message did.v1.ChainInfo.ExplorerInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.ExplorerInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo.ExplorerInfo 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_ChainInfo_ExplorerInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.ChainInfo.ExplorerInfo.name": + return protoreflect.ValueOfString("") + case "did.v1.ChainInfo.ExplorerInfo.url": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.ExplorerInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo.ExplorerInfo 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_ChainInfo_ExplorerInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.ChainInfo.ExplorerInfo", 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_ChainInfo_ExplorerInfo) 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_ChainInfo_ExplorerInfo) 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_ChainInfo_ExplorerInfo) 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_ChainInfo_ExplorerInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ChainInfo_ExplorerInfo) + 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.Name) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Url) + 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().(*ChainInfo_ExplorerInfo) + 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.Url) > 0 { + i -= len(x.Url) + copy(dAtA[i:], x.Url) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Url))) + i-- + dAtA[i] = 0x12 + } + if len(x.Name) > 0 { + i -= len(x.Name) + copy(dAtA[i:], x.Name) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) + 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().(*ChainInfo_ExplorerInfo) + 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: ChainInfo_ExplorerInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ChainInfo_ExplorerInfo: 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 Name", 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.Name = 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 Url", 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.Url = 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 _ protoreflect.List = (*_ChainInfo_FeeInfo_2_list)(nil) + +type _ChainInfo_FeeInfo_2_list struct { + list *[]string +} + +func (x *_ChainInfo_FeeInfo_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ChainInfo_FeeInfo_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_ChainInfo_FeeInfo_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_ChainInfo_FeeInfo_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_ChainInfo_FeeInfo_2_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message ChainInfo_FeeInfo at list field FeeRates as it is not of Message kind")) +} + +func (x *_ChainInfo_FeeInfo_2_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_ChainInfo_FeeInfo_2_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_ChainInfo_FeeInfo_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_ChainInfo_FeeInfo protoreflect.MessageDescriptor + fd_ChainInfo_FeeInfo_base_denom protoreflect.FieldDescriptor + fd_ChainInfo_FeeInfo_fee_rates protoreflect.FieldDescriptor + fd_ChainInfo_FeeInfo_init_gas_limit protoreflect.FieldDescriptor + fd_ChainInfo_FeeInfo_is_simulable protoreflect.FieldDescriptor + fd_ChainInfo_FeeInfo_gas_multiply protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_genesis_proto_init() + md_ChainInfo_FeeInfo = File_did_v1_genesis_proto.Messages().ByName("ChainInfo").Messages().ByName("FeeInfo") + fd_ChainInfo_FeeInfo_base_denom = md_ChainInfo_FeeInfo.Fields().ByName("base_denom") + fd_ChainInfo_FeeInfo_fee_rates = md_ChainInfo_FeeInfo.Fields().ByName("fee_rates") + fd_ChainInfo_FeeInfo_init_gas_limit = md_ChainInfo_FeeInfo.Fields().ByName("init_gas_limit") + fd_ChainInfo_FeeInfo_is_simulable = md_ChainInfo_FeeInfo.Fields().ByName("is_simulable") + fd_ChainInfo_FeeInfo_gas_multiply = md_ChainInfo_FeeInfo.Fields().ByName("gas_multiply") +} + +var _ protoreflect.Message = (*fastReflection_ChainInfo_FeeInfo)(nil) + +type fastReflection_ChainInfo_FeeInfo ChainInfo_FeeInfo + +func (x *ChainInfo_FeeInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_ChainInfo_FeeInfo)(x) +} + +func (x *ChainInfo_FeeInfo) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_genesis_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_ChainInfo_FeeInfo_messageType fastReflection_ChainInfo_FeeInfo_messageType +var _ protoreflect.MessageType = fastReflection_ChainInfo_FeeInfo_messageType{} + +type fastReflection_ChainInfo_FeeInfo_messageType struct{} + +func (x fastReflection_ChainInfo_FeeInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_ChainInfo_FeeInfo)(nil) +} +func (x fastReflection_ChainInfo_FeeInfo_messageType) New() protoreflect.Message { + return new(fastReflection_ChainInfo_FeeInfo) +} +func (x fastReflection_ChainInfo_FeeInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ChainInfo_FeeInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ChainInfo_FeeInfo) Descriptor() protoreflect.MessageDescriptor { + return md_ChainInfo_FeeInfo +} + +// 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_ChainInfo_FeeInfo) Type() protoreflect.MessageType { + return _fastReflection_ChainInfo_FeeInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ChainInfo_FeeInfo) New() protoreflect.Message { + return new(fastReflection_ChainInfo_FeeInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ChainInfo_FeeInfo) Interface() protoreflect.ProtoMessage { + return (*ChainInfo_FeeInfo)(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_ChainInfo_FeeInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.BaseDenom != "" { + value := protoreflect.ValueOfString(x.BaseDenom) + if !f(fd_ChainInfo_FeeInfo_base_denom, value) { + return + } + } + if len(x.FeeRates) != 0 { + value := protoreflect.ValueOfList(&_ChainInfo_FeeInfo_2_list{list: &x.FeeRates}) + if !f(fd_ChainInfo_FeeInfo_fee_rates, value) { + return + } + } + if x.InitGasLimit != int32(0) { + value := protoreflect.ValueOfInt32(x.InitGasLimit) + if !f(fd_ChainInfo_FeeInfo_init_gas_limit, value) { + return + } + } + if x.IsSimulable != false { + value := protoreflect.ValueOfBool(x.IsSimulable) + if !f(fd_ChainInfo_FeeInfo_is_simulable, value) { + return + } + } + if x.GasMultiply != float64(0) || math.Signbit(x.GasMultiply) { + value := protoreflect.ValueOfFloat64(x.GasMultiply) + if !f(fd_ChainInfo_FeeInfo_gas_multiply, 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_ChainInfo_FeeInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.ChainInfo.FeeInfo.base_denom": + return x.BaseDenom != "" + case "did.v1.ChainInfo.FeeInfo.fee_rates": + return len(x.FeeRates) != 0 + case "did.v1.ChainInfo.FeeInfo.init_gas_limit": + return x.InitGasLimit != int32(0) + case "did.v1.ChainInfo.FeeInfo.is_simulable": + return x.IsSimulable != false + case "did.v1.ChainInfo.FeeInfo.gas_multiply": + return x.GasMultiply != float64(0) || math.Signbit(x.GasMultiply) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.FeeInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo.FeeInfo 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_ChainInfo_FeeInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.ChainInfo.FeeInfo.base_denom": + x.BaseDenom = "" + case "did.v1.ChainInfo.FeeInfo.fee_rates": + x.FeeRates = nil + case "did.v1.ChainInfo.FeeInfo.init_gas_limit": + x.InitGasLimit = int32(0) + case "did.v1.ChainInfo.FeeInfo.is_simulable": + x.IsSimulable = false + case "did.v1.ChainInfo.FeeInfo.gas_multiply": + x.GasMultiply = float64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.FeeInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo.FeeInfo 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_ChainInfo_FeeInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.ChainInfo.FeeInfo.base_denom": + value := x.BaseDenom + return protoreflect.ValueOfString(value) + case "did.v1.ChainInfo.FeeInfo.fee_rates": + if len(x.FeeRates) == 0 { + return protoreflect.ValueOfList(&_ChainInfo_FeeInfo_2_list{}) + } + listValue := &_ChainInfo_FeeInfo_2_list{list: &x.FeeRates} + return protoreflect.ValueOfList(listValue) + case "did.v1.ChainInfo.FeeInfo.init_gas_limit": + value := x.InitGasLimit + return protoreflect.ValueOfInt32(value) + case "did.v1.ChainInfo.FeeInfo.is_simulable": + value := x.IsSimulable + return protoreflect.ValueOfBool(value) + case "did.v1.ChainInfo.FeeInfo.gas_multiply": + value := x.GasMultiply + return protoreflect.ValueOfFloat64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.FeeInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo.FeeInfo 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_ChainInfo_FeeInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.ChainInfo.FeeInfo.base_denom": + x.BaseDenom = value.Interface().(string) + case "did.v1.ChainInfo.FeeInfo.fee_rates": + lv := value.List() + clv := lv.(*_ChainInfo_FeeInfo_2_list) + x.FeeRates = *clv.list + case "did.v1.ChainInfo.FeeInfo.init_gas_limit": + x.InitGasLimit = int32(value.Int()) + case "did.v1.ChainInfo.FeeInfo.is_simulable": + x.IsSimulable = value.Bool() + case "did.v1.ChainInfo.FeeInfo.gas_multiply": + x.GasMultiply = value.Float() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.FeeInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo.FeeInfo 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_ChainInfo_FeeInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.ChainInfo.FeeInfo.fee_rates": + if x.FeeRates == nil { + x.FeeRates = []string{} + } + value := &_ChainInfo_FeeInfo_2_list{list: &x.FeeRates} + return protoreflect.ValueOfList(value) + case "did.v1.ChainInfo.FeeInfo.base_denom": + panic(fmt.Errorf("field base_denom of message did.v1.ChainInfo.FeeInfo is not mutable")) + case "did.v1.ChainInfo.FeeInfo.init_gas_limit": + panic(fmt.Errorf("field init_gas_limit of message did.v1.ChainInfo.FeeInfo is not mutable")) + case "did.v1.ChainInfo.FeeInfo.is_simulable": + panic(fmt.Errorf("field is_simulable of message did.v1.ChainInfo.FeeInfo is not mutable")) + case "did.v1.ChainInfo.FeeInfo.gas_multiply": + panic(fmt.Errorf("field gas_multiply of message did.v1.ChainInfo.FeeInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.FeeInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo.FeeInfo 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_ChainInfo_FeeInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.ChainInfo.FeeInfo.base_denom": + return protoreflect.ValueOfString("") + case "did.v1.ChainInfo.FeeInfo.fee_rates": + list := []string{} + return protoreflect.ValueOfList(&_ChainInfo_FeeInfo_2_list{list: &list}) + case "did.v1.ChainInfo.FeeInfo.init_gas_limit": + return protoreflect.ValueOfInt32(int32(0)) + case "did.v1.ChainInfo.FeeInfo.is_simulable": + return protoreflect.ValueOfBool(false) + case "did.v1.ChainInfo.FeeInfo.gas_multiply": + return protoreflect.ValueOfFloat64(float64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.FeeInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo.FeeInfo 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_ChainInfo_FeeInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.ChainInfo.FeeInfo", 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_ChainInfo_FeeInfo) 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_ChainInfo_FeeInfo) 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_ChainInfo_FeeInfo) 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_ChainInfo_FeeInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ChainInfo_FeeInfo) + 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.BaseDenom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.FeeRates) > 0 { + for _, s := range x.FeeRates { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.InitGasLimit != 0 { + n += 1 + runtime.Sov(uint64(x.InitGasLimit)) + } + if x.IsSimulable { + n += 2 + } + if x.GasMultiply != 0 || math.Signbit(x.GasMultiply) { + n += 9 + } + 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().(*ChainInfo_FeeInfo) + 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.GasMultiply != 0 || math.Signbit(x.GasMultiply) { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(x.GasMultiply)))) + i-- + dAtA[i] = 0x29 + } + if x.IsSimulable { + i-- + if x.IsSimulable { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if x.InitGasLimit != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.InitGasLimit)) + i-- + dAtA[i] = 0x18 + } + if len(x.FeeRates) > 0 { + for iNdEx := len(x.FeeRates) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.FeeRates[iNdEx]) + copy(dAtA[i:], x.FeeRates[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FeeRates[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.BaseDenom) > 0 { + i -= len(x.BaseDenom) + copy(dAtA[i:], x.BaseDenom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BaseDenom))) + 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().(*ChainInfo_FeeInfo) + 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: ChainInfo_FeeInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ChainInfo_FeeInfo: 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 BaseDenom", 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.BaseDenom = 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 FeeRates", 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.FeeRates = append(x.FeeRates, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InitGasLimit", wireType) + } + x.InitGasLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.InitGasLimit |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IsSimulable", 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.IsSimulable = bool(v != 0) + case 5: + if wireType != 1 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GasMultiply", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + x.GasMultiply = float64(math.Float64frombits(v)) + 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_KeyInfo protoreflect.MessageDescriptor + fd_KeyInfo_kind protoreflect.FieldDescriptor + fd_KeyInfo_algorithm protoreflect.FieldDescriptor + fd_KeyInfo_curve protoreflect.FieldDescriptor + fd_KeyInfo_encoding protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_genesis_proto_init() + md_KeyInfo = File_did_v1_genesis_proto.Messages().ByName("KeyInfo") + fd_KeyInfo_kind = md_KeyInfo.Fields().ByName("kind") + fd_KeyInfo_algorithm = md_KeyInfo.Fields().ByName("algorithm") + fd_KeyInfo_curve = md_KeyInfo.Fields().ByName("curve") + fd_KeyInfo_encoding = md_KeyInfo.Fields().ByName("encoding") +} + +var _ protoreflect.Message = (*fastReflection_KeyInfo)(nil) + +type fastReflection_KeyInfo KeyInfo + +func (x *KeyInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_KeyInfo)(x) +} + +func (x *KeyInfo) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_genesis_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_KeyInfo_messageType fastReflection_KeyInfo_messageType +var _ protoreflect.MessageType = fastReflection_KeyInfo_messageType{} + +type fastReflection_KeyInfo_messageType struct{} + +func (x fastReflection_KeyInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_KeyInfo)(nil) +} +func (x fastReflection_KeyInfo_messageType) New() protoreflect.Message { + return new(fastReflection_KeyInfo) +} +func (x fastReflection_KeyInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_KeyInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_KeyInfo) Descriptor() protoreflect.MessageDescriptor { + return md_KeyInfo +} + +// 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_KeyInfo) Type() protoreflect.MessageType { + return _fastReflection_KeyInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_KeyInfo) New() protoreflect.Message { + return new(fastReflection_KeyInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_KeyInfo) Interface() protoreflect.ProtoMessage { + return (*KeyInfo)(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_KeyInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Kind != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Kind)) + if !f(fd_KeyInfo_kind, value) { + return + } + } + if x.Algorithm != "" { + value := protoreflect.ValueOfString(x.Algorithm) + if !f(fd_KeyInfo_algorithm, value) { + return + } + } + if x.Curve != "" { + value := protoreflect.ValueOfString(x.Curve) + if !f(fd_KeyInfo_curve, value) { + return + } + } + if x.Encoding != "" { + value := protoreflect.ValueOfString(x.Encoding) + if !f(fd_KeyInfo_encoding, 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_KeyInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.KeyInfo.kind": + return x.Kind != 0 + case "did.v1.KeyInfo.algorithm": + return x.Algorithm != "" + case "did.v1.KeyInfo.curve": + return x.Curve != "" + case "did.v1.KeyInfo.encoding": + return x.Encoding != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) + } + panic(fmt.Errorf("message did.v1.KeyInfo 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_KeyInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.KeyInfo.kind": + x.Kind = 0 + case "did.v1.KeyInfo.algorithm": + x.Algorithm = "" + case "did.v1.KeyInfo.curve": + x.Curve = "" + case "did.v1.KeyInfo.encoding": + x.Encoding = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) + } + panic(fmt.Errorf("message did.v1.KeyInfo 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_KeyInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.KeyInfo.kind": + value := x.Kind + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "did.v1.KeyInfo.algorithm": + value := x.Algorithm + return protoreflect.ValueOfString(value) + case "did.v1.KeyInfo.curve": + value := x.Curve + return protoreflect.ValueOfString(value) + case "did.v1.KeyInfo.encoding": + value := x.Encoding + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) + } + panic(fmt.Errorf("message did.v1.KeyInfo 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_KeyInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.KeyInfo.kind": + x.Kind = (KeyType)(value.Enum()) + case "did.v1.KeyInfo.algorithm": + x.Algorithm = value.Interface().(string) + case "did.v1.KeyInfo.curve": + x.Curve = value.Interface().(string) + case "did.v1.KeyInfo.encoding": + x.Encoding = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) + } + panic(fmt.Errorf("message did.v1.KeyInfo 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_KeyInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.KeyInfo.kind": + panic(fmt.Errorf("field kind of message did.v1.KeyInfo is not mutable")) + case "did.v1.KeyInfo.algorithm": + panic(fmt.Errorf("field algorithm of message did.v1.KeyInfo is not mutable")) + case "did.v1.KeyInfo.curve": + panic(fmt.Errorf("field curve of message did.v1.KeyInfo is not mutable")) + case "did.v1.KeyInfo.encoding": + panic(fmt.Errorf("field encoding of message did.v1.KeyInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) + } + panic(fmt.Errorf("message did.v1.KeyInfo 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_KeyInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.KeyInfo.kind": + return protoreflect.ValueOfEnum(0) + case "did.v1.KeyInfo.algorithm": + return protoreflect.ValueOfString("") + case "did.v1.KeyInfo.curve": + return protoreflect.ValueOfString("") + case "did.v1.KeyInfo.encoding": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) + } + panic(fmt.Errorf("message did.v1.KeyInfo 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_KeyInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.KeyInfo", 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_KeyInfo) 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_KeyInfo) 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_KeyInfo) 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_KeyInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*KeyInfo) + 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.Kind != 0 { + n += 1 + runtime.Sov(uint64(x.Kind)) + } + l = len(x.Algorithm) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Curve) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Encoding) + 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().(*KeyInfo) + 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.Encoding) > 0 { + i -= len(x.Encoding) + copy(dAtA[i:], x.Encoding) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Encoding))) + i-- + dAtA[i] = 0x22 + } + if len(x.Curve) > 0 { + i -= len(x.Curve) + copy(dAtA[i:], x.Curve) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Curve))) + i-- + dAtA[i] = 0x1a + } + if len(x.Algorithm) > 0 { + i -= len(x.Algorithm) + copy(dAtA[i:], x.Algorithm) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Algorithm))) + i-- + dAtA[i] = 0x12 + } + if x.Kind != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Kind)) + 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().(*KeyInfo) + 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: KeyInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: KeyInfo: 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 Kind", wireType) + } + x.Kind = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Kind |= KeyType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Algorithm", 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.Algorithm = 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 Curve", 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.Curve = 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 Encoding", 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.Encoding = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1094,6 +5875,218 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// DIDNamespace define the different namespaces of DID +type DIDNamespace int32 + +const ( + DIDNamespace_DID_NAMESPACE_UNSPECIFIED DIDNamespace = 0 + DIDNamespace_DID_NAMESPACE_IPFS DIDNamespace = 1 + DIDNamespace_DID_NAMESPACE_SONR DIDNamespace = 2 + DIDNamespace_DID_NAMESPACE_BITCOIN DIDNamespace = 3 + DIDNamespace_DID_NAMESPACE_ETHEREUM DIDNamespace = 4 + DIDNamespace_DID_NAMESPACE_IBC DIDNamespace = 5 +) + +// Enum value maps for DIDNamespace. +var ( + DIDNamespace_name = map[int32]string{ + 0: "DID_NAMESPACE_UNSPECIFIED", + 1: "DID_NAMESPACE_IPFS", + 2: "DID_NAMESPACE_SONR", + 3: "DID_NAMESPACE_BITCOIN", + 4: "DID_NAMESPACE_ETHEREUM", + 5: "DID_NAMESPACE_IBC", + } + DIDNamespace_value = map[string]int32{ + "DID_NAMESPACE_UNSPECIFIED": 0, + "DID_NAMESPACE_IPFS": 1, + "DID_NAMESPACE_SONR": 2, + "DID_NAMESPACE_BITCOIN": 3, + "DID_NAMESPACE_ETHEREUM": 4, + "DID_NAMESPACE_IBC": 5, + } +) + +func (x DIDNamespace) Enum() *DIDNamespace { + p := new(DIDNamespace) + *p = x + return p +} + +func (x DIDNamespace) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DIDNamespace) Descriptor() protoreflect.EnumDescriptor { + return file_did_v1_genesis_proto_enumTypes[0].Descriptor() +} + +func (DIDNamespace) Type() protoreflect.EnumType { + return &file_did_v1_genesis_proto_enumTypes[0] +} + +func (x DIDNamespace) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DIDNamespace.Descriptor instead. +func (DIDNamespace) EnumDescriptor() ([]byte, []int) { + return file_did_v1_genesis_proto_rawDescGZIP(), []int{0} +} + +// KeyKTind defines the kind of key +type KeyType int32 + +const ( + KeyType_KEY_TYPE_UNSPECIFIED KeyType = 0 + // Blockchain key types + KeyType_KEY_TYPE_SECP256K1 KeyType = 1 // cross-chain + KeyType_KEY_TYPE_ED25519 KeyType = 2 // validators + KeyType_KEY_TYPE_KECCAK KeyType = 3 // ethereum addresses + KeyType_KEY_TYPE_BLS12381 KeyType = 4 // zero-knowledge + KeyType_KEY_TYPE_X25519 KeyType = 5 // multisig + KeyType_KEY_TYPE_SCHNORR KeyType = 6 // mpc + // Webauthn and FIDO key types + KeyType_KEY_TYPE_WEBAUTHN KeyType = 7 // passkey authentication + KeyType_KEY_TYPE_FIDO KeyType = 8 // fido2 authentication +) + +// Enum value maps for KeyType. +var ( + KeyType_name = map[int32]string{ + 0: "KEY_TYPE_UNSPECIFIED", + 1: "KEY_TYPE_SECP256K1", + 2: "KEY_TYPE_ED25519", + 3: "KEY_TYPE_KECCAK", + 4: "KEY_TYPE_BLS12381", + 5: "KEY_TYPE_X25519", + 6: "KEY_TYPE_SCHNORR", + 7: "KEY_TYPE_WEBAUTHN", + 8: "KEY_TYPE_FIDO", + } + KeyType_value = map[string]int32{ + "KEY_TYPE_UNSPECIFIED": 0, + "KEY_TYPE_SECP256K1": 1, + "KEY_TYPE_ED25519": 2, + "KEY_TYPE_KECCAK": 3, + "KEY_TYPE_BLS12381": 4, + "KEY_TYPE_X25519": 5, + "KEY_TYPE_SCHNORR": 6, + "KEY_TYPE_WEBAUTHN": 7, + "KEY_TYPE_FIDO": 8, + } +) + +func (x KeyType) Enum() *KeyType { + p := new(KeyType) + *p = x + return p +} + +func (x KeyType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (KeyType) Descriptor() protoreflect.EnumDescriptor { + return file_did_v1_genesis_proto_enumTypes[1].Descriptor() +} + +func (KeyType) Type() protoreflect.EnumType { + return &file_did_v1_genesis_proto_enumTypes[1] +} + +func (x KeyType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use KeyType.Descriptor instead. +func (KeyType) EnumDescriptor() ([]byte, []int) { + return file_did_v1_genesis_proto_rawDescGZIP(), []int{1} +} + +// PermissionScope define the Capabilities Controllers can grant for Services +type PermissionScope int32 + +const ( + PermissionScope_PERMISSION_SCOPE_UNSPECIFIED PermissionScope = 0 + PermissionScope_PERMISSION_SCOPE_BASIC_INFO PermissionScope = 1 + PermissionScope_PERMISSION_SCOPE_RECORDS_READ PermissionScope = 2 + PermissionScope_PERMISSION_SCOPE_RECORDS_WRITE PermissionScope = 3 + PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_READ PermissionScope = 4 + PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_WRITE PermissionScope = 5 + PermissionScope_PERMISSION_SCOPE_WALLETS_READ PermissionScope = 6 + PermissionScope_PERMISSION_SCOPE_WALLETS_CREATE PermissionScope = 7 + PermissionScope_PERMISSION_SCOPE_WALLETS_SUBSCRIBE PermissionScope = 8 + PermissionScope_PERMISSION_SCOPE_WALLETS_UPDATE PermissionScope = 9 + PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_VERIFY PermissionScope = 10 + PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_BROADCAST PermissionScope = 11 + PermissionScope_PERMISSION_SCOPE_ADMIN_USER PermissionScope = 12 + PermissionScope_PERMISSION_SCOPE_ADMIN_VALIDATOR PermissionScope = 13 +) + +// Enum value maps for PermissionScope. +var ( + PermissionScope_name = map[int32]string{ + 0: "PERMISSION_SCOPE_UNSPECIFIED", + 1: "PERMISSION_SCOPE_BASIC_INFO", + 2: "PERMISSION_SCOPE_RECORDS_READ", + 3: "PERMISSION_SCOPE_RECORDS_WRITE", + 4: "PERMISSION_SCOPE_TRANSACTIONS_READ", + 5: "PERMISSION_SCOPE_TRANSACTIONS_WRITE", + 6: "PERMISSION_SCOPE_WALLETS_READ", + 7: "PERMISSION_SCOPE_WALLETS_CREATE", + 8: "PERMISSION_SCOPE_WALLETS_SUBSCRIBE", + 9: "PERMISSION_SCOPE_WALLETS_UPDATE", + 10: "PERMISSION_SCOPE_TRANSACTIONS_VERIFY", + 11: "PERMISSION_SCOPE_TRANSACTIONS_BROADCAST", + 12: "PERMISSION_SCOPE_ADMIN_USER", + 13: "PERMISSION_SCOPE_ADMIN_VALIDATOR", + } + PermissionScope_value = map[string]int32{ + "PERMISSION_SCOPE_UNSPECIFIED": 0, + "PERMISSION_SCOPE_BASIC_INFO": 1, + "PERMISSION_SCOPE_RECORDS_READ": 2, + "PERMISSION_SCOPE_RECORDS_WRITE": 3, + "PERMISSION_SCOPE_TRANSACTIONS_READ": 4, + "PERMISSION_SCOPE_TRANSACTIONS_WRITE": 5, + "PERMISSION_SCOPE_WALLETS_READ": 6, + "PERMISSION_SCOPE_WALLETS_CREATE": 7, + "PERMISSION_SCOPE_WALLETS_SUBSCRIBE": 8, + "PERMISSION_SCOPE_WALLETS_UPDATE": 9, + "PERMISSION_SCOPE_TRANSACTIONS_VERIFY": 10, + "PERMISSION_SCOPE_TRANSACTIONS_BROADCAST": 11, + "PERMISSION_SCOPE_ADMIN_USER": 12, + "PERMISSION_SCOPE_ADMIN_VALIDATOR": 13, + } +) + +func (x PermissionScope) Enum() *PermissionScope { + p := new(PermissionScope) + *p = x + return p +} + +func (x PermissionScope) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PermissionScope) Descriptor() protoreflect.EnumDescriptor { + return file_did_v1_genesis_proto_enumTypes[2].Descriptor() +} + +func (PermissionScope) Type() protoreflect.EnumType { + return &file_did_v1_genesis_proto_enumTypes[2] +} + +func (x PermissionScope) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PermissionScope.Descriptor instead. +func (PermissionScope) EnumDescriptor() ([]byte, []int) { + return file_did_v1_genesis_proto_rawDescGZIP(), []int{2} +} + // GenesisState defines the module genesis state type GenesisState struct { state protoimpl.MessageState @@ -1141,6 +6134,8 @@ type Params struct { WhitelistedAssets []*AssetInfo `protobuf:"bytes,1,rep,name=whitelisted_assets,json=whitelistedAssets,proto3" json:"whitelisted_assets,omitempty"` // Whitelisted Blockchains WhitelistedChains []*ChainInfo `protobuf:"bytes,2,rep,name=whitelisted_chains,json=whitelistedChains,proto3" json:"whitelisted_chains,omitempty"` + // Whitelisted Key Types + AllowedPublicKeys []*KeyInfo `protobuf:"bytes,3,rep,name=allowed_public_keys,json=allowedPublicKeys,proto3" json:"allowed_public_keys,omitempty"` } func (x *Params) Reset() { @@ -1177,6 +6172,477 @@ func (x *Params) GetWhitelistedChains() []*ChainInfo { return nil } +func (x *Params) GetAllowedPublicKeys() []*KeyInfo { + if x != nil { + return x.AllowedPublicKeys + } + return nil +} + +// AssetInfo defines the asset info +type AssetInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` + AssetType string `protobuf:"bytes,4,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + OriginChain string `protobuf:"bytes,5,opt,name=origin_chain,json=originChain,proto3" json:"origin_chain,omitempty"` + OriginDenom string `protobuf:"bytes,6,opt,name=origin_denom,json=originDenom,proto3" json:"origin_denom,omitempty"` + Decimals int32 `protobuf:"varint,7,opt,name=decimals,proto3" json:"decimals,omitempty"` + Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` + ImageUrl string `protobuf:"bytes,9,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"` + CoingeckoId string `protobuf:"bytes,10,opt,name=coingecko_id,json=coingeckoId,proto3" json:"coingecko_id,omitempty"` + IsEnabled bool `protobuf:"varint,11,opt,name=is_enabled,json=isEnabled,proto3" json:"is_enabled,omitempty"` + IbcPath string `protobuf:"bytes,12,opt,name=ibc_path,json=ibcPath,proto3" json:"ibc_path,omitempty"` + IbcChannel string `protobuf:"bytes,13,opt,name=ibc_channel,json=ibcChannel,proto3" json:"ibc_channel,omitempty"` + IbcPort string `protobuf:"bytes,14,opt,name=ibc_port,json=ibcPort,proto3" json:"ibc_port,omitempty"` +} + +func (x *AssetInfo) Reset() { + *x = AssetInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_genesis_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AssetInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AssetInfo) ProtoMessage() {} + +// Deprecated: Use AssetInfo.ProtoReflect.Descriptor instead. +func (*AssetInfo) Descriptor() ([]byte, []int) { + return file_did_v1_genesis_proto_rawDescGZIP(), []int{2} +} + +func (x *AssetInfo) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *AssetInfo) GetDenom() string { + if x != nil { + return x.Denom + } + return "" +} + +func (x *AssetInfo) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *AssetInfo) GetAssetType() string { + if x != nil { + return x.AssetType + } + return "" +} + +func (x *AssetInfo) GetOriginChain() string { + if x != nil { + return x.OriginChain + } + return "" +} + +func (x *AssetInfo) GetOriginDenom() string { + if x != nil { + return x.OriginDenom + } + return "" +} + +func (x *AssetInfo) GetDecimals() int32 { + if x != nil { + return x.Decimals + } + return 0 +} + +func (x *AssetInfo) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *AssetInfo) GetImageUrl() string { + if x != nil { + return x.ImageUrl + } + return "" +} + +func (x *AssetInfo) GetCoingeckoId() string { + if x != nil { + return x.CoingeckoId + } + return "" +} + +func (x *AssetInfo) GetIsEnabled() bool { + if x != nil { + return x.IsEnabled + } + return false +} + +func (x *AssetInfo) GetIbcPath() string { + if x != nil { + return x.IbcPath + } + return "" +} + +func (x *AssetInfo) GetIbcChannel() string { + if x != nil { + return x.IbcChannel + } + return "" +} + +func (x *AssetInfo) GetIbcPort() string { + if x != nil { + return x.IbcPort + } + return "" +} + +// ChainInfo defines the chain info +type ChainInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Symbol string `protobuf:"bytes,4,opt,name=symbol,proto3" json:"symbol,omitempty"` + Bech32Prefix string `protobuf:"bytes,5,opt,name=bech32_prefix,json=bech32Prefix,proto3" json:"bech32_prefix,omitempty"` + GenesisTime string `protobuf:"bytes,6,opt,name=genesis_time,json=genesisTime,proto3" json:"genesis_time,omitempty"` + GrpcEndpoints []*ChainInfo_Endpoint `protobuf:"bytes,7,rep,name=grpc_endpoints,json=grpcEndpoints,proto3" json:"grpc_endpoints,omitempty"` + RestEndpoints []*ChainInfo_Endpoint `protobuf:"bytes,8,rep,name=rest_endpoints,json=restEndpoints,proto3" json:"rest_endpoints,omitempty"` + Explorer *ChainInfo_ExplorerInfo `protobuf:"bytes,9,opt,name=explorer,proto3" json:"explorer,omitempty"` + FeeInfo *ChainInfo_FeeInfo `protobuf:"bytes,10,opt,name=fee_info,json=feeInfo,proto3" json:"fee_info,omitempty"` +} + +func (x *ChainInfo) Reset() { + *x = ChainInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_genesis_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChainInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChainInfo) ProtoMessage() {} + +// Deprecated: Use ChainInfo.ProtoReflect.Descriptor instead. +func (*ChainInfo) Descriptor() ([]byte, []int) { + return file_did_v1_genesis_proto_rawDescGZIP(), []int{3} +} + +func (x *ChainInfo) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ChainInfo) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +func (x *ChainInfo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ChainInfo) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *ChainInfo) GetBech32Prefix() string { + if x != nil { + return x.Bech32Prefix + } + return "" +} + +func (x *ChainInfo) GetGenesisTime() string { + if x != nil { + return x.GenesisTime + } + return "" +} + +func (x *ChainInfo) GetGrpcEndpoints() []*ChainInfo_Endpoint { + if x != nil { + return x.GrpcEndpoints + } + return nil +} + +func (x *ChainInfo) GetRestEndpoints() []*ChainInfo_Endpoint { + if x != nil { + return x.RestEndpoints + } + return nil +} + +func (x *ChainInfo) GetExplorer() *ChainInfo_ExplorerInfo { + if x != nil { + return x.Explorer + } + return nil +} + +func (x *ChainInfo) GetFeeInfo() *ChainInfo_FeeInfo { + if x != nil { + return x.FeeInfo + } + return nil +} + +// KeyInfo defines information for accepted PubKey types +type KeyInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Kind KeyType `protobuf:"varint,1,opt,name=kind,proto3,enum=did.v1.KeyType" json:"kind,omitempty"` + Algorithm string `protobuf:"bytes,2,opt,name=algorithm,proto3" json:"algorithm,omitempty"` // e.g., "ES256", "EdDSA", "ES256K" + Curve string `protobuf:"bytes,3,opt,name=curve,proto3" json:"curve,omitempty"` // e.g., "P-256", "Ed25519", "secp256k1" + Encoding string `protobuf:"bytes,4,opt,name=encoding,proto3" json:"encoding,omitempty"` // e.g., "hex", "base64", "multibase" +} + +func (x *KeyInfo) Reset() { + *x = KeyInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_genesis_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KeyInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KeyInfo) ProtoMessage() {} + +// Deprecated: Use KeyInfo.ProtoReflect.Descriptor instead. +func (*KeyInfo) Descriptor() ([]byte, []int) { + return file_did_v1_genesis_proto_rawDescGZIP(), []int{4} +} + +func (x *KeyInfo) GetKind() KeyType { + if x != nil { + return x.Kind + } + return KeyType_KEY_TYPE_UNSPECIFIED +} + +func (x *KeyInfo) GetAlgorithm() string { + if x != nil { + return x.Algorithm + } + return "" +} + +func (x *KeyInfo) GetCurve() string { + if x != nil { + return x.Curve + } + return "" +} + +func (x *KeyInfo) GetEncoding() string { + if x != nil { + return x.Encoding + } + return "" +} + +// Endpoint defines an endpoint +type ChainInfo_Endpoint struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + IsPrimary bool `protobuf:"varint,2,opt,name=is_primary,json=isPrimary,proto3" json:"is_primary,omitempty"` +} + +func (x *ChainInfo_Endpoint) Reset() { + *x = ChainInfo_Endpoint{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_genesis_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChainInfo_Endpoint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChainInfo_Endpoint) ProtoMessage() {} + +// Deprecated: Use ChainInfo_Endpoint.ProtoReflect.Descriptor instead. +func (*ChainInfo_Endpoint) Descriptor() ([]byte, []int) { + return file_did_v1_genesis_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *ChainInfo_Endpoint) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *ChainInfo_Endpoint) GetIsPrimary() bool { + if x != nil { + return x.IsPrimary + } + return false +} + +// ExplorerInfo defines the explorer info +type ChainInfo_ExplorerInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` +} + +func (x *ChainInfo_ExplorerInfo) Reset() { + *x = ChainInfo_ExplorerInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_genesis_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChainInfo_ExplorerInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChainInfo_ExplorerInfo) ProtoMessage() {} + +// Deprecated: Use ChainInfo_ExplorerInfo.ProtoReflect.Descriptor instead. +func (*ChainInfo_ExplorerInfo) Descriptor() ([]byte, []int) { + return file_did_v1_genesis_proto_rawDescGZIP(), []int{3, 1} +} + +func (x *ChainInfo_ExplorerInfo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ChainInfo_ExplorerInfo) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +// FeeInfo defines a fee info +type ChainInfo_FeeInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BaseDenom string `protobuf:"bytes,1,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty"` + FeeRates []string `protobuf:"bytes,2,rep,name=fee_rates,json=feeRates,proto3" json:"fee_rates,omitempty"` + InitGasLimit int32 `protobuf:"varint,3,opt,name=init_gas_limit,json=initGasLimit,proto3" json:"init_gas_limit,omitempty"` + IsSimulable bool `protobuf:"varint,4,opt,name=is_simulable,json=isSimulable,proto3" json:"is_simulable,omitempty"` + GasMultiply float64 `protobuf:"fixed64,5,opt,name=gas_multiply,json=gasMultiply,proto3" json:"gas_multiply,omitempty"` +} + +func (x *ChainInfo_FeeInfo) Reset() { + *x = ChainInfo_FeeInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_genesis_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChainInfo_FeeInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChainInfo_FeeInfo) ProtoMessage() {} + +// Deprecated: Use ChainInfo_FeeInfo.ProtoReflect.Descriptor instead. +func (*ChainInfo_FeeInfo) Descriptor() ([]byte, []int) { + return file_did_v1_genesis_proto_rawDescGZIP(), []int{3, 2} +} + +func (x *ChainInfo_FeeInfo) GetBaseDenom() string { + if x != nil { + return x.BaseDenom + } + return "" +} + +func (x *ChainInfo_FeeInfo) GetFeeRates() []string { + if x != nil { + return x.FeeRates + } + return nil +} + +func (x *ChainInfo_FeeInfo) GetInitGasLimit() int32 { + if x != nil { + return x.InitGasLimit + } + return 0 +} + +func (x *ChainInfo_FeeInfo) GetIsSimulable() bool { + if x != nil { + return x.IsSimulable + } + return false +} + +func (x *ChainInfo_FeeInfo) GetGasMultiply() float64 { + if x != nil { + return x.GasMultiply + } + return 0 +} + var File_did_v1_genesis_proto protoreflect.FileDescriptor var file_did_v1_genesis_proto_rawDesc = []byte{ @@ -1184,31 +6650,171 @@ var file_did_v1_genesis_proto_rawDesc = []byte{ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, - 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3c, 0x0a, 0x0c, 0x47, - 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, - 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xa5, 0x01, 0x0a, 0x06, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x40, 0x0a, 0x12, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, - 0x74, 0x65, 0x64, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x11, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x11, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, - 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x12, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x11, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, - 0x65, 0x64, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x3a, 0x17, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, - 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0a, 0x64, 0x69, 0x64, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x42, 0x7c, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, - 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 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, + 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3c, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, + 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xe6, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x40, 0x0a, 0x12, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x64, + 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x11, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, + 0x74, 0x73, 0x12, 0x40, 0x0a, 0x12, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x64, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x11, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x43, 0x68, + 0x61, 0x69, 0x6e, 0x73, 0x12, 0x3f, 0x0a, 0x13, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x50, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x4b, 0x65, 0x79, 0x73, 0x3a, 0x17, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, + 0xe7, 0xb0, 0x2a, 0x0a, 0x64, 0x69, 0x64, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xa2, + 0x03, 0x0a, 0x09, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, + 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, + 0x6f, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, + 0x73, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x0a, 0x0c, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, + 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, + 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, + 0x69, 0x6e, 0x67, 0x65, 0x63, 0x6b, 0x6f, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x63, 0x6f, 0x69, 0x6e, 0x67, 0x65, 0x63, 0x6b, 0x6f, 0x49, 0x64, 0x12, 0x1d, 0x0a, + 0x0a, 0x69, 0x73, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x09, 0x69, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, + 0x69, 0x62, 0x63, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x69, 0x62, 0x63, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x62, 0x63, 0x5f, 0x63, + 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x62, + 0x63, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x62, 0x63, 0x5f, + 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x62, 0x63, 0x50, + 0x6f, 0x72, 0x74, 0x22, 0xc9, 0x05, 0x0a, 0x09, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x65, 0x63, 0x68, + 0x33, 0x32, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x21, 0x0a, + 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x41, 0x0a, 0x0e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0d, 0x67, 0x72, 0x70, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x65, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x45, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x08, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, + 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, 0x78, 0x70, 0x6c, + 0x6f, 0x72, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, + 0x65, 0x72, 0x12, 0x34, 0x0a, 0x08, 0x66, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, + 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x46, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x07, 0x66, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x3b, 0x0a, 0x08, 0x45, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x69, + 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x50, 0x72, + 0x69, 0x6d, 0x61, 0x72, 0x79, 0x1a, 0x34, 0x0a, 0x0c, 0x45, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, + 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x1a, 0xb1, 0x01, 0x0a, 0x07, + 0x46, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x5f, + 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x61, 0x73, + 0x65, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, + 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x66, 0x65, 0x65, 0x52, 0x61, + 0x74, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x67, 0x61, 0x73, 0x5f, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x69, 0x6e, 0x69, + 0x74, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, + 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0b, 0x69, 0x73, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x0c, + 0x67, 0x61, 0x73, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x79, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x01, 0x52, 0x0b, 0x67, 0x61, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x79, 0x22, + 0x7e, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x23, 0x0a, 0x04, 0x6b, 0x69, + 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, + 0x1c, 0x0a, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x14, 0x0a, + 0x05, 0x63, 0x75, 0x72, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x75, + 0x72, 0x76, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x2a, + 0xab, 0x01, 0x0a, 0x0c, 0x44, 0x49, 0x44, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x1d, 0x0a, 0x19, 0x44, 0x49, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, + 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x16, 0x0a, 0x12, 0x44, 0x49, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, + 0x5f, 0x49, 0x50, 0x46, 0x53, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x49, 0x44, 0x5f, 0x4e, + 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x53, 0x4f, 0x4e, 0x52, 0x10, 0x02, 0x12, + 0x19, 0x0a, 0x15, 0x44, 0x49, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, + 0x5f, 0x42, 0x49, 0x54, 0x43, 0x4f, 0x49, 0x4e, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x44, 0x49, + 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x45, 0x54, 0x48, 0x45, + 0x52, 0x45, 0x55, 0x4d, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x49, 0x44, 0x5f, 0x4e, 0x41, + 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x49, 0x42, 0x43, 0x10, 0x05, 0x2a, 0xd2, 0x01, + 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x4b, 0x45, 0x59, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x53, 0x45, 0x43, 0x50, 0x32, 0x35, 0x36, 0x4b, 0x31, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x4b, + 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x44, 0x32, 0x35, 0x35, 0x31, 0x39, 0x10, + 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4b, 0x45, + 0x43, 0x43, 0x41, 0x4b, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x42, 0x4c, 0x53, 0x31, 0x32, 0x33, 0x38, 0x31, 0x10, 0x04, 0x12, 0x13, 0x0a, + 0x0f, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x58, 0x32, 0x35, 0x35, 0x31, 0x39, + 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, + 0x43, 0x48, 0x4e, 0x4f, 0x52, 0x52, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x4b, 0x45, 0x59, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x57, 0x45, 0x42, 0x41, 0x55, 0x54, 0x48, 0x4e, 0x10, 0x07, 0x12, + 0x11, 0x0a, 0x0d, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x44, 0x4f, + 0x10, 0x08, 0x2a, 0x9f, 0x04, 0x0a, 0x0f, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, + 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x45, 0x52, 0x4d, + 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x42, 0x41, 0x53, + 0x49, 0x43, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x45, 0x52, + 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x52, 0x45, + 0x43, 0x4f, 0x52, 0x44, 0x53, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x10, 0x02, 0x12, 0x22, 0x0a, 0x1e, + 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, + 0x5f, 0x52, 0x45, 0x43, 0x4f, 0x52, 0x44, 0x53, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x03, + 0x12, 0x26, 0x0a, 0x22, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, + 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, + 0x53, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x10, 0x04, 0x12, 0x27, 0x0a, 0x23, 0x50, 0x45, 0x52, 0x4d, + 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, + 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, + 0x05, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, + 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, 0x4c, 0x45, 0x54, 0x53, 0x5f, 0x52, 0x45, + 0x41, 0x44, 0x10, 0x06, 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, + 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, 0x4c, 0x45, 0x54, 0x53, + 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x07, 0x12, 0x26, 0x0a, 0x22, 0x50, 0x45, 0x52, + 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x57, 0x41, + 0x4c, 0x4c, 0x45, 0x54, 0x53, 0x5f, 0x53, 0x55, 0x42, 0x53, 0x43, 0x52, 0x49, 0x42, 0x45, 0x10, + 0x08, 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, + 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, 0x4c, 0x45, 0x54, 0x53, 0x5f, 0x55, 0x50, + 0x44, 0x41, 0x54, 0x45, 0x10, 0x09, 0x12, 0x28, 0x0a, 0x24, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, + 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, + 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x10, 0x0a, + 0x12, 0x2b, 0x0a, 0x27, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, + 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, + 0x53, 0x5f, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x10, 0x0b, 0x12, 0x1f, 0x0a, + 0x1b, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, + 0x45, 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, 0x0c, 0x12, 0x24, + 0x0a, 0x20, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, + 0x50, 0x45, 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, + 0x4f, 0x52, 0x10, 0x0d, 0x42, 0x7c, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, + 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 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 ( @@ -1223,22 +6829,36 @@ func file_did_v1_genesis_proto_rawDescGZIP() []byte { return file_did_v1_genesis_proto_rawDescData } -var file_did_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_did_v1_genesis_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_did_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_did_v1_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: did.v1.GenesisState - (*Params)(nil), // 1: did.v1.Params - (*AssetInfo)(nil), // 2: did.v1.AssetInfo - (*ChainInfo)(nil), // 3: did.v1.ChainInfo + (DIDNamespace)(0), // 0: did.v1.DIDNamespace + (KeyType)(0), // 1: did.v1.KeyType + (PermissionScope)(0), // 2: did.v1.PermissionScope + (*GenesisState)(nil), // 3: did.v1.GenesisState + (*Params)(nil), // 4: did.v1.Params + (*AssetInfo)(nil), // 5: did.v1.AssetInfo + (*ChainInfo)(nil), // 6: did.v1.ChainInfo + (*KeyInfo)(nil), // 7: did.v1.KeyInfo + (*ChainInfo_Endpoint)(nil), // 8: did.v1.ChainInfo.Endpoint + (*ChainInfo_ExplorerInfo)(nil), // 9: did.v1.ChainInfo.ExplorerInfo + (*ChainInfo_FeeInfo)(nil), // 10: did.v1.ChainInfo.FeeInfo } var file_did_v1_genesis_proto_depIdxs = []int32{ - 1, // 0: did.v1.GenesisState.params:type_name -> did.v1.Params - 2, // 1: did.v1.Params.whitelisted_assets:type_name -> did.v1.AssetInfo - 3, // 2: did.v1.Params.whitelisted_chains:type_name -> did.v1.ChainInfo - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] 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 + 4, // 0: did.v1.GenesisState.params:type_name -> did.v1.Params + 5, // 1: did.v1.Params.whitelisted_assets:type_name -> did.v1.AssetInfo + 6, // 2: did.v1.Params.whitelisted_chains:type_name -> did.v1.ChainInfo + 7, // 3: did.v1.Params.allowed_public_keys:type_name -> did.v1.KeyInfo + 8, // 4: did.v1.ChainInfo.grpc_endpoints:type_name -> did.v1.ChainInfo.Endpoint + 8, // 5: did.v1.ChainInfo.rest_endpoints:type_name -> did.v1.ChainInfo.Endpoint + 9, // 6: did.v1.ChainInfo.explorer:type_name -> did.v1.ChainInfo.ExplorerInfo + 10, // 7: did.v1.ChainInfo.fee_info:type_name -> did.v1.ChainInfo.FeeInfo + 1, // 8: did.v1.KeyInfo.kind:type_name -> did.v1.KeyType + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_did_v1_genesis_proto_init() } @@ -1246,7 +6866,6 @@ func file_did_v1_genesis_proto_init() { if File_did_v1_genesis_proto != nil { return } - file_did_v1_types_proto_init() if !protoimpl.UnsafeEnabled { file_did_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenesisState); i { @@ -1272,19 +6891,92 @@ func file_did_v1_genesis_proto_init() { return nil } } + file_did_v1_genesis_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AssetInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_genesis_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChainInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_genesis_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KeyInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_genesis_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChainInfo_Endpoint); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_genesis_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChainInfo_ExplorerInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_genesis_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChainInfo_FeeInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_genesis_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, + NumEnums: 3, + NumMessages: 8, NumExtensions: 0, NumServices: 0, }, GoTypes: file_did_v1_genesis_proto_goTypes, DependencyIndexes: file_did_v1_genesis_proto_depIdxs, + EnumInfos: file_did_v1_genesis_proto_enumTypes, MessageInfos: file_did_v1_genesis_proto_msgTypes, }.Build() File_did_v1_genesis_proto = out.File diff --git a/api/did/v1/types.pulsar.go b/api/did/v1/models.pulsar.go similarity index 58% rename from api/did/v1/types.pulsar.go rename to api/did/v1/models.pulsar.go index ba114c7ab..b658f5f8c 100644 --- a/api/did/v1/types.pulsar.go +++ b/api/did/v1/models.pulsar.go @@ -2,69 +2,92 @@ package didv1 import ( - _ "cosmossdk.io/api/cosmos/msg/v1" - binary "encoding/binary" fmt "fmt" - _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" - math "math" reflect "reflect" sort "sort" sync "sync" ) +var _ protoreflect.List = (*_DID_5_list)(nil) + +type _DID_5_list struct { + list *[]string +} + +func (x *_DID_5_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_DID_5_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_DID_5_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_DID_5_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_DID_5_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message DID at list field Paths as it is not of Message kind")) +} + +func (x *_DID_5_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_DID_5_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_DID_5_list) IsValid() bool { + return x.list != nil +} + var ( - md_AssetInfo protoreflect.MessageDescriptor - fd_AssetInfo_id protoreflect.FieldDescriptor - fd_AssetInfo_denom protoreflect.FieldDescriptor - fd_AssetInfo_symbol protoreflect.FieldDescriptor - fd_AssetInfo_asset_type protoreflect.FieldDescriptor - fd_AssetInfo_origin_chain protoreflect.FieldDescriptor - fd_AssetInfo_origin_denom protoreflect.FieldDescriptor - fd_AssetInfo_decimals protoreflect.FieldDescriptor - fd_AssetInfo_description protoreflect.FieldDescriptor - fd_AssetInfo_image_url protoreflect.FieldDescriptor - fd_AssetInfo_coingecko_id protoreflect.FieldDescriptor - fd_AssetInfo_is_enabled protoreflect.FieldDescriptor - fd_AssetInfo_ibc_path protoreflect.FieldDescriptor - fd_AssetInfo_ibc_channel protoreflect.FieldDescriptor - fd_AssetInfo_ibc_port protoreflect.FieldDescriptor + md_DID protoreflect.MessageDescriptor + fd_DID_id protoreflect.FieldDescriptor + fd_DID_method protoreflect.FieldDescriptor + fd_DID_network protoreflect.FieldDescriptor + fd_DID_identifier protoreflect.FieldDescriptor + fd_DID_paths protoreflect.FieldDescriptor ) func init() { - file_did_v1_types_proto_init() - md_AssetInfo = File_did_v1_types_proto.Messages().ByName("AssetInfo") - fd_AssetInfo_id = md_AssetInfo.Fields().ByName("id") - fd_AssetInfo_denom = md_AssetInfo.Fields().ByName("denom") - fd_AssetInfo_symbol = md_AssetInfo.Fields().ByName("symbol") - fd_AssetInfo_asset_type = md_AssetInfo.Fields().ByName("asset_type") - fd_AssetInfo_origin_chain = md_AssetInfo.Fields().ByName("origin_chain") - fd_AssetInfo_origin_denom = md_AssetInfo.Fields().ByName("origin_denom") - fd_AssetInfo_decimals = md_AssetInfo.Fields().ByName("decimals") - fd_AssetInfo_description = md_AssetInfo.Fields().ByName("description") - fd_AssetInfo_image_url = md_AssetInfo.Fields().ByName("image_url") - fd_AssetInfo_coingecko_id = md_AssetInfo.Fields().ByName("coingecko_id") - fd_AssetInfo_is_enabled = md_AssetInfo.Fields().ByName("is_enabled") - fd_AssetInfo_ibc_path = md_AssetInfo.Fields().ByName("ibc_path") - fd_AssetInfo_ibc_channel = md_AssetInfo.Fields().ByName("ibc_channel") - fd_AssetInfo_ibc_port = md_AssetInfo.Fields().ByName("ibc_port") + file_did_v1_models_proto_init() + md_DID = File_did_v1_models_proto.Messages().ByName("DID") + fd_DID_id = md_DID.Fields().ByName("id") + fd_DID_method = md_DID.Fields().ByName("method") + fd_DID_network = md_DID.Fields().ByName("network") + fd_DID_identifier = md_DID.Fields().ByName("identifier") + fd_DID_paths = md_DID.Fields().ByName("paths") } -var _ protoreflect.Message = (*fastReflection_AssetInfo)(nil) +var _ protoreflect.Message = (*fastReflection_DID)(nil) -type fastReflection_AssetInfo AssetInfo +type fastReflection_DID DID -func (x *AssetInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_AssetInfo)(x) +func (x *DID) ProtoReflect() protoreflect.Message { + return (*fastReflection_DID)(x) } -func (x *AssetInfo) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_types_proto_msgTypes[0] +func (x *DID) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_models_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -75,43 +98,43 @@ func (x *AssetInfo) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_AssetInfo_messageType fastReflection_AssetInfo_messageType -var _ protoreflect.MessageType = fastReflection_AssetInfo_messageType{} +var _fastReflection_DID_messageType fastReflection_DID_messageType +var _ protoreflect.MessageType = fastReflection_DID_messageType{} -type fastReflection_AssetInfo_messageType struct{} +type fastReflection_DID_messageType struct{} -func (x fastReflection_AssetInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_AssetInfo)(nil) +func (x fastReflection_DID_messageType) Zero() protoreflect.Message { + return (*fastReflection_DID)(nil) } -func (x fastReflection_AssetInfo_messageType) New() protoreflect.Message { - return new(fastReflection_AssetInfo) +func (x fastReflection_DID_messageType) New() protoreflect.Message { + return new(fastReflection_DID) } -func (x fastReflection_AssetInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_AssetInfo +func (x fastReflection_DID_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_DID } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_AssetInfo) Descriptor() protoreflect.MessageDescriptor { - return md_AssetInfo +func (x *fastReflection_DID) Descriptor() protoreflect.MessageDescriptor { + return md_DID } // 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_AssetInfo) Type() protoreflect.MessageType { - return _fastReflection_AssetInfo_messageType +func (x *fastReflection_DID) Type() protoreflect.MessageType { + return _fastReflection_DID_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_AssetInfo) New() protoreflect.Message { - return new(fastReflection_AssetInfo) +func (x *fastReflection_DID) New() protoreflect.Message { + return new(fastReflection_DID) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_AssetInfo) Interface() protoreflect.ProtoMessage { - return (*AssetInfo)(x) +func (x *fastReflection_DID) Interface() protoreflect.ProtoMessage { + return (*DID)(x) } // Range iterates over every populated field in an undefined order, @@ -119,88 +142,34 @@ func (x *fastReflection_AssetInfo) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_AssetInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_DID) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Id != "" { value := protoreflect.ValueOfString(x.Id) - if !f(fd_AssetInfo_id, value) { + if !f(fd_DID_id, value) { return } } - if x.Denom != "" { - value := protoreflect.ValueOfString(x.Denom) - if !f(fd_AssetInfo_denom, value) { + if x.Method != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Method)) + if !f(fd_DID_method, value) { return } } - if x.Symbol != "" { - value := protoreflect.ValueOfString(x.Symbol) - if !f(fd_AssetInfo_symbol, value) { + if x.Network != "" { + value := protoreflect.ValueOfString(x.Network) + if !f(fd_DID_network, value) { return } } - if x.AssetType != "" { - value := protoreflect.ValueOfString(x.AssetType) - if !f(fd_AssetInfo_asset_type, value) { + if x.Identifier != "" { + value := protoreflect.ValueOfString(x.Identifier) + if !f(fd_DID_identifier, value) { return } } - if x.OriginChain != "" { - value := protoreflect.ValueOfString(x.OriginChain) - if !f(fd_AssetInfo_origin_chain, value) { - return - } - } - if x.OriginDenom != "" { - value := protoreflect.ValueOfString(x.OriginDenom) - if !f(fd_AssetInfo_origin_denom, value) { - return - } - } - if x.Decimals != int32(0) { - value := protoreflect.ValueOfInt32(x.Decimals) - if !f(fd_AssetInfo_decimals, value) { - return - } - } - if x.Description != "" { - value := protoreflect.ValueOfString(x.Description) - if !f(fd_AssetInfo_description, value) { - return - } - } - if x.ImageUrl != "" { - value := protoreflect.ValueOfString(x.ImageUrl) - if !f(fd_AssetInfo_image_url, value) { - return - } - } - if x.CoingeckoId != "" { - value := protoreflect.ValueOfString(x.CoingeckoId) - if !f(fd_AssetInfo_coingecko_id, value) { - return - } - } - if x.IsEnabled != false { - value := protoreflect.ValueOfBool(x.IsEnabled) - if !f(fd_AssetInfo_is_enabled, value) { - return - } - } - if x.IbcPath != "" { - value := protoreflect.ValueOfString(x.IbcPath) - if !f(fd_AssetInfo_ibc_path, value) { - return - } - } - if x.IbcChannel != "" { - value := protoreflect.ValueOfString(x.IbcChannel) - if !f(fd_AssetInfo_ibc_channel, value) { - return - } - } - if x.IbcPort != "" { - value := protoreflect.ValueOfString(x.IbcPort) - if !f(fd_AssetInfo_ibc_port, value) { + if len(x.Paths) != 0 { + value := protoreflect.ValueOfList(&_DID_5_list{list: &x.Paths}) + if !f(fd_DID_paths, value) { return } } @@ -217,41 +186,23 @@ func (x *fastReflection_AssetInfo) Range(f func(protoreflect.FieldDescriptor, pr // 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_AssetInfo) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_DID) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.AssetInfo.id": + case "did.v1.DID.id": return x.Id != "" - case "did.v1.AssetInfo.denom": - return x.Denom != "" - case "did.v1.AssetInfo.symbol": - return x.Symbol != "" - case "did.v1.AssetInfo.asset_type": - return x.AssetType != "" - case "did.v1.AssetInfo.origin_chain": - return x.OriginChain != "" - case "did.v1.AssetInfo.origin_denom": - return x.OriginDenom != "" - case "did.v1.AssetInfo.decimals": - return x.Decimals != int32(0) - case "did.v1.AssetInfo.description": - return x.Description != "" - case "did.v1.AssetInfo.image_url": - return x.ImageUrl != "" - case "did.v1.AssetInfo.coingecko_id": - return x.CoingeckoId != "" - case "did.v1.AssetInfo.is_enabled": - return x.IsEnabled != false - case "did.v1.AssetInfo.ibc_path": - return x.IbcPath != "" - case "did.v1.AssetInfo.ibc_channel": - return x.IbcChannel != "" - case "did.v1.AssetInfo.ibc_port": - return x.IbcPort != "" + case "did.v1.DID.method": + return x.Method != 0 + case "did.v1.DID.network": + return x.Network != "" + case "did.v1.DID.identifier": + return x.Identifier != "" + case "did.v1.DID.paths": + return len(x.Paths) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID")) } - panic(fmt.Errorf("message did.v1.AssetInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.DID does not contain field %s", fd.FullName())) } } @@ -261,41 +212,23 @@ func (x *fastReflection_AssetInfo) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AssetInfo) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_DID) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.AssetInfo.id": + case "did.v1.DID.id": x.Id = "" - case "did.v1.AssetInfo.denom": - x.Denom = "" - case "did.v1.AssetInfo.symbol": - x.Symbol = "" - case "did.v1.AssetInfo.asset_type": - x.AssetType = "" - case "did.v1.AssetInfo.origin_chain": - x.OriginChain = "" - case "did.v1.AssetInfo.origin_denom": - x.OriginDenom = "" - case "did.v1.AssetInfo.decimals": - x.Decimals = int32(0) - case "did.v1.AssetInfo.description": - x.Description = "" - case "did.v1.AssetInfo.image_url": - x.ImageUrl = "" - case "did.v1.AssetInfo.coingecko_id": - x.CoingeckoId = "" - case "did.v1.AssetInfo.is_enabled": - x.IsEnabled = false - case "did.v1.AssetInfo.ibc_path": - x.IbcPath = "" - case "did.v1.AssetInfo.ibc_channel": - x.IbcChannel = "" - case "did.v1.AssetInfo.ibc_port": - x.IbcPort = "" + case "did.v1.DID.method": + x.Method = 0 + case "did.v1.DID.network": + x.Network = "" + case "did.v1.DID.identifier": + x.Identifier = "" + case "did.v1.DID.paths": + x.Paths = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID")) } - panic(fmt.Errorf("message did.v1.AssetInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.DID does not contain field %s", fd.FullName())) } } @@ -305,55 +238,31 @@ func (x *fastReflection_AssetInfo) Clear(fd protoreflect.FieldDescriptor) { // 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_AssetInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_DID) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.AssetInfo.id": + case "did.v1.DID.id": value := x.Id return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.denom": - value := x.Denom + case "did.v1.DID.method": + value := x.Method + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "did.v1.DID.network": + value := x.Network return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.symbol": - value := x.Symbol - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.asset_type": - value := x.AssetType - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.origin_chain": - value := x.OriginChain - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.origin_denom": - value := x.OriginDenom - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.decimals": - value := x.Decimals - return protoreflect.ValueOfInt32(value) - case "did.v1.AssetInfo.description": - value := x.Description - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.image_url": - value := x.ImageUrl - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.coingecko_id": - value := x.CoingeckoId - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.is_enabled": - value := x.IsEnabled - return protoreflect.ValueOfBool(value) - case "did.v1.AssetInfo.ibc_path": - value := x.IbcPath - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.ibc_channel": - value := x.IbcChannel - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.ibc_port": - value := x.IbcPort + case "did.v1.DID.identifier": + value := x.Identifier return protoreflect.ValueOfString(value) + case "did.v1.DID.paths": + if len(x.Paths) == 0 { + return protoreflect.ValueOfList(&_DID_5_list{}) + } + listValue := &_DID_5_list{list: &x.Paths} + return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID")) } - panic(fmt.Errorf("message did.v1.AssetInfo does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.DID does not contain field %s", descriptor.FullName())) } } @@ -367,41 +276,25 @@ func (x *fastReflection_AssetInfo) Get(descriptor protoreflect.FieldDescriptor) // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AssetInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_DID) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.AssetInfo.id": + case "did.v1.DID.id": x.Id = value.Interface().(string) - case "did.v1.AssetInfo.denom": - x.Denom = value.Interface().(string) - case "did.v1.AssetInfo.symbol": - x.Symbol = value.Interface().(string) - case "did.v1.AssetInfo.asset_type": - x.AssetType = value.Interface().(string) - case "did.v1.AssetInfo.origin_chain": - x.OriginChain = value.Interface().(string) - case "did.v1.AssetInfo.origin_denom": - x.OriginDenom = value.Interface().(string) - case "did.v1.AssetInfo.decimals": - x.Decimals = int32(value.Int()) - case "did.v1.AssetInfo.description": - x.Description = value.Interface().(string) - case "did.v1.AssetInfo.image_url": - x.ImageUrl = value.Interface().(string) - case "did.v1.AssetInfo.coingecko_id": - x.CoingeckoId = value.Interface().(string) - case "did.v1.AssetInfo.is_enabled": - x.IsEnabled = value.Bool() - case "did.v1.AssetInfo.ibc_path": - x.IbcPath = value.Interface().(string) - case "did.v1.AssetInfo.ibc_channel": - x.IbcChannel = value.Interface().(string) - case "did.v1.AssetInfo.ibc_port": - x.IbcPort = value.Interface().(string) + case "did.v1.DID.method": + x.Method = (DIDNamespace)(value.Enum()) + case "did.v1.DID.network": + x.Network = value.Interface().(string) + case "did.v1.DID.identifier": + x.Identifier = value.Interface().(string) + case "did.v1.DID.paths": + lv := value.List() + clv := lv.(*_DID_5_list) + x.Paths = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID")) } - panic(fmt.Errorf("message did.v1.AssetInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.DID does not contain field %s", fd.FullName())) } } @@ -415,92 +308,61 @@ func (x *fastReflection_AssetInfo) Set(fd protoreflect.FieldDescriptor, value pr // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AssetInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_DID) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.AssetInfo.id": - panic(fmt.Errorf("field id of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.denom": - panic(fmt.Errorf("field denom of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.symbol": - panic(fmt.Errorf("field symbol of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.asset_type": - panic(fmt.Errorf("field asset_type of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.origin_chain": - panic(fmt.Errorf("field origin_chain of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.origin_denom": - panic(fmt.Errorf("field origin_denom of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.decimals": - panic(fmt.Errorf("field decimals of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.description": - panic(fmt.Errorf("field description of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.image_url": - panic(fmt.Errorf("field image_url of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.coingecko_id": - panic(fmt.Errorf("field coingecko_id of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.is_enabled": - panic(fmt.Errorf("field is_enabled of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.ibc_path": - panic(fmt.Errorf("field ibc_path of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.ibc_channel": - panic(fmt.Errorf("field ibc_channel of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.ibc_port": - panic(fmt.Errorf("field ibc_port of message did.v1.AssetInfo is not mutable")) + case "did.v1.DID.paths": + if x.Paths == nil { + x.Paths = []string{} + } + value := &_DID_5_list{list: &x.Paths} + return protoreflect.ValueOfList(value) + case "did.v1.DID.id": + panic(fmt.Errorf("field id of message did.v1.DID is not mutable")) + case "did.v1.DID.method": + panic(fmt.Errorf("field method of message did.v1.DID is not mutable")) + case "did.v1.DID.network": + panic(fmt.Errorf("field network of message did.v1.DID is not mutable")) + case "did.v1.DID.identifier": + panic(fmt.Errorf("field identifier of message did.v1.DID is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID")) } - panic(fmt.Errorf("message did.v1.AssetInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.DID 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_AssetInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_DID) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.AssetInfo.id": + case "did.v1.DID.id": return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.denom": + case "did.v1.DID.method": + return protoreflect.ValueOfEnum(0) + case "did.v1.DID.network": return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.symbol": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.asset_type": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.origin_chain": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.origin_denom": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.decimals": - return protoreflect.ValueOfInt32(int32(0)) - case "did.v1.AssetInfo.description": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.image_url": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.coingecko_id": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.is_enabled": - return protoreflect.ValueOfBool(false) - case "did.v1.AssetInfo.ibc_path": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.ibc_channel": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.ibc_port": + case "did.v1.DID.identifier": return protoreflect.ValueOfString("") + case "did.v1.DID.paths": + list := []string{} + return protoreflect.ValueOfList(&_DID_5_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID")) } - panic(fmt.Errorf("message did.v1.AssetInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.DID 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_AssetInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_DID) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.AssetInfo", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.DID", d.FullName())) } panic("unreachable") } @@ -508,7 +370,7 @@ func (x *fastReflection_AssetInfo) WhichOneof(d protoreflect.OneofDescriptor) pr // 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_AssetInfo) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_DID) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -519,7 +381,7 @@ func (x *fastReflection_AssetInfo) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AssetInfo) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_DID) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -531,7 +393,7 @@ func (x *fastReflection_AssetInfo) SetUnknown(fields protoreflect.RawFields) { // 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_AssetInfo) IsValid() bool { +func (x *fastReflection_DID) IsValid() bool { return x != nil } @@ -541,9 +403,9 @@ func (x *fastReflection_AssetInfo) 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_AssetInfo) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_DID) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*AssetInfo) + x := input.Message.Interface().(*DID) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -559,55 +421,22 @@ func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Denom) + if x.Method != 0 { + n += 1 + runtime.Sov(uint64(x.Method)) + } + l = len(x.Network) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Symbol) + l = len(x.Identifier) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.AssetType) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.OriginChain) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.OriginDenom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Decimals != 0 { - n += 1 + runtime.Sov(uint64(x.Decimals)) - } - l = len(x.Description) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ImageUrl) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.CoingeckoId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.IsEnabled { - n += 2 - } - l = len(x.IbcPath) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.IbcChannel) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.IbcPort) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if len(x.Paths) > 0 { + for _, s := range x.Paths { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } } if x.unknownFields != nil { n += len(x.unknownFields) @@ -619,7 +448,7 @@ func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*AssetInfo) + x := input.Message.Interface().(*DID) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -638,97 +467,33 @@ func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.IbcPort) > 0 { - i -= len(x.IbcPort) - copy(dAtA[i:], x.IbcPort) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.IbcPort))) - i-- - dAtA[i] = 0x72 - } - if len(x.IbcChannel) > 0 { - i -= len(x.IbcChannel) - copy(dAtA[i:], x.IbcChannel) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.IbcChannel))) - i-- - dAtA[i] = 0x6a - } - if len(x.IbcPath) > 0 { - i -= len(x.IbcPath) - copy(dAtA[i:], x.IbcPath) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.IbcPath))) - i-- - dAtA[i] = 0x62 - } - if x.IsEnabled { - i-- - if x.IsEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(x.Paths) > 0 { + for iNdEx := len(x.Paths) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Paths[iNdEx]) + copy(dAtA[i:], x.Paths[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Paths[iNdEx]))) + i-- + dAtA[i] = 0x2a } - i-- - dAtA[i] = 0x58 } - if len(x.CoingeckoId) > 0 { - i -= len(x.CoingeckoId) - copy(dAtA[i:], x.CoingeckoId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CoingeckoId))) - i-- - dAtA[i] = 0x52 - } - if len(x.ImageUrl) > 0 { - i -= len(x.ImageUrl) - copy(dAtA[i:], x.ImageUrl) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ImageUrl))) - i-- - dAtA[i] = 0x4a - } - if len(x.Description) > 0 { - i -= len(x.Description) - copy(dAtA[i:], x.Description) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) - i-- - dAtA[i] = 0x42 - } - if x.Decimals != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Decimals)) - i-- - dAtA[i] = 0x38 - } - if len(x.OriginDenom) > 0 { - i -= len(x.OriginDenom) - copy(dAtA[i:], x.OriginDenom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginDenom))) - i-- - dAtA[i] = 0x32 - } - if len(x.OriginChain) > 0 { - i -= len(x.OriginChain) - copy(dAtA[i:], x.OriginChain) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginChain))) - i-- - dAtA[i] = 0x2a - } - if len(x.AssetType) > 0 { - i -= len(x.AssetType) - copy(dAtA[i:], x.AssetType) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AssetType))) + if len(x.Identifier) > 0 { + i -= len(x.Identifier) + copy(dAtA[i:], x.Identifier) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Identifier))) i-- dAtA[i] = 0x22 } - if len(x.Symbol) > 0 { - i -= len(x.Symbol) - copy(dAtA[i:], x.Symbol) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Symbol))) + if len(x.Network) > 0 { + i -= len(x.Network) + copy(dAtA[i:], x.Network) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Network))) i-- dAtA[i] = 0x1a } - if len(x.Denom) > 0 { - i -= len(x.Denom) - copy(dAtA[i:], x.Denom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) + if x.Method != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Method)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x10 } if len(x.Id) > 0 { i -= len(x.Id) @@ -748,7 +513,7 @@ func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*AssetInfo) + x := input.Message.Interface().(*DID) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -780,10 +545,10 @@ func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AssetInfo: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DID: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AssetInfo: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DID: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -819,10 +584,10 @@ func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { x.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) } - var stringLen uint64 + x.Method = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -832,27 +597,14 @@ func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + x.Method |= DIDNamespace(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.Denom = 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 Symbol", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -880,11 +632,11 @@ func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Symbol = string(dAtA[iNdEx:postIndex]) + x.Network = 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 AssetType", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Identifier", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -912,11 +664,11 @@ func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.AssetType = string(dAtA[iNdEx:postIndex]) + x.Identifier = 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 OriginChain", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -944,1444 +696,7 @@ func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.OriginChain = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OriginDenom", 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.OriginDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Decimals", wireType) - } - x.Decimals = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Decimals |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", 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.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ImageUrl", 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.ImageUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CoingeckoId", 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.CoingeckoId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IsEnabled", 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.IsEnabled = bool(v != 0) - case 12: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IbcPath", 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.IbcPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 13: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IbcChannel", 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.IbcChannel = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 14: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IbcPort", 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.IbcPort = 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 _ protoreflect.List = (*_ChainInfo_7_list)(nil) - -type _ChainInfo_7_list struct { - list *[]*Endpoint -} - -func (x *_ChainInfo_7_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ChainInfo_7_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ChainInfo_7_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Endpoint) - (*x.list)[i] = concreteValue -} - -func (x *_ChainInfo_7_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Endpoint) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ChainInfo_7_list) AppendMutable() protoreflect.Value { - v := new(Endpoint) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ChainInfo_7_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ChainInfo_7_list) NewElement() protoreflect.Value { - v := new(Endpoint) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ChainInfo_7_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_ChainInfo_8_list)(nil) - -type _ChainInfo_8_list struct { - list *[]*Endpoint -} - -func (x *_ChainInfo_8_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ChainInfo_8_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ChainInfo_8_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Endpoint) - (*x.list)[i] = concreteValue -} - -func (x *_ChainInfo_8_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Endpoint) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ChainInfo_8_list) AppendMutable() protoreflect.Value { - v := new(Endpoint) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ChainInfo_8_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ChainInfo_8_list) NewElement() protoreflect.Value { - v := new(Endpoint) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ChainInfo_8_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ChainInfo protoreflect.MessageDescriptor - fd_ChainInfo_id protoreflect.FieldDescriptor - fd_ChainInfo_chain_id protoreflect.FieldDescriptor - fd_ChainInfo_name protoreflect.FieldDescriptor - fd_ChainInfo_symbol protoreflect.FieldDescriptor - fd_ChainInfo_bech32_prefix protoreflect.FieldDescriptor - fd_ChainInfo_genesis_time protoreflect.FieldDescriptor - fd_ChainInfo_grpc_endpoints protoreflect.FieldDescriptor - fd_ChainInfo_rest_endpoints protoreflect.FieldDescriptor - fd_ChainInfo_explorer protoreflect.FieldDescriptor - fd_ChainInfo_fee_info protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_types_proto_init() - md_ChainInfo = File_did_v1_types_proto.Messages().ByName("ChainInfo") - fd_ChainInfo_id = md_ChainInfo.Fields().ByName("id") - fd_ChainInfo_chain_id = md_ChainInfo.Fields().ByName("chain_id") - fd_ChainInfo_name = md_ChainInfo.Fields().ByName("name") - fd_ChainInfo_symbol = md_ChainInfo.Fields().ByName("symbol") - fd_ChainInfo_bech32_prefix = md_ChainInfo.Fields().ByName("bech32_prefix") - fd_ChainInfo_genesis_time = md_ChainInfo.Fields().ByName("genesis_time") - fd_ChainInfo_grpc_endpoints = md_ChainInfo.Fields().ByName("grpc_endpoints") - fd_ChainInfo_rest_endpoints = md_ChainInfo.Fields().ByName("rest_endpoints") - fd_ChainInfo_explorer = md_ChainInfo.Fields().ByName("explorer") - fd_ChainInfo_fee_info = md_ChainInfo.Fields().ByName("fee_info") -} - -var _ protoreflect.Message = (*fastReflection_ChainInfo)(nil) - -type fastReflection_ChainInfo ChainInfo - -func (x *ChainInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_ChainInfo)(x) -} - -func (x *ChainInfo) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_types_proto_msgTypes[1] - 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_ChainInfo_messageType fastReflection_ChainInfo_messageType -var _ protoreflect.MessageType = fastReflection_ChainInfo_messageType{} - -type fastReflection_ChainInfo_messageType struct{} - -func (x fastReflection_ChainInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_ChainInfo)(nil) -} -func (x fastReflection_ChainInfo_messageType) New() protoreflect.Message { - return new(fastReflection_ChainInfo) -} -func (x fastReflection_ChainInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ChainInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ChainInfo) Descriptor() protoreflect.MessageDescriptor { - return md_ChainInfo -} - -// 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_ChainInfo) Type() protoreflect.MessageType { - return _fastReflection_ChainInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ChainInfo) New() protoreflect.Message { - return new(fastReflection_ChainInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ChainInfo) Interface() protoreflect.ProtoMessage { - return (*ChainInfo)(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_ChainInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_ChainInfo_id, value) { - return - } - } - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_ChainInfo_chain_id, value) { - return - } - } - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_ChainInfo_name, value) { - return - } - } - if x.Symbol != "" { - value := protoreflect.ValueOfString(x.Symbol) - if !f(fd_ChainInfo_symbol, value) { - return - } - } - if x.Bech32Prefix != "" { - value := protoreflect.ValueOfString(x.Bech32Prefix) - if !f(fd_ChainInfo_bech32_prefix, value) { - return - } - } - if x.GenesisTime != "" { - value := protoreflect.ValueOfString(x.GenesisTime) - if !f(fd_ChainInfo_genesis_time, value) { - return - } - } - if len(x.GrpcEndpoints) != 0 { - value := protoreflect.ValueOfList(&_ChainInfo_7_list{list: &x.GrpcEndpoints}) - if !f(fd_ChainInfo_grpc_endpoints, value) { - return - } - } - if len(x.RestEndpoints) != 0 { - value := protoreflect.ValueOfList(&_ChainInfo_8_list{list: &x.RestEndpoints}) - if !f(fd_ChainInfo_rest_endpoints, value) { - return - } - } - if x.Explorer != nil { - value := protoreflect.ValueOfMessage(x.Explorer.ProtoReflect()) - if !f(fd_ChainInfo_explorer, value) { - return - } - } - if x.FeeInfo != nil { - value := protoreflect.ValueOfMessage(x.FeeInfo.ProtoReflect()) - if !f(fd_ChainInfo_fee_info, 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_ChainInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.ChainInfo.id": - return x.Id != "" - case "did.v1.ChainInfo.chain_id": - return x.ChainId != "" - case "did.v1.ChainInfo.name": - return x.Name != "" - case "did.v1.ChainInfo.symbol": - return x.Symbol != "" - case "did.v1.ChainInfo.bech32_prefix": - return x.Bech32Prefix != "" - case "did.v1.ChainInfo.genesis_time": - return x.GenesisTime != "" - case "did.v1.ChainInfo.grpc_endpoints": - return len(x.GrpcEndpoints) != 0 - case "did.v1.ChainInfo.rest_endpoints": - return len(x.RestEndpoints) != 0 - case "did.v1.ChainInfo.explorer": - return x.Explorer != nil - case "did.v1.ChainInfo.fee_info": - return x.FeeInfo != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) - } - panic(fmt.Errorf("message did.v1.ChainInfo 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_ChainInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.ChainInfo.id": - x.Id = "" - case "did.v1.ChainInfo.chain_id": - x.ChainId = "" - case "did.v1.ChainInfo.name": - x.Name = "" - case "did.v1.ChainInfo.symbol": - x.Symbol = "" - case "did.v1.ChainInfo.bech32_prefix": - x.Bech32Prefix = "" - case "did.v1.ChainInfo.genesis_time": - x.GenesisTime = "" - case "did.v1.ChainInfo.grpc_endpoints": - x.GrpcEndpoints = nil - case "did.v1.ChainInfo.rest_endpoints": - x.RestEndpoints = nil - case "did.v1.ChainInfo.explorer": - x.Explorer = nil - case "did.v1.ChainInfo.fee_info": - x.FeeInfo = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) - } - panic(fmt.Errorf("message did.v1.ChainInfo 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_ChainInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.ChainInfo.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "did.v1.ChainInfo.chain_id": - value := x.ChainId - return protoreflect.ValueOfString(value) - case "did.v1.ChainInfo.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "did.v1.ChainInfo.symbol": - value := x.Symbol - return protoreflect.ValueOfString(value) - case "did.v1.ChainInfo.bech32_prefix": - value := x.Bech32Prefix - return protoreflect.ValueOfString(value) - case "did.v1.ChainInfo.genesis_time": - value := x.GenesisTime - return protoreflect.ValueOfString(value) - case "did.v1.ChainInfo.grpc_endpoints": - if len(x.GrpcEndpoints) == 0 { - return protoreflect.ValueOfList(&_ChainInfo_7_list{}) - } - listValue := &_ChainInfo_7_list{list: &x.GrpcEndpoints} - return protoreflect.ValueOfList(listValue) - case "did.v1.ChainInfo.rest_endpoints": - if len(x.RestEndpoints) == 0 { - return protoreflect.ValueOfList(&_ChainInfo_8_list{}) - } - listValue := &_ChainInfo_8_list{list: &x.RestEndpoints} - return protoreflect.ValueOfList(listValue) - case "did.v1.ChainInfo.explorer": - value := x.Explorer - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "did.v1.ChainInfo.fee_info": - value := x.FeeInfo - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) - } - panic(fmt.Errorf("message did.v1.ChainInfo 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_ChainInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.ChainInfo.id": - x.Id = value.Interface().(string) - case "did.v1.ChainInfo.chain_id": - x.ChainId = value.Interface().(string) - case "did.v1.ChainInfo.name": - x.Name = value.Interface().(string) - case "did.v1.ChainInfo.symbol": - x.Symbol = value.Interface().(string) - case "did.v1.ChainInfo.bech32_prefix": - x.Bech32Prefix = value.Interface().(string) - case "did.v1.ChainInfo.genesis_time": - x.GenesisTime = value.Interface().(string) - case "did.v1.ChainInfo.grpc_endpoints": - lv := value.List() - clv := lv.(*_ChainInfo_7_list) - x.GrpcEndpoints = *clv.list - case "did.v1.ChainInfo.rest_endpoints": - lv := value.List() - clv := lv.(*_ChainInfo_8_list) - x.RestEndpoints = *clv.list - case "did.v1.ChainInfo.explorer": - x.Explorer = value.Message().Interface().(*ExplorerInfo) - case "did.v1.ChainInfo.fee_info": - x.FeeInfo = value.Message().Interface().(*FeeInfo) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) - } - panic(fmt.Errorf("message did.v1.ChainInfo 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_ChainInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.ChainInfo.grpc_endpoints": - if x.GrpcEndpoints == nil { - x.GrpcEndpoints = []*Endpoint{} - } - value := &_ChainInfo_7_list{list: &x.GrpcEndpoints} - return protoreflect.ValueOfList(value) - case "did.v1.ChainInfo.rest_endpoints": - if x.RestEndpoints == nil { - x.RestEndpoints = []*Endpoint{} - } - value := &_ChainInfo_8_list{list: &x.RestEndpoints} - return protoreflect.ValueOfList(value) - case "did.v1.ChainInfo.explorer": - if x.Explorer == nil { - x.Explorer = new(ExplorerInfo) - } - return protoreflect.ValueOfMessage(x.Explorer.ProtoReflect()) - case "did.v1.ChainInfo.fee_info": - if x.FeeInfo == nil { - x.FeeInfo = new(FeeInfo) - } - return protoreflect.ValueOfMessage(x.FeeInfo.ProtoReflect()) - case "did.v1.ChainInfo.id": - panic(fmt.Errorf("field id of message did.v1.ChainInfo is not mutable")) - case "did.v1.ChainInfo.chain_id": - panic(fmt.Errorf("field chain_id of message did.v1.ChainInfo is not mutable")) - case "did.v1.ChainInfo.name": - panic(fmt.Errorf("field name of message did.v1.ChainInfo is not mutable")) - case "did.v1.ChainInfo.symbol": - panic(fmt.Errorf("field symbol of message did.v1.ChainInfo is not mutable")) - case "did.v1.ChainInfo.bech32_prefix": - panic(fmt.Errorf("field bech32_prefix of message did.v1.ChainInfo is not mutable")) - case "did.v1.ChainInfo.genesis_time": - panic(fmt.Errorf("field genesis_time of message did.v1.ChainInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) - } - panic(fmt.Errorf("message did.v1.ChainInfo 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_ChainInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.ChainInfo.id": - return protoreflect.ValueOfString("") - case "did.v1.ChainInfo.chain_id": - return protoreflect.ValueOfString("") - case "did.v1.ChainInfo.name": - return protoreflect.ValueOfString("") - case "did.v1.ChainInfo.symbol": - return protoreflect.ValueOfString("") - case "did.v1.ChainInfo.bech32_prefix": - return protoreflect.ValueOfString("") - case "did.v1.ChainInfo.genesis_time": - return protoreflect.ValueOfString("") - case "did.v1.ChainInfo.grpc_endpoints": - list := []*Endpoint{} - return protoreflect.ValueOfList(&_ChainInfo_7_list{list: &list}) - case "did.v1.ChainInfo.rest_endpoints": - list := []*Endpoint{} - return protoreflect.ValueOfList(&_ChainInfo_8_list{list: &list}) - case "did.v1.ChainInfo.explorer": - m := new(ExplorerInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "did.v1.ChainInfo.fee_info": - m := new(FeeInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) - } - panic(fmt.Errorf("message did.v1.ChainInfo 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_ChainInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.ChainInfo", 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_ChainInfo) 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_ChainInfo) 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_ChainInfo) 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_ChainInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ChainInfo) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Symbol) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Bech32Prefix) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.GenesisTime) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.GrpcEndpoints) > 0 { - for _, e := range x.GrpcEndpoints { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.RestEndpoints) > 0 { - for _, e := range x.RestEndpoints { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Explorer != nil { - l = options.Size(x.Explorer) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.FeeInfo != nil { - l = options.Size(x.FeeInfo) - 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().(*ChainInfo) - 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.FeeInfo != nil { - encoded, err := options.Marshal(x.FeeInfo) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x52 - } - if x.Explorer != nil { - encoded, err := options.Marshal(x.Explorer) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x4a - } - if len(x.RestEndpoints) > 0 { - for iNdEx := len(x.RestEndpoints) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.RestEndpoints[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x42 - } - } - if len(x.GrpcEndpoints) > 0 { - for iNdEx := len(x.GrpcEndpoints) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.GrpcEndpoints[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - } - if len(x.GenesisTime) > 0 { - i -= len(x.GenesisTime) - copy(dAtA[i:], x.GenesisTime) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GenesisTime))) - i-- - dAtA[i] = 0x32 - } - if len(x.Bech32Prefix) > 0 { - i -= len(x.Bech32Prefix) - copy(dAtA[i:], x.Bech32Prefix) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bech32Prefix))) - i-- - dAtA[i] = 0x2a - } - if len(x.Symbol) > 0 { - i -= len(x.Symbol) - copy(dAtA[i:], x.Symbol) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Symbol))) - i-- - dAtA[i] = 0x22 - } - if len(x.Name) > 0 { - i -= len(x.Name) - copy(dAtA[i:], x.Name) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) - i-- - dAtA[i] = 0x1a - } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ChainInfo) - 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: ChainInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ChainInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", 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.ChainId = 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 Name", 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.Name = 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 Symbol", 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.Symbol = 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 Bech32Prefix", 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.Bech32Prefix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GenesisTime", 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.GenesisTime = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GrpcEndpoints", 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 - } - x.GrpcEndpoints = append(x.GrpcEndpoints, &Endpoint{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.GrpcEndpoints[len(x.GrpcEndpoints)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RestEndpoints", 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 - } - x.RestEndpoints = append(x.RestEndpoints, &Endpoint{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RestEndpoints[len(x.RestEndpoints)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Explorer", 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.Explorer == nil { - x.Explorer = &ExplorerInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Explorer); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeeInfo", 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.FeeInfo == nil { - x.FeeInfo = &FeeInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.FeeInfo); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } + x.Paths = append(x.Paths, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -2465,25 +780,23 @@ func (x *_Credential_4_list) IsValid() bool { } var ( - md_Credential protoreflect.MessageDescriptor - fd_Credential_id protoreflect.FieldDescriptor - fd_Credential_credential_type protoreflect.FieldDescriptor - fd_Credential_credential_id protoreflect.FieldDescriptor - fd_Credential_transport protoreflect.FieldDescriptor - fd_Credential_attestation_type protoreflect.FieldDescriptor - fd_Credential_display_name protoreflect.FieldDescriptor - fd_Credential_controller protoreflect.FieldDescriptor + md_Credential protoreflect.MessageDescriptor + fd_Credential_id protoreflect.FieldDescriptor + fd_Credential_credential_type protoreflect.FieldDescriptor + fd_Credential_credential_id protoreflect.FieldDescriptor + fd_Credential_transport protoreflect.FieldDescriptor + fd_Credential_subject protoreflect.FieldDescriptor + fd_Credential_controller protoreflect.FieldDescriptor ) func init() { - file_did_v1_types_proto_init() - md_Credential = File_did_v1_types_proto.Messages().ByName("Credential") + file_did_v1_models_proto_init() + md_Credential = File_did_v1_models_proto.Messages().ByName("Credential") fd_Credential_id = md_Credential.Fields().ByName("id") fd_Credential_credential_type = md_Credential.Fields().ByName("credential_type") fd_Credential_credential_id = md_Credential.Fields().ByName("credential_id") fd_Credential_transport = md_Credential.Fields().ByName("transport") - fd_Credential_attestation_type = md_Credential.Fields().ByName("attestation_type") - fd_Credential_display_name = md_Credential.Fields().ByName("display_name") + fd_Credential_subject = md_Credential.Fields().ByName("subject") fd_Credential_controller = md_Credential.Fields().ByName("controller") } @@ -2496,7 +809,7 @@ func (x *Credential) ProtoReflect() protoreflect.Message { } func (x *Credential) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_types_proto_msgTypes[2] + mi := &file_did_v1_models_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2576,15 +889,9 @@ func (x *fastReflection_Credential) Range(f func(protoreflect.FieldDescriptor, p return } } - if x.AttestationType != "" { - value := protoreflect.ValueOfString(x.AttestationType) - if !f(fd_Credential_attestation_type, value) { - return - } - } - if x.DisplayName != "" { - value := protoreflect.ValueOfString(x.DisplayName) - if !f(fd_Credential_display_name, value) { + if x.Subject != "" { + value := protoreflect.ValueOfString(x.Subject) + if !f(fd_Credential_subject, value) { return } } @@ -2617,10 +924,8 @@ func (x *fastReflection_Credential) Has(fd protoreflect.FieldDescriptor) bool { return len(x.CredentialId) != 0 case "did.v1.Credential.transport": return len(x.Transport) != 0 - case "did.v1.Credential.attestation_type": - return x.AttestationType != "" - case "did.v1.Credential.display_name": - return x.DisplayName != "" + case "did.v1.Credential.subject": + return x.Subject != "" case "did.v1.Credential.controller": return x.Controller != "" default: @@ -2647,10 +952,8 @@ func (x *fastReflection_Credential) Clear(fd protoreflect.FieldDescriptor) { x.CredentialId = nil case "did.v1.Credential.transport": x.Transport = nil - case "did.v1.Credential.attestation_type": - x.AttestationType = "" - case "did.v1.Credential.display_name": - x.DisplayName = "" + case "did.v1.Credential.subject": + x.Subject = "" case "did.v1.Credential.controller": x.Controller = "" default: @@ -2684,11 +987,8 @@ func (x *fastReflection_Credential) Get(descriptor protoreflect.FieldDescriptor) } listValue := &_Credential_4_list{list: &x.Transport} return protoreflect.ValueOfList(listValue) - case "did.v1.Credential.attestation_type": - value := x.AttestationType - return protoreflect.ValueOfString(value) - case "did.v1.Credential.display_name": - value := x.DisplayName + case "did.v1.Credential.subject": + value := x.Subject return protoreflect.ValueOfString(value) case "did.v1.Credential.controller": value := x.Controller @@ -2723,10 +1023,8 @@ func (x *fastReflection_Credential) Set(fd protoreflect.FieldDescriptor, value p lv := value.List() clv := lv.(*_Credential_4_list) x.Transport = *clv.list - case "did.v1.Credential.attestation_type": - x.AttestationType = value.Interface().(string) - case "did.v1.Credential.display_name": - x.DisplayName = value.Interface().(string) + case "did.v1.Credential.subject": + x.Subject = value.Interface().(string) case "did.v1.Credential.controller": x.Controller = value.Interface().(string) default: @@ -2761,10 +1059,8 @@ func (x *fastReflection_Credential) Mutable(fd protoreflect.FieldDescriptor) pro panic(fmt.Errorf("field credential_type of message did.v1.Credential is not mutable")) case "did.v1.Credential.credential_id": panic(fmt.Errorf("field credential_id of message did.v1.Credential is not mutable")) - case "did.v1.Credential.attestation_type": - panic(fmt.Errorf("field attestation_type of message did.v1.Credential is not mutable")) - case "did.v1.Credential.display_name": - panic(fmt.Errorf("field display_name of message did.v1.Credential is not mutable")) + case "did.v1.Credential.subject": + panic(fmt.Errorf("field subject of message did.v1.Credential is not mutable")) case "did.v1.Credential.controller": panic(fmt.Errorf("field controller of message did.v1.Credential is not mutable")) default: @@ -2789,9 +1085,7 @@ func (x *fastReflection_Credential) NewField(fd protoreflect.FieldDescriptor) pr case "did.v1.Credential.transport": list := []string{} return protoreflect.ValueOfList(&_Credential_4_list{list: &list}) - case "did.v1.Credential.attestation_type": - return protoreflect.ValueOfString("") - case "did.v1.Credential.display_name": + case "did.v1.Credential.subject": return protoreflect.ValueOfString("") case "did.v1.Credential.controller": return protoreflect.ValueOfString("") @@ -2882,11 +1176,7 @@ func (x *fastReflection_Credential) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } - l = len(x.AttestationType) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.DisplayName) + l = len(x.Subject) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -2930,20 +1220,13 @@ func (x *fastReflection_Credential) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x3a } - if len(x.DisplayName) > 0 { - i -= len(x.DisplayName) - copy(dAtA[i:], x.DisplayName) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DisplayName))) + if len(x.Subject) > 0 { + i -= len(x.Subject) + copy(dAtA[i:], x.Subject) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Subject))) i-- dAtA[i] = 0x32 } - if len(x.AttestationType) > 0 { - i -= len(x.AttestationType) - copy(dAtA[i:], x.AttestationType) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AttestationType))) - i-- - dAtA[i] = 0x2a - } if len(x.Transport) > 0 { for iNdEx := len(x.Transport) - 1; iNdEx >= 0; iNdEx-- { i -= len(x.Transport[iNdEx]) @@ -3153,41 +1436,9 @@ func (x *fastReflection_Credential) ProtoMethods() *protoiface.Methods { } x.Transport = append(x.Transport, 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 AttestationType", 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.AttestationType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 6: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DisplayName", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3215,7 +1466,7 @@ func (x *fastReflection_Credential) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.DisplayName = string(dAtA[iNdEx:postIndex]) + x.Subject = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 7: if wireType != 2 { @@ -3530,8 +1781,8 @@ var ( ) func init() { - file_did_v1_types_proto_init() - md_Document = File_did_v1_types_proto.Messages().ByName("Document") + file_did_v1_models_proto_init() + md_Document = File_did_v1_models_proto.Messages().ByName("Document") fd_Document_id = md_Document.Fields().ByName("id") fd_Document_verification_methods = md_Document.Fields().ByName("verification_methods") fd_Document_authentication = md_Document.Fields().ByName("authentication") @@ -3549,7 +1800,7 @@ func (x *Document) ProtoReflect() protoreflect.Message { } func (x *Document) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_types_proto_msgTypes[3] + mi := &file_did_v1_models_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4338,1039 +2589,203 @@ func (x *fastReflection_Document) ProtoMethods() *protoiface.Methods { } } -var ( - md_Endpoint protoreflect.MessageDescriptor - fd_Endpoint_url protoreflect.FieldDescriptor - fd_Endpoint_is_primary protoreflect.FieldDescriptor -) +var _ protoreflect.Map = (*_Metadata_2_map)(nil) -func init() { - file_did_v1_types_proto_init() - md_Endpoint = File_did_v1_types_proto.Messages().ByName("Endpoint") - fd_Endpoint_url = md_Endpoint.Fields().ByName("url") - fd_Endpoint_is_primary = md_Endpoint.Fields().ByName("is_primary") +type _Metadata_2_map struct { + m *map[string]string } -var _ protoreflect.Message = (*fastReflection_Endpoint)(nil) - -type fastReflection_Endpoint Endpoint - -func (x *Endpoint) ProtoReflect() protoreflect.Message { - return (*fastReflection_Endpoint)(x) -} - -func (x *Endpoint) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_types_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_Endpoint_messageType fastReflection_Endpoint_messageType -var _ protoreflect.MessageType = fastReflection_Endpoint_messageType{} - -type fastReflection_Endpoint_messageType struct{} - -func (x fastReflection_Endpoint_messageType) Zero() protoreflect.Message { - return (*fastReflection_Endpoint)(nil) -} -func (x fastReflection_Endpoint_messageType) New() protoreflect.Message { - return new(fastReflection_Endpoint) -} -func (x fastReflection_Endpoint_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Endpoint -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Endpoint) Descriptor() protoreflect.MessageDescriptor { - return md_Endpoint -} - -// 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_Endpoint) Type() protoreflect.MessageType { - return _fastReflection_Endpoint_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Endpoint) New() protoreflect.Message { - return new(fastReflection_Endpoint) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Endpoint) Interface() protoreflect.ProtoMessage { - return (*Endpoint)(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_Endpoint) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Url != "" { - value := protoreflect.ValueOfString(x.Url) - if !f(fd_Endpoint_url, value) { - return - } - } - if x.IsPrimary != false { - value := protoreflect.ValueOfBool(x.IsPrimary) - if !f(fd_Endpoint_is_primary, 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_Endpoint) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.Endpoint.url": - return x.Url != "" - case "did.v1.Endpoint.is_primary": - return x.IsPrimary != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Endpoint")) - } - panic(fmt.Errorf("message did.v1.Endpoint 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_Endpoint) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.Endpoint.url": - x.Url = "" - case "did.v1.Endpoint.is_primary": - x.IsPrimary = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Endpoint")) - } - panic(fmt.Errorf("message did.v1.Endpoint 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_Endpoint) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.Endpoint.url": - value := x.Url - return protoreflect.ValueOfString(value) - case "did.v1.Endpoint.is_primary": - value := x.IsPrimary - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Endpoint")) - } - panic(fmt.Errorf("message did.v1.Endpoint 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_Endpoint) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.Endpoint.url": - x.Url = value.Interface().(string) - case "did.v1.Endpoint.is_primary": - x.IsPrimary = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Endpoint")) - } - panic(fmt.Errorf("message did.v1.Endpoint 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_Endpoint) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Endpoint.url": - panic(fmt.Errorf("field url of message did.v1.Endpoint is not mutable")) - case "did.v1.Endpoint.is_primary": - panic(fmt.Errorf("field is_primary of message did.v1.Endpoint is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Endpoint")) - } - panic(fmt.Errorf("message did.v1.Endpoint 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_Endpoint) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Endpoint.url": - return protoreflect.ValueOfString("") - case "did.v1.Endpoint.is_primary": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Endpoint")) - } - panic(fmt.Errorf("message did.v1.Endpoint 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_Endpoint) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.Endpoint", 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_Endpoint) 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_Endpoint) 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_Endpoint) 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_Endpoint) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Endpoint) - 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.Url) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.IsPrimary { - 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().(*Endpoint) - 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.IsPrimary { - i-- - if x.IsPrimary { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(x.Url) > 0 { - i -= len(x.Url) - copy(dAtA[i:], x.Url) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Url))) - 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().(*Endpoint) - 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: Endpoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Endpoint: 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 Url", 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.Url = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IsPrimary", 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.IsPrimary = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ExplorerInfo protoreflect.MessageDescriptor - fd_ExplorerInfo_name protoreflect.FieldDescriptor - fd_ExplorerInfo_url protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_types_proto_init() - md_ExplorerInfo = File_did_v1_types_proto.Messages().ByName("ExplorerInfo") - fd_ExplorerInfo_name = md_ExplorerInfo.Fields().ByName("name") - fd_ExplorerInfo_url = md_ExplorerInfo.Fields().ByName("url") -} - -var _ protoreflect.Message = (*fastReflection_ExplorerInfo)(nil) - -type fastReflection_ExplorerInfo ExplorerInfo - -func (x *ExplorerInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_ExplorerInfo)(x) -} - -func (x *ExplorerInfo) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_types_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_ExplorerInfo_messageType fastReflection_ExplorerInfo_messageType -var _ protoreflect.MessageType = fastReflection_ExplorerInfo_messageType{} - -type fastReflection_ExplorerInfo_messageType struct{} - -func (x fastReflection_ExplorerInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_ExplorerInfo)(nil) -} -func (x fastReflection_ExplorerInfo_messageType) New() protoreflect.Message { - return new(fastReflection_ExplorerInfo) -} -func (x fastReflection_ExplorerInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ExplorerInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ExplorerInfo) Descriptor() protoreflect.MessageDescriptor { - return md_ExplorerInfo -} - -// 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_ExplorerInfo) Type() protoreflect.MessageType { - return _fastReflection_ExplorerInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ExplorerInfo) New() protoreflect.Message { - return new(fastReflection_ExplorerInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ExplorerInfo) Interface() protoreflect.ProtoMessage { - return (*ExplorerInfo)(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_ExplorerInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_ExplorerInfo_name, value) { - return - } - } - if x.Url != "" { - value := protoreflect.ValueOfString(x.Url) - if !f(fd_ExplorerInfo_url, 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_ExplorerInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.ExplorerInfo.name": - return x.Name != "" - case "did.v1.ExplorerInfo.url": - return x.Url != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ExplorerInfo")) - } - panic(fmt.Errorf("message did.v1.ExplorerInfo 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_ExplorerInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.ExplorerInfo.name": - x.Name = "" - case "did.v1.ExplorerInfo.url": - x.Url = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ExplorerInfo")) - } - panic(fmt.Errorf("message did.v1.ExplorerInfo 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_ExplorerInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.ExplorerInfo.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "did.v1.ExplorerInfo.url": - value := x.Url - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ExplorerInfo")) - } - panic(fmt.Errorf("message did.v1.ExplorerInfo 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_ExplorerInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.ExplorerInfo.name": - x.Name = value.Interface().(string) - case "did.v1.ExplorerInfo.url": - x.Url = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ExplorerInfo")) - } - panic(fmt.Errorf("message did.v1.ExplorerInfo 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_ExplorerInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.ExplorerInfo.name": - panic(fmt.Errorf("field name of message did.v1.ExplorerInfo is not mutable")) - case "did.v1.ExplorerInfo.url": - panic(fmt.Errorf("field url of message did.v1.ExplorerInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ExplorerInfo")) - } - panic(fmt.Errorf("message did.v1.ExplorerInfo 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_ExplorerInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.ExplorerInfo.name": - return protoreflect.ValueOfString("") - case "did.v1.ExplorerInfo.url": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ExplorerInfo")) - } - panic(fmt.Errorf("message did.v1.ExplorerInfo 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_ExplorerInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.ExplorerInfo", 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_ExplorerInfo) 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_ExplorerInfo) 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_ExplorerInfo) 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_ExplorerInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ExplorerInfo) - 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.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Url) - 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().(*ExplorerInfo) - 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.Url) > 0 { - i -= len(x.Url) - copy(dAtA[i:], x.Url) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Url))) - i-- - dAtA[i] = 0x12 - } - if len(x.Name) > 0 { - i -= len(x.Name) - copy(dAtA[i:], x.Name) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) - 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().(*ExplorerInfo) - 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: ExplorerInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ExplorerInfo: 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 Name", 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.Name = 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 Url", 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.Url = 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 _ protoreflect.List = (*_FeeInfo_2_list)(nil) - -type _FeeInfo_2_list struct { - list *[]string -} - -func (x *_FeeInfo_2_list) Len() int { - if x.list == nil { +func (x *_Metadata_2_map) Len() int { + if x.m == nil { return 0 } - return len(*x.list) + return len(*x.m) } -func (x *_FeeInfo_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) +func (x *_Metadata_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 *_FeeInfo_2_list) Set(i int, value protoreflect.Value) { +func (x *_Metadata_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 *_Metadata_2_map) Clear(key protoreflect.MapKey) { + if x.m == nil { + return + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + delete(*x.m, concreteKey) +} + +func (x *_Metadata_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 *_Metadata_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.list)[i] = concreteValue + (*x.m)[concreteKey] = concreteValue } -func (x *_FeeInfo_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) +func (x *_Metadata_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 *_FeeInfo_2_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message FeeInfo at list field FeeRates as it is not of Message kind")) -} - -func (x *_FeeInfo_2_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_FeeInfo_2_list) NewElement() protoreflect.Value { +func (x *_Metadata_2_map) NewValue() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } -func (x *_FeeInfo_2_list) IsValid() bool { - return x.list != nil +func (x *_Metadata_2_map) IsValid() bool { + return x.m != nil +} + +var _ protoreflect.Map = (*_Metadata_3_map)(nil) + +type _Metadata_3_map struct { + m *map[string]*Property +} + +func (x *_Metadata_3_map) Len() int { + if x.m == nil { + return 0 + } + return len(*x.m) +} + +func (x *_Metadata_3_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.ValueOfMessage(v.ProtoReflect()) + if !f(mapKey, mapValue) { + break + } + } +} + +func (x *_Metadata_3_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 *_Metadata_3_map) Clear(key protoreflect.MapKey) { + if x.m == nil { + return + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + delete(*x.m, concreteKey) +} + +func (x *_Metadata_3_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.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Metadata_3_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.Message() + concreteValue := valueUnwrapped.Interface().(*Property) + (*x.m)[concreteKey] = concreteValue +} + +func (x *_Metadata_3_map) Mutable(key protoreflect.MapKey) protoreflect.Value { + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + v, ok := (*x.m)[concreteKey] + if ok { + return protoreflect.ValueOfMessage(v.ProtoReflect()) + } + newValue := new(Property) + (*x.m)[concreteKey] = newValue + return protoreflect.ValueOfMessage(newValue.ProtoReflect()) +} + +func (x *_Metadata_3_map) NewValue() protoreflect.Value { + v := new(Property) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Metadata_3_map) IsValid() bool { + return x.m != nil } var ( - md_FeeInfo protoreflect.MessageDescriptor - fd_FeeInfo_base_denom protoreflect.FieldDescriptor - fd_FeeInfo_fee_rates protoreflect.FieldDescriptor - fd_FeeInfo_init_gas_limit protoreflect.FieldDescriptor - fd_FeeInfo_is_simulable protoreflect.FieldDescriptor - fd_FeeInfo_gas_multiply protoreflect.FieldDescriptor + md_Metadata protoreflect.MessageDescriptor + fd_Metadata_origin_uri protoreflect.FieldDescriptor + fd_Metadata_public protoreflect.FieldDescriptor + fd_Metadata_private protoreflect.FieldDescriptor ) func init() { - file_did_v1_types_proto_init() - md_FeeInfo = File_did_v1_types_proto.Messages().ByName("FeeInfo") - fd_FeeInfo_base_denom = md_FeeInfo.Fields().ByName("base_denom") - fd_FeeInfo_fee_rates = md_FeeInfo.Fields().ByName("fee_rates") - fd_FeeInfo_init_gas_limit = md_FeeInfo.Fields().ByName("init_gas_limit") - fd_FeeInfo_is_simulable = md_FeeInfo.Fields().ByName("is_simulable") - fd_FeeInfo_gas_multiply = md_FeeInfo.Fields().ByName("gas_multiply") + file_did_v1_models_proto_init() + md_Metadata = File_did_v1_models_proto.Messages().ByName("Metadata") + fd_Metadata_origin_uri = md_Metadata.Fields().ByName("origin_uri") + fd_Metadata_public = md_Metadata.Fields().ByName("public") + fd_Metadata_private = md_Metadata.Fields().ByName("private") } -var _ protoreflect.Message = (*fastReflection_FeeInfo)(nil) +var _ protoreflect.Message = (*fastReflection_Metadata)(nil) -type fastReflection_FeeInfo FeeInfo +type fastReflection_Metadata Metadata -func (x *FeeInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_FeeInfo)(x) +func (x *Metadata) ProtoReflect() protoreflect.Message { + return (*fastReflection_Metadata)(x) } -func (x *FeeInfo) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_types_proto_msgTypes[6] +func (x *Metadata) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_models_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5381,43 +2796,43 @@ func (x *FeeInfo) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_FeeInfo_messageType fastReflection_FeeInfo_messageType -var _ protoreflect.MessageType = fastReflection_FeeInfo_messageType{} +var _fastReflection_Metadata_messageType fastReflection_Metadata_messageType +var _ protoreflect.MessageType = fastReflection_Metadata_messageType{} -type fastReflection_FeeInfo_messageType struct{} +type fastReflection_Metadata_messageType struct{} -func (x fastReflection_FeeInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_FeeInfo)(nil) +func (x fastReflection_Metadata_messageType) Zero() protoreflect.Message { + return (*fastReflection_Metadata)(nil) } -func (x fastReflection_FeeInfo_messageType) New() protoreflect.Message { - return new(fastReflection_FeeInfo) +func (x fastReflection_Metadata_messageType) New() protoreflect.Message { + return new(fastReflection_Metadata) } -func (x fastReflection_FeeInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_FeeInfo +func (x fastReflection_Metadata_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Metadata } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_FeeInfo) Descriptor() protoreflect.MessageDescriptor { - return md_FeeInfo +func (x *fastReflection_Metadata) Descriptor() protoreflect.MessageDescriptor { + return md_Metadata } // 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_FeeInfo) Type() protoreflect.MessageType { - return _fastReflection_FeeInfo_messageType +func (x *fastReflection_Metadata) Type() protoreflect.MessageType { + return _fastReflection_Metadata_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_FeeInfo) New() protoreflect.Message { - return new(fastReflection_FeeInfo) +func (x *fastReflection_Metadata) New() protoreflect.Message { + return new(fastReflection_Metadata) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_FeeInfo) Interface() protoreflect.ProtoMessage { - return (*FeeInfo)(x) +func (x *fastReflection_Metadata) Interface() protoreflect.ProtoMessage { + return (*Metadata)(x) } // Range iterates over every populated field in an undefined order, @@ -5425,34 +2840,22 @@ func (x *fastReflection_FeeInfo) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_FeeInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.BaseDenom != "" { - value := protoreflect.ValueOfString(x.BaseDenom) - if !f(fd_FeeInfo_base_denom, value) { +func (x *fastReflection_Metadata) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.OriginUri != "" { + value := protoreflect.ValueOfString(x.OriginUri) + if !f(fd_Metadata_origin_uri, value) { return } } - if len(x.FeeRates) != 0 { - value := protoreflect.ValueOfList(&_FeeInfo_2_list{list: &x.FeeRates}) - if !f(fd_FeeInfo_fee_rates, value) { + if len(x.Public) != 0 { + value := protoreflect.ValueOfMap(&_Metadata_2_map{m: &x.Public}) + if !f(fd_Metadata_public, value) { return } } - if x.InitGasLimit != int32(0) { - value := protoreflect.ValueOfInt32(x.InitGasLimit) - if !f(fd_FeeInfo_init_gas_limit, value) { - return - } - } - if x.IsSimulable != false { - value := protoreflect.ValueOfBool(x.IsSimulable) - if !f(fd_FeeInfo_is_simulable, value) { - return - } - } - if x.GasMultiply != float64(0) || math.Signbit(x.GasMultiply) { - value := protoreflect.ValueOfFloat64(x.GasMultiply) - if !f(fd_FeeInfo_gas_multiply, value) { + if len(x.Private) != 0 { + value := protoreflect.ValueOfMap(&_Metadata_3_map{m: &x.Private}) + if !f(fd_Metadata_private, value) { return } } @@ -5469,23 +2872,19 @@ func (x *fastReflection_FeeInfo) Range(f func(protoreflect.FieldDescriptor, prot // 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_FeeInfo) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_Metadata) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.FeeInfo.base_denom": - return x.BaseDenom != "" - case "did.v1.FeeInfo.fee_rates": - return len(x.FeeRates) != 0 - case "did.v1.FeeInfo.init_gas_limit": - return x.InitGasLimit != int32(0) - case "did.v1.FeeInfo.is_simulable": - return x.IsSimulable != false - case "did.v1.FeeInfo.gas_multiply": - return x.GasMultiply != float64(0) || math.Signbit(x.GasMultiply) + case "did.v1.Metadata.origin_uri": + return x.OriginUri != "" + case "did.v1.Metadata.public": + return len(x.Public) != 0 + case "did.v1.Metadata.private": + return len(x.Private) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FeeInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Metadata")) } - panic(fmt.Errorf("message did.v1.FeeInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Metadata does not contain field %s", fd.FullName())) } } @@ -5495,23 +2894,19 @@ func (x *fastReflection_FeeInfo) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_FeeInfo) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_Metadata) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.FeeInfo.base_denom": - x.BaseDenom = "" - case "did.v1.FeeInfo.fee_rates": - x.FeeRates = nil - case "did.v1.FeeInfo.init_gas_limit": - x.InitGasLimit = int32(0) - case "did.v1.FeeInfo.is_simulable": - x.IsSimulable = false - case "did.v1.FeeInfo.gas_multiply": - x.GasMultiply = float64(0) + case "did.v1.Metadata.origin_uri": + x.OriginUri = "" + case "did.v1.Metadata.public": + x.Public = nil + case "did.v1.Metadata.private": + x.Private = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FeeInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Metadata")) } - panic(fmt.Errorf("message did.v1.FeeInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Metadata does not contain field %s", fd.FullName())) } } @@ -5521,31 +2916,28 @@ func (x *fastReflection_FeeInfo) Clear(fd protoreflect.FieldDescriptor) { // 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_FeeInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Metadata) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.FeeInfo.base_denom": - value := x.BaseDenom + case "did.v1.Metadata.origin_uri": + value := x.OriginUri return protoreflect.ValueOfString(value) - case "did.v1.FeeInfo.fee_rates": - if len(x.FeeRates) == 0 { - return protoreflect.ValueOfList(&_FeeInfo_2_list{}) + case "did.v1.Metadata.public": + if len(x.Public) == 0 { + return protoreflect.ValueOfMap(&_Metadata_2_map{}) } - listValue := &_FeeInfo_2_list{list: &x.FeeRates} - return protoreflect.ValueOfList(listValue) - case "did.v1.FeeInfo.init_gas_limit": - value := x.InitGasLimit - return protoreflect.ValueOfInt32(value) - case "did.v1.FeeInfo.is_simulable": - value := x.IsSimulable - return protoreflect.ValueOfBool(value) - case "did.v1.FeeInfo.gas_multiply": - value := x.GasMultiply - return protoreflect.ValueOfFloat64(value) + mapValue := &_Metadata_2_map{m: &x.Public} + return protoreflect.ValueOfMap(mapValue) + case "did.v1.Metadata.private": + if len(x.Private) == 0 { + return protoreflect.ValueOfMap(&_Metadata_3_map{}) + } + mapValue := &_Metadata_3_map{m: &x.Private} + return protoreflect.ValueOfMap(mapValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FeeInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Metadata")) } - panic(fmt.Errorf("message did.v1.FeeInfo does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.Metadata does not contain field %s", descriptor.FullName())) } } @@ -5559,25 +2951,23 @@ func (x *fastReflection_FeeInfo) Get(descriptor protoreflect.FieldDescriptor) pr // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_FeeInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_Metadata) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.FeeInfo.base_denom": - x.BaseDenom = value.Interface().(string) - case "did.v1.FeeInfo.fee_rates": - lv := value.List() - clv := lv.(*_FeeInfo_2_list) - x.FeeRates = *clv.list - case "did.v1.FeeInfo.init_gas_limit": - x.InitGasLimit = int32(value.Int()) - case "did.v1.FeeInfo.is_simulable": - x.IsSimulable = value.Bool() - case "did.v1.FeeInfo.gas_multiply": - x.GasMultiply = value.Float() + case "did.v1.Metadata.origin_uri": + x.OriginUri = value.Interface().(string) + case "did.v1.Metadata.public": + mv := value.Map() + cmv := mv.(*_Metadata_2_map) + x.Public = *cmv.m + case "did.v1.Metadata.private": + mv := value.Map() + cmv := mv.(*_Metadata_3_map) + x.Private = *cmv.m default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FeeInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Metadata")) } - panic(fmt.Errorf("message did.v1.FeeInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Metadata does not contain field %s", fd.FullName())) } } @@ -5591,61 +2981,58 @@ func (x *fastReflection_FeeInfo) Set(fd protoreflect.FieldDescriptor, value prot // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_FeeInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Metadata) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.FeeInfo.fee_rates": - if x.FeeRates == nil { - x.FeeRates = []string{} + case "did.v1.Metadata.public": + if x.Public == nil { + x.Public = make(map[string]string) } - value := &_FeeInfo_2_list{list: &x.FeeRates} - return protoreflect.ValueOfList(value) - case "did.v1.FeeInfo.base_denom": - panic(fmt.Errorf("field base_denom of message did.v1.FeeInfo is not mutable")) - case "did.v1.FeeInfo.init_gas_limit": - panic(fmt.Errorf("field init_gas_limit of message did.v1.FeeInfo is not mutable")) - case "did.v1.FeeInfo.is_simulable": - panic(fmt.Errorf("field is_simulable of message did.v1.FeeInfo is not mutable")) - case "did.v1.FeeInfo.gas_multiply": - panic(fmt.Errorf("field gas_multiply of message did.v1.FeeInfo is not mutable")) + value := &_Metadata_2_map{m: &x.Public} + return protoreflect.ValueOfMap(value) + case "did.v1.Metadata.private": + if x.Private == nil { + x.Private = make(map[string]*Property) + } + value := &_Metadata_3_map{m: &x.Private} + return protoreflect.ValueOfMap(value) + case "did.v1.Metadata.origin_uri": + panic(fmt.Errorf("field origin_uri of message did.v1.Metadata is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FeeInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Metadata")) } - panic(fmt.Errorf("message did.v1.FeeInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Metadata 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_FeeInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Metadata) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.FeeInfo.base_denom": + case "did.v1.Metadata.origin_uri": return protoreflect.ValueOfString("") - case "did.v1.FeeInfo.fee_rates": - list := []string{} - return protoreflect.ValueOfList(&_FeeInfo_2_list{list: &list}) - case "did.v1.FeeInfo.init_gas_limit": - return protoreflect.ValueOfInt32(int32(0)) - case "did.v1.FeeInfo.is_simulable": - return protoreflect.ValueOfBool(false) - case "did.v1.FeeInfo.gas_multiply": - return protoreflect.ValueOfFloat64(float64(0)) + case "did.v1.Metadata.public": + m := make(map[string]string) + return protoreflect.ValueOfMap(&_Metadata_2_map{m: &m}) + case "did.v1.Metadata.private": + m := make(map[string]*Property) + return protoreflect.ValueOfMap(&_Metadata_3_map{m: &m}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FeeInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Metadata")) } - panic(fmt.Errorf("message did.v1.FeeInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Metadata 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_FeeInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_Metadata) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.FeeInfo", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.Metadata", d.FullName())) } panic("unreachable") } @@ -5653,7 +3040,7 @@ func (x *fastReflection_FeeInfo) WhichOneof(d protoreflect.OneofDescriptor) prot // 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_FeeInfo) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_Metadata) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -5664,7 +3051,7 @@ func (x *fastReflection_FeeInfo) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_FeeInfo) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_Metadata) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -5676,7 +3063,7 @@ func (x *fastReflection_FeeInfo) SetUnknown(fields protoreflect.RawFields) { // 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_FeeInfo) IsValid() bool { +func (x *fastReflection_Metadata) IsValid() bool { return x != nil } @@ -5686,9 +3073,9 @@ func (x *fastReflection_FeeInfo) 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_FeeInfo) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_Metadata) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*FeeInfo) + x := input.Message.Interface().(*Metadata) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5700,24 +3087,56 @@ func (x *fastReflection_FeeInfo) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.BaseDenom) + l = len(x.OriginUri) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if len(x.FeeRates) > 0 { - for _, s := range x.FeeRates { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) + if len(x.Public) > 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.Public)) + for k := range x.Public { + sortme = append(sortme, k) + } + sort.Strings(sortme) + for _, k := range sortme { + v := x.Public[k] + SiZeMaP(k, v) + } + } else { + for k, v := range x.Public { + SiZeMaP(k, v) + } } } - if x.InitGasLimit != 0 { - n += 1 + runtime.Sov(uint64(x.InitGasLimit)) - } - if x.IsSimulable { - n += 2 - } - if x.GasMultiply != 0 || math.Signbit(x.GasMultiply) { - n += 9 + if len(x.Private) > 0 { + SiZeMaP := func(k string, v *Property) { + l := 0 + if v != nil { + l = options.Size(v) + } + l += 1 + runtime.Sov(uint64(l)) + mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + l + n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) + } + if options.Deterministic { + sortme := make([]string, 0, len(x.Private)) + for k := range x.Private { + sortme = append(sortme, k) + } + sort.Strings(sortme) + for _, k := range sortme { + v := x.Private[k] + SiZeMaP(k, v) + } + } else { + for k, v := range x.Private { + SiZeMaP(k, v) + } + } } if x.unknownFields != nil { n += len(x.unknownFields) @@ -5729,7 +3148,7 @@ func (x *fastReflection_FeeInfo) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*FeeInfo) + x := input.Message.Interface().(*Metadata) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5748,40 +3167,103 @@ func (x *fastReflection_FeeInfo) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.GasMultiply != 0 || math.Signbit(x.GasMultiply) { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(x.GasMultiply)))) - i-- - dAtA[i] = 0x29 - } - if x.IsSimulable { - i-- - if x.IsSimulable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if x.InitGasLimit != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.InitGasLimit)) - i-- - dAtA[i] = 0x18 - } - if len(x.FeeRates) > 0 { - for iNdEx := len(x.FeeRates) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.FeeRates[iNdEx]) - copy(dAtA[i:], x.FeeRates[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FeeRates[iNdEx]))) + if len(x.Private) > 0 { + MaRsHaLmAp := func(k string, v *Property) (protoiface.MarshalOutput, error) { + baseI := i + encoded, err := options.Marshal(v) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 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] = 0x1a + return protoiface.MarshalOutput{}, nil + } + if options.Deterministic { + keysForPrivate := make([]string, 0, len(x.Private)) + for k := range x.Private { + keysForPrivate = append(keysForPrivate, string(k)) + } + sort.Slice(keysForPrivate, func(i, j int) bool { + return keysForPrivate[i] < keysForPrivate[j] + }) + for iNdEx := len(keysForPrivate) - 1; iNdEx >= 0; iNdEx-- { + v := x.Private[string(keysForPrivate[iNdEx])] + out, err := MaRsHaLmAp(keysForPrivate[iNdEx], v) + if err != nil { + return out, err + } + } + } else { + for k := range x.Private { + v := x.Private[k] + out, err := MaRsHaLmAp(k, v) + if err != nil { + return out, err + } + } } } - if len(x.BaseDenom) > 0 { - i -= len(x.BaseDenom) - copy(dAtA[i:], x.BaseDenom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BaseDenom))) + if len(x.Public) > 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 { + keysForPublic := make([]string, 0, len(x.Public)) + for k := range x.Public { + keysForPublic = append(keysForPublic, string(k)) + } + sort.Slice(keysForPublic, func(i, j int) bool { + return keysForPublic[i] < keysForPublic[j] + }) + for iNdEx := len(keysForPublic) - 1; iNdEx >= 0; iNdEx-- { + v := x.Public[string(keysForPublic[iNdEx])] + out, err := MaRsHaLmAp(keysForPublic[iNdEx], v) + if err != nil { + return out, err + } + } + } else { + for k := range x.Public { + v := x.Public[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] = 0xa } @@ -5796,7 +3278,7 @@ func (x *fastReflection_FeeInfo) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*FeeInfo) + x := input.Message.Interface().(*Metadata) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5828,15 +3310,15 @@ func (x *fastReflection_FeeInfo) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FeeInfo: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Metadata: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FeeInfo: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Metadata: 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 BaseDenom", wireType) + 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 { @@ -5864,13 +3346,13 @@ func (x *fastReflection_FeeInfo) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.BaseDenom = string(dAtA[iNdEx:postIndex]) + x.OriginUri = 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 FeeRates", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Public", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -5880,29 +3362,124 @@ func (x *fastReflection_FeeInfo) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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 } - x.FeeRates = append(x.FeeRates, string(dAtA[iNdEx:postIndex])) + if x.Public == nil { + x.Public = 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.Public[mapkey] = mapvalue iNdEx = postIndex case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InitGasLimit", wireType) + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Private", wireType) } - x.InitGasLimit = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -5912,42 +3489,121 @@ func (x *fastReflection_FeeInfo) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.InitGasLimit |= int32(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IsSimulable", wireType) + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - 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 - } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - x.IsSimulable = bool(v != 0) - case 5: - if wireType != 1 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GasMultiply", wireType) - } - var v uint64 - if (iNdEx + 8) > l { + if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - x.GasMultiply = float64(math.Float64frombits(v)) + if x.Private == nil { + x.Private = make(map[string]*Property) + } + var mapkey string + var mapvalue *Property + 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 mapmsglen 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++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postmsgIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapvalue = &Property{} + if err := options.Unmarshal(dAtA[iNdEx:postmsgIndex], mapvalue); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postmsgIndex + } 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.Private[mapkey] = mapvalue + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -5983,137 +3639,121 @@ func (x *fastReflection_FeeInfo) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.List = (*_Identity_4_list)(nil) +var _ protoreflect.List = (*_Permissions_1_list)(nil) -type _Identity_4_list struct { - list *[]*Credential +type _Permissions_1_list struct { + list *[]DIDNamespace } -func (x *_Identity_4_list) Len() int { +func (x *_Permissions_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_Identity_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +func (x *_Permissions_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)((*x.list)[i])) } -func (x *_Identity_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Credential) +func (x *_Permissions_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Enum() + concreteValue := (DIDNamespace)(valueUnwrapped) (*x.list)[i] = concreteValue } -func (x *_Identity_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Credential) +func (x *_Permissions_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Enum() + concreteValue := (DIDNamespace)(valueUnwrapped) *x.list = append(*x.list, concreteValue) } -func (x *_Identity_4_list) AppendMutable() protoreflect.Value { - v := new(Credential) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) +func (x *_Permissions_1_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Permissions at list field Grants as it is not of Message kind")) } -func (x *_Identity_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } +func (x *_Permissions_1_list) Truncate(n int) { *x.list = (*x.list)[:n] } -func (x *_Identity_4_list) NewElement() protoreflect.Value { - v := new(Credential) - return protoreflect.ValueOfMessage(v.ProtoReflect()) +func (x *_Permissions_1_list) NewElement() protoreflect.Value { + v := 0 + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(v)) } -func (x *_Identity_4_list) IsValid() bool { +func (x *_Permissions_1_list) IsValid() bool { return x.list != nil } -var _ protoreflect.List = (*_Identity_5_list)(nil) +var _ protoreflect.List = (*_Permissions_2_list)(nil) -type _Identity_5_list struct { - list *[]*VerificationMethod +type _Permissions_2_list struct { + list *[]PermissionScope } -func (x *_Identity_5_list) Len() int { +func (x *_Permissions_2_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_Identity_5_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +func (x *_Permissions_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)((*x.list)[i])) } -func (x *_Identity_5_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*VerificationMethod) +func (x *_Permissions_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Enum() + concreteValue := (PermissionScope)(valueUnwrapped) (*x.list)[i] = concreteValue } -func (x *_Identity_5_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*VerificationMethod) +func (x *_Permissions_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Enum() + concreteValue := (PermissionScope)(valueUnwrapped) *x.list = append(*x.list, concreteValue) } -func (x *_Identity_5_list) AppendMutable() protoreflect.Value { - v := new(VerificationMethod) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) +func (x *_Permissions_2_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Permissions at list field Scopes as it is not of Message kind")) } -func (x *_Identity_5_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } +func (x *_Permissions_2_list) Truncate(n int) { *x.list = (*x.list)[:n] } -func (x *_Identity_5_list) NewElement() protoreflect.Value { - v := new(VerificationMethod) - return protoreflect.ValueOfMessage(v.ProtoReflect()) +func (x *_Permissions_2_list) NewElement() protoreflect.Value { + v := 0 + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(v)) } -func (x *_Identity_5_list) IsValid() bool { +func (x *_Permissions_2_list) IsValid() bool { return x.list != nil } var ( - md_Identity protoreflect.MessageDescriptor - fd_Identity_id protoreflect.FieldDescriptor - fd_Identity_subject protoreflect.FieldDescriptor - fd_Identity_controller protoreflect.FieldDescriptor - fd_Identity_credentials protoreflect.FieldDescriptor - fd_Identity_verification_methods protoreflect.FieldDescriptor + md_Permissions protoreflect.MessageDescriptor + fd_Permissions_grants protoreflect.FieldDescriptor + fd_Permissions_scopes protoreflect.FieldDescriptor ) func init() { - file_did_v1_types_proto_init() - md_Identity = File_did_v1_types_proto.Messages().ByName("Identity") - fd_Identity_id = md_Identity.Fields().ByName("id") - fd_Identity_subject = md_Identity.Fields().ByName("subject") - fd_Identity_controller = md_Identity.Fields().ByName("controller") - fd_Identity_credentials = md_Identity.Fields().ByName("credentials") - fd_Identity_verification_methods = md_Identity.Fields().ByName("verification_methods") + file_did_v1_models_proto_init() + md_Permissions = File_did_v1_models_proto.Messages().ByName("Permissions") + fd_Permissions_grants = md_Permissions.Fields().ByName("grants") + fd_Permissions_scopes = md_Permissions.Fields().ByName("scopes") } -var _ protoreflect.Message = (*fastReflection_Identity)(nil) +var _ protoreflect.Message = (*fastReflection_Permissions)(nil) -type fastReflection_Identity Identity +type fastReflection_Permissions Permissions -func (x *Identity) ProtoReflect() protoreflect.Message { - return (*fastReflection_Identity)(x) +func (x *Permissions) ProtoReflect() protoreflect.Message { + return (*fastReflection_Permissions)(x) } -func (x *Identity) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_types_proto_msgTypes[7] +func (x *Permissions) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_models_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6124,43 +3764,43 @@ func (x *Identity) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_Identity_messageType fastReflection_Identity_messageType -var _ protoreflect.MessageType = fastReflection_Identity_messageType{} +var _fastReflection_Permissions_messageType fastReflection_Permissions_messageType +var _ protoreflect.MessageType = fastReflection_Permissions_messageType{} -type fastReflection_Identity_messageType struct{} +type fastReflection_Permissions_messageType struct{} -func (x fastReflection_Identity_messageType) Zero() protoreflect.Message { - return (*fastReflection_Identity)(nil) +func (x fastReflection_Permissions_messageType) Zero() protoreflect.Message { + return (*fastReflection_Permissions)(nil) } -func (x fastReflection_Identity_messageType) New() protoreflect.Message { - return new(fastReflection_Identity) +func (x fastReflection_Permissions_messageType) New() protoreflect.Message { + return new(fastReflection_Permissions) } -func (x fastReflection_Identity_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Identity +func (x fastReflection_Permissions_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Permissions } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_Identity) Descriptor() protoreflect.MessageDescriptor { - return md_Identity +func (x *fastReflection_Permissions) Descriptor() protoreflect.MessageDescriptor { + return md_Permissions } // 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_Identity) Type() protoreflect.MessageType { - return _fastReflection_Identity_messageType +func (x *fastReflection_Permissions) Type() protoreflect.MessageType { + return _fastReflection_Permissions_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_Identity) New() protoreflect.Message { - return new(fastReflection_Identity) +func (x *fastReflection_Permissions) New() protoreflect.Message { + return new(fastReflection_Permissions) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_Identity) Interface() protoreflect.ProtoMessage { - return (*Identity)(x) +func (x *fastReflection_Permissions) Interface() protoreflect.ProtoMessage { + return (*Permissions)(x) } // Range iterates over every populated field in an undefined order, @@ -6168,34 +3808,762 @@ func (x *fastReflection_Identity) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_Identity) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_Permissions) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Grants) != 0 { + value := protoreflect.ValueOfList(&_Permissions_1_list{list: &x.Grants}) + if !f(fd_Permissions_grants, value) { + return + } + } + if len(x.Scopes) != 0 { + value := protoreflect.ValueOfList(&_Permissions_2_list{list: &x.Scopes}) + if !f(fd_Permissions_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_Permissions) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.Permissions.grants": + return len(x.Grants) != 0 + case "did.v1.Permissions.scopes": + return len(x.Scopes) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Permissions")) + } + panic(fmt.Errorf("message did.v1.Permissions 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_Permissions) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.Permissions.grants": + x.Grants = nil + case "did.v1.Permissions.scopes": + x.Scopes = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Permissions")) + } + panic(fmt.Errorf("message did.v1.Permissions 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_Permissions) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.Permissions.grants": + if len(x.Grants) == 0 { + return protoreflect.ValueOfList(&_Permissions_1_list{}) + } + listValue := &_Permissions_1_list{list: &x.Grants} + return protoreflect.ValueOfList(listValue) + case "did.v1.Permissions.scopes": + if len(x.Scopes) == 0 { + return protoreflect.ValueOfList(&_Permissions_2_list{}) + } + listValue := &_Permissions_2_list{list: &x.Scopes} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Permissions")) + } + panic(fmt.Errorf("message did.v1.Permissions 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_Permissions) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.Permissions.grants": + lv := value.List() + clv := lv.(*_Permissions_1_list) + x.Grants = *clv.list + case "did.v1.Permissions.scopes": + lv := value.List() + clv := lv.(*_Permissions_2_list) + x.Scopes = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Permissions")) + } + panic(fmt.Errorf("message did.v1.Permissions 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_Permissions) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.Permissions.grants": + if x.Grants == nil { + x.Grants = []DIDNamespace{} + } + value := &_Permissions_1_list{list: &x.Grants} + return protoreflect.ValueOfList(value) + case "did.v1.Permissions.scopes": + if x.Scopes == nil { + x.Scopes = []PermissionScope{} + } + value := &_Permissions_2_list{list: &x.Scopes} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Permissions")) + } + panic(fmt.Errorf("message did.v1.Permissions 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_Permissions) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.Permissions.grants": + list := []DIDNamespace{} + return protoreflect.ValueOfList(&_Permissions_1_list{list: &list}) + case "did.v1.Permissions.scopes": + list := []PermissionScope{} + return protoreflect.ValueOfList(&_Permissions_2_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Permissions")) + } + panic(fmt.Errorf("message did.v1.Permissions 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_Permissions) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.Permissions", 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_Permissions) 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_Permissions) 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_Permissions) 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_Permissions) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Permissions) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Grants) > 0 { + l = 0 + for _, e := range x.Grants { + l += runtime.Sov(uint64(e)) + } + n += 1 + runtime.Sov(uint64(l)) + 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().(*Permissions) + 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] = 0x12 + } + if len(x.Grants) > 0 { + var pksize4 int + for _, num := range x.Grants { + pksize4 += runtime.Sov(uint64(num)) + } + i -= pksize4 + j3 := i + for _, num1 := range x.Grants { + num := uint64(num1) + for num >= 1<<7 { + dAtA[j3] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j3++ + } + dAtA[j3] = uint8(num) + j3++ + } + i = runtime.EncodeVarint(dAtA, i, uint64(pksize4)) + 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().(*Permissions) + 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: Permissions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Permissions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v DIDNamespace + 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 |= DIDNamespace(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Grants = append(x.Grants, 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.Grants) == 0 { + x.Grants = make([]DIDNamespace, 0, elementCount) + } + for iNdEx < postIndex { + var v DIDNamespace + 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 |= DIDNamespace(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Grants = append(x.Grants, v) + } + } else { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Grants", wireType) + } + case 2: + 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 _ protoreflect.List = (*_Profile_4_list)(nil) + +type _Profile_4_list struct { + list *[]*Credential +} + +func (x *_Profile_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Profile_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Profile_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Credential) + (*x.list)[i] = concreteValue +} + +func (x *_Profile_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Credential) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Profile_4_list) AppendMutable() protoreflect.Value { + v := new(Credential) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Profile_4_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Profile_4_list) NewElement() protoreflect.Value { + v := new(Credential) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Profile_4_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_Profile_5_list)(nil) + +type _Profile_5_list struct { + list *[]*VerificationMethod +} + +func (x *_Profile_5_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Profile_5_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Profile_5_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*VerificationMethod) + (*x.list)[i] = concreteValue +} + +func (x *_Profile_5_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*VerificationMethod) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Profile_5_list) AppendMutable() protoreflect.Value { + v := new(VerificationMethod) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Profile_5_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Profile_5_list) NewElement() protoreflect.Value { + v := new(VerificationMethod) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Profile_5_list) IsValid() bool { + return x.list != nil +} + +var ( + md_Profile protoreflect.MessageDescriptor + fd_Profile_id protoreflect.FieldDescriptor + fd_Profile_subject protoreflect.FieldDescriptor + fd_Profile_controller protoreflect.FieldDescriptor + fd_Profile_credentials protoreflect.FieldDescriptor + fd_Profile_attestations protoreflect.FieldDescriptor + fd_Profile_metadata protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_models_proto_init() + md_Profile = File_did_v1_models_proto.Messages().ByName("Profile") + fd_Profile_id = md_Profile.Fields().ByName("id") + fd_Profile_subject = md_Profile.Fields().ByName("subject") + fd_Profile_controller = md_Profile.Fields().ByName("controller") + fd_Profile_credentials = md_Profile.Fields().ByName("credentials") + fd_Profile_attestations = md_Profile.Fields().ByName("attestations") + fd_Profile_metadata = md_Profile.Fields().ByName("metadata") +} + +var _ protoreflect.Message = (*fastReflection_Profile)(nil) + +type fastReflection_Profile Profile + +func (x *Profile) ProtoReflect() protoreflect.Message { + return (*fastReflection_Profile)(x) +} + +func (x *Profile) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_models_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_Profile_messageType fastReflection_Profile_messageType +var _ protoreflect.MessageType = fastReflection_Profile_messageType{} + +type fastReflection_Profile_messageType struct{} + +func (x fastReflection_Profile_messageType) Zero() protoreflect.Message { + return (*fastReflection_Profile)(nil) +} +func (x fastReflection_Profile_messageType) New() protoreflect.Message { + return new(fastReflection_Profile) +} +func (x fastReflection_Profile_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Profile +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Profile) Descriptor() protoreflect.MessageDescriptor { + return md_Profile +} + +// 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_Profile) Type() protoreflect.MessageType { + return _fastReflection_Profile_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Profile) New() protoreflect.Message { + return new(fastReflection_Profile) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Profile) Interface() protoreflect.ProtoMessage { + return (*Profile)(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_Profile) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Id != "" { value := protoreflect.ValueOfString(x.Id) - if !f(fd_Identity_id, value) { + if !f(fd_Profile_id, value) { return } } if x.Subject != "" { value := protoreflect.ValueOfString(x.Subject) - if !f(fd_Identity_subject, value) { + if !f(fd_Profile_subject, value) { return } } if x.Controller != "" { value := protoreflect.ValueOfString(x.Controller) - if !f(fd_Identity_controller, value) { + if !f(fd_Profile_controller, value) { return } } if len(x.Credentials) != 0 { - value := protoreflect.ValueOfList(&_Identity_4_list{list: &x.Credentials}) - if !f(fd_Identity_credentials, value) { + value := protoreflect.ValueOfList(&_Profile_4_list{list: &x.Credentials}) + if !f(fd_Profile_credentials, value) { return } } - if len(x.VerificationMethods) != 0 { - value := protoreflect.ValueOfList(&_Identity_5_list{list: &x.VerificationMethods}) - if !f(fd_Identity_verification_methods, value) { + if len(x.Attestations) != 0 { + value := protoreflect.ValueOfList(&_Profile_5_list{list: &x.Attestations}) + if !f(fd_Profile_attestations, value) { + return + } + } + if x.Metadata != nil { + value := protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) + if !f(fd_Profile_metadata, value) { return } } @@ -6212,23 +4580,25 @@ func (x *fastReflection_Identity) Range(f func(protoreflect.FieldDescriptor, pro // 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_Identity) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_Profile) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.Identity.id": + case "did.v1.Profile.id": return x.Id != "" - case "did.v1.Identity.subject": + case "did.v1.Profile.subject": return x.Subject != "" - case "did.v1.Identity.controller": + case "did.v1.Profile.controller": return x.Controller != "" - case "did.v1.Identity.credentials": + case "did.v1.Profile.credentials": return len(x.Credentials) != 0 - case "did.v1.Identity.verification_methods": - return len(x.VerificationMethods) != 0 + case "did.v1.Profile.attestations": + return len(x.Attestations) != 0 + case "did.v1.Profile.metadata": + return x.Metadata != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Identity")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Profile")) } - panic(fmt.Errorf("message did.v1.Identity does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Profile does not contain field %s", fd.FullName())) } } @@ -6238,23 +4608,25 @@ func (x *fastReflection_Identity) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Identity) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_Profile) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.Identity.id": + case "did.v1.Profile.id": x.Id = "" - case "did.v1.Identity.subject": + case "did.v1.Profile.subject": x.Subject = "" - case "did.v1.Identity.controller": + case "did.v1.Profile.controller": x.Controller = "" - case "did.v1.Identity.credentials": + case "did.v1.Profile.credentials": x.Credentials = nil - case "did.v1.Identity.verification_methods": - x.VerificationMethods = nil + case "did.v1.Profile.attestations": + x.Attestations = nil + case "did.v1.Profile.metadata": + x.Metadata = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Identity")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Profile")) } - panic(fmt.Errorf("message did.v1.Identity does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Profile does not contain field %s", fd.FullName())) } } @@ -6264,34 +4636,37 @@ func (x *fastReflection_Identity) Clear(fd protoreflect.FieldDescriptor) { // 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_Identity) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Profile) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.Identity.id": + case "did.v1.Profile.id": value := x.Id return protoreflect.ValueOfString(value) - case "did.v1.Identity.subject": + case "did.v1.Profile.subject": value := x.Subject return protoreflect.ValueOfString(value) - case "did.v1.Identity.controller": + case "did.v1.Profile.controller": value := x.Controller return protoreflect.ValueOfString(value) - case "did.v1.Identity.credentials": + case "did.v1.Profile.credentials": if len(x.Credentials) == 0 { - return protoreflect.ValueOfList(&_Identity_4_list{}) + return protoreflect.ValueOfList(&_Profile_4_list{}) } - listValue := &_Identity_4_list{list: &x.Credentials} + listValue := &_Profile_4_list{list: &x.Credentials} return protoreflect.ValueOfList(listValue) - case "did.v1.Identity.verification_methods": - if len(x.VerificationMethods) == 0 { - return protoreflect.ValueOfList(&_Identity_5_list{}) + case "did.v1.Profile.attestations": + if len(x.Attestations) == 0 { + return protoreflect.ValueOfList(&_Profile_5_list{}) } - listValue := &_Identity_5_list{list: &x.VerificationMethods} + listValue := &_Profile_5_list{list: &x.Attestations} return protoreflect.ValueOfList(listValue) + case "did.v1.Profile.metadata": + value := x.Metadata + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Identity")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Profile")) } - panic(fmt.Errorf("message did.v1.Identity does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.Profile does not contain field %s", descriptor.FullName())) } } @@ -6305,27 +4680,29 @@ func (x *fastReflection_Identity) Get(descriptor protoreflect.FieldDescriptor) p // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Identity) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_Profile) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.Identity.id": + case "did.v1.Profile.id": x.Id = value.Interface().(string) - case "did.v1.Identity.subject": + case "did.v1.Profile.subject": x.Subject = value.Interface().(string) - case "did.v1.Identity.controller": + case "did.v1.Profile.controller": x.Controller = value.Interface().(string) - case "did.v1.Identity.credentials": + case "did.v1.Profile.credentials": lv := value.List() - clv := lv.(*_Identity_4_list) + clv := lv.(*_Profile_4_list) x.Credentials = *clv.list - case "did.v1.Identity.verification_methods": + case "did.v1.Profile.attestations": lv := value.List() - clv := lv.(*_Identity_5_list) - x.VerificationMethods = *clv.list + clv := lv.(*_Profile_5_list) + x.Attestations = *clv.list + case "did.v1.Profile.metadata": + x.Metadata = value.Message().Interface().(*Metadata) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Identity")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Profile")) } - panic(fmt.Errorf("message did.v1.Identity does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Profile does not contain field %s", fd.FullName())) } } @@ -6339,66 +4716,74 @@ func (x *fastReflection_Identity) Set(fd protoreflect.FieldDescriptor, value pro // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Identity) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Profile) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.Identity.credentials": + case "did.v1.Profile.credentials": if x.Credentials == nil { x.Credentials = []*Credential{} } - value := &_Identity_4_list{list: &x.Credentials} + value := &_Profile_4_list{list: &x.Credentials} return protoreflect.ValueOfList(value) - case "did.v1.Identity.verification_methods": - if x.VerificationMethods == nil { - x.VerificationMethods = []*VerificationMethod{} + case "did.v1.Profile.attestations": + if x.Attestations == nil { + x.Attestations = []*VerificationMethod{} } - value := &_Identity_5_list{list: &x.VerificationMethods} + value := &_Profile_5_list{list: &x.Attestations} return protoreflect.ValueOfList(value) - case "did.v1.Identity.id": - panic(fmt.Errorf("field id of message did.v1.Identity is not mutable")) - case "did.v1.Identity.subject": - panic(fmt.Errorf("field subject of message did.v1.Identity is not mutable")) - case "did.v1.Identity.controller": - panic(fmt.Errorf("field controller of message did.v1.Identity is not mutable")) + case "did.v1.Profile.metadata": + if x.Metadata == nil { + x.Metadata = new(Metadata) + } + return protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) + case "did.v1.Profile.id": + panic(fmt.Errorf("field id of message did.v1.Profile is not mutable")) + case "did.v1.Profile.subject": + panic(fmt.Errorf("field subject of message did.v1.Profile is not mutable")) + case "did.v1.Profile.controller": + panic(fmt.Errorf("field controller of message did.v1.Profile is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Identity")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Profile")) } - panic(fmt.Errorf("message did.v1.Identity does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Profile 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_Identity) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Profile) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.Identity.id": + case "did.v1.Profile.id": return protoreflect.ValueOfString("") - case "did.v1.Identity.subject": + case "did.v1.Profile.subject": return protoreflect.ValueOfString("") - case "did.v1.Identity.controller": + case "did.v1.Profile.controller": return protoreflect.ValueOfString("") - case "did.v1.Identity.credentials": + case "did.v1.Profile.credentials": list := []*Credential{} - return protoreflect.ValueOfList(&_Identity_4_list{list: &list}) - case "did.v1.Identity.verification_methods": + return protoreflect.ValueOfList(&_Profile_4_list{list: &list}) + case "did.v1.Profile.attestations": list := []*VerificationMethod{} - return protoreflect.ValueOfList(&_Identity_5_list{list: &list}) + return protoreflect.ValueOfList(&_Profile_5_list{list: &list}) + case "did.v1.Profile.metadata": + m := new(Metadata) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Identity")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Profile")) } - panic(fmt.Errorf("message did.v1.Identity does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Profile 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_Identity) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_Profile) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.Identity", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.Profile", d.FullName())) } panic("unreachable") } @@ -6406,7 +4791,7 @@ func (x *fastReflection_Identity) WhichOneof(d protoreflect.OneofDescriptor) pro // 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_Identity) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_Profile) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -6417,7 +4802,7 @@ func (x *fastReflection_Identity) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Identity) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_Profile) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -6429,7 +4814,7 @@ func (x *fastReflection_Identity) SetUnknown(fields protoreflect.RawFields) { // 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_Identity) IsValid() bool { +func (x *fastReflection_Profile) IsValid() bool { return x != nil } @@ -6439,9 +4824,9 @@ func (x *fastReflection_Identity) 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_Identity) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_Profile) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Identity) + x := input.Message.Interface().(*Profile) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6471,12 +4856,16 @@ func (x *fastReflection_Identity) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } - if len(x.VerificationMethods) > 0 { - for _, e := range x.VerificationMethods { + if len(x.Attestations) > 0 { + for _, e := range x.Attestations { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } + if x.Metadata != nil { + l = options.Size(x.Metadata) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -6487,7 +4876,7 @@ func (x *fastReflection_Identity) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Identity) + x := input.Message.Interface().(*Profile) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6506,9 +4895,23 @@ func (x *fastReflection_Identity) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.VerificationMethods) > 0 { - for iNdEx := len(x.VerificationMethods) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.VerificationMethods[iNdEx]) + if x.Metadata != nil { + encoded, err := options.Marshal(x.Metadata) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x32 + } + if len(x.Attestations) > 0 { + for iNdEx := len(x.Attestations) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Attestations[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6570,7 +4973,7 @@ func (x *fastReflection_Identity) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Identity) + x := input.Message.Interface().(*Profile) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6602,10 +5005,10 @@ func (x *fastReflection_Identity) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Identity: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Profile: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Identity: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Profile: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -6740,7 +5143,7 @@ func (x *fastReflection_Identity) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 5: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VerificationMethods", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Attestations", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6767,8 +5170,44 @@ func (x *fastReflection_Identity) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.VerificationMethods = append(x.VerificationMethods, &VerificationMethod{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VerificationMethods[len(x.VerificationMethods)-1]); err != nil { + x.Attestations = append(x.Attestations, &VerificationMethod{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Attestations[len(x.Attestations)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Metadata == nil { + x.Metadata = &Metadata{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Metadata); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -6808,20 +5247,592 @@ func (x *fastReflection_Identity) ProtoMethods() *protoiface.Methods { } var ( - md_PubKey protoreflect.MessageDescriptor - fd_PubKey_id protoreflect.FieldDescriptor - fd_PubKey_key protoreflect.FieldDescriptor - fd_PubKey_key_type protoreflect.FieldDescriptor - fd_PubKey_controller protoreflect.FieldDescriptor + md_Property protoreflect.MessageDescriptor + fd_Property_accumulator protoreflect.FieldDescriptor + fd_Property_key protoreflect.FieldDescriptor ) func init() { - file_did_v1_types_proto_init() - md_PubKey = File_did_v1_types_proto.Messages().ByName("PubKey") - fd_PubKey_id = md_PubKey.Fields().ByName("id") + file_did_v1_models_proto_init() + md_Property = File_did_v1_models_proto.Messages().ByName("Property") + fd_Property_accumulator = md_Property.Fields().ByName("accumulator") + fd_Property_key = md_Property.Fields().ByName("key") +} + +var _ protoreflect.Message = (*fastReflection_Property)(nil) + +type fastReflection_Property Property + +func (x *Property) ProtoReflect() protoreflect.Message { + return (*fastReflection_Property)(x) +} + +func (x *Property) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_models_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_Property_messageType fastReflection_Property_messageType +var _ protoreflect.MessageType = fastReflection_Property_messageType{} + +type fastReflection_Property_messageType struct{} + +func (x fastReflection_Property_messageType) Zero() protoreflect.Message { + return (*fastReflection_Property)(nil) +} +func (x fastReflection_Property_messageType) New() protoreflect.Message { + return new(fastReflection_Property) +} +func (x fastReflection_Property_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Property +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Property) Descriptor() protoreflect.MessageDescriptor { + return md_Property +} + +// 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_Property) Type() protoreflect.MessageType { + return _fastReflection_Property_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Property) New() protoreflect.Message { + return new(fastReflection_Property) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Property) Interface() protoreflect.ProtoMessage { + return (*Property)(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_Property) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Accumulator) != 0 { + value := protoreflect.ValueOfBytes(x.Accumulator) + if !f(fd_Property_accumulator, value) { + return + } + } + if len(x.Key) != 0 { + value := protoreflect.ValueOfBytes(x.Key) + if !f(fd_Property_key, 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_Property) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.Property.accumulator": + return len(x.Accumulator) != 0 + case "did.v1.Property.key": + return len(x.Key) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Property")) + } + panic(fmt.Errorf("message did.v1.Property 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_Property) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.Property.accumulator": + x.Accumulator = nil + case "did.v1.Property.key": + x.Key = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Property")) + } + panic(fmt.Errorf("message did.v1.Property 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_Property) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.Property.accumulator": + value := x.Accumulator + return protoreflect.ValueOfBytes(value) + case "did.v1.Property.key": + value := x.Key + return protoreflect.ValueOfBytes(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Property")) + } + panic(fmt.Errorf("message did.v1.Property 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_Property) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.Property.accumulator": + x.Accumulator = value.Bytes() + case "did.v1.Property.key": + x.Key = value.Bytes() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Property")) + } + panic(fmt.Errorf("message did.v1.Property 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_Property) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.Property.accumulator": + panic(fmt.Errorf("field accumulator of message did.v1.Property is not mutable")) + case "did.v1.Property.key": + panic(fmt.Errorf("field key of message did.v1.Property is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Property")) + } + panic(fmt.Errorf("message did.v1.Property 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_Property) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.Property.accumulator": + return protoreflect.ValueOfBytes(nil) + case "did.v1.Property.key": + return protoreflect.ValueOfBytes(nil) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Property")) + } + panic(fmt.Errorf("message did.v1.Property 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_Property) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.Property", 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_Property) 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_Property) 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_Property) 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_Property) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Property) + 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.Accumulator) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Key) + 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().(*Property) + 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.Key) > 0 { + i -= len(x.Key) + copy(dAtA[i:], x.Key) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) + i-- + dAtA[i] = 0x12 + } + if len(x.Accumulator) > 0 { + i -= len(x.Accumulator) + copy(dAtA[i:], x.Accumulator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Accumulator))) + 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().(*Property) + 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: Property: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Property: 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 Accumulator", 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.Accumulator = append(x.Accumulator[:0], dAtA[iNdEx:postIndex]...) + if x.Accumulator == nil { + x.Accumulator = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", 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.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) + if x.Key == nil { + x.Key = []byte{} + } + 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 = (*_PubKey_6_map)(nil) + +type _PubKey_6_map struct { + m *map[string]string +} + +func (x *_PubKey_6_map) Len() int { + if x.m == nil { + return 0 + } + return len(*x.m) +} + +func (x *_PubKey_6_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { + if x.m == nil { + return + } + for k, v := range *x.m { + mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) + mapValue := protoreflect.ValueOfString(v) + if !f(mapKey, mapValue) { + break + } + } +} + +func (x *_PubKey_6_map) Has(key protoreflect.MapKey) bool { + if x.m == nil { + return false + } + keyUnwrapped := key.String() + concreteValue := keyUnwrapped + _, ok := (*x.m)[concreteValue] + return ok +} + +func (x *_PubKey_6_map) Clear(key protoreflect.MapKey) { + if x.m == nil { + return + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + delete(*x.m, concreteKey) +} + +func (x *_PubKey_6_map) Get(key protoreflect.MapKey) protoreflect.Value { + if x.m == nil { + return protoreflect.Value{} + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + v, ok := (*x.m)[concreteKey] + if !ok { + return protoreflect.Value{} + } + return protoreflect.ValueOfString(v) +} + +func (x *_PubKey_6_map) Set(key protoreflect.MapKey, value protoreflect.Value) { + if !key.IsValid() || !value.IsValid() { + panic("invalid key or value provided") + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.m)[concreteKey] = concreteValue +} + +func (x *_PubKey_6_map) Mutable(key protoreflect.MapKey) protoreflect.Value { + panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") +} + +func (x *_PubKey_6_map) NewValue() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_PubKey_6_map) IsValid() bool { + return x.m != nil +} + +var ( + md_PubKey protoreflect.MessageDescriptor + fd_PubKey_namespace protoreflect.FieldDescriptor + fd_PubKey_key protoreflect.FieldDescriptor + fd_PubKey_kind protoreflect.FieldDescriptor + fd_PubKey_multibase protoreflect.FieldDescriptor + fd_PubKey_jwks protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_models_proto_init() + md_PubKey = File_did_v1_models_proto.Messages().ByName("PubKey") + fd_PubKey_namespace = md_PubKey.Fields().ByName("namespace") fd_PubKey_key = md_PubKey.Fields().ByName("key") - fd_PubKey_key_type = md_PubKey.Fields().ByName("key_type") - fd_PubKey_controller = md_PubKey.Fields().ByName("controller") + fd_PubKey_kind = md_PubKey.Fields().ByName("kind") + fd_PubKey_multibase = md_PubKey.Fields().ByName("multibase") + fd_PubKey_jwks = md_PubKey.Fields().ByName("jwks") } var _ protoreflect.Message = (*fastReflection_PubKey)(nil) @@ -6833,7 +5844,7 @@ func (x *PubKey) ProtoReflect() protoreflect.Message { } func (x *PubKey) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_types_proto_msgTypes[8] + mi := &file_did_v1_models_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6889,9 +5900,9 @@ func (x *fastReflection_PubKey) Interface() protoreflect.ProtoMessage { // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_PubKey) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_PubKey_id, value) { + if x.Namespace != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Namespace)) + if !f(fd_PubKey_namespace, value) { return } } @@ -6901,15 +5912,21 @@ func (x *fastReflection_PubKey) Range(f func(protoreflect.FieldDescriptor, proto return } } - if x.KeyType != "" { - value := protoreflect.ValueOfString(x.KeyType) - if !f(fd_PubKey_key_type, value) { + if x.Kind != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Kind)) + if !f(fd_PubKey_kind, value) { return } } - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_PubKey_controller, value) { + if x.Multibase != "" { + value := protoreflect.ValueOfString(x.Multibase) + if !f(fd_PubKey_multibase, value) { + return + } + } + if len(x.Jwks) != 0 { + value := protoreflect.ValueOfMap(&_PubKey_6_map{m: &x.Jwks}) + if !f(fd_PubKey_jwks, value) { return } } @@ -6928,14 +5945,16 @@ func (x *fastReflection_PubKey) Range(f func(protoreflect.FieldDescriptor, proto // a repeated field is populated if it is non-empty. func (x *fastReflection_PubKey) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.PubKey.id": - return x.Id != "" + case "did.v1.PubKey.namespace": + return x.Namespace != 0 case "did.v1.PubKey.key": return len(x.Key) != 0 - case "did.v1.PubKey.key_type": - return x.KeyType != "" - case "did.v1.PubKey.controller": - return x.Controller != "" + case "did.v1.PubKey.kind": + return x.Kind != 0 + case "did.v1.PubKey.multibase": + return x.Multibase != "" + case "did.v1.PubKey.jwks": + return len(x.Jwks) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) @@ -6952,14 +5971,16 @@ func (x *fastReflection_PubKey) Has(fd protoreflect.FieldDescriptor) bool { // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PubKey) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.PubKey.id": - x.Id = "" + case "did.v1.PubKey.namespace": + x.Namespace = 0 case "did.v1.PubKey.key": x.Key = nil - case "did.v1.PubKey.key_type": - x.KeyType = "" - case "did.v1.PubKey.controller": - x.Controller = "" + case "did.v1.PubKey.kind": + x.Kind = 0 + case "did.v1.PubKey.multibase": + x.Multibase = "" + case "did.v1.PubKey.jwks": + x.Jwks = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) @@ -6976,18 +5997,24 @@ func (x *fastReflection_PubKey) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_PubKey) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.PubKey.id": - value := x.Id - return protoreflect.ValueOfString(value) + case "did.v1.PubKey.namespace": + value := x.Namespace + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) case "did.v1.PubKey.key": value := x.Key return protoreflect.ValueOfBytes(value) - case "did.v1.PubKey.key_type": - value := x.KeyType - return protoreflect.ValueOfString(value) - case "did.v1.PubKey.controller": - value := x.Controller + case "did.v1.PubKey.kind": + value := x.Kind + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "did.v1.PubKey.multibase": + value := x.Multibase return protoreflect.ValueOfString(value) + case "did.v1.PubKey.jwks": + if len(x.Jwks) == 0 { + return protoreflect.ValueOfMap(&_PubKey_6_map{}) + } + mapValue := &_PubKey_6_map{m: &x.Jwks} + return protoreflect.ValueOfMap(mapValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) @@ -7008,14 +6035,18 @@ func (x *fastReflection_PubKey) Get(descriptor protoreflect.FieldDescriptor) pro // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PubKey) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.PubKey.id": - x.Id = value.Interface().(string) + case "did.v1.PubKey.namespace": + x.Namespace = (DIDNamespace)(value.Enum()) case "did.v1.PubKey.key": x.Key = value.Bytes() - case "did.v1.PubKey.key_type": - x.KeyType = value.Interface().(string) - case "did.v1.PubKey.controller": - x.Controller = value.Interface().(string) + case "did.v1.PubKey.kind": + x.Kind = (KeyType)(value.Enum()) + case "did.v1.PubKey.multibase": + x.Multibase = value.Interface().(string) + case "did.v1.PubKey.jwks": + mv := value.Map() + cmv := mv.(*_PubKey_6_map) + x.Jwks = *cmv.m default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) @@ -7036,14 +6067,20 @@ func (x *fastReflection_PubKey) Set(fd protoreflect.FieldDescriptor, value proto // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PubKey) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.PubKey.id": - panic(fmt.Errorf("field id of message did.v1.PubKey is not mutable")) + case "did.v1.PubKey.jwks": + if x.Jwks == nil { + x.Jwks = make(map[string]string) + } + value := &_PubKey_6_map{m: &x.Jwks} + return protoreflect.ValueOfMap(value) + case "did.v1.PubKey.namespace": + panic(fmt.Errorf("field namespace of message did.v1.PubKey is not mutable")) case "did.v1.PubKey.key": panic(fmt.Errorf("field key of message did.v1.PubKey is not mutable")) - case "did.v1.PubKey.key_type": - panic(fmt.Errorf("field key_type of message did.v1.PubKey is not mutable")) - case "did.v1.PubKey.controller": - panic(fmt.Errorf("field controller of message did.v1.PubKey is not mutable")) + case "did.v1.PubKey.kind": + panic(fmt.Errorf("field kind of message did.v1.PubKey is not mutable")) + case "did.v1.PubKey.multibase": + panic(fmt.Errorf("field multibase of message did.v1.PubKey is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) @@ -7057,14 +6094,17 @@ func (x *fastReflection_PubKey) Mutable(fd protoreflect.FieldDescriptor) protore // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_PubKey) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.PubKey.id": - return protoreflect.ValueOfString("") + case "did.v1.PubKey.namespace": + return protoreflect.ValueOfEnum(0) case "did.v1.PubKey.key": return protoreflect.ValueOfBytes(nil) - case "did.v1.PubKey.key_type": - return protoreflect.ValueOfString("") - case "did.v1.PubKey.controller": + case "did.v1.PubKey.kind": + return protoreflect.ValueOfEnum(0) + case "did.v1.PubKey.multibase": return protoreflect.ValueOfString("") + case "did.v1.PubKey.jwks": + m := make(map[string]string) + return protoreflect.ValueOfMap(&_PubKey_6_map{m: &m}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) @@ -7134,21 +6174,40 @@ func (x *fastReflection_PubKey) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if x.Namespace != 0 { + n += 1 + runtime.Sov(uint64(x.Namespace)) } l = len(x.Key) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.KeyType) + if x.Kind != 0 { + n += 1 + runtime.Sov(uint64(x.Kind)) + } + l = len(x.Multibase) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Controller) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if len(x.Jwks) > 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.Jwks)) + for k := range x.Jwks { + sortme = append(sortme, k) + } + sort.Strings(sortme) + for _, k := range sortme { + v := x.Jwks[k] + SiZeMaP(k, v) + } + } else { + for k, v := range x.Jwks { + SiZeMaP(k, v) + } + } } if x.unknownFields != nil { n += len(x.unknownFields) @@ -7179,19 +6238,60 @@ func (x *fastReflection_PubKey) ProtoMethods() *protoiface.Methods { 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] = 0x22 + if len(x.Jwks) > 0 { + MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) { + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x32 + return protoiface.MarshalOutput{}, nil + } + if options.Deterministic { + keysForJwks := make([]string, 0, len(x.Jwks)) + for k := range x.Jwks { + keysForJwks = append(keysForJwks, string(k)) + } + sort.Slice(keysForJwks, func(i, j int) bool { + return keysForJwks[i] < keysForJwks[j] + }) + for iNdEx := len(keysForJwks) - 1; iNdEx >= 0; iNdEx-- { + v := x.Jwks[string(keysForJwks[iNdEx])] + out, err := MaRsHaLmAp(keysForJwks[iNdEx], v) + if err != nil { + return out, err + } + } + } else { + for k := range x.Jwks { + v := x.Jwks[k] + out, err := MaRsHaLmAp(k, v) + if err != nil { + return out, err + } + } + } } - if len(x.KeyType) > 0 { - i -= len(x.KeyType) - copy(dAtA[i:], x.KeyType) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.KeyType))) + if len(x.Multibase) > 0 { + i -= len(x.Multibase) + copy(dAtA[i:], x.Multibase) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Multibase))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x2a + } + if x.Kind != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Kind)) + i-- + dAtA[i] = 0x18 } if len(x.Key) > 0 { i -= len(x.Key) @@ -7200,12 +6300,10 @@ func (x *fastReflection_PubKey) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x12 } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + if x.Namespace != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Namespace)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -7257,10 +6355,10 @@ func (x *fastReflection_PubKey) ProtoMethods() *protoiface.Methods { } switch fieldNum { case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } - var stringLen uint64 + x.Namespace = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -7270,24 +6368,11 @@ func (x *fastReflection_PubKey) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + x.Namespace |= DIDNamespace(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) @@ -7323,8 +6408,27 @@ func (x *fastReflection_PubKey) ProtoMethods() *protoiface.Methods { } iNdEx = postIndex case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + x.Kind = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Kind |= KeyType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field KeyType", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Multibase", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7352,13 +6456,13 @@ func (x *fastReflection_PubKey) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.KeyType = string(dAtA[iNdEx:postIndex]) + x.Multibase = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 6: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Jwks", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -7368,23 +6472,118 @@ func (x *fastReflection_PubKey) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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 } - x.Controller = string(dAtA[iNdEx:postIndex]) + if x.Jwks == nil { + x.Jwks = 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.Jwks[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex @@ -7421,103 +6620,19 @@ func (x *fastReflection_PubKey) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.Map = (*_VerificationMethod_4_map)(nil) - -type _VerificationMethod_4_map struct { - m *map[string]string -} - -func (x *_VerificationMethod_4_map) Len() int { - if x.m == nil { - return 0 - } - return len(*x.m) -} - -func (x *_VerificationMethod_4_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 *_VerificationMethod_4_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 *_VerificationMethod_4_map) Clear(key protoreflect.MapKey) { - if x.m == nil { - return - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - delete(*x.m, concreteKey) -} - -func (x *_VerificationMethod_4_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 *_VerificationMethod_4_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 *_VerificationMethod_4_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 *_VerificationMethod_4_map) NewValue() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_VerificationMethod_4_map) IsValid() bool { - return x.m != nil -} - var ( - md_VerificationMethod protoreflect.MessageDescriptor - fd_VerificationMethod_id protoreflect.FieldDescriptor - fd_VerificationMethod_controller protoreflect.FieldDescriptor - fd_VerificationMethod_public_key_multibase protoreflect.FieldDescriptor - fd_VerificationMethod_public_key_jwks protoreflect.FieldDescriptor + md_VerificationMethod protoreflect.MessageDescriptor + fd_VerificationMethod_id protoreflect.FieldDescriptor + fd_VerificationMethod_controller protoreflect.FieldDescriptor + fd_VerificationMethod_public_key protoreflect.FieldDescriptor ) func init() { - file_did_v1_types_proto_init() - md_VerificationMethod = File_did_v1_types_proto.Messages().ByName("VerificationMethod") + file_did_v1_models_proto_init() + md_VerificationMethod = File_did_v1_models_proto.Messages().ByName("VerificationMethod") fd_VerificationMethod_id = md_VerificationMethod.Fields().ByName("id") fd_VerificationMethod_controller = md_VerificationMethod.Fields().ByName("controller") - fd_VerificationMethod_public_key_multibase = md_VerificationMethod.Fields().ByName("public_key_multibase") - fd_VerificationMethod_public_key_jwks = md_VerificationMethod.Fields().ByName("public_key_jwks") + fd_VerificationMethod_public_key = md_VerificationMethod.Fields().ByName("public_key") } var _ protoreflect.Message = (*fastReflection_VerificationMethod)(nil) @@ -7529,7 +6644,7 @@ func (x *VerificationMethod) ProtoReflect() protoreflect.Message { } func (x *VerificationMethod) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_types_proto_msgTypes[9] + mi := &file_did_v1_models_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7597,15 +6712,9 @@ func (x *fastReflection_VerificationMethod) Range(f func(protoreflect.FieldDescr return } } - if x.PublicKeyMultibase != "" { - value := protoreflect.ValueOfString(x.PublicKeyMultibase) - if !f(fd_VerificationMethod_public_key_multibase, value) { - return - } - } - if len(x.PublicKeyJwks) != 0 { - value := protoreflect.ValueOfMap(&_VerificationMethod_4_map{m: &x.PublicKeyJwks}) - if !f(fd_VerificationMethod_public_key_jwks, value) { + if x.PublicKey != nil { + value := protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) + if !f(fd_VerificationMethod_public_key, value) { return } } @@ -7628,10 +6737,8 @@ func (x *fastReflection_VerificationMethod) Has(fd protoreflect.FieldDescriptor) return x.Id != "" case "did.v1.VerificationMethod.controller": return x.Controller != "" - case "did.v1.VerificationMethod.public_key_multibase": - return x.PublicKeyMultibase != "" - case "did.v1.VerificationMethod.public_key_jwks": - return len(x.PublicKeyJwks) != 0 + case "did.v1.VerificationMethod.public_key": + return x.PublicKey != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) @@ -7652,10 +6759,8 @@ func (x *fastReflection_VerificationMethod) Clear(fd protoreflect.FieldDescripto x.Id = "" case "did.v1.VerificationMethod.controller": x.Controller = "" - case "did.v1.VerificationMethod.public_key_multibase": - x.PublicKeyMultibase = "" - case "did.v1.VerificationMethod.public_key_jwks": - x.PublicKeyJwks = nil + case "did.v1.VerificationMethod.public_key": + x.PublicKey = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) @@ -7678,15 +6783,9 @@ func (x *fastReflection_VerificationMethod) Get(descriptor protoreflect.FieldDes case "did.v1.VerificationMethod.controller": value := x.Controller return protoreflect.ValueOfString(value) - case "did.v1.VerificationMethod.public_key_multibase": - value := x.PublicKeyMultibase - return protoreflect.ValueOfString(value) - case "did.v1.VerificationMethod.public_key_jwks": - if len(x.PublicKeyJwks) == 0 { - return protoreflect.ValueOfMap(&_VerificationMethod_4_map{}) - } - mapValue := &_VerificationMethod_4_map{m: &x.PublicKeyJwks} - return protoreflect.ValueOfMap(mapValue) + case "did.v1.VerificationMethod.public_key": + value := x.PublicKey + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) @@ -7711,12 +6810,8 @@ func (x *fastReflection_VerificationMethod) Set(fd protoreflect.FieldDescriptor, x.Id = value.Interface().(string) case "did.v1.VerificationMethod.controller": x.Controller = value.Interface().(string) - case "did.v1.VerificationMethod.public_key_multibase": - x.PublicKeyMultibase = value.Interface().(string) - case "did.v1.VerificationMethod.public_key_jwks": - mv := value.Map() - cmv := mv.(*_VerificationMethod_4_map) - x.PublicKeyJwks = *cmv.m + case "did.v1.VerificationMethod.public_key": + x.PublicKey = value.Message().Interface().(*PubKey) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) @@ -7737,18 +6832,15 @@ func (x *fastReflection_VerificationMethod) Set(fd protoreflect.FieldDescriptor, // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_VerificationMethod) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.VerificationMethod.public_key_jwks": - if x.PublicKeyJwks == nil { - x.PublicKeyJwks = make(map[string]string) + case "did.v1.VerificationMethod.public_key": + if x.PublicKey == nil { + x.PublicKey = new(PubKey) } - value := &_VerificationMethod_4_map{m: &x.PublicKeyJwks} - return protoreflect.ValueOfMap(value) + return protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) case "did.v1.VerificationMethod.id": panic(fmt.Errorf("field id of message did.v1.VerificationMethod is not mutable")) case "did.v1.VerificationMethod.controller": panic(fmt.Errorf("field controller of message did.v1.VerificationMethod is not mutable")) - case "did.v1.VerificationMethod.public_key_multibase": - panic(fmt.Errorf("field public_key_multibase of message did.v1.VerificationMethod is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) @@ -7766,11 +6858,9 @@ func (x *fastReflection_VerificationMethod) NewField(fd protoreflect.FieldDescri return protoreflect.ValueOfString("") case "did.v1.VerificationMethod.controller": return protoreflect.ValueOfString("") - case "did.v1.VerificationMethod.public_key_multibase": - return protoreflect.ValueOfString("") - case "did.v1.VerificationMethod.public_key_jwks": - m := make(map[string]string) - return protoreflect.ValueOfMap(&_VerificationMethod_4_map{m: &m}) + case "did.v1.VerificationMethod.public_key": + m := new(PubKey) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) @@ -7848,31 +6938,10 @@ func (x *fastReflection_VerificationMethod) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.PublicKeyMultibase) - if l > 0 { + if x.PublicKey != nil { + l = options.Size(x.PublicKey) n += 1 + l + runtime.Sov(uint64(l)) } - if len(x.PublicKeyJwks) > 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.PublicKeyJwks)) - for k := range x.PublicKeyJwks { - sortme = append(sortme, k) - } - sort.Strings(sortme) - for _, k := range sortme { - v := x.PublicKeyJwks[k] - SiZeMaP(k, v) - } - } else { - for k, v := range x.PublicKeyJwks { - SiZeMaP(k, v) - } - } - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -7902,53 +6971,17 @@ func (x *fastReflection_VerificationMethod) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.PublicKeyJwks) > 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] = 0x22 - return protoiface.MarshalOutput{}, nil + if x.PublicKey != nil { + encoded, err := options.Marshal(x.PublicKey) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err } - if options.Deterministic { - keysForPublicKeyJwks := make([]string, 0, len(x.PublicKeyJwks)) - for k := range x.PublicKeyJwks { - keysForPublicKeyJwks = append(keysForPublicKeyJwks, string(k)) - } - sort.Slice(keysForPublicKeyJwks, func(i, j int) bool { - return keysForPublicKeyJwks[i] < keysForPublicKeyJwks[j] - }) - for iNdEx := len(keysForPublicKeyJwks) - 1; iNdEx >= 0; iNdEx-- { - v := x.PublicKeyJwks[string(keysForPublicKeyJwks[iNdEx])] - out, err := MaRsHaLmAp(keysForPublicKeyJwks[iNdEx], v) - if err != nil { - return out, err - } - } - } else { - for k := range x.PublicKeyJwks { - v := x.PublicKeyJwks[k] - out, err := MaRsHaLmAp(k, v) - if err != nil { - return out, err - } - } - } - } - if len(x.PublicKeyMultibase) > 0 { - i -= len(x.PublicKeyMultibase) - copy(dAtA[i:], x.PublicKeyMultibase) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PublicKeyMultibase))) + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x1a } @@ -8081,39 +7114,7 @@ func (x *fastReflection_VerificationMethod) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 3: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PublicKeyMultibase", 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.PublicKeyMultibase = 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 PublicKeyJwks", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8140,103 +7141,12 @@ func (x *fastReflection_VerificationMethod) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.PublicKeyJwks == nil { - x.PublicKeyJwks = make(map[string]string) + if x.PublicKey == nil { + x.PublicKey = &PubKey{} } - 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 - } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PublicKey); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } - x.PublicKeyJwks[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex @@ -8277,7 +7187,7 @@ func (x *fastReflection_VerificationMethod) ProtoMethods() *protoiface.Methods { // versions: // protoc-gen-go v1.27.0 // protoc (unknown) -// source: did/v1/types.proto +// source: did/v1/models.proto const ( // Verify that this generated code is sufficiently up-to-date. @@ -8286,250 +7196,70 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// AssetInfo defines the asset info -type AssetInfo struct { +// DID defines a parsed DID string +type DID struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` - Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` - AssetType string `protobuf:"bytes,4,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` - OriginChain string `protobuf:"bytes,5,opt,name=origin_chain,json=originChain,proto3" json:"origin_chain,omitempty"` - OriginDenom string `protobuf:"bytes,6,opt,name=origin_denom,json=originDenom,proto3" json:"origin_denom,omitempty"` - Decimals int32 `protobuf:"varint,7,opt,name=decimals,proto3" json:"decimals,omitempty"` - Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` - ImageUrl string `protobuf:"bytes,9,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"` - CoingeckoId string `protobuf:"bytes,10,opt,name=coingecko_id,json=coingeckoId,proto3" json:"coingecko_id,omitempty"` - IsEnabled bool `protobuf:"varint,11,opt,name=is_enabled,json=isEnabled,proto3" json:"is_enabled,omitempty"` - IbcPath string `protobuf:"bytes,12,opt,name=ibc_path,json=ibcPath,proto3" json:"ibc_path,omitempty"` - IbcChannel string `protobuf:"bytes,13,opt,name=ibc_channel,json=ibcChannel,proto3" json:"ibc_channel,omitempty"` - IbcPort string `protobuf:"bytes,14,opt,name=ibc_port,json=ibcPort,proto3" json:"ibc_port,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Method DIDNamespace `protobuf:"varint,2,opt,name=method,proto3,enum=did.v1.DIDNamespace" json:"method,omitempty"` + Network string `protobuf:"bytes,3,opt,name=network,proto3" json:"network,omitempty"` + Identifier string `protobuf:"bytes,4,opt,name=identifier,proto3" json:"identifier,omitempty"` + Paths []string `protobuf:"bytes,5,rep,name=paths,proto3" json:"paths,omitempty"` } -func (x *AssetInfo) Reset() { - *x = AssetInfo{} +func (x *DID) Reset() { + *x = DID{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_types_proto_msgTypes[0] + mi := &file_did_v1_models_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *AssetInfo) String() string { +func (x *DID) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AssetInfo) ProtoMessage() {} +func (*DID) ProtoMessage() {} -// Deprecated: Use AssetInfo.ProtoReflect.Descriptor instead. -func (*AssetInfo) Descriptor() ([]byte, []int) { - return file_did_v1_types_proto_rawDescGZIP(), []int{0} +// Deprecated: Use DID.ProtoReflect.Descriptor instead. +func (*DID) Descriptor() ([]byte, []int) { + return file_did_v1_models_proto_rawDescGZIP(), []int{0} } -func (x *AssetInfo) GetId() string { +func (x *DID) GetId() string { if x != nil { return x.Id } return "" } -func (x *AssetInfo) GetDenom() string { +func (x *DID) GetMethod() DIDNamespace { if x != nil { - return x.Denom + return x.Method + } + return DIDNamespace_DID_NAMESPACE_UNSPECIFIED +} + +func (x *DID) GetNetwork() string { + if x != nil { + return x.Network } return "" } -func (x *AssetInfo) GetSymbol() string { +func (x *DID) GetIdentifier() string { if x != nil { - return x.Symbol + return x.Identifier } return "" } -func (x *AssetInfo) GetAssetType() string { +func (x *DID) GetPaths() []string { if x != nil { - return x.AssetType - } - return "" -} - -func (x *AssetInfo) GetOriginChain() string { - if x != nil { - return x.OriginChain - } - return "" -} - -func (x *AssetInfo) GetOriginDenom() string { - if x != nil { - return x.OriginDenom - } - return "" -} - -func (x *AssetInfo) GetDecimals() int32 { - if x != nil { - return x.Decimals - } - return 0 -} - -func (x *AssetInfo) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *AssetInfo) GetImageUrl() string { - if x != nil { - return x.ImageUrl - } - return "" -} - -func (x *AssetInfo) GetCoingeckoId() string { - if x != nil { - return x.CoingeckoId - } - return "" -} - -func (x *AssetInfo) GetIsEnabled() bool { - if x != nil { - return x.IsEnabled - } - return false -} - -func (x *AssetInfo) GetIbcPath() string { - if x != nil { - return x.IbcPath - } - return "" -} - -func (x *AssetInfo) GetIbcChannel() string { - if x != nil { - return x.IbcChannel - } - return "" -} - -func (x *AssetInfo) GetIbcPort() string { - if x != nil { - return x.IbcPort - } - return "" -} - -// ChainInfo defines the chain info -type ChainInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Symbol string `protobuf:"bytes,4,opt,name=symbol,proto3" json:"symbol,omitempty"` - Bech32Prefix string `protobuf:"bytes,5,opt,name=bech32_prefix,json=bech32Prefix,proto3" json:"bech32_prefix,omitempty"` - GenesisTime string `protobuf:"bytes,6,opt,name=genesis_time,json=genesisTime,proto3" json:"genesis_time,omitempty"` - GrpcEndpoints []*Endpoint `protobuf:"bytes,7,rep,name=grpc_endpoints,json=grpcEndpoints,proto3" json:"grpc_endpoints,omitempty"` - RestEndpoints []*Endpoint `protobuf:"bytes,8,rep,name=rest_endpoints,json=restEndpoints,proto3" json:"rest_endpoints,omitempty"` - Explorer *ExplorerInfo `protobuf:"bytes,9,opt,name=explorer,proto3" json:"explorer,omitempty"` - FeeInfo *FeeInfo `protobuf:"bytes,10,opt,name=fee_info,json=feeInfo,proto3" json:"fee_info,omitempty"` -} - -func (x *ChainInfo) Reset() { - *x = ChainInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_types_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ChainInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChainInfo) ProtoMessage() {} - -// Deprecated: Use ChainInfo.ProtoReflect.Descriptor instead. -func (*ChainInfo) Descriptor() ([]byte, []int) { - return file_did_v1_types_proto_rawDescGZIP(), []int{1} -} - -func (x *ChainInfo) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *ChainInfo) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -func (x *ChainInfo) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ChainInfo) GetSymbol() string { - if x != nil { - return x.Symbol - } - return "" -} - -func (x *ChainInfo) GetBech32Prefix() string { - if x != nil { - return x.Bech32Prefix - } - return "" -} - -func (x *ChainInfo) GetGenesisTime() string { - if x != nil { - return x.GenesisTime - } - return "" -} - -func (x *ChainInfo) GetGrpcEndpoints() []*Endpoint { - if x != nil { - return x.GrpcEndpoints - } - return nil -} - -func (x *ChainInfo) GetRestEndpoints() []*Endpoint { - if x != nil { - return x.RestEndpoints - } - return nil -} - -func (x *ChainInfo) GetExplorer() *ExplorerInfo { - if x != nil { - return x.Explorer - } - return nil -} - -func (x *ChainInfo) GetFeeInfo() *FeeInfo { - if x != nil { - return x.FeeInfo + return x.Paths } return nil } @@ -8540,19 +7270,18 @@ type Credential struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - CredentialType string `protobuf:"bytes,2,opt,name=credential_type,json=credentialType,proto3" json:"credential_type,omitempty"` - CredentialId []byte `protobuf:"bytes,3,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"` - Transport []string `protobuf:"bytes,4,rep,name=transport,proto3" json:"transport,omitempty"` - AttestationType string `protobuf:"bytes,5,opt,name=attestation_type,json=attestationType,proto3" json:"attestation_type,omitempty"` - DisplayName string `protobuf:"bytes,6,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - Controller string `protobuf:"bytes,7,opt,name=controller,proto3" json:"controller,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + CredentialType string `protobuf:"bytes,2,opt,name=credential_type,json=credentialType,proto3" json:"credential_type,omitempty"` + CredentialId []byte `protobuf:"bytes,3,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"` + Transport []string `protobuf:"bytes,4,rep,name=transport,proto3" json:"transport,omitempty"` + Subject string `protobuf:"bytes,6,opt,name=subject,proto3" json:"subject,omitempty"` + Controller string `protobuf:"bytes,7,opt,name=controller,proto3" json:"controller,omitempty"` } func (x *Credential) Reset() { *x = Credential{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_types_proto_msgTypes[2] + mi := &file_did_v1_models_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8566,7 +7295,7 @@ func (*Credential) ProtoMessage() {} // Deprecated: Use Credential.ProtoReflect.Descriptor instead. func (*Credential) Descriptor() ([]byte, []int) { - return file_did_v1_types_proto_rawDescGZIP(), []int{2} + return file_did_v1_models_proto_rawDescGZIP(), []int{1} } func (x *Credential) GetId() string { @@ -8597,16 +7326,9 @@ func (x *Credential) GetTransport() []string { return nil } -func (x *Credential) GetAttestationType() string { +func (x *Credential) GetSubject() string { if x != nil { - return x.AttestationType - } - return "" -} - -func (x *Credential) GetDisplayName() string { - if x != nil { - return x.DisplayName + return x.Subject } return "" } @@ -8635,7 +7357,7 @@ type Document struct { func (x *Document) Reset() { *x = Document{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_types_proto_msgTypes[3] + mi := &file_did_v1_models_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8649,7 +7371,7 @@ func (*Document) ProtoMessage() {} // Deprecated: Use Document.ProtoReflect.Descriptor instead. func (*Document) Descriptor() ([]byte, []int) { - return file_did_v1_types_proto_rawDescGZIP(), []int{3} + return file_did_v1_models_proto_rawDescGZIP(), []int{2} } func (x *Document) GetId() string { @@ -8694,226 +7416,220 @@ func (x *Document) GetCapabilityInvocation() []string { return nil } -// Endpoint defines an endpoint -type Endpoint struct { +// Metadata defines additional information provided to a did +type Metadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` - IsPrimary bool `protobuf:"varint,2,opt,name=is_primary,json=isPrimary,proto3" json:"is_primary,omitempty"` + OriginUri string `protobuf:"bytes,1,opt,name=origin_uri,json=originUri,proto3" json:"origin_uri,omitempty"` + Public map[string]string `protobuf:"bytes,2,rep,name=public,proto3" json:"public,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Private map[string]*Property `protobuf:"bytes,3,rep,name=private,proto3" json:"private,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -func (x *Endpoint) Reset() { - *x = Endpoint{} +func (x *Metadata) Reset() { + *x = Metadata{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_types_proto_msgTypes[4] + mi := &file_did_v1_models_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Endpoint) String() string { +func (x *Metadata) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Endpoint) ProtoMessage() {} +func (*Metadata) ProtoMessage() {} -// Deprecated: Use Endpoint.ProtoReflect.Descriptor instead. -func (*Endpoint) Descriptor() ([]byte, []int) { - return file_did_v1_types_proto_rawDescGZIP(), []int{4} +// Deprecated: Use Metadata.ProtoReflect.Descriptor instead. +func (*Metadata) Descriptor() ([]byte, []int) { + return file_did_v1_models_proto_rawDescGZIP(), []int{3} } -func (x *Endpoint) GetUrl() string { +func (x *Metadata) GetOriginUri() string { if x != nil { - return x.Url + return x.OriginUri } return "" } -func (x *Endpoint) GetIsPrimary() bool { +func (x *Metadata) GetPublic() map[string]string { if x != nil { - return x.IsPrimary - } - return false -} - -// ExplorerInfo defines the explorer info -type ExplorerInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` -} - -func (x *ExplorerInfo) Reset() { - *x = ExplorerInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_types_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExplorerInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExplorerInfo) ProtoMessage() {} - -// Deprecated: Use ExplorerInfo.ProtoReflect.Descriptor instead. -func (*ExplorerInfo) Descriptor() ([]byte, []int) { - return file_did_v1_types_proto_rawDescGZIP(), []int{5} -} - -func (x *ExplorerInfo) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ExplorerInfo) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -// FeeInfo defines a fee info -type FeeInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BaseDenom string `protobuf:"bytes,1,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty"` - FeeRates []string `protobuf:"bytes,2,rep,name=fee_rates,json=feeRates,proto3" json:"fee_rates,omitempty"` - InitGasLimit int32 `protobuf:"varint,3,opt,name=init_gas_limit,json=initGasLimit,proto3" json:"init_gas_limit,omitempty"` - IsSimulable bool `protobuf:"varint,4,opt,name=is_simulable,json=isSimulable,proto3" json:"is_simulable,omitempty"` - GasMultiply float64 `protobuf:"fixed64,5,opt,name=gas_multiply,json=gasMultiply,proto3" json:"gas_multiply,omitempty"` -} - -func (x *FeeInfo) Reset() { - *x = FeeInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_types_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FeeInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FeeInfo) ProtoMessage() {} - -// Deprecated: Use FeeInfo.ProtoReflect.Descriptor instead. -func (*FeeInfo) Descriptor() ([]byte, []int) { - return file_did_v1_types_proto_rawDescGZIP(), []int{6} -} - -func (x *FeeInfo) GetBaseDenom() string { - if x != nil { - return x.BaseDenom - } - return "" -} - -func (x *FeeInfo) GetFeeRates() []string { - if x != nil { - return x.FeeRates + return x.Public } return nil } -func (x *FeeInfo) GetInitGasLimit() int32 { +func (x *Metadata) GetPrivate() map[string]*Property { if x != nil { - return x.InitGasLimit + return x.Private } - return 0 + return nil } -func (x *FeeInfo) GetIsSimulable() bool { - if x != nil { - return x.IsSimulable - } - return false -} - -func (x *FeeInfo) GetGasMultiply() float64 { - if x != nil { - return x.GasMultiply - } - return 0 -} - -// Identity defines an associated profile for a did subject -type Identity struct { +// Permissions contains a list of grants and access control rules for +// a Service. +type Permissions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` - Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"` - Credentials []*Credential `protobuf:"bytes,4,rep,name=credentials,proto3" json:"credentials,omitempty"` - VerificationMethods []*VerificationMethod `protobuf:"bytes,5,rep,name=verification_methods,json=verificationMethods,proto3" json:"verification_methods,omitempty"` + Grants []DIDNamespace `protobuf:"varint,1,rep,packed,name=grants,proto3,enum=did.v1.DIDNamespace" json:"grants,omitempty"` + Scopes []PermissionScope `protobuf:"varint,2,rep,packed,name=scopes,proto3,enum=did.v1.PermissionScope" json:"scopes,omitempty"` } -func (x *Identity) Reset() { - *x = Identity{} +func (x *Permissions) Reset() { + *x = Permissions{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_types_proto_msgTypes[7] + mi := &file_did_v1_models_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Identity) String() string { +func (x *Permissions) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Identity) ProtoMessage() {} +func (*Permissions) ProtoMessage() {} -// Deprecated: Use Identity.ProtoReflect.Descriptor instead. -func (*Identity) Descriptor() ([]byte, []int) { - return file_did_v1_types_proto_rawDescGZIP(), []int{7} +// Deprecated: Use Permissions.ProtoReflect.Descriptor instead. +func (*Permissions) Descriptor() ([]byte, []int) { + return file_did_v1_models_proto_rawDescGZIP(), []int{4} } -func (x *Identity) GetId() string { +func (x *Permissions) GetGrants() []DIDNamespace { + if x != nil { + return x.Grants + } + return nil +} + +func (x *Permissions) GetScopes() []PermissionScope { + if x != nil { + return x.Scopes + } + return nil +} + +// Profile defines an associated public identity for a did subject +type Profile struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` + Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"` + Credentials []*Credential `protobuf:"bytes,4,rep,name=credentials,proto3" json:"credentials,omitempty"` + Attestations []*VerificationMethod `protobuf:"bytes,5,rep,name=attestations,proto3" json:"attestations,omitempty"` + Metadata *Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` +} + +func (x *Profile) Reset() { + *x = Profile{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_models_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Profile) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Profile) ProtoMessage() {} + +// Deprecated: Use Profile.ProtoReflect.Descriptor instead. +func (*Profile) Descriptor() ([]byte, []int) { + return file_did_v1_models_proto_rawDescGZIP(), []int{5} +} + +func (x *Profile) GetId() string { if x != nil { return x.Id } return "" } -func (x *Identity) GetSubject() string { +func (x *Profile) GetSubject() string { if x != nil { return x.Subject } return "" } -func (x *Identity) GetController() string { +func (x *Profile) GetController() string { if x != nil { return x.Controller } return "" } -func (x *Identity) GetCredentials() []*Credential { +func (x *Profile) GetCredentials() []*Credential { if x != nil { return x.Credentials } return nil } -func (x *Identity) GetVerificationMethods() []*VerificationMethod { +func (x *Profile) GetAttestations() []*VerificationMethod { if x != nil { - return x.VerificationMethods + return x.Attestations + } + return nil +} + +func (x *Profile) GetMetadata() *Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +// Property defines a Zero-Knowledge accumulator which can be used to +// anonymously prove a given value to a DID subject +type Property struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Accumulator []byte `protobuf:"bytes,1,opt,name=accumulator,proto3" json:"accumulator,omitempty"` + Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` +} + +func (x *Property) Reset() { + *x = Property{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_models_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Property) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Property) ProtoMessage() {} + +// Deprecated: Use Property.ProtoReflect.Descriptor instead. +func (*Property) Descriptor() ([]byte, []int) { + return file_did_v1_models_proto_rawDescGZIP(), []int{6} +} + +func (x *Property) GetAccumulator() []byte { + if x != nil { + return x.Accumulator + } + return nil +} + +func (x *Property) GetKey() []byte { + if x != nil { + return x.Key } return nil } @@ -8924,16 +7640,17 @@ type PubKey struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - KeyType string `protobuf:"bytes,3,opt,name=key_type,json=keyType,proto3" json:"key_type,omitempty"` - Controller string `protobuf:"bytes,4,opt,name=controller,proto3" json:"controller,omitempty"` + Namespace DIDNamespace `protobuf:"varint,1,opt,name=namespace,proto3,enum=did.v1.DIDNamespace" json:"namespace,omitempty"` + Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + Kind KeyType `protobuf:"varint,3,opt,name=kind,proto3,enum=did.v1.KeyType" json:"kind,omitempty"` + Multibase string `protobuf:"bytes,5,opt,name=multibase,proto3" json:"multibase,omitempty"` + Jwks map[string]string `protobuf:"bytes,6,rep,name=jwks,proto3" json:"jwks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *PubKey) Reset() { *x = PubKey{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_types_proto_msgTypes[8] + mi := &file_did_v1_models_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8947,14 +7664,14 @@ func (*PubKey) ProtoMessage() {} // Deprecated: Use PubKey.ProtoReflect.Descriptor instead. func (*PubKey) Descriptor() ([]byte, []int) { - return file_did_v1_types_proto_rawDescGZIP(), []int{8} + return file_did_v1_models_proto_rawDescGZIP(), []int{7} } -func (x *PubKey) GetId() string { +func (x *PubKey) GetNamespace() DIDNamespace { if x != nil { - return x.Id + return x.Namespace } - return "" + return DIDNamespace_DID_NAMESPACE_UNSPECIFIED } func (x *PubKey) GetKey() []byte { @@ -8964,18 +7681,25 @@ func (x *PubKey) GetKey() []byte { return nil } -func (x *PubKey) GetKeyType() string { +func (x *PubKey) GetKind() KeyType { if x != nil { - return x.KeyType + return x.Kind + } + return KeyType_KEY_TYPE_UNSPECIFIED +} + +func (x *PubKey) GetMultibase() string { + if x != nil { + return x.Multibase } return "" } -func (x *PubKey) GetController() string { +func (x *PubKey) GetJwks() map[string]string { if x != nil { - return x.Controller + return x.Jwks } - return "" + return nil } // VerificationMethod defines a verification method @@ -8984,18 +7708,15 @@ type VerificationMethod struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` - // The delegation proof or verification method - PublicKeyMultibase string `protobuf:"bytes,3,opt,name=public_key_multibase,json=publicKeyMultibase,proto3" json:"public_key_multibase,omitempty"` - // Public Key JWKS is a map of the associated public keys - PublicKeyJwks map[string]string `protobuf:"bytes,4,rep,name=public_key_jwks,json=publicKeyJwks,proto3" json:"public_key_jwks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` + PublicKey *PubKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` } func (x *VerificationMethod) Reset() { *x = VerificationMethod{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_types_proto_msgTypes[9] + mi := &file_did_v1_models_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9009,7 +7730,7 @@ func (*VerificationMethod) ProtoMessage() {} // Deprecated: Use VerificationMethod.ProtoReflect.Descriptor instead. func (*VerificationMethod) Descriptor() ([]byte, []int) { - return file_did_v1_types_proto_rawDescGZIP(), []int{9} + return file_did_v1_models_proto_rawDescGZIP(), []int{8} } func (x *VerificationMethod) GetId() string { @@ -9026,230 +7747,199 @@ func (x *VerificationMethod) GetController() string { return "" } -func (x *VerificationMethod) GetPublicKeyMultibase() string { +func (x *VerificationMethod) GetPublicKey() *PubKey { if x != nil { - return x.PublicKeyMultibase - } - return "" -} - -func (x *VerificationMethod) GetPublicKeyJwks() map[string]string { - if x != nil { - return x.PublicKeyJwks + return x.PublicKey } return nil } -var File_did_v1_types_proto protoreflect.FileDescriptor +var File_did_v1_models_proto protoreflect.FileDescriptor -var file_did_v1_types_proto_rawDesc = []byte{ - 0x0a, 0x12, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 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, 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, 0xa2, 0x03, 0x0a, 0x09, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, - 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, - 0x6f, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x43, - 0x68, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x64, - 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x72, 0x69, 0x67, - 0x69, 0x6e, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, 0x6d, - 0x61, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, 0x6d, - 0x61, 0x6c, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x75, - 0x72, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, - 0x72, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x69, 0x6e, 0x67, 0x65, 0x63, 0x6b, 0x6f, 0x5f, - 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x69, 0x6e, 0x67, 0x65, - 0x63, 0x6b, 0x6f, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x45, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x62, 0x63, 0x5f, 0x70, 0x61, 0x74, 0x68, - 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x62, 0x63, 0x50, 0x61, 0x74, 0x68, 0x12, - 0x1f, 0x0a, 0x0b, 0x69, 0x62, 0x63, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x62, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, - 0x12, 0x19, 0x0a, 0x08, 0x69, 0x62, 0x63, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0e, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x69, 0x62, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x22, 0xfa, 0x02, 0x0a, 0x09, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, - 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, - 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x67, 0x65, 0x6e, - 0x65, 0x73, 0x69, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x0e, 0x67, 0x72, 0x70, 0x63, - 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x52, 0x0d, 0x67, 0x72, 0x70, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x12, 0x37, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0d, 0x72, 0x65, 0x73, - 0x74, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x08, 0x65, 0x78, - 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x08, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x08, - 0x66, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, - 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x07, 0x66, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xf6, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, - 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, - 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x22, 0xa6, 0x02, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x4d, - 0x0a, 0x14, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x13, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x26, 0x0a, - 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0f, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x12, 0x33, 0x0a, 0x15, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x14, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x15, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x5f, 0x69, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x0a, 0x08, 0x45, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x70, - 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, - 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x34, 0x0a, 0x0c, 0x45, 0x78, 0x70, 0x6c, 0x6f, - 0x72, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, - 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0xb1, 0x01, - 0x0a, 0x07, 0x46, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x73, - 0x65, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, - 0x61, 0x73, 0x65, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x65, 0x65, 0x5f, - 0x72, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x66, 0x65, 0x65, - 0x52, 0x61, 0x74, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x67, 0x61, - 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x69, - 0x6e, 0x69, 0x74, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, - 0x73, 0x5f, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0b, 0x69, 0x73, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x21, - 0x0a, 0x0c, 0x67, 0x61, 0x73, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x79, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x67, 0x61, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, - 0x79, 0x22, 0xd9, 0x01, 0x0a, 0x08, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, - 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, - 0x6c, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x4d, - 0x0a, 0x14, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x13, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x22, 0x65, 0x0a, - 0x06, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, - 0x54, 0x79, 0x70, 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, 0x22, 0x8f, 0x02, 0x0a, 0x12, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 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, 0x55, 0x0a, - 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6a, 0x77, 0x6b, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, - 0x6f, 0x64, 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, 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, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, - 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 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 file_did_v1_models_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x64, + 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x93, 0x01, 0x0a, 0x03, 0x44, 0x49, 0x44, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x06, 0x6d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x49, 0x44, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x22, 0xc2, 0x01, 0x0a, 0x0a, 0x43, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x70, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1e, + 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0xa6, + 0x02, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x4d, 0x0a, 0x14, 0x76, + 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x13, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x75, + 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x73, + 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x33, 0x0a, + 0x15, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x65, 0x6c, 0x65, + 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, 0x61, + 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x15, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x5f, 0x69, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x14, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x76, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa1, 0x02, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x75, + 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x55, 0x72, 0x69, 0x12, 0x34, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x12, 0x37, 0x0a, 0x07, 0x70, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x69, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x1a, 0x39, 0x0a, 0x0b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 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, 0x1a, 0x4c, 0x0a, + 0x0c, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x26, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, + 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x6c, 0x0a, 0x0b, 0x50, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2c, 0x0a, 0x06, 0x67, 0x72, + 0x61, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x64, 0x69, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x49, 0x44, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x52, 0x06, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, + 0x65, 0x73, 0x18, 0x02, 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, 0x22, 0xf7, 0x01, 0x0a, 0x07, 0x50, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, + 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, + 0x34, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x3e, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x22, 0x3e, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, + 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, + 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x22, 0xf8, 0x01, 0x0a, 0x06, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x32, + 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x49, 0x44, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x75, 0x6c, + 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x75, + 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x6a, 0x77, 0x6b, 0x73, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x75, 0x62, 0x4b, 0x65, 0x79, 0x2e, 0x4a, 0x77, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x04, 0x6a, 0x77, 0x6b, 0x73, 0x1a, 0x37, 0x0a, 0x09, 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, 0x22, 0x73, + 0x0a, 0x12, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, + 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x4b, 0x65, 0x79, 0x42, 0x7b, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, + 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 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 ( - file_did_v1_types_proto_rawDescOnce sync.Once - file_did_v1_types_proto_rawDescData = file_did_v1_types_proto_rawDesc + file_did_v1_models_proto_rawDescOnce sync.Once + file_did_v1_models_proto_rawDescData = file_did_v1_models_proto_rawDesc ) -func file_did_v1_types_proto_rawDescGZIP() []byte { - file_did_v1_types_proto_rawDescOnce.Do(func() { - file_did_v1_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_did_v1_types_proto_rawDescData) +func file_did_v1_models_proto_rawDescGZIP() []byte { + file_did_v1_models_proto_rawDescOnce.Do(func() { + file_did_v1_models_proto_rawDescData = protoimpl.X.CompressGZIP(file_did_v1_models_proto_rawDescData) }) - return file_did_v1_types_proto_rawDescData + return file_did_v1_models_proto_rawDescData } -var file_did_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 11) -var file_did_v1_types_proto_goTypes = []interface{}{ - (*AssetInfo)(nil), // 0: did.v1.AssetInfo - (*ChainInfo)(nil), // 1: did.v1.ChainInfo - (*Credential)(nil), // 2: did.v1.Credential - (*Document)(nil), // 3: did.v1.Document - (*Endpoint)(nil), // 4: did.v1.Endpoint - (*ExplorerInfo)(nil), // 5: did.v1.ExplorerInfo - (*FeeInfo)(nil), // 6: did.v1.FeeInfo - (*Identity)(nil), // 7: did.v1.Identity - (*PubKey)(nil), // 8: did.v1.PubKey - (*VerificationMethod)(nil), // 9: did.v1.VerificationMethod - nil, // 10: did.v1.VerificationMethod.PublicKeyJwksEntry +var file_did_v1_models_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_did_v1_models_proto_goTypes = []interface{}{ + (*DID)(nil), // 0: did.v1.DID + (*Credential)(nil), // 1: did.v1.Credential + (*Document)(nil), // 2: did.v1.Document + (*Metadata)(nil), // 3: did.v1.Metadata + (*Permissions)(nil), // 4: did.v1.Permissions + (*Profile)(nil), // 5: did.v1.Profile + (*Property)(nil), // 6: did.v1.Property + (*PubKey)(nil), // 7: did.v1.PubKey + (*VerificationMethod)(nil), // 8: did.v1.VerificationMethod + nil, // 9: did.v1.Metadata.PublicEntry + nil, // 10: did.v1.Metadata.PrivateEntry + nil, // 11: did.v1.PubKey.JwksEntry + (DIDNamespace)(0), // 12: did.v1.DIDNamespace + (PermissionScope)(0), // 13: did.v1.PermissionScope + (KeyType)(0), // 14: did.v1.KeyType } -var file_did_v1_types_proto_depIdxs = []int32{ - 4, // 0: did.v1.ChainInfo.grpc_endpoints:type_name -> did.v1.Endpoint - 4, // 1: did.v1.ChainInfo.rest_endpoints:type_name -> did.v1.Endpoint - 5, // 2: did.v1.ChainInfo.explorer:type_name -> did.v1.ExplorerInfo - 6, // 3: did.v1.ChainInfo.fee_info:type_name -> did.v1.FeeInfo - 9, // 4: did.v1.Document.verification_methods:type_name -> did.v1.VerificationMethod - 2, // 5: did.v1.Identity.credentials:type_name -> did.v1.Credential - 9, // 6: did.v1.Identity.verification_methods:type_name -> did.v1.VerificationMethod - 10, // 7: did.v1.VerificationMethod.public_key_jwks:type_name -> did.v1.VerificationMethod.PublicKeyJwksEntry - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name +var file_did_v1_models_proto_depIdxs = []int32{ + 12, // 0: did.v1.DID.method:type_name -> did.v1.DIDNamespace + 8, // 1: did.v1.Document.verification_methods:type_name -> did.v1.VerificationMethod + 9, // 2: did.v1.Metadata.public:type_name -> did.v1.Metadata.PublicEntry + 10, // 3: did.v1.Metadata.private:type_name -> did.v1.Metadata.PrivateEntry + 12, // 4: did.v1.Permissions.grants:type_name -> did.v1.DIDNamespace + 13, // 5: did.v1.Permissions.scopes:type_name -> did.v1.PermissionScope + 1, // 6: did.v1.Profile.credentials:type_name -> did.v1.Credential + 8, // 7: did.v1.Profile.attestations:type_name -> did.v1.VerificationMethod + 3, // 8: did.v1.Profile.metadata:type_name -> did.v1.Metadata + 12, // 9: did.v1.PubKey.namespace:type_name -> did.v1.DIDNamespace + 14, // 10: did.v1.PubKey.kind:type_name -> did.v1.KeyType + 11, // 11: did.v1.PubKey.jwks:type_name -> did.v1.PubKey.JwksEntry + 7, // 12: did.v1.VerificationMethod.public_key:type_name -> did.v1.PubKey + 6, // 13: did.v1.Metadata.PrivateEntry.value:type_name -> did.v1.Property + 14, // [14:14] is the sub-list for method output_type + 14, // [14:14] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name } -func init() { file_did_v1_types_proto_init() } -func file_did_v1_types_proto_init() { - if File_did_v1_types_proto != nil { +func init() { file_did_v1_models_proto_init() } +func file_did_v1_models_proto_init() { + if File_did_v1_models_proto != nil { return } + file_did_v1_genesis_proto_init() if !protoimpl.UnsafeEnabled { - file_did_v1_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AssetInfo); i { + file_did_v1_models_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DID); i { case 0: return &v.state case 1: @@ -9260,19 +7950,7 @@ func file_did_v1_types_proto_init() { return nil } } - file_did_v1_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChainInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_did_v1_models_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Credential); i { case 0: return &v.state @@ -9284,7 +7962,7 @@ func file_did_v1_types_proto_init() { return nil } } - file_did_v1_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_did_v1_models_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Document); i { case 0: return &v.state @@ -9296,8 +7974,8 @@ func file_did_v1_types_proto_init() { return nil } } - file_did_v1_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Endpoint); i { + file_did_v1_models_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Metadata); i { case 0: return &v.state case 1: @@ -9308,8 +7986,8 @@ func file_did_v1_types_proto_init() { return nil } } - file_did_v1_types_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExplorerInfo); i { + file_did_v1_models_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Permissions); i { case 0: return &v.state case 1: @@ -9320,8 +7998,8 @@ func file_did_v1_types_proto_init() { return nil } } - file_did_v1_types_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FeeInfo); i { + file_did_v1_models_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Profile); i { case 0: return &v.state case 1: @@ -9332,8 +8010,8 @@ func file_did_v1_types_proto_init() { return nil } } - file_did_v1_types_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Identity); i { + file_did_v1_models_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Property); i { case 0: return &v.state case 1: @@ -9344,7 +8022,7 @@ func file_did_v1_types_proto_init() { return nil } } - file_did_v1_types_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_did_v1_models_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PubKey); i { case 0: return &v.state @@ -9356,7 +8034,7 @@ func file_did_v1_types_proto_init() { return nil } } - file_did_v1_types_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_did_v1_models_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*VerificationMethod); i { case 0: return &v.state @@ -9373,18 +8051,18 @@ func file_did_v1_types_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_did_v1_types_proto_rawDesc, + RawDescriptor: file_did_v1_models_proto_rawDesc, NumEnums: 0, - NumMessages: 11, + NumMessages: 12, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_did_v1_types_proto_goTypes, - DependencyIndexes: file_did_v1_types_proto_depIdxs, - MessageInfos: file_did_v1_types_proto_msgTypes, + GoTypes: file_did_v1_models_proto_goTypes, + DependencyIndexes: file_did_v1_models_proto_depIdxs, + MessageInfos: file_did_v1_models_proto_msgTypes, }.Build() - File_did_v1_types_proto = out.File - file_did_v1_types_proto_rawDesc = nil - file_did_v1_types_proto_goTypes = nil - file_did_v1_types_proto_depIdxs = nil + File_did_v1_models_proto = out.File + file_did_v1_models_proto_rawDesc = nil + file_did_v1_models_proto_goTypes = nil + file_did_v1_models_proto_depIdxs = nil } diff --git a/api/did/v1/query.pulsar.go b/api/did/v1/query.pulsar.go index 39deb96a2..3d81ca0da 100644 --- a/api/did/v1/query.pulsar.go +++ b/api/did/v1/query.pulsar.go @@ -5907,106 +5907,106 @@ var file_did_v1_query_proto_rawDesc = []byte{ 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x12, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3d, 0x0a, 0x13, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x26, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x28, 0x0a, 0x14, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x64, 0x69, 0x64, 0x22, 0x2f, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, - 0x69, 0x73, 0x74, 0x73, 0x22, 0x43, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x72, 0x65, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, - 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x22, 0xaf, 0x01, 0x0a, 0x18, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x64, 0x69, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x72, - 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, - 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x1a, 0x3e, 0x0a, 0x10, 0x43, - 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 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, 0x0c, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x2a, 0x0a, 0x16, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x22, 0x7d, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x4a, 0x0a, 0x12, 0x76, 0x65, - 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, - 0x6f, 0x64, 0x52, 0x12, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22, 0x27, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, - 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, - 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x22, - 0x44, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x64, 0x6f, 0x63, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x2d, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, - 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, - 0x69, 0x67, 0x69, 0x6e, 0x22, 0x30, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0xf5, 0x04, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x12, 0x56, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1a, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, 0x2f, 0x64, 0x69, - 0x64, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x64, 0x0a, 0x08, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x73, 0x12, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, + 0x1a, 0x13, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3d, 0x0a, 0x13, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x28, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x64, 0x69, 0x64, 0x2f, - 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x79, - 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x1f, 0x2e, - 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x72, 0x65, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, + 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x64, 0x69, 0x64, 0x22, 0x2f, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, + 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x43, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, + 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x22, 0xaf, 0x01, 0x0a, 0x18, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x64, + 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x72, 0x65, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x1a, 0x3e, 0x0a, 0x10, + 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 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, + 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x2a, 0x0a, 0x16, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x22, 0x7d, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x4a, 0x0a, 0x12, 0x76, + 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x52, 0x12, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22, 0x27, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, + 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, + 0x22, 0x44, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x64, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x2d, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, + 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x22, 0x30, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0xf5, 0x04, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x12, 0x56, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1a, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, 0x2f, 0x64, + 0x69, 0x64, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x64, 0x0a, 0x08, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x64, 0x69, 0x64, + 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, + 0x79, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x72, 0x65, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x7b, - 0x64, 0x69, 0x64, 0x7d, 0x2f, 0x7b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x7d, 0x2f, 0x63, 0x72, - 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x6c, 0x0a, 0x0a, 0x49, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, - 0x12, 0x15, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x2f, 0x69, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x60, 0x0a, 0x07, 0x52, 0x65, 0x73, 0x6f, 0x6c, - 0x76, 0x65, 0x12, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x72, 0x65, 0x73, 0x6f, - 0x6c, 0x76, 0x65, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x12, 0x63, 0x0a, 0x07, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x7b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x7d, 0x42, 0x7a, - 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 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, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x20, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x64, 0x69, 0x64, 0x2f, + 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x2f, 0x7b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x7d, 0x2f, 0x63, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x6c, 0x0a, 0x0a, 0x49, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x17, 0x12, 0x15, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x2f, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x60, 0x0a, 0x07, 0x52, 0x65, 0x73, 0x6f, + 0x6c, 0x76, 0x65, 0x12, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, + 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x72, 0x65, 0x73, + 0x6f, 0x6c, 0x76, 0x65, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x12, 0x63, 0x0a, 0x07, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x7b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x7d, 0x42, + 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 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 ( @@ -6070,7 +6070,7 @@ func file_did_v1_query_proto_init() { return } file_did_v1_genesis_proto_init() - file_did_v1_types_proto_init() + file_did_v1_models_proto_init() if !protoimpl.UnsafeEnabled { file_did_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryParamsRequest); i { diff --git a/api/did/v1/state.pulsar.go b/api/did/v1/state.pulsar.go index 1029d7a66..b35c4df2a 100644 --- a/api/did/v1/state.pulsar.go +++ b/api/did/v1/state.pulsar.go @@ -674,105 +674,23 @@ func (x *fastReflection_Aliases) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.Map = (*_Assertion_4_map)(nil) - -type _Assertion_4_map struct { - m *map[string]string -} - -func (x *_Assertion_4_map) Len() int { - if x.m == nil { - return 0 - } - return len(*x.m) -} - -func (x *_Assertion_4_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 *_Assertion_4_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 *_Assertion_4_map) Clear(key protoreflect.MapKey) { - if x.m == nil { - return - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - delete(*x.m, concreteKey) -} - -func (x *_Assertion_4_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 *_Assertion_4_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 *_Assertion_4_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 *_Assertion_4_map) NewValue() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Assertion_4_map) IsValid() bool { - return x.m != nil -} - var ( - md_Assertion protoreflect.MessageDescriptor - fd_Assertion_id protoreflect.FieldDescriptor - fd_Assertion_key_type protoreflect.FieldDescriptor - fd_Assertion_credential protoreflect.FieldDescriptor - fd_Assertion_metadata protoreflect.FieldDescriptor - fd_Assertion_controller protoreflect.FieldDescriptor + md_Assertion protoreflect.MessageDescriptor + fd_Assertion_id protoreflect.FieldDescriptor + fd_Assertion_controller protoreflect.FieldDescriptor + fd_Assertion_public_key protoreflect.FieldDescriptor + fd_Assertion_credential_id protoreflect.FieldDescriptor + fd_Assertion_metadata protoreflect.FieldDescriptor ) func init() { file_did_v1_state_proto_init() md_Assertion = File_did_v1_state_proto.Messages().ByName("Assertion") fd_Assertion_id = md_Assertion.Fields().ByName("id") - fd_Assertion_key_type = md_Assertion.Fields().ByName("key_type") - fd_Assertion_credential = md_Assertion.Fields().ByName("credential") - fd_Assertion_metadata = md_Assertion.Fields().ByName("metadata") fd_Assertion_controller = md_Assertion.Fields().ByName("controller") + fd_Assertion_public_key = md_Assertion.Fields().ByName("public_key") + fd_Assertion_credential_id = md_Assertion.Fields().ByName("credential_id") + fd_Assertion_metadata = md_Assertion.Fields().ByName("metadata") } var _ protoreflect.Message = (*fastReflection_Assertion)(nil) @@ -846,30 +764,30 @@ func (x *fastReflection_Assertion) Range(f func(protoreflect.FieldDescriptor, pr return } } - if x.KeyType != "" { - value := protoreflect.ValueOfString(x.KeyType) - if !f(fd_Assertion_key_type, value) { - return - } - } - if len(x.Credential) != 0 { - value := protoreflect.ValueOfBytes(x.Credential) - if !f(fd_Assertion_credential, value) { - return - } - } - if len(x.Metadata) != 0 { - value := protoreflect.ValueOfMap(&_Assertion_4_map{m: &x.Metadata}) - if !f(fd_Assertion_metadata, value) { - return - } - } if x.Controller != "" { value := protoreflect.ValueOfString(x.Controller) if !f(fd_Assertion_controller, value) { return } } + if x.PublicKey != nil { + value := protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) + if !f(fd_Assertion_public_key, value) { + return + } + } + if len(x.CredentialId) != 0 { + value := protoreflect.ValueOfBytes(x.CredentialId) + if !f(fd_Assertion_credential_id, value) { + return + } + } + if x.Metadata != nil { + value := protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) + if !f(fd_Assertion_metadata, value) { + return + } + } } // Has reports whether a field is populated. @@ -887,14 +805,14 @@ func (x *fastReflection_Assertion) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "did.v1.Assertion.id": return x.Id != "" - case "did.v1.Assertion.key_type": - return x.KeyType != "" - case "did.v1.Assertion.credential": - return len(x.Credential) != 0 - case "did.v1.Assertion.metadata": - return len(x.Metadata) != 0 case "did.v1.Assertion.controller": return x.Controller != "" + case "did.v1.Assertion.public_key": + return x.PublicKey != nil + case "did.v1.Assertion.credential_id": + return len(x.CredentialId) != 0 + case "did.v1.Assertion.metadata": + return x.Metadata != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Assertion")) @@ -913,14 +831,14 @@ func (x *fastReflection_Assertion) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "did.v1.Assertion.id": x.Id = "" - case "did.v1.Assertion.key_type": - x.KeyType = "" - case "did.v1.Assertion.credential": - x.Credential = nil - case "did.v1.Assertion.metadata": - x.Metadata = nil case "did.v1.Assertion.controller": x.Controller = "" + case "did.v1.Assertion.public_key": + x.PublicKey = nil + case "did.v1.Assertion.credential_id": + x.CredentialId = nil + case "did.v1.Assertion.metadata": + x.Metadata = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Assertion")) @@ -940,21 +858,18 @@ func (x *fastReflection_Assertion) Get(descriptor protoreflect.FieldDescriptor) case "did.v1.Assertion.id": value := x.Id return protoreflect.ValueOfString(value) - case "did.v1.Assertion.key_type": - value := x.KeyType - return protoreflect.ValueOfString(value) - case "did.v1.Assertion.credential": - value := x.Credential - return protoreflect.ValueOfBytes(value) - case "did.v1.Assertion.metadata": - if len(x.Metadata) == 0 { - return protoreflect.ValueOfMap(&_Assertion_4_map{}) - } - mapValue := &_Assertion_4_map{m: &x.Metadata} - return protoreflect.ValueOfMap(mapValue) case "did.v1.Assertion.controller": value := x.Controller return protoreflect.ValueOfString(value) + case "did.v1.Assertion.public_key": + value := x.PublicKey + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "did.v1.Assertion.credential_id": + value := x.CredentialId + return protoreflect.ValueOfBytes(value) + case "did.v1.Assertion.metadata": + value := x.Metadata + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Assertion")) @@ -977,16 +892,14 @@ func (x *fastReflection_Assertion) Set(fd protoreflect.FieldDescriptor, value pr switch fd.FullName() { case "did.v1.Assertion.id": x.Id = value.Interface().(string) - case "did.v1.Assertion.key_type": - x.KeyType = value.Interface().(string) - case "did.v1.Assertion.credential": - x.Credential = value.Bytes() - case "did.v1.Assertion.metadata": - mv := value.Map() - cmv := mv.(*_Assertion_4_map) - x.Metadata = *cmv.m case "did.v1.Assertion.controller": x.Controller = value.Interface().(string) + case "did.v1.Assertion.public_key": + x.PublicKey = value.Message().Interface().(*PubKey) + case "did.v1.Assertion.credential_id": + x.CredentialId = value.Bytes() + case "did.v1.Assertion.metadata": + x.Metadata = value.Message().Interface().(*Metadata) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Assertion")) @@ -1007,20 +920,22 @@ func (x *fastReflection_Assertion) Set(fd protoreflect.FieldDescriptor, value pr // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Assertion) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "did.v1.Assertion.public_key": + if x.PublicKey == nil { + x.PublicKey = new(PubKey) + } + return protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) case "did.v1.Assertion.metadata": if x.Metadata == nil { - x.Metadata = make(map[string]string) + x.Metadata = new(Metadata) } - value := &_Assertion_4_map{m: &x.Metadata} - return protoreflect.ValueOfMap(value) + return protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) case "did.v1.Assertion.id": panic(fmt.Errorf("field id of message did.v1.Assertion is not mutable")) - case "did.v1.Assertion.key_type": - panic(fmt.Errorf("field key_type of message did.v1.Assertion is not mutable")) - case "did.v1.Assertion.credential": - panic(fmt.Errorf("field credential of message did.v1.Assertion is not mutable")) case "did.v1.Assertion.controller": panic(fmt.Errorf("field controller of message did.v1.Assertion is not mutable")) + case "did.v1.Assertion.credential_id": + panic(fmt.Errorf("field credential_id of message did.v1.Assertion is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Assertion")) @@ -1036,15 +951,16 @@ func (x *fastReflection_Assertion) NewField(fd protoreflect.FieldDescriptor) pro switch fd.FullName() { case "did.v1.Assertion.id": return protoreflect.ValueOfString("") - case "did.v1.Assertion.key_type": - return protoreflect.ValueOfString("") - case "did.v1.Assertion.credential": - return protoreflect.ValueOfBytes(nil) - case "did.v1.Assertion.metadata": - m := make(map[string]string) - return protoreflect.ValueOfMap(&_Assertion_4_map{m: &m}) case "did.v1.Assertion.controller": return protoreflect.ValueOfString("") + case "did.v1.Assertion.public_key": + m := new(PubKey) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "did.v1.Assertion.credential_id": + return protoreflect.ValueOfBytes(nil) + case "did.v1.Assertion.metadata": + m := new(Metadata) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Assertion")) @@ -1118,39 +1034,22 @@ func (x *fastReflection_Assertion) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.KeyType) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Credential) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Metadata) > 0 { - SiZeMaP := func(k string, v string) { - mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + len(v) + runtime.Sov(uint64(len(v))) - n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) - } - if options.Deterministic { - sortme := make([]string, 0, len(x.Metadata)) - for k := range x.Metadata { - sortme = append(sortme, k) - } - sort.Strings(sortme) - for _, k := range sortme { - v := x.Metadata[k] - SiZeMaP(k, v) - } - } else { - for k, v := range x.Metadata { - SiZeMaP(k, v) - } - } - } l = len(x.Controller) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + if x.PublicKey != nil { + l = options.Size(x.PublicKey) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.CredentialId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Metadata != nil { + l = options.Size(x.Metadata) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1180,68 +1079,46 @@ func (x *fastReflection_Assertion) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.Metadata != nil { + encoded, err := options.Marshal(x.Metadata) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x2a + } + if len(x.CredentialId) > 0 { + i -= len(x.CredentialId) + copy(dAtA[i:], x.CredentialId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CredentialId))) + i-- + dAtA[i] = 0x22 + } + if x.PublicKey != nil { + encoded, err := options.Marshal(x.PublicKey) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } if len(x.Controller) > 0 { i -= len(x.Controller) copy(dAtA[i:], x.Controller) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) i-- - dAtA[i] = 0x2a - } - if len(x.Metadata) > 0 { - MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) { - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x22 - return protoiface.MarshalOutput{}, nil - } - if options.Deterministic { - keysForMetadata := make([]string, 0, len(x.Metadata)) - for k := range x.Metadata { - keysForMetadata = append(keysForMetadata, string(k)) - } - sort.Slice(keysForMetadata, func(i, j int) bool { - return keysForMetadata[i] < keysForMetadata[j] - }) - for iNdEx := len(keysForMetadata) - 1; iNdEx >= 0; iNdEx-- { - v := x.Metadata[string(keysForMetadata[iNdEx])] - out, err := MaRsHaLmAp(keysForMetadata[iNdEx], v) - if err != nil { - return out, err - } - } - } else { - for k := range x.Metadata { - v := x.Metadata[k] - out, err := MaRsHaLmAp(k, v) - if err != nil { - return out, err - } - } - } - } - if len(x.Credential) > 0 { - i -= len(x.Credential) - copy(dAtA[i:], x.Credential) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Credential))) - i-- - dAtA[i] = 0x1a - } - if len(x.KeyType) > 0 { - i -= len(x.KeyType) - copy(dAtA[i:], x.KeyType) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.KeyType))) - i-- dAtA[i] = 0x12 } if len(x.Id) > 0 { @@ -1333,199 +1210,6 @@ func (x *fastReflection_Assertion) ProtoMethods() *protoiface.Methods { x.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field KeyType", 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.KeyType = 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 Credential", 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.Credential = append(x.Credential[:0], dAtA[iNdEx:postIndex]...) - if x.Credential == nil { - x.Credential = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Metadata == nil { - x.Metadata = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postStringIndexmapkey > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postStringIndexmapvalue > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - x.Metadata[mapkey] = mapvalue - iNdEx = postIndex - case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) } @@ -1557,6 +1241,112 @@ func (x *fastReflection_Assertion) ProtoMethods() *protoiface.Methods { } x.Controller = 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 PublicKey", 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.PublicKey == nil { + x.PublicKey = &PubKey{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PublicKey); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CredentialId", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.CredentialId = append(x.CredentialId[:0], dAtA[iNdEx:postIndex]...) + if x.CredentialId == nil { + x.CredentialId = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Metadata == nil { + x.Metadata = &Metadata{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Metadata); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1595,20 +1385,18 @@ func (x *fastReflection_Assertion) ProtoMethods() *protoiface.Methods { var ( md_Attestation protoreflect.MessageDescriptor fd_Attestation_id protoreflect.FieldDescriptor - fd_Attestation_key_type protoreflect.FieldDescriptor - fd_Attestation_value protoreflect.FieldDescriptor - fd_Attestation_proof protoreflect.FieldDescriptor fd_Attestation_controller protoreflect.FieldDescriptor + fd_Attestation_public_key protoreflect.FieldDescriptor + fd_Attestation_metadata protoreflect.FieldDescriptor ) func init() { file_did_v1_state_proto_init() md_Attestation = File_did_v1_state_proto.Messages().ByName("Attestation") fd_Attestation_id = md_Attestation.Fields().ByName("id") - fd_Attestation_key_type = md_Attestation.Fields().ByName("key_type") - fd_Attestation_value = md_Attestation.Fields().ByName("value") - fd_Attestation_proof = md_Attestation.Fields().ByName("proof") fd_Attestation_controller = md_Attestation.Fields().ByName("controller") + fd_Attestation_public_key = md_Attestation.Fields().ByName("public_key") + fd_Attestation_metadata = md_Attestation.Fields().ByName("metadata") } var _ protoreflect.Message = (*fastReflection_Attestation)(nil) @@ -1682,30 +1470,24 @@ func (x *fastReflection_Attestation) Range(f func(protoreflect.FieldDescriptor, return } } - if x.KeyType != "" { - value := protoreflect.ValueOfString(x.KeyType) - if !f(fd_Attestation_key_type, value) { - return - } - } - if x.Value != "" { - value := protoreflect.ValueOfString(x.Value) - if !f(fd_Attestation_value, value) { - return - } - } - if x.Proof != "" { - value := protoreflect.ValueOfString(x.Proof) - if !f(fd_Attestation_proof, value) { - return - } - } if x.Controller != "" { value := protoreflect.ValueOfString(x.Controller) if !f(fd_Attestation_controller, value) { return } } + if x.PublicKey != nil { + value := protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) + if !f(fd_Attestation_public_key, value) { + return + } + } + if x.Metadata != nil { + value := protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) + if !f(fd_Attestation_metadata, value) { + return + } + } } // Has reports whether a field is populated. @@ -1723,14 +1505,12 @@ func (x *fastReflection_Attestation) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "did.v1.Attestation.id": return x.Id != "" - case "did.v1.Attestation.key_type": - return x.KeyType != "" - case "did.v1.Attestation.value": - return x.Value != "" - case "did.v1.Attestation.proof": - return x.Proof != "" case "did.v1.Attestation.controller": return x.Controller != "" + case "did.v1.Attestation.public_key": + return x.PublicKey != nil + case "did.v1.Attestation.metadata": + return x.Metadata != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Attestation")) @@ -1749,14 +1529,12 @@ func (x *fastReflection_Attestation) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "did.v1.Attestation.id": x.Id = "" - case "did.v1.Attestation.key_type": - x.KeyType = "" - case "did.v1.Attestation.value": - x.Value = "" - case "did.v1.Attestation.proof": - x.Proof = "" case "did.v1.Attestation.controller": x.Controller = "" + case "did.v1.Attestation.public_key": + x.PublicKey = nil + case "did.v1.Attestation.metadata": + x.Metadata = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Attestation")) @@ -1776,18 +1554,15 @@ func (x *fastReflection_Attestation) Get(descriptor protoreflect.FieldDescriptor case "did.v1.Attestation.id": value := x.Id return protoreflect.ValueOfString(value) - case "did.v1.Attestation.key_type": - value := x.KeyType - return protoreflect.ValueOfString(value) - case "did.v1.Attestation.value": - value := x.Value - return protoreflect.ValueOfString(value) - case "did.v1.Attestation.proof": - value := x.Proof - return protoreflect.ValueOfString(value) case "did.v1.Attestation.controller": value := x.Controller return protoreflect.ValueOfString(value) + case "did.v1.Attestation.public_key": + value := x.PublicKey + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "did.v1.Attestation.metadata": + value := x.Metadata + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Attestation")) @@ -1810,14 +1585,12 @@ func (x *fastReflection_Attestation) Set(fd protoreflect.FieldDescriptor, value switch fd.FullName() { case "did.v1.Attestation.id": x.Id = value.Interface().(string) - case "did.v1.Attestation.key_type": - x.KeyType = value.Interface().(string) - case "did.v1.Attestation.value": - x.Value = value.Interface().(string) - case "did.v1.Attestation.proof": - x.Proof = value.Interface().(string) case "did.v1.Attestation.controller": x.Controller = value.Interface().(string) + case "did.v1.Attestation.public_key": + x.PublicKey = value.Message().Interface().(*PubKey) + case "did.v1.Attestation.metadata": + x.Metadata = value.Message().Interface().(*Metadata) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Attestation")) @@ -1838,14 +1611,18 @@ func (x *fastReflection_Attestation) Set(fd protoreflect.FieldDescriptor, value // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Attestation) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "did.v1.Attestation.public_key": + if x.PublicKey == nil { + x.PublicKey = new(PubKey) + } + return protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) + case "did.v1.Attestation.metadata": + if x.Metadata == nil { + x.Metadata = new(Metadata) + } + return protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) case "did.v1.Attestation.id": panic(fmt.Errorf("field id of message did.v1.Attestation is not mutable")) - case "did.v1.Attestation.key_type": - panic(fmt.Errorf("field key_type of message did.v1.Attestation is not mutable")) - case "did.v1.Attestation.value": - panic(fmt.Errorf("field value of message did.v1.Attestation is not mutable")) - case "did.v1.Attestation.proof": - panic(fmt.Errorf("field proof of message did.v1.Attestation is not mutable")) case "did.v1.Attestation.controller": panic(fmt.Errorf("field controller of message did.v1.Attestation is not mutable")) default: @@ -1863,14 +1640,14 @@ func (x *fastReflection_Attestation) NewField(fd protoreflect.FieldDescriptor) p switch fd.FullName() { case "did.v1.Attestation.id": return protoreflect.ValueOfString("") - case "did.v1.Attestation.key_type": - return protoreflect.ValueOfString("") - case "did.v1.Attestation.value": - return protoreflect.ValueOfString("") - case "did.v1.Attestation.proof": - return protoreflect.ValueOfString("") case "did.v1.Attestation.controller": return protoreflect.ValueOfString("") + case "did.v1.Attestation.public_key": + m := new(PubKey) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "did.v1.Attestation.metadata": + m := new(Metadata) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Attestation")) @@ -1944,22 +1721,18 @@ func (x *fastReflection_Attestation) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.KeyType) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Value) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Proof) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } l = len(x.Controller) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + if x.PublicKey != nil { + l = options.Size(x.PublicKey) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Metadata != nil { + l = options.Size(x.Metadata) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1989,32 +1762,39 @@ func (x *fastReflection_Attestation) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.Metadata != nil { + encoded, err := options.Marshal(x.Metadata) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + if x.PublicKey != nil { + encoded, err := options.Marshal(x.PublicKey) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } if len(x.Controller) > 0 { i -= len(x.Controller) copy(dAtA[i:], x.Controller) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) i-- - dAtA[i] = 0x2a - } - if len(x.Proof) > 0 { - i -= len(x.Proof) - copy(dAtA[i:], x.Proof) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Proof))) - i-- - dAtA[i] = 0x22 - } - if len(x.Value) > 0 { - i -= len(x.Value) - copy(dAtA[i:], x.Value) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Value))) - i-- - dAtA[i] = 0x1a - } - if len(x.KeyType) > 0 { - i -= len(x.KeyType) - copy(dAtA[i:], x.KeyType) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.KeyType))) - i-- dAtA[i] = 0x12 } if len(x.Id) > 0 { @@ -2106,102 +1886,6 @@ func (x *fastReflection_Attestation) ProtoMethods() *protoiface.Methods { x.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field KeyType", 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.KeyType = 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 Value", 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.Value = 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 Proof", 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.Proof = 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 Controller", wireType) } @@ -2233,6 +1917,78 @@ func (x *fastReflection_Attestation) ProtoMethods() *protoiface.Methods { } x.Controller = 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 PublicKey", 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.PublicKey == nil { + x.PublicKey = &PubKey{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PublicKey); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Metadata == nil { + x.Metadata = &Metadata{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Metadata); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2269,22 +2025,20 @@ func (x *fastReflection_Attestation) ProtoMethods() *protoiface.Methods { } var ( - md_Controller protoreflect.MessageDescriptor - fd_Controller_id protoreflect.FieldDescriptor - fd_Controller_did protoreflect.FieldDescriptor - fd_Controller_public_key_multibase protoreflect.FieldDescriptor - fd_Controller_vault_cid protoreflect.FieldDescriptor - fd_Controller_fingerprint protoreflect.FieldDescriptor + md_Controller protoreflect.MessageDescriptor + fd_Controller_id protoreflect.FieldDescriptor + fd_Controller_address protoreflect.FieldDescriptor + fd_Controller_public_key protoreflect.FieldDescriptor + fd_Controller_vault_cid protoreflect.FieldDescriptor ) func init() { file_did_v1_state_proto_init() md_Controller = File_did_v1_state_proto.Messages().ByName("Controller") fd_Controller_id = md_Controller.Fields().ByName("id") - fd_Controller_did = md_Controller.Fields().ByName("did") - fd_Controller_public_key_multibase = md_Controller.Fields().ByName("public_key_multibase") + fd_Controller_address = md_Controller.Fields().ByName("address") + fd_Controller_public_key = md_Controller.Fields().ByName("public_key") fd_Controller_vault_cid = md_Controller.Fields().ByName("vault_cid") - fd_Controller_fingerprint = md_Controller.Fields().ByName("fingerprint") } var _ protoreflect.Message = (*fastReflection_Controller)(nil) @@ -2358,15 +2112,15 @@ func (x *fastReflection_Controller) Range(f func(protoreflect.FieldDescriptor, p return } } - if x.Did != "" { - value := protoreflect.ValueOfString(x.Did) - if !f(fd_Controller_did, value) { + if x.Address != "" { + value := protoreflect.ValueOfString(x.Address) + if !f(fd_Controller_address, value) { return } } - if x.PublicKeyMultibase != "" { - value := protoreflect.ValueOfString(x.PublicKeyMultibase) - if !f(fd_Controller_public_key_multibase, value) { + if x.PublicKey != nil { + value := protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) + if !f(fd_Controller_public_key, value) { return } } @@ -2376,12 +2130,6 @@ func (x *fastReflection_Controller) Range(f func(protoreflect.FieldDescriptor, p return } } - if len(x.Fingerprint) != 0 { - value := protoreflect.ValueOfBytes(x.Fingerprint) - if !f(fd_Controller_fingerprint, value) { - return - } - } } // Has reports whether a field is populated. @@ -2399,14 +2147,12 @@ func (x *fastReflection_Controller) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "did.v1.Controller.id": return x.Id != "" - case "did.v1.Controller.did": - return x.Did != "" - case "did.v1.Controller.public_key_multibase": - return x.PublicKeyMultibase != "" + case "did.v1.Controller.address": + return x.Address != "" + case "did.v1.Controller.public_key": + return x.PublicKey != nil case "did.v1.Controller.vault_cid": return x.VaultCid != "" - case "did.v1.Controller.fingerprint": - return len(x.Fingerprint) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) @@ -2425,14 +2171,12 @@ func (x *fastReflection_Controller) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "did.v1.Controller.id": x.Id = "" - case "did.v1.Controller.did": - x.Did = "" - case "did.v1.Controller.public_key_multibase": - x.PublicKeyMultibase = "" + case "did.v1.Controller.address": + x.Address = "" + case "did.v1.Controller.public_key": + x.PublicKey = nil case "did.v1.Controller.vault_cid": x.VaultCid = "" - case "did.v1.Controller.fingerprint": - x.Fingerprint = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) @@ -2452,18 +2196,15 @@ func (x *fastReflection_Controller) Get(descriptor protoreflect.FieldDescriptor) case "did.v1.Controller.id": value := x.Id return protoreflect.ValueOfString(value) - case "did.v1.Controller.did": - value := x.Did - return protoreflect.ValueOfString(value) - case "did.v1.Controller.public_key_multibase": - value := x.PublicKeyMultibase + case "did.v1.Controller.address": + value := x.Address return protoreflect.ValueOfString(value) + case "did.v1.Controller.public_key": + value := x.PublicKey + return protoreflect.ValueOfMessage(value.ProtoReflect()) case "did.v1.Controller.vault_cid": value := x.VaultCid return protoreflect.ValueOfString(value) - case "did.v1.Controller.fingerprint": - value := x.Fingerprint - return protoreflect.ValueOfBytes(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) @@ -2486,14 +2227,12 @@ func (x *fastReflection_Controller) Set(fd protoreflect.FieldDescriptor, value p switch fd.FullName() { case "did.v1.Controller.id": x.Id = value.Interface().(string) - case "did.v1.Controller.did": - x.Did = value.Interface().(string) - case "did.v1.Controller.public_key_multibase": - x.PublicKeyMultibase = value.Interface().(string) + case "did.v1.Controller.address": + x.Address = value.Interface().(string) + case "did.v1.Controller.public_key": + x.PublicKey = value.Message().Interface().(*PubKey) case "did.v1.Controller.vault_cid": x.VaultCid = value.Interface().(string) - case "did.v1.Controller.fingerprint": - x.Fingerprint = value.Bytes() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) @@ -2514,16 +2253,17 @@ func (x *fastReflection_Controller) Set(fd protoreflect.FieldDescriptor, value p // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Controller) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "did.v1.Controller.public_key": + if x.PublicKey == nil { + x.PublicKey = new(PubKey) + } + return protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) case "did.v1.Controller.id": panic(fmt.Errorf("field id of message did.v1.Controller is not mutable")) - case "did.v1.Controller.did": - panic(fmt.Errorf("field did of message did.v1.Controller is not mutable")) - case "did.v1.Controller.public_key_multibase": - panic(fmt.Errorf("field public_key_multibase of message did.v1.Controller is not mutable")) + case "did.v1.Controller.address": + panic(fmt.Errorf("field address of message did.v1.Controller is not mutable")) case "did.v1.Controller.vault_cid": panic(fmt.Errorf("field vault_cid of message did.v1.Controller is not mutable")) - case "did.v1.Controller.fingerprint": - panic(fmt.Errorf("field fingerprint of message did.v1.Controller is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) @@ -2539,14 +2279,13 @@ func (x *fastReflection_Controller) NewField(fd protoreflect.FieldDescriptor) pr switch fd.FullName() { case "did.v1.Controller.id": return protoreflect.ValueOfString("") - case "did.v1.Controller.did": - return protoreflect.ValueOfString("") - case "did.v1.Controller.public_key_multibase": + case "did.v1.Controller.address": return protoreflect.ValueOfString("") + case "did.v1.Controller.public_key": + m := new(PubKey) + return protoreflect.ValueOfMessage(m.ProtoReflect()) case "did.v1.Controller.vault_cid": return protoreflect.ValueOfString("") - case "did.v1.Controller.fingerprint": - return protoreflect.ValueOfBytes(nil) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) @@ -2620,22 +2359,18 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Did) + l = len(x.Address) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.PublicKeyMultibase) - if l > 0 { + if x.PublicKey != nil { + l = options.Size(x.PublicKey) n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.VaultCid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Fingerprint) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -2665,31 +2400,31 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Fingerprint) > 0 { - i -= len(x.Fingerprint) - copy(dAtA[i:], x.Fingerprint) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Fingerprint))) - i-- - dAtA[i] = 0x2a - } if len(x.VaultCid) > 0 { i -= len(x.VaultCid) copy(dAtA[i:], x.VaultCid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.VaultCid))) i-- + dAtA[i] = 0x2a + } + if x.PublicKey != nil { + encoded, err := options.Marshal(x.PublicKey) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- dAtA[i] = 0x22 } - if len(x.PublicKeyMultibase) > 0 { - i -= len(x.PublicKeyMultibase) - copy(dAtA[i:], x.PublicKeyMultibase) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PublicKeyMultibase))) - i-- - dAtA[i] = 0x1a - } - if len(x.Did) > 0 { - i -= len(x.Did) - copy(dAtA[i:], x.Did) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Did))) + if len(x.Address) > 0 { + i -= len(x.Address) + copy(dAtA[i:], x.Address) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) i-- dAtA[i] = 0x12 } @@ -2783,7 +2518,7 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2811,41 +2546,45 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Did = 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 PublicKeyMultibase", 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.PublicKeyMultibase = string(dAtA[iNdEx:postIndex]) + x.Address = 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 PublicKey", 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.PublicKey == nil { + x.PublicKey = &PubKey{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PublicKey); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VaultCid", wireType) } @@ -2877,40 +2616,6 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { } x.VaultCid = 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 Fingerprint", 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.Fingerprint = append(x.Fingerprint[:0], dAtA[iNdEx:postIndex]...) - if x.Fingerprint == nil { - x.Fingerprint = []byte{} - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2946,111 +2651,21 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.Map = (*_Delegation_7_map)(nil) - -type _Delegation_7_map struct { - m *map[string]string -} - -func (x *_Delegation_7_map) Len() int { - if x.m == nil { - return 0 - } - return len(*x.m) -} - -func (x *_Delegation_7_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 *_Delegation_7_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 *_Delegation_7_map) Clear(key protoreflect.MapKey) { - if x.m == nil { - return - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - delete(*x.m, concreteKey) -} - -func (x *_Delegation_7_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 *_Delegation_7_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 *_Delegation_7_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 *_Delegation_7_map) NewValue() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Delegation_7_map) IsValid() bool { - return x.m != nil -} - var ( - md_Delegation protoreflect.MessageDescriptor - fd_Delegation_id protoreflect.FieldDescriptor - fd_Delegation_did protoreflect.FieldDescriptor - fd_Delegation_chain_type protoreflect.FieldDescriptor - fd_Delegation_chain_address protoreflect.FieldDescriptor - fd_Delegation_controller_did protoreflect.FieldDescriptor - fd_Delegation_public_key_multibase protoreflect.FieldDescriptor - fd_Delegation_public_key_jwks protoreflect.FieldDescriptor - fd_Delegation_channel_id protoreflect.FieldDescriptor + md_Delegation protoreflect.MessageDescriptor + fd_Delegation_id protoreflect.FieldDescriptor + fd_Delegation_controller protoreflect.FieldDescriptor + fd_Delegation_chain_info_id protoreflect.FieldDescriptor + fd_Delegation_public_key protoreflect.FieldDescriptor ) func init() { file_did_v1_state_proto_init() md_Delegation = File_did_v1_state_proto.Messages().ByName("Delegation") fd_Delegation_id = md_Delegation.Fields().ByName("id") - fd_Delegation_did = md_Delegation.Fields().ByName("did") - fd_Delegation_chain_type = md_Delegation.Fields().ByName("chain_type") - fd_Delegation_chain_address = md_Delegation.Fields().ByName("chain_address") - fd_Delegation_controller_did = md_Delegation.Fields().ByName("controller_did") - fd_Delegation_public_key_multibase = md_Delegation.Fields().ByName("public_key_multibase") - fd_Delegation_public_key_jwks = md_Delegation.Fields().ByName("public_key_jwks") - fd_Delegation_channel_id = md_Delegation.Fields().ByName("channel_id") + fd_Delegation_controller = md_Delegation.Fields().ByName("controller") + fd_Delegation_chain_info_id = md_Delegation.Fields().ByName("chain_info_id") + fd_Delegation_public_key = md_Delegation.Fields().ByName("public_key") } var _ protoreflect.Message = (*fastReflection_Delegation)(nil) @@ -3124,45 +2739,21 @@ func (x *fastReflection_Delegation) Range(f func(protoreflect.FieldDescriptor, p return } } - if x.Did != "" { - value := protoreflect.ValueOfString(x.Did) - if !f(fd_Delegation_did, value) { + if x.Controller != "" { + value := protoreflect.ValueOfString(x.Controller) + if !f(fd_Delegation_controller, value) { return } } - if x.ChainType != "" { - value := protoreflect.ValueOfString(x.ChainType) - if !f(fd_Delegation_chain_type, value) { + if x.ChainInfoId != "" { + value := protoreflect.ValueOfString(x.ChainInfoId) + if !f(fd_Delegation_chain_info_id, value) { return } } - if x.ChainAddress != "" { - value := protoreflect.ValueOfString(x.ChainAddress) - if !f(fd_Delegation_chain_address, value) { - return - } - } - if x.ControllerDid != "" { - value := protoreflect.ValueOfString(x.ControllerDid) - if !f(fd_Delegation_controller_did, value) { - return - } - } - if x.PublicKeyMultibase != "" { - value := protoreflect.ValueOfString(x.PublicKeyMultibase) - if !f(fd_Delegation_public_key_multibase, value) { - return - } - } - if len(x.PublicKeyJwks) != 0 { - value := protoreflect.ValueOfMap(&_Delegation_7_map{m: &x.PublicKeyJwks}) - if !f(fd_Delegation_public_key_jwks, value) { - return - } - } - if x.ChannelId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ChannelId) - if !f(fd_Delegation_channel_id, value) { + if x.PublicKey != nil { + value := protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) + if !f(fd_Delegation_public_key, value) { return } } @@ -3183,20 +2774,12 @@ func (x *fastReflection_Delegation) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "did.v1.Delegation.id": return x.Id != "" - case "did.v1.Delegation.did": - return x.Did != "" - case "did.v1.Delegation.chain_type": - return x.ChainType != "" - case "did.v1.Delegation.chain_address": - return x.ChainAddress != "" - case "did.v1.Delegation.controller_did": - return x.ControllerDid != "" - case "did.v1.Delegation.public_key_multibase": - return x.PublicKeyMultibase != "" - case "did.v1.Delegation.public_key_jwks": - return len(x.PublicKeyJwks) != 0 - case "did.v1.Delegation.channel_id": - return x.ChannelId != uint64(0) + case "did.v1.Delegation.controller": + return x.Controller != "" + case "did.v1.Delegation.chain_info_id": + return x.ChainInfoId != "" + case "did.v1.Delegation.public_key": + return x.PublicKey != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Delegation")) @@ -3215,20 +2798,12 @@ func (x *fastReflection_Delegation) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "did.v1.Delegation.id": x.Id = "" - case "did.v1.Delegation.did": - x.Did = "" - case "did.v1.Delegation.chain_type": - x.ChainType = "" - case "did.v1.Delegation.chain_address": - x.ChainAddress = "" - case "did.v1.Delegation.controller_did": - x.ControllerDid = "" - case "did.v1.Delegation.public_key_multibase": - x.PublicKeyMultibase = "" - case "did.v1.Delegation.public_key_jwks": - x.PublicKeyJwks = nil - case "did.v1.Delegation.channel_id": - x.ChannelId = uint64(0) + case "did.v1.Delegation.controller": + x.Controller = "" + case "did.v1.Delegation.chain_info_id": + x.ChainInfoId = "" + case "did.v1.Delegation.public_key": + x.PublicKey = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Delegation")) @@ -3248,30 +2823,15 @@ func (x *fastReflection_Delegation) Get(descriptor protoreflect.FieldDescriptor) case "did.v1.Delegation.id": value := x.Id return protoreflect.ValueOfString(value) - case "did.v1.Delegation.did": - value := x.Did + case "did.v1.Delegation.controller": + value := x.Controller return protoreflect.ValueOfString(value) - case "did.v1.Delegation.chain_type": - value := x.ChainType + case "did.v1.Delegation.chain_info_id": + value := x.ChainInfoId return protoreflect.ValueOfString(value) - case "did.v1.Delegation.chain_address": - value := x.ChainAddress - return protoreflect.ValueOfString(value) - case "did.v1.Delegation.controller_did": - value := x.ControllerDid - return protoreflect.ValueOfString(value) - case "did.v1.Delegation.public_key_multibase": - value := x.PublicKeyMultibase - return protoreflect.ValueOfString(value) - case "did.v1.Delegation.public_key_jwks": - if len(x.PublicKeyJwks) == 0 { - return protoreflect.ValueOfMap(&_Delegation_7_map{}) - } - mapValue := &_Delegation_7_map{m: &x.PublicKeyJwks} - return protoreflect.ValueOfMap(mapValue) - case "did.v1.Delegation.channel_id": - value := x.ChannelId - return protoreflect.ValueOfUint64(value) + case "did.v1.Delegation.public_key": + value := x.PublicKey + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Delegation")) @@ -3294,22 +2854,12 @@ func (x *fastReflection_Delegation) Set(fd protoreflect.FieldDescriptor, value p switch fd.FullName() { case "did.v1.Delegation.id": x.Id = value.Interface().(string) - case "did.v1.Delegation.did": - x.Did = value.Interface().(string) - case "did.v1.Delegation.chain_type": - x.ChainType = value.Interface().(string) - case "did.v1.Delegation.chain_address": - x.ChainAddress = value.Interface().(string) - case "did.v1.Delegation.controller_did": - x.ControllerDid = value.Interface().(string) - case "did.v1.Delegation.public_key_multibase": - x.PublicKeyMultibase = value.Interface().(string) - case "did.v1.Delegation.public_key_jwks": - mv := value.Map() - cmv := mv.(*_Delegation_7_map) - x.PublicKeyJwks = *cmv.m - case "did.v1.Delegation.channel_id": - x.ChannelId = value.Uint() + case "did.v1.Delegation.controller": + x.Controller = value.Interface().(string) + case "did.v1.Delegation.chain_info_id": + x.ChainInfoId = value.Interface().(string) + case "did.v1.Delegation.public_key": + x.PublicKey = value.Message().Interface().(*PubKey) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Delegation")) @@ -3330,26 +2880,17 @@ func (x *fastReflection_Delegation) Set(fd protoreflect.FieldDescriptor, value p // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Delegation) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.Delegation.public_key_jwks": - if x.PublicKeyJwks == nil { - x.PublicKeyJwks = make(map[string]string) + case "did.v1.Delegation.public_key": + if x.PublicKey == nil { + x.PublicKey = new(PubKey) } - value := &_Delegation_7_map{m: &x.PublicKeyJwks} - return protoreflect.ValueOfMap(value) + return protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) case "did.v1.Delegation.id": panic(fmt.Errorf("field id of message did.v1.Delegation is not mutable")) - case "did.v1.Delegation.did": - panic(fmt.Errorf("field did of message did.v1.Delegation is not mutable")) - case "did.v1.Delegation.chain_type": - panic(fmt.Errorf("field chain_type of message did.v1.Delegation is not mutable")) - case "did.v1.Delegation.chain_address": - panic(fmt.Errorf("field chain_address of message did.v1.Delegation is not mutable")) - case "did.v1.Delegation.controller_did": - panic(fmt.Errorf("field controller_did of message did.v1.Delegation is not mutable")) - case "did.v1.Delegation.public_key_multibase": - panic(fmt.Errorf("field public_key_multibase of message did.v1.Delegation is not mutable")) - case "did.v1.Delegation.channel_id": - panic(fmt.Errorf("field channel_id of message did.v1.Delegation is not mutable")) + case "did.v1.Delegation.controller": + panic(fmt.Errorf("field controller of message did.v1.Delegation is not mutable")) + case "did.v1.Delegation.chain_info_id": + panic(fmt.Errorf("field chain_info_id of message did.v1.Delegation is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Delegation")) @@ -3365,21 +2906,13 @@ func (x *fastReflection_Delegation) NewField(fd protoreflect.FieldDescriptor) pr switch fd.FullName() { case "did.v1.Delegation.id": return protoreflect.ValueOfString("") - case "did.v1.Delegation.did": + case "did.v1.Delegation.controller": return protoreflect.ValueOfString("") - case "did.v1.Delegation.chain_type": + case "did.v1.Delegation.chain_info_id": return protoreflect.ValueOfString("") - case "did.v1.Delegation.chain_address": - return protoreflect.ValueOfString("") - case "did.v1.Delegation.controller_did": - return protoreflect.ValueOfString("") - case "did.v1.Delegation.public_key_multibase": - return protoreflect.ValueOfString("") - case "did.v1.Delegation.public_key_jwks": - m := make(map[string]string) - return protoreflect.ValueOfMap(&_Delegation_7_map{m: &m}) - case "did.v1.Delegation.channel_id": - return protoreflect.ValueOfUint64(uint64(0)) + case "did.v1.Delegation.public_key": + m := new(PubKey) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Delegation")) @@ -3453,50 +2986,18 @@ func (x *fastReflection_Delegation) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Did) + l = len(x.Controller) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.ChainType) + l = len(x.ChainInfoId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.ChainAddress) - if l > 0 { + if x.PublicKey != nil { + l = options.Size(x.PublicKey) n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.ControllerDid) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.PublicKeyMultibase) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.PublicKeyJwks) > 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.PublicKeyJwks)) - for k := range x.PublicKeyJwks { - sortme = append(sortme, k) - } - sort.Strings(sortme) - for _, k := range sortme { - v := x.PublicKeyJwks[k] - SiZeMaP(k, v) - } - } else { - for k, v := range x.PublicKeyJwks { - SiZeMaP(k, v) - } - } - } - if x.ChannelId != 0 { - n += 1 + runtime.Sov(uint64(x.ChannelId)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -3526,86 +3027,31 @@ func (x *fastReflection_Delegation) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.ChannelId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ChannelId)) - i-- - dAtA[i] = 0x40 - } - if len(x.PublicKeyJwks) > 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] = 0x3a - return protoiface.MarshalOutput{}, nil + if x.PublicKey != nil { + encoded, err := options.Marshal(x.PublicKey) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err } - if options.Deterministic { - keysForPublicKeyJwks := make([]string, 0, len(x.PublicKeyJwks)) - for k := range x.PublicKeyJwks { - keysForPublicKeyJwks = append(keysForPublicKeyJwks, string(k)) - } - sort.Slice(keysForPublicKeyJwks, func(i, j int) bool { - return keysForPublicKeyJwks[i] < keysForPublicKeyJwks[j] - }) - for iNdEx := len(keysForPublicKeyJwks) - 1; iNdEx >= 0; iNdEx-- { - v := x.PublicKeyJwks[string(keysForPublicKeyJwks[iNdEx])] - out, err := MaRsHaLmAp(keysForPublicKeyJwks[iNdEx], v) - if err != nil { - return out, err - } - } - } else { - for k := range x.PublicKeyJwks { - v := x.PublicKeyJwks[k] - out, err := MaRsHaLmAp(k, v) - if err != nil { - return out, err - } - } - } - } - if len(x.PublicKeyMultibase) > 0 { - i -= len(x.PublicKeyMultibase) - copy(dAtA[i:], x.PublicKeyMultibase) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PublicKeyMultibase))) - i-- - dAtA[i] = 0x32 - } - 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] = 0x2a - } - if len(x.ChainAddress) > 0 { - i -= len(x.ChainAddress) - copy(dAtA[i:], x.ChainAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainAddress))) + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x22 } - if len(x.ChainType) > 0 { - i -= len(x.ChainType) - copy(dAtA[i:], x.ChainType) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainType))) + if len(x.ChainInfoId) > 0 { + i -= len(x.ChainInfoId) + copy(dAtA[i:], x.ChainInfoId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainInfoId))) i-- dAtA[i] = 0x1a } - if len(x.Did) > 0 { - i -= len(x.Did) - copy(dAtA[i:], x.Did) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Did))) + 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] = 0x12 } @@ -3699,7 +3145,7 @@ func (x *fastReflection_Delegation) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) + 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 { @@ -3727,11 +3173,11 @@ func (x *fastReflection_Delegation) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Did = string(dAtA[iNdEx:postIndex]) + x.Controller = 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 ChainType", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainInfoId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3759,107 +3205,11 @@ func (x *fastReflection_Delegation) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.ChainType = string(dAtA[iNdEx:postIndex]) + x.ChainInfoId = 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 ChainAddress", 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.ChainAddress = 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 ControllerDid", 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.ControllerDid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PublicKeyMultibase", 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.PublicKeyMultibase = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PublicKeyJwks", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3886,123 +3236,13 @@ func (x *fastReflection_Delegation) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.PublicKeyJwks == nil { - x.PublicKeyJwks = make(map[string]string) + if x.PublicKey == nil { + x.PublicKey = &PubKey{} } - 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 - } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PublicKey); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } - x.PublicKeyJwks[mapkey] = mapvalue iNdEx = postIndex - case 8: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) - } - x.ChannelId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ChannelId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -4120,52 +3360,6 @@ 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 @@ -4173,7 +3367,7 @@ var ( fd_Service_controller_did protoreflect.FieldDescriptor fd_Service_origin_uri protoreflect.FieldDescriptor fd_Service_service_endpoints protoreflect.FieldDescriptor - fd_Service_scopes protoreflect.FieldDescriptor + fd_Service_permissions protoreflect.FieldDescriptor ) func init() { @@ -4184,7 +3378,7 @@ func init() { 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") + fd_Service_permissions = md_Service.Fields().ByName("permissions") } var _ protoreflect.Message = (*fastReflection_Service)(nil) @@ -4282,9 +3476,9 @@ func (x *fastReflection_Service) Range(f func(protoreflect.FieldDescriptor, prot return } } - if len(x.Scopes) != 0 { - value := protoreflect.ValueOfList(&_Service_6_list{list: &x.Scopes}) - if !f(fd_Service_scopes, value) { + if x.Permissions != nil { + value := protoreflect.ValueOfMessage(x.Permissions.ProtoReflect()) + if !f(fd_Service_permissions, value) { return } } @@ -4313,8 +3507,8 @@ func (x *fastReflection_Service) Has(fd protoreflect.FieldDescriptor) bool { return x.OriginUri != "" case "did.v1.Service.service_endpoints": return len(x.ServiceEndpoints) != 0 - case "did.v1.Service.scopes": - return len(x.Scopes) != 0 + case "did.v1.Service.permissions": + return x.Permissions != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) @@ -4341,8 +3535,8 @@ func (x *fastReflection_Service) Clear(fd protoreflect.FieldDescriptor) { x.OriginUri = "" case "did.v1.Service.service_endpoints": x.ServiceEndpoints = nil - case "did.v1.Service.scopes": - x.Scopes = nil + case "did.v1.Service.permissions": + x.Permissions = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) @@ -4377,12 +3571,9 @@ func (x *fastReflection_Service) Get(descriptor protoreflect.FieldDescriptor) pr } 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) + case "did.v1.Service.permissions": + value := x.Permissions + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) @@ -4415,10 +3606,8 @@ func (x *fastReflection_Service) Set(fd protoreflect.FieldDescriptor, value prot 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 + case "did.v1.Service.permissions": + x.Permissions = value.Message().Interface().(*Permissions) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) @@ -4445,12 +3634,11 @@ func (x *fastReflection_Service) Mutable(fd protoreflect.FieldDescriptor) protor } value := &_Service_5_map{m: &x.ServiceEndpoints} return protoreflect.ValueOfMap(value) - case "did.v1.Service.scopes": - if x.Scopes == nil { - x.Scopes = []PermissionScope{} + case "did.v1.Service.permissions": + if x.Permissions == nil { + x.Permissions = new(Permissions) } - value := &_Service_6_list{list: &x.Scopes} - return protoreflect.ValueOfList(value) + return protoreflect.ValueOfMessage(x.Permissions.ProtoReflect()) case "did.v1.Service.id": panic(fmt.Errorf("field id of message did.v1.Service is not mutable")) case "did.v1.Service.service_type": @@ -4483,9 +3671,9 @@ func (x *fastReflection_Service) NewField(fd protoreflect.FieldDescriptor) proto 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}) + case "did.v1.Service.permissions": + m := new(Permissions) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) @@ -4592,12 +3780,9 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { } } } - 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.Permissions != nil { + l = options.Size(x.Permissions) + n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -4628,24 +3813,17 @@ 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)) + if x.Permissions != nil { + encoded, err := options.Marshal(x.Permissions) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err } - 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 -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x32 } @@ -5025,74 +4203,41 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { 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 - } + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } - 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 { + if iNdEx >= 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) + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break } - 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) } + 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.Permissions == nil { + x.Permissions = &Permissions{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Permissions); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -5222,14 +4367,14 @@ type Assertion struct { // The unique identifier of the attestation Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // Key type (e.g., "passkey", "ssh", "gpg", "native-secure-enclave") - KeyType string `protobuf:"bytes,2,opt,name=key_type,json=keyType,proto3" json:"key_type,omitempty"` - // The value of the linked identifier - Credential []byte `protobuf:"bytes,3,opt,name=credential,proto3" json:"credential,omitempty"` - // Metadata is optional additional information about the assertion - Metadata map[string]string `protobuf:"bytes,4,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // The controller of the attestation - Controller string `protobuf:"bytes,5,opt,name=controller,proto3" json:"controller,omitempty"` + Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` + // Key type (e.g., "passkey", "ssh", "gpg", "native-secure-enclave") + PublicKey *PubKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // The value of the linked identifier + CredentialId []byte `protobuf:"bytes,4,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"` + // Metadata is optional additional information about the assertion + Metadata *Metadata `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"` } func (x *Assertion) Reset() { @@ -5259,27 +4404,6 @@ func (x *Assertion) GetId() string { return "" } -func (x *Assertion) GetKeyType() string { - if x != nil { - return x.KeyType - } - return "" -} - -func (x *Assertion) GetCredential() []byte { - if x != nil { - return x.Credential - } - return nil -} - -func (x *Assertion) GetMetadata() map[string]string { - if x != nil { - return x.Metadata - } - return nil -} - func (x *Assertion) GetController() string { if x != nil { return x.Controller @@ -5287,6 +4411,27 @@ func (x *Assertion) GetController() string { return "" } +func (x *Assertion) GetPublicKey() *PubKey { + if x != nil { + return x.PublicKey + } + return nil +} + +func (x *Assertion) GetCredentialId() []byte { + if x != nil { + return x.CredentialId + } + return nil +} + +func (x *Assertion) GetMetadata() *Metadata { + if x != nil { + return x.Metadata + } + return nil +} + // Attestation represents linked identifiers (e.g., Crypto Accounts, Github, Email, Phone) type Attestation struct { state protoimpl.MessageState @@ -5296,13 +4441,11 @@ type Attestation struct { // The unique identifier of the attestation Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The type of the linked identifier (e.g., "crypto", "github", "email", "phone") - KeyType string `protobuf:"bytes,2,opt,name=key_type,json=keyType,proto3" json:"key_type,omitempty"` + Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` // The value of the linked identifier - Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` - // The proof or verification method for this attestation - Proof string `protobuf:"bytes,4,opt,name=proof,proto3" json:"proof,omitempty"` + PublicKey *PubKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // The controller of the attestation - Controller string `protobuf:"bytes,5,opt,name=controller,proto3" json:"controller,omitempty"` + Metadata *Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` } func (x *Attestation) Reset() { @@ -5332,27 +4475,6 @@ func (x *Attestation) GetId() string { return "" } -func (x *Attestation) GetKeyType() string { - if x != nil { - return x.KeyType - } - return "" -} - -func (x *Attestation) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -func (x *Attestation) GetProof() string { - if x != nil { - return x.Proof - } - return "" -} - func (x *Attestation) GetController() string { if x != nil { return x.Controller @@ -5360,6 +4482,20 @@ func (x *Attestation) GetController() string { return "" } +func (x *Attestation) GetPublicKey() *PubKey { + if x != nil { + return x.PublicKey + } + return nil +} + +func (x *Attestation) GetMetadata() *Metadata { + if x != nil { + return x.Metadata + } + return nil +} + // Controller represents a Sonr DWN Vault type Controller struct { state protoimpl.MessageState @@ -5369,13 +4505,11 @@ type Controller struct { // The unique identifier of the controller Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The DID of the controller - Did string `protobuf:"bytes,2,opt,name=did,proto3" json:"did,omitempty"` - // The public key of the controller - PublicKeyMultibase string `protobuf:"bytes,3,opt,name=public_key_multibase,json=publicKeyMultibase,proto3" json:"public_key_multibase,omitempty"` + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // PubKey is the verification method + PublicKey *PubKey `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // The vault address or identifier - VaultCid string `protobuf:"bytes,4,opt,name=vault_cid,json=vaultCid,proto3" json:"vault_cid,omitempty"` - // Fingerprint is the Accumulator of discrete credential identifiers - Fingerprint []byte `protobuf:"bytes,5,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"` + VaultCid string `protobuf:"bytes,5,opt,name=vault_cid,json=vaultCid,proto3" json:"vault_cid,omitempty"` } func (x *Controller) Reset() { @@ -5405,18 +4539,18 @@ func (x *Controller) GetId() string { return "" } -func (x *Controller) GetDid() string { +func (x *Controller) GetAddress() string { if x != nil { - return x.Did + return x.Address } return "" } -func (x *Controller) GetPublicKeyMultibase() string { +func (x *Controller) GetPublicKey() *PubKey { if x != nil { - return x.PublicKeyMultibase + return x.PublicKey } - return "" + return nil } func (x *Controller) GetVaultCid() string { @@ -5426,13 +4560,6 @@ func (x *Controller) GetVaultCid() string { return "" } -func (x *Controller) GetFingerprint() []byte { - if x != nil { - return x.Fingerprint - } - return nil -} - // Delegation represents IBC Account Controllers for various chains (e.g., ETH, BTC) type Delegation struct { state protoimpl.MessageState @@ -5442,19 +4569,11 @@ type Delegation struct { // The unique identifier of the delegation Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The Decentralized Identifier of the delegated account - Did string `protobuf:"bytes,2,opt,name=did,proto3" json:"did,omitempty"` - // The chain type (e.g., "ETH", "BTC") - ChainType string `protobuf:"bytes,3,opt,name=chain_type,json=chainType,proto3" json:"chain_type,omitempty"` - // The address on the target chain - ChainAddress string `protobuf:"bytes,4,opt,name=chain_address,json=chainAddress,proto3" json:"chain_address,omitempty"` - // The controller DID - ControllerDid string `protobuf:"bytes,5,opt,name=controller_did,json=controllerDid,proto3" json:"controller_did,omitempty"` + Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` + // Resolved from module parameters + ChainInfoId string `protobuf:"bytes,3,opt,name=chain_info_id,json=chainInfoId,proto3" json:"chain_info_id,omitempty"` // The delegation proof or verification method - PublicKeyMultibase string `protobuf:"bytes,6,opt,name=public_key_multibase,json=publicKeyMultibase,proto3" json:"public_key_multibase,omitempty"` - // Public Key JWKS is a map of the associated public keys - PublicKeyJwks map[string]string `protobuf:"bytes,7,rep,name=public_key_jwks,json=publicKeyJwks,proto3" json:"public_key_jwks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // IBC Channel ID - ChannelId uint64 `protobuf:"varint,8,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + PublicKey *PubKey `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` } func (x *Delegation) Reset() { @@ -5484,55 +4603,27 @@ func (x *Delegation) GetId() string { return "" } -func (x *Delegation) GetDid() string { +func (x *Delegation) GetController() string { if x != nil { - return x.Did + return x.Controller } return "" } -func (x *Delegation) GetChainType() string { +func (x *Delegation) GetChainInfoId() string { if x != nil { - return x.ChainType + return x.ChainInfoId } return "" } -func (x *Delegation) GetChainAddress() string { +func (x *Delegation) GetPublicKey() *PubKey { if x != nil { - return x.ChainAddress - } - return "" -} - -func (x *Delegation) GetControllerDid() string { - if x != nil { - return x.ControllerDid - } - return "" -} - -func (x *Delegation) GetPublicKeyMultibase() string { - if x != nil { - return x.PublicKeyMultibase - } - return "" -} - -func (x *Delegation) GetPublicKeyJwks() map[string]string { - if x != nil { - return x.PublicKeyJwks + return x.PublicKey } return nil } -func (x *Delegation) GetChannelId() uint64 { - if x != nil { - return x.ChannelId - } - return 0 -} - // Service represents a service in a DID Document type Service struct { state protoimpl.MessageState @@ -5550,7 +4641,7 @@ type Service struct { // 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"` + Permissions *Permissions `protobuf:"bytes,6,opt,name=permissions,proto3" json:"permissions,omitempty"` } func (x *Service) Reset() { @@ -5608,9 +4699,9 @@ func (x *Service) GetServiceEndpoints() map[string]string { return nil } -func (x *Service) GetScopes() []PermissionScope { +func (x *Service) GetPermissions() *Permissions { if x != nil { - return x.Scopes + return x.Permissions } return nil } @@ -5622,111 +4713,93 @@ 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, 0x1a, 0x12, 0x64, 0x69, 0x64, - 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xaa, 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, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 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, 0x1d, 0xf2, - 0x9e, 0xd3, 0x8e, 0x03, 0x17, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x0d, 0x0a, 0x07, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 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, 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, + 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x64, 0x69, 0x64, + 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xaa, 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, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 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, 0x1d, + 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x17, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x0d, 0x0a, 0x07, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x10, 0x01, 0x18, 0x01, 0x18, 0x01, 0x22, 0xcd, 0x01, + 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, 0x1e, 0x0a, 0x0a, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x0a, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, + 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, + 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x0e, 0xf2, + 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x22, 0xaa, 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, 0x1e, 0x0a, + 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x2d, 0x0a, + 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, + 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, + 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, + 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x22, 0x92, 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, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, + 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x69, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x69, 0x64, 0x3a, + 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x04, 0x22, + 0x9f, 0x01, 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, 0x1e, + 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x22, + 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, + 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, + 0x79, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x05, 0x22, 0xe2, 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, 0x35, 0x0a, 0x0b, 0x70, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x13, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 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, 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, + 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 ( @@ -5741,29 +4814,33 @@ 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, 9) +var file_did_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 7) 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 - nil, // 8: did.v1.Service.ServiceEndpointsEntry - (PermissionScope)(0), // 9: did.v1.PermissionScope + (*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.Service.ServiceEndpointsEntry + (*PubKey)(nil), // 7: did.v1.PubKey + (*Metadata)(nil), // 8: did.v1.Metadata + (*Permissions)(nil), // 9: did.v1.Permissions } 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 - 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 + 7, // 0: did.v1.Assertion.public_key:type_name -> did.v1.PubKey + 8, // 1: did.v1.Assertion.metadata:type_name -> did.v1.Metadata + 7, // 2: did.v1.Attestation.public_key:type_name -> did.v1.PubKey + 8, // 3: did.v1.Attestation.metadata:type_name -> did.v1.Metadata + 7, // 4: did.v1.Controller.public_key:type_name -> did.v1.PubKey + 7, // 5: did.v1.Delegation.public_key:type_name -> did.v1.PubKey + 6, // 6: did.v1.Service.service_endpoints:type_name -> did.v1.Service.ServiceEndpointsEntry + 9, // 7: did.v1.Service.permissions:type_name -> did.v1.Permissions + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_did_v1_state_proto_init() } @@ -5772,7 +4849,7 @@ func file_did_v1_state_proto_init() { return } file_did_v1_genesis_proto_init() - file_did_v1_enums_proto_init() + file_did_v1_models_proto_init() if !protoimpl.UnsafeEnabled { file_did_v1_state_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Aliases); i { @@ -5853,7 +4930,7 @@ func file_did_v1_state_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_state_proto_rawDesc, NumEnums: 0, - NumMessages: 9, + NumMessages: 7, NumExtensions: 0, NumServices: 0, }, diff --git a/api/did/v1/tx.pulsar.go b/api/did/v1/tx.pulsar.go index b9b465148..12c66072c 100644 --- a/api/did/v1/tx.pulsar.go +++ b/api/did/v1/tx.pulsar.go @@ -3823,52 +3823,6 @@ func (x *fastReflection_MsgSyncVaultResponse) ProtoMethods() *protoiface.Methods } } -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 { @@ -3964,7 +3918,7 @@ func (x *_MsgRegisterController_4_list) IsValid() bool { var ( md_MsgRegisterController protoreflect.MessageDescriptor fd_MsgRegisterController_authority protoreflect.FieldDescriptor - fd_MsgRegisterController_assertions protoreflect.FieldDescriptor + fd_MsgRegisterController_cid protoreflect.FieldDescriptor fd_MsgRegisterController_keyshares protoreflect.FieldDescriptor fd_MsgRegisterController_verifications protoreflect.FieldDescriptor ) @@ -3973,7 +3927,7 @@ 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_cid = md_MsgRegisterController.Fields().ByName("cid") fd_MsgRegisterController_keyshares = md_MsgRegisterController.Fields().ByName("keyshares") fd_MsgRegisterController_verifications = md_MsgRegisterController.Fields().ByName("verifications") } @@ -4049,9 +4003,9 @@ func (x *fastReflection_MsgRegisterController) Range(f func(protoreflect.FieldDe return } } - if len(x.Assertions) != 0 { - value := protoreflect.ValueOfList(&_MsgRegisterController_2_list{list: &x.Assertions}) - if !f(fd_MsgRegisterController_assertions, value) { + if x.Cid != "" { + value := protoreflect.ValueOfString(x.Cid) + if !f(fd_MsgRegisterController_cid, value) { return } } @@ -4084,8 +4038,8 @@ func (x *fastReflection_MsgRegisterController) Has(fd protoreflect.FieldDescript 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.cid": + return x.Cid != "" case "did.v1.MsgRegisterController.keyshares": return len(x.Keyshares) != 0 case "did.v1.MsgRegisterController.verifications": @@ -4108,8 +4062,8 @@ func (x *fastReflection_MsgRegisterController) Clear(fd protoreflect.FieldDescri switch fd.FullName() { case "did.v1.MsgRegisterController.authority": x.Authority = "" - case "did.v1.MsgRegisterController.assertions": - x.Assertions = nil + case "did.v1.MsgRegisterController.cid": + x.Cid = "" case "did.v1.MsgRegisterController.keyshares": x.Keyshares = nil case "did.v1.MsgRegisterController.verifications": @@ -4133,12 +4087,9 @@ func (x *fastReflection_MsgRegisterController) Get(descriptor protoreflect.Field 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.cid": + value := x.Cid + return protoreflect.ValueOfString(value) case "did.v1.MsgRegisterController.keyshares": if len(x.Keyshares) == 0 { return protoreflect.ValueOfList(&_MsgRegisterController_3_list{}) @@ -4173,10 +4124,8 @@ func (x *fastReflection_MsgRegisterController) Set(fd protoreflect.FieldDescript 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.cid": + x.Cid = value.Interface().(string) case "did.v1.MsgRegisterController.keyshares": lv := value.List() clv := lv.(*_MsgRegisterController_3_list) @@ -4205,12 +4154,6 @@ func (x *fastReflection_MsgRegisterController) Set(fd protoreflect.FieldDescript // 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{} @@ -4225,6 +4168,8 @@ func (x *fastReflection_MsgRegisterController) Mutable(fd protoreflect.FieldDesc return protoreflect.ValueOfList(value) case "did.v1.MsgRegisterController.authority": panic(fmt.Errorf("field authority of message did.v1.MsgRegisterController is not mutable")) + case "did.v1.MsgRegisterController.cid": + panic(fmt.Errorf("field cid 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")) @@ -4240,9 +4185,8 @@ func (x *fastReflection_MsgRegisterController) NewField(fd protoreflect.FieldDes 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.cid": + return protoreflect.ValueOfString("") case "did.v1.MsgRegisterController.keyshares": list := [][]byte{} return protoreflect.ValueOfList(&_MsgRegisterController_3_list{list: &list}) @@ -4322,11 +4266,9 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method 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)) - } + l = len(x.Cid) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) } if len(x.Keyshares) > 0 { for _, b := range x.Keyshares { @@ -4387,14 +4329,12 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method 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.Cid) > 0 { + i -= len(x.Cid) + copy(dAtA[i:], x.Cid) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Cid))) + i-- + dAtA[i] = 0x12 } if len(x.Authority) > 0 { i -= len(x.Authority) @@ -4486,9 +4426,9 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method 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) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -4498,23 +4438,23 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Assertions = append(x.Assertions, make([]byte, postIndex-iNdEx)) - copy(x.Assertions[len(x.Assertions)-1], dAtA[iNdEx:postIndex]) + x.Cid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { @@ -6790,7 +6730,7 @@ 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"` + Cid string `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,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. @@ -6824,11 +6764,11 @@ func (x *MsgRegisterController) GetAuthority() string { return "" } -func (x *MsgRegisterController) GetAssertions() [][]byte { +func (x *MsgRegisterController) GetCid() string { if x != nil { - return x.Assertions + return x.Cid } - return nil + return "" } func (x *MsgRegisterController) GetKeyshares() [][]byte { @@ -6988,143 +6928,143 @@ 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, 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, 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, - 0x8f, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x57, 0x69, 0x74, 0x6e, - 0x65, 0x73, 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, 0x1a, 0x0a, 0x08, 0x70, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x69, 0x74, 0x6e, 0x65, - 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x77, 0x69, 0x74, 0x6e, 0x65, 0x73, - 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x22, 0x4f, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x57, 0x69, 0x74, - 0x6e, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x79, 0x22, 0x83, 0x01, 0x0a, 0x0c, 0x4d, 0x73, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x56, 0x61, - 0x75, 0x6c, 0x74, 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, 0x10, 0x0a, - 0x03, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, - 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x63, 0x72, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x06, 0x6d, 0x61, 0x63, 0x72, 0x6f, 0x6e, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x30, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x53, - 0x79, 0x6e, 0x63, 0x56, 0x61, 0x75, 0x6c, 0x74, 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, 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, + 0x74, 0x6f, 0x1a, 0x13, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, + 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, 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, 0x8f, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x57, 0x69, 0x74, + 0x6e, 0x65, 0x73, 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, 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, + 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, + 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x69, 0x74, 0x6e, + 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x77, 0x69, 0x74, 0x6e, 0x65, + 0x73, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x22, 0x4f, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x57, 0x69, + 0x74, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x79, 0x22, 0x83, 0x01, 0x0a, 0x0c, 0x4d, 0x73, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x56, + 0x61, 0x75, 0x6c, 0x74, 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, 0x10, + 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, + 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x63, 0x72, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x06, 0x6d, 0x61, 0x63, 0x72, 0x6f, 0x6e, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x30, 0x0a, 0x14, 0x4d, 0x73, 0x67, + 0x53, 0x79, 0x6e, 0x63, 0x56, 0x61, 0x75, 0x6c, 0x74, 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, 0x22, 0xb5, 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, 0x10, 0x0a, + 0x03, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 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, 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, 0xda, 0x03, 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, 0x48, 0x0a, - 0x0c, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x17, 0x2e, - 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x57, - 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x1a, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x56, - 0x61, 0x75, 0x6c, 0x74, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x53, 0x79, 0x6e, 0x63, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x1a, 0x1c, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x56, 0x61, 0x75, 0x6c, 0x74, - 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, + 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, 0xda, 0x03, 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, 0x48, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, + 0x12, 0x17, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, + 0x76, 0x65, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x1a, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x57, 0x69, 0x74, 0x6e, 0x65, + 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x09, 0x53, 0x79, + 0x6e, 0x63, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x1a, 0x1c, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x56, 0x61, + 0x75, 0x6c, 0x74, 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 ( @@ -7185,7 +7125,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_models_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{} { diff --git a/proto/did/v1/accounts.proto b/proto/did/v1/accounts.proto index f189a6a7b..8e1f1b1e0 100644 --- a/proto/did/v1/accounts.proto +++ b/proto/did/v1/accounts.proto @@ -2,3 +2,11 @@ syntax = "proto3"; package did.v1; option go_package = "github.com/onsonr/hway/x/did/types"; + +message BtcAccount {} + +message EthAccount {} + +message IBCAccount {} + +message SnrAccount {} diff --git a/proto/did/v1/enums.proto b/proto/did/v1/enums.proto deleted file mode 100644 index d7a1bd08b..000000000 --- a/proto/did/v1/enums.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; -package did.v1; - -import "gogoproto/gogo.proto"; -import "amino/amino.proto"; -option go_package = "github.com/onsonr/hway/x/did/types"; - -// PermissionScope define the Capabilities Controllers can grant for Services -enum PermissionScope { - PERMISSION_SCOPE_UNSPECIFIED = 0; - PERMISSION_SCOPE_PROFILE_NAME = 1; - PERMISSION_SCOPE_IDENTIFIERS_EMAIL = 2; - PERMISSION_SCOPE_IDENTIFIERS_PHONE = 3; - PERMISSION_SCOPE_TRANSACTIONS_READ = 4; - PERMISSION_SCOPE_TRANSACTIONS_WRITE = 5; - PERMISSION_SCOPE_WALLETS_READ = 6; - PERMISSION_SCOPE_WALLETS_CREATE = 7; - PERMISSION_SCOPE_WALLETS_SUBSCRIBE = 8; - PERMISSION_SCOPE_WALLETS_UPDATE = 9; - PERMISSION_SCOPE_TRANSACTIONS_VERIFY = 10; - PERMISSION_SCOPE_TRANSACTIONS_BROADCAST = 11; - PERMISSION_SCOPE_ADMIN_USER = 12; - PERMISSION_SCOPE_ADMIN_VALIDATOR = 13; -} diff --git a/proto/did/v1/genesis.proto b/proto/did/v1/genesis.proto index 88290beec..a847f1d3d 100644 --- a/proto/did/v1/genesis.proto +++ b/proto/did/v1/genesis.proto @@ -25,7 +25,7 @@ message Params { repeated ChainInfo whitelisted_chains = 2; // Whitelisted Key Types - repeated KeyInfo whitelisted_keys = 3; + repeated KeyInfo allowed_public_keys = 3; } // AssetInfo defines the asset info @@ -81,27 +81,55 @@ message ChainInfo { } } - // KeyInfo defines information for accepted PubKey types message KeyInfo { - KeyKind kind = 1; + KeyType kind = 1; string algorithm = 2; // e.g., "ES256", "EdDSA", "ES256K" string curve = 3; // e.g., "P-256", "Ed25519", "secp256k1" - bool is_cbor = 4; // true for WebAuthn CBOR-encoded keys, false for others - string encoding = 5; // e.g., "hex", "base64", "multibase" + string encoding = 4; // e.g., "hex", "base64", "multibase" } -// KeyKind defines the kind of key -enum KeyKind { - KEY_KIND_UNSPECIFIED = 0; - // Blockchain key types - KEY_KIND_SECP256K1 = 1; - KEY_KIND_ED25519 = 2; - KEY_KIND_P256 = 3; - KEY_KIND_BLS12381 = 4; - KEY_KIND_X25519 = 5; - KEY_KIND_SCHNORR = 6; - // Webauthn and FIDO key types - KEY_KIND_WEBAUTHN = 7; - KEY_KIND_FIDO = 8; +// DIDNamespace define the different namespaces of DID +enum DIDNamespace { + DID_NAMESPACE_UNSPECIFIED = 0; + DID_NAMESPACE_IPFS = 1; + DID_NAMESPACE_SONR = 2; + DID_NAMESPACE_BITCOIN = 3; + DID_NAMESPACE_ETHEREUM = 4; + DID_NAMESPACE_IBC = 5; +} + +// KeyKTind defines the kind of key +enum KeyType { + KEY_TYPE_UNSPECIFIED = 0; + + // Blockchain key types + KEY_TYPE_SECP256K1 = 1; // cross-chain + KEY_TYPE_ED25519 = 2; // validators + KEY_TYPE_KECCAK = 3; // ethereum addresses + KEY_TYPE_BLS12381 = 4; // zero-knowledge + KEY_TYPE_X25519 = 5; // multisig + KEY_TYPE_SCHNORR = 6; // mpc + + // Webauthn and FIDO key types + KEY_TYPE_WEBAUTHN = 7; // passkey authentication + KEY_TYPE_FIDO = 8; // fido2 authentication +} + +// PermissionScope define the Capabilities Controllers can grant for Services +enum PermissionScope { + PERMISSION_SCOPE_UNSPECIFIED = 0; + PERMISSION_SCOPE_BASIC_INFO = 1; + PERMISSION_SCOPE_RECORDS_READ = 2; + PERMISSION_SCOPE_RECORDS_WRITE = 3; + PERMISSION_SCOPE_TRANSACTIONS_READ = 4; + PERMISSION_SCOPE_TRANSACTIONS_WRITE = 5; + PERMISSION_SCOPE_WALLETS_READ = 6; + PERMISSION_SCOPE_WALLETS_CREATE = 7; + PERMISSION_SCOPE_WALLETS_SUBSCRIBE = 8; + PERMISSION_SCOPE_WALLETS_UPDATE = 9; + PERMISSION_SCOPE_TRANSACTIONS_VERIFY = 10; + PERMISSION_SCOPE_TRANSACTIONS_BROADCAST = 11; + PERMISSION_SCOPE_ADMIN_USER = 12; + PERMISSION_SCOPE_ADMIN_VALIDATOR = 13; } diff --git a/proto/did/v1/grants.proto b/proto/did/v1/grants.proto deleted file mode 100644 index 7e7383c53..000000000 --- a/proto/did/v1/grants.proto +++ /dev/null @@ -1,52 +0,0 @@ -syntax = "proto3"; -package did.v1; - -import "gogoproto/gogo.proto"; -import "amino/amino.proto"; -option go_package = "github.com/onsonr/hway/x/did/types"; - -// DIDNamespace define the different namespaces of DID -enum DIDNamespace { - DID_NAMESPACE_UNSPECIFIED = 0; - DID_NAMESPACE_IPFS = 1; - DID_NAMESPACE_SONR = 2; - DID_NAMESPACE_BITCOIN = 3; - DID_NAMESPACE_ETHEREUM = 4; - DID_NAMESPACE_IBC = 5; -} - -enum KeyType { - KEY_TYPE_UNSPECIFIED = 0; - // Blockchain key types - KEY_TYPE_SECP256K1 = 1; - KEY_TYPE_ED25519 = 2; - KEY_TYPE_P256 = 3; - KEY_TYPE_BLS12381 = 4; - KEY_TYPE_X25519 = 5; - KEY_TYPE_SCHNORR = 6; - // Webauthn and FIDO key types - KEY_TYPE_WEBAUTHN = 7; - KEY_TYPE_FIDO = 8; - // MPC key type - KEY_TYPE_MPC = 9; - // ZK key type - KEY_TYPE_ZK = 10; -} - -// PermissionScope define the Capabilities Controllers can grant for Services -enum PermissionScope { - PERMISSION_SCOPE_UNSPECIFIED = 0; - PERMISSION_SCOPE_BASIC_INFO = 1; - PERMISSION_SCOPE_RECORDS_READ = 2; - PERMISSION_SCOPE_RECORDS_WRITE = 3; - PERMISSION_SCOPE_TRANSACTIONS_READ = 4; - PERMISSION_SCOPE_TRANSACTIONS_WRITE = 5; - PERMISSION_SCOPE_WALLETS_READ = 6; - PERMISSION_SCOPE_WALLETS_CREATE = 7; - PERMISSION_SCOPE_WALLETS_SUBSCRIBE = 8; - PERMISSION_SCOPE_WALLETS_UPDATE = 9; - PERMISSION_SCOPE_TRANSACTIONS_VERIFY = 10; - PERMISSION_SCOPE_TRANSACTIONS_BROADCAST = 11; - PERMISSION_SCOPE_ADMIN_USER = 12; - PERMISSION_SCOPE_ADMIN_VALIDATOR = 13; -} diff --git a/proto/did/v1/models.proto b/proto/did/v1/models.proto new file mode 100644 index 000000000..79bdc46b7 --- /dev/null +++ b/proto/did/v1/models.proto @@ -0,0 +1,84 @@ +syntax = "proto3"; + +package did.v1; + +import "did/v1/genesis.proto"; + +option go_package = "github.com/onsonr/hway/x/did/types"; + +// DID defines a parsed DID string +message DID { + string id = 1; + DIDNamespace method = 2; + string network = 3; + string identifier = 4; + repeated string paths = 5; +} + +// Credential defines a WebAuthn credential +message Credential { + string id = 1; + string credential_type = 2; + bytes credential_id = 3; + repeated string transport = 4; + string subject = 6; + string controller = 7; +} + +// Document defines a DID document +message Document { + string id = 1; + repeated VerificationMethod verification_methods = 2; + repeated string authentication = 4; + repeated string assertion_method = 5; + repeated string capability_delegation = 7; + repeated string capability_invocation = 8; +} + +// Metadata defines additional information provided to a did +message Metadata { + string origin_uri = 1; + map public = 2; + map private = 3; +} + +// Permissions contains a list of grants and access control rules for +// a Service. +message Permissions { + repeated DIDNamespace grants = 1; + repeated PermissionScope scopes = 2; +} + +// Profile defines an associated public identity for a did subject +message Profile { + string id = 1; + string subject = 2; + string controller = 3; + repeated Credential credentials = 4; + repeated VerificationMethod attestations = 5; + Metadata metadata = 6; +} + +// Property defines a Zero-Knowledge accumulator which can be used to +// anonymously prove a given value to a DID subject +message Property { + bytes accumulator = 1; + bytes key = 2; +} + +// PubKey defines a public key for a did +message PubKey { + DIDNamespace namespace = 1; + bytes key = 2; + KeyType kind = 3; + string multibase = 5; + map jwks = 6; +} + +// VerificationMethod defines a verification method +message VerificationMethod { + string id = 1; + string controller = 2; + PubKey public_key = 3; +} + diff --git a/proto/did/v1/query.proto b/proto/did/v1/query.proto index 2bd10adcd..0716e576c 100644 --- a/proto/did/v1/query.proto +++ b/proto/did/v1/query.proto @@ -3,7 +3,7 @@ package did.v1; import "google/api/annotations.proto"; import "did/v1/genesis.proto"; -import "did/v1/types.proto"; +import "did/v1/models.proto"; option go_package = "github.com/onsonr/hway/x/did/types"; diff --git a/proto/did/v1/state.proto b/proto/did/v1/state.proto index 9eb487d27..bf68371b1 100644 --- a/proto/did/v1/state.proto +++ b/proto/did/v1/state.proto @@ -5,7 +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"; +import "did/v1/models.proto"; // Aliases represents the `alsoKnownAs` property associated with a DID Controller message Aliases { @@ -41,20 +41,19 @@ message Assertion { // The unique identifier of the attestation string id = 1; + // The controller of the attestation + string controller = 2; + // Key type (e.g., "passkey", "ssh", "gpg", "native-secure-enclave") - string key_type = 2; + PubKey public_key = 3; // The value of the linked identifier - bytes credential = 3; + bytes credential_id = 4; // Metadata is optional additional information about the assertion - map metadata = 4; - - // The controller of the attestation - string controller = 5; + Metadata metadata = 5; } - // Attestation represents linked identifiers (e.g., Crypto Accounts, Github, Email, Phone) message Attestation { option (cosmos.orm.v1.table) = { @@ -66,16 +65,13 @@ message Attestation { string id = 1; // The type of the linked identifier (e.g., "crypto", "github", "email", "phone") - string key_type = 2; + string controller = 2; // The value of the linked identifier - string value = 3; - - // The proof or verification method for this attestation - string proof = 4; + PubKey public_key = 3; // The controller of the attestation - string controller = 5; + Metadata metadata = 4; } @@ -90,16 +86,13 @@ message Controller { string id = 1; // The DID of the controller - string did = 2; + string address = 2; - // The public key of the controller - string public_key_multibase = 3; + // PubKey is the verification method + PubKey public_key = 4; // The vault address or identifier - string vault_cid = 4; - - // Fingerprint is the Accumulator of discrete credential identifiers - bytes fingerprint = 5; + string vault_cid = 5; } // Delegation represents IBC Account Controllers for various chains (e.g., ETH, BTC) @@ -113,25 +106,13 @@ message Delegation { string id = 1; // The Decentralized Identifier of the delegated account - string did = 2; + string controller = 2; - // The chain type (e.g., "ETH", "BTC") - string chain_type = 3; - - // The address on the target chain - string chain_address = 4; - - // The controller DID - string controller_did = 5; + // Resolved from module parameters + string chain_info_id = 3; // The delegation proof or verification method - string public_key_multibase = 6; - - // Public Key JWKS is a map of the associated public keys - map public_key_jwks = 7; - - // IBC Channel ID - uint64 channel_id = 8; + PubKey public_key = 4; } // Service represents a service in a DID Document @@ -157,5 +138,5 @@ message Service { map service_endpoints = 5; // Scopes is the Authorization Grants of the service - repeated PermissionScope scopes = 6; + Permissions permissions = 6; } diff --git a/proto/did/v1/tx.proto b/proto/did/v1/tx.proto index 3ec2a6700..ee65f158a 100644 --- a/proto/did/v1/tx.proto +++ b/proto/did/v1/tx.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package did.v1; import "cosmos/msg/v1/msg.proto"; -import "did/v1/enums.proto"; +import "did/v1/models.proto"; import "did/v1/genesis.proto"; import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; @@ -121,7 +121,7 @@ message MsgRegisterController { string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // Assertions is the list of assertions to initialize the controller with. - repeated bytes assertions = 2; + string cid = 2; // Keyshares is the list of keyshares to initialize the controller with. repeated bytes keyshares = 3; diff --git a/proto/did/v1/types.proto b/proto/did/v1/types.proto deleted file mode 100644 index 1e7b87cfb..000000000 --- a/proto/did/v1/types.proto +++ /dev/null @@ -1,114 +0,0 @@ -syntax = "proto3"; - -package did.v1; - -import "cosmos/msg/v1/msg.proto"; -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/onsonr/hway/x/did/types"; - -// AssetInfo defines the asset info -message AssetInfo { - string id = 1; - string denom = 2; - string symbol = 3; - string asset_type = 4; - string origin_chain = 5; - string origin_denom = 6; - int32 decimals = 7; - string description = 8; - string image_url = 9; - string coingecko_id = 10; - bool is_enabled = 11; - string ibc_path = 12; - string ibc_channel = 13; - string ibc_port = 14; -} - -// ChainInfo defines the chain info -message ChainInfo { - string id = 1; - string chain_id = 2; - string name = 3; - string symbol = 4; - string bech32_prefix = 5; - string genesis_time = 6; - repeated Endpoint grpc_endpoints = 7; - repeated Endpoint rest_endpoints = 8; - ExplorerInfo explorer = 9; - FeeInfo fee_info = 10; -} - -// Credential defines a WebAuthn credential -message Credential { - string id = 1; - string credential_type = 2; - bytes credential_id = 3; - repeated string transport = 4; - string attestation_type = 5; - string display_name = 6; - string controller = 7; -} - -// Document defines a DID document -message Document { - string id = 1; - repeated VerificationMethod verification_methods = 2; - repeated string authentication = 4; - repeated string assertion_method = 5; - repeated string capability_delegation = 7; - repeated string capability_invocation = 8; -} - -// Endpoint defines an endpoint -message Endpoint { - string url = 1; - bool is_primary = 2; -} - -// ExplorerInfo defines the explorer info -message ExplorerInfo { - string name = 1; - string url = 2; -} - -// FeeInfo defines a fee info -message FeeInfo { - string base_denom = 1; - repeated string fee_rates = 2; - int32 init_gas_limit = 3; - bool is_simulable = 4; - double gas_multiply = 5; -} - -// Identity defines an associated profile for a did subject -message Identity { - string id = 1; - string subject = 2; - string controller = 3; - repeated Credential credentials = 4; - repeated VerificationMethod verification_methods = 5; -} - -// PubKey defines a public key for a did -message PubKey { - string id = 1; - bytes key = 2; - string key_type = 3; - string controller = 4; -} - -// VerificationMethod defines a verification method -message VerificationMethod { - string id = 1; - string controller = 2; - - // The delegation proof or verification method - string public_key_multibase = 3; - - // Public Key JWKS is a map of the associated public keys - map public_key_jwks = 4; -} - - diff --git a/x/did/keeper/accounts.go b/x/did/keeper/accounts.go new file mode 100644 index 000000000..b55569d4a --- /dev/null +++ b/x/did/keeper/accounts.go @@ -0,0 +1 @@ +package keeper diff --git a/x/did/types/accounts.pb.go b/x/did/types/accounts.pb.go index bdef8a1e6..c9102852a 100644 --- a/x/did/types/accounts.pb.go +++ b/x/did/types/accounts.pb.go @@ -6,7 +6,9 @@ package types import ( fmt "fmt" proto "github.com/cosmos/gogoproto/proto" + io "io" math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. @@ -20,16 +22,599 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +type BtcAccount struct { +} + +func (m *BtcAccount) Reset() { *m = BtcAccount{} } +func (m *BtcAccount) String() string { return proto.CompactTextString(m) } +func (*BtcAccount) ProtoMessage() {} +func (*BtcAccount) Descriptor() ([]byte, []int) { + return fileDescriptor_2125a09fb14c3bc3, []int{0} +} +func (m *BtcAccount) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BtcAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BtcAccount.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 *BtcAccount) XXX_Merge(src proto.Message) { + xxx_messageInfo_BtcAccount.Merge(m, src) +} +func (m *BtcAccount) XXX_Size() int { + return m.Size() +} +func (m *BtcAccount) XXX_DiscardUnknown() { + xxx_messageInfo_BtcAccount.DiscardUnknown(m) +} + +var xxx_messageInfo_BtcAccount proto.InternalMessageInfo + +type EthAccount struct { +} + +func (m *EthAccount) Reset() { *m = EthAccount{} } +func (m *EthAccount) String() string { return proto.CompactTextString(m) } +func (*EthAccount) ProtoMessage() {} +func (*EthAccount) Descriptor() ([]byte, []int) { + return fileDescriptor_2125a09fb14c3bc3, []int{1} +} +func (m *EthAccount) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EthAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EthAccount.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 *EthAccount) XXX_Merge(src proto.Message) { + xxx_messageInfo_EthAccount.Merge(m, src) +} +func (m *EthAccount) XXX_Size() int { + return m.Size() +} +func (m *EthAccount) XXX_DiscardUnknown() { + xxx_messageInfo_EthAccount.DiscardUnknown(m) +} + +var xxx_messageInfo_EthAccount proto.InternalMessageInfo + +type IBCAccount struct { +} + +func (m *IBCAccount) Reset() { *m = IBCAccount{} } +func (m *IBCAccount) String() string { return proto.CompactTextString(m) } +func (*IBCAccount) ProtoMessage() {} +func (*IBCAccount) Descriptor() ([]byte, []int) { + return fileDescriptor_2125a09fb14c3bc3, []int{2} +} +func (m *IBCAccount) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IBCAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_IBCAccount.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 *IBCAccount) XXX_Merge(src proto.Message) { + xxx_messageInfo_IBCAccount.Merge(m, src) +} +func (m *IBCAccount) XXX_Size() int { + return m.Size() +} +func (m *IBCAccount) XXX_DiscardUnknown() { + xxx_messageInfo_IBCAccount.DiscardUnknown(m) +} + +var xxx_messageInfo_IBCAccount proto.InternalMessageInfo + +type SnrAccount struct { +} + +func (m *SnrAccount) Reset() { *m = SnrAccount{} } +func (m *SnrAccount) String() string { return proto.CompactTextString(m) } +func (*SnrAccount) ProtoMessage() {} +func (*SnrAccount) Descriptor() ([]byte, []int) { + return fileDescriptor_2125a09fb14c3bc3, []int{3} +} +func (m *SnrAccount) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SnrAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SnrAccount.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 *SnrAccount) XXX_Merge(src proto.Message) { + xxx_messageInfo_SnrAccount.Merge(m, src) +} +func (m *SnrAccount) XXX_Size() int { + return m.Size() +} +func (m *SnrAccount) XXX_DiscardUnknown() { + xxx_messageInfo_SnrAccount.DiscardUnknown(m) +} + +var xxx_messageInfo_SnrAccount proto.InternalMessageInfo + +func init() { + proto.RegisterType((*BtcAccount)(nil), "did.v1.BtcAccount") + proto.RegisterType((*EthAccount)(nil), "did.v1.EthAccount") + proto.RegisterType((*IBCAccount)(nil), "did.v1.IBCAccount") + proto.RegisterType((*SnrAccount)(nil), "did.v1.SnrAccount") +} + func init() { proto.RegisterFile("did/v1/accounts.proto", fileDescriptor_2125a09fb14c3bc3) } var fileDescriptor_2125a09fb14c3bc3 = []byte{ - // 122 bytes of a gzipped FileDescriptorProto + // 148 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4d, 0xc9, 0x4c, 0xd1, 0x2f, 0x33, 0xd4, 0x4f, 0x4c, 0x4e, 0xce, 0x2f, 0xcd, 0x2b, 0x29, 0xd6, 0x2b, 0x28, 0xca, 0x2f, - 0xc9, 0x17, 0x62, 0x4b, 0xc9, 0x4c, 0xd1, 0x2b, 0x33, 0x74, 0xb2, 0x39, 0xf1, 0x48, 0x8e, 0xf1, - 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, - 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xa5, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, - 0x5c, 0xfd, 0xfc, 0xbc, 0xe2, 0xfc, 0xbc, 0x22, 0xfd, 0x8c, 0xf2, 0xc4, 0x4a, 0xfd, 0x0a, 0x7d, - 0x90, 0x89, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0x60, 0xc3, 0x8c, 0x01, 0x01, 0x00, 0x00, - 0xff, 0xff, 0x28, 0xd1, 0x54, 0x54, 0x65, 0x00, 0x00, 0x00, + 0xc9, 0x17, 0x62, 0x4b, 0xc9, 0x4c, 0xd1, 0x2b, 0x33, 0x54, 0xe2, 0xe1, 0xe2, 0x72, 0x2a, 0x49, + 0x76, 0x84, 0x48, 0x82, 0x78, 0xae, 0x25, 0x19, 0x48, 0x3c, 0x4f, 0x27, 0x67, 0x24, 0x5e, 0x70, + 0x5e, 0x11, 0x94, 0xe7, 0x64, 0x73, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, + 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, + 0x4a, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xf9, 0x79, 0xc5, 0xf9, + 0x79, 0x45, 0xfa, 0x19, 0xe5, 0x89, 0x95, 0xfa, 0x15, 0xfa, 0x20, 0x97, 0x94, 0x54, 0x16, 0xa4, + 0x16, 0x27, 0xb1, 0x81, 0x1d, 0x61, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x96, 0xc2, 0x4c, 0x7c, + 0x9d, 0x00, 0x00, 0x00, } + +func (m *BtcAccount) 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 *BtcAccount) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BtcAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *EthAccount) 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 *EthAccount) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EthAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *IBCAccount) 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 *IBCAccount) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IBCAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *SnrAccount) 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 *SnrAccount) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnrAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintAccounts(dAtA []byte, offset int, v uint64) int { + offset -= sovAccounts(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *BtcAccount) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *EthAccount) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *IBCAccount) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *SnrAccount) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovAccounts(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozAccounts(x uint64) (n int) { + return sovAccounts(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *BtcAccount) 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 ErrIntOverflowAccounts + } + 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: BtcAccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BtcAccount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipAccounts(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAccounts + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EthAccount) 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 ErrIntOverflowAccounts + } + 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: EthAccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EthAccount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipAccounts(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAccounts + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IBCAccount) 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 ErrIntOverflowAccounts + } + 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: IBCAccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IBCAccount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipAccounts(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAccounts + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SnrAccount) 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 ErrIntOverflowAccounts + } + 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: SnrAccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SnrAccount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipAccounts(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAccounts + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAccounts(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAccounts + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAccounts + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAccounts + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthAccounts + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupAccounts + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthAccounts + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthAccounts = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAccounts = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAccounts = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/did/types/genesis.pb.go b/x/did/types/genesis.pb.go index 7dd981913..2eec3f876 100644 --- a/x/did/types/genesis.pb.go +++ b/x/did/types/genesis.pb.go @@ -4,6 +4,7 @@ package types import ( + encoding_binary "encoding/binary" fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" @@ -24,6 +25,155 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// DIDNamespace define the different namespaces of DID +type DIDNamespace int32 + +const ( + DIDNamespace_DID_NAMESPACE_UNSPECIFIED DIDNamespace = 0 + DIDNamespace_DID_NAMESPACE_IPFS DIDNamespace = 1 + DIDNamespace_DID_NAMESPACE_SONR DIDNamespace = 2 + DIDNamespace_DID_NAMESPACE_BITCOIN DIDNamespace = 3 + DIDNamespace_DID_NAMESPACE_ETHEREUM DIDNamespace = 4 + DIDNamespace_DID_NAMESPACE_IBC DIDNamespace = 5 +) + +var DIDNamespace_name = map[int32]string{ + 0: "DID_NAMESPACE_UNSPECIFIED", + 1: "DID_NAMESPACE_IPFS", + 2: "DID_NAMESPACE_SONR", + 3: "DID_NAMESPACE_BITCOIN", + 4: "DID_NAMESPACE_ETHEREUM", + 5: "DID_NAMESPACE_IBC", +} + +var DIDNamespace_value = map[string]int32{ + "DID_NAMESPACE_UNSPECIFIED": 0, + "DID_NAMESPACE_IPFS": 1, + "DID_NAMESPACE_SONR": 2, + "DID_NAMESPACE_BITCOIN": 3, + "DID_NAMESPACE_ETHEREUM": 4, + "DID_NAMESPACE_IBC": 5, +} + +func (x DIDNamespace) String() string { + return proto.EnumName(DIDNamespace_name, int32(x)) +} + +func (DIDNamespace) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_fda181cae44f7c00, []int{0} +} + +// KeyKTind defines the kind of key +type KeyType int32 + +const ( + KeyType_KEY_TYPE_UNSPECIFIED KeyType = 0 + // Blockchain key types + KeyType_KEY_TYPE_SECP256K1 KeyType = 1 + KeyType_KEY_TYPE_ED25519 KeyType = 2 + KeyType_KEY_TYPE_KECCAK KeyType = 3 + KeyType_KEY_TYPE_BLS12381 KeyType = 4 + KeyType_KEY_TYPE_X25519 KeyType = 5 + KeyType_KEY_TYPE_SCHNORR KeyType = 6 + // Webauthn and FIDO key types + KeyType_KEY_TYPE_WEBAUTHN KeyType = 7 + KeyType_KEY_TYPE_FIDO KeyType = 8 +) + +var KeyType_name = map[int32]string{ + 0: "KEY_TYPE_UNSPECIFIED", + 1: "KEY_TYPE_SECP256K1", + 2: "KEY_TYPE_ED25519", + 3: "KEY_TYPE_KECCAK", + 4: "KEY_TYPE_BLS12381", + 5: "KEY_TYPE_X25519", + 6: "KEY_TYPE_SCHNORR", + 7: "KEY_TYPE_WEBAUTHN", + 8: "KEY_TYPE_FIDO", +} + +var KeyType_value = map[string]int32{ + "KEY_TYPE_UNSPECIFIED": 0, + "KEY_TYPE_SECP256K1": 1, + "KEY_TYPE_ED25519": 2, + "KEY_TYPE_KECCAK": 3, + "KEY_TYPE_BLS12381": 4, + "KEY_TYPE_X25519": 5, + "KEY_TYPE_SCHNORR": 6, + "KEY_TYPE_WEBAUTHN": 7, + "KEY_TYPE_FIDO": 8, +} + +func (x KeyType) String() string { + return proto.EnumName(KeyType_name, int32(x)) +} + +func (KeyType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_fda181cae44f7c00, []int{1} +} + +// PermissionScope define the Capabilities Controllers can grant for Services +type PermissionScope int32 + +const ( + PermissionScope_PERMISSION_SCOPE_UNSPECIFIED PermissionScope = 0 + PermissionScope_PERMISSION_SCOPE_BASIC_INFO PermissionScope = 1 + PermissionScope_PERMISSION_SCOPE_RECORDS_READ PermissionScope = 2 + PermissionScope_PERMISSION_SCOPE_RECORDS_WRITE PermissionScope = 3 + PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_READ PermissionScope = 4 + PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_WRITE PermissionScope = 5 + PermissionScope_PERMISSION_SCOPE_WALLETS_READ PermissionScope = 6 + PermissionScope_PERMISSION_SCOPE_WALLETS_CREATE PermissionScope = 7 + PermissionScope_PERMISSION_SCOPE_WALLETS_SUBSCRIBE PermissionScope = 8 + PermissionScope_PERMISSION_SCOPE_WALLETS_UPDATE PermissionScope = 9 + PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_VERIFY PermissionScope = 10 + PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_BROADCAST PermissionScope = 11 + PermissionScope_PERMISSION_SCOPE_ADMIN_USER PermissionScope = 12 + PermissionScope_PERMISSION_SCOPE_ADMIN_VALIDATOR PermissionScope = 13 +) + +var PermissionScope_name = map[int32]string{ + 0: "PERMISSION_SCOPE_UNSPECIFIED", + 1: "PERMISSION_SCOPE_BASIC_INFO", + 2: "PERMISSION_SCOPE_RECORDS_READ", + 3: "PERMISSION_SCOPE_RECORDS_WRITE", + 4: "PERMISSION_SCOPE_TRANSACTIONS_READ", + 5: "PERMISSION_SCOPE_TRANSACTIONS_WRITE", + 6: "PERMISSION_SCOPE_WALLETS_READ", + 7: "PERMISSION_SCOPE_WALLETS_CREATE", + 8: "PERMISSION_SCOPE_WALLETS_SUBSCRIBE", + 9: "PERMISSION_SCOPE_WALLETS_UPDATE", + 10: "PERMISSION_SCOPE_TRANSACTIONS_VERIFY", + 11: "PERMISSION_SCOPE_TRANSACTIONS_BROADCAST", + 12: "PERMISSION_SCOPE_ADMIN_USER", + 13: "PERMISSION_SCOPE_ADMIN_VALIDATOR", +} + +var PermissionScope_value = map[string]int32{ + "PERMISSION_SCOPE_UNSPECIFIED": 0, + "PERMISSION_SCOPE_BASIC_INFO": 1, + "PERMISSION_SCOPE_RECORDS_READ": 2, + "PERMISSION_SCOPE_RECORDS_WRITE": 3, + "PERMISSION_SCOPE_TRANSACTIONS_READ": 4, + "PERMISSION_SCOPE_TRANSACTIONS_WRITE": 5, + "PERMISSION_SCOPE_WALLETS_READ": 6, + "PERMISSION_SCOPE_WALLETS_CREATE": 7, + "PERMISSION_SCOPE_WALLETS_SUBSCRIBE": 8, + "PERMISSION_SCOPE_WALLETS_UPDATE": 9, + "PERMISSION_SCOPE_TRANSACTIONS_VERIFY": 10, + "PERMISSION_SCOPE_TRANSACTIONS_BROADCAST": 11, + "PERMISSION_SCOPE_ADMIN_USER": 12, + "PERMISSION_SCOPE_ADMIN_VALIDATOR": 13, +} + +func (x PermissionScope) String() string { + return proto.EnumName(PermissionScope_name, int32(x)) +} + +func (PermissionScope) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_fda181cae44f7c00, []int{2} +} + // GenesisState defines the module genesis state type GenesisState struct { // Params defines all the parameters of the module. @@ -76,6 +226,8 @@ type Params struct { WhitelistedAssets []*AssetInfo `protobuf:"bytes,1,rep,name=whitelisted_assets,json=whitelistedAssets,proto3" json:"whitelisted_assets,omitempty"` // Whitelisted Blockchains WhitelistedChains []*ChainInfo `protobuf:"bytes,2,rep,name=whitelisted_chains,json=whitelistedChains,proto3" json:"whitelisted_chains,omitempty"` + // Whitelisted Key Types + AllowedPublicKeys []*KeyInfo `protobuf:"bytes,3,rep,name=allowed_public_keys,json=allowedPublicKeys,proto3" json:"allowed_public_keys,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -124,34 +276,633 @@ func (m *Params) GetWhitelistedChains() []*ChainInfo { return nil } +func (m *Params) GetAllowedPublicKeys() []*KeyInfo { + if m != nil { + return m.AllowedPublicKeys + } + return nil +} + +// AssetInfo defines the asset info +type AssetInfo struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` + AssetType string `protobuf:"bytes,4,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + OriginChain string `protobuf:"bytes,5,opt,name=origin_chain,json=originChain,proto3" json:"origin_chain,omitempty"` + OriginDenom string `protobuf:"bytes,6,opt,name=origin_denom,json=originDenom,proto3" json:"origin_denom,omitempty"` + Decimals int32 `protobuf:"varint,7,opt,name=decimals,proto3" json:"decimals,omitempty"` + Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` + ImageUrl string `protobuf:"bytes,9,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"` + CoingeckoId string `protobuf:"bytes,10,opt,name=coingecko_id,json=coingeckoId,proto3" json:"coingecko_id,omitempty"` + IsEnabled bool `protobuf:"varint,11,opt,name=is_enabled,json=isEnabled,proto3" json:"is_enabled,omitempty"` + IbcPath string `protobuf:"bytes,12,opt,name=ibc_path,json=ibcPath,proto3" json:"ibc_path,omitempty"` + IbcChannel string `protobuf:"bytes,13,opt,name=ibc_channel,json=ibcChannel,proto3" json:"ibc_channel,omitempty"` + IbcPort string `protobuf:"bytes,14,opt,name=ibc_port,json=ibcPort,proto3" json:"ibc_port,omitempty"` +} + +func (m *AssetInfo) Reset() { *m = AssetInfo{} } +func (m *AssetInfo) String() string { return proto.CompactTextString(m) } +func (*AssetInfo) ProtoMessage() {} +func (*AssetInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_fda181cae44f7c00, []int{2} +} +func (m *AssetInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AssetInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AssetInfo.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 *AssetInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_AssetInfo.Merge(m, src) +} +func (m *AssetInfo) XXX_Size() int { + return m.Size() +} +func (m *AssetInfo) XXX_DiscardUnknown() { + xxx_messageInfo_AssetInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_AssetInfo proto.InternalMessageInfo + +func (m *AssetInfo) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *AssetInfo) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *AssetInfo) GetSymbol() string { + if m != nil { + return m.Symbol + } + return "" +} + +func (m *AssetInfo) GetAssetType() string { + if m != nil { + return m.AssetType + } + return "" +} + +func (m *AssetInfo) GetOriginChain() string { + if m != nil { + return m.OriginChain + } + return "" +} + +func (m *AssetInfo) GetOriginDenom() string { + if m != nil { + return m.OriginDenom + } + return "" +} + +func (m *AssetInfo) GetDecimals() int32 { + if m != nil { + return m.Decimals + } + return 0 +} + +func (m *AssetInfo) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *AssetInfo) GetImageUrl() string { + if m != nil { + return m.ImageUrl + } + return "" +} + +func (m *AssetInfo) GetCoingeckoId() string { + if m != nil { + return m.CoingeckoId + } + return "" +} + +func (m *AssetInfo) GetIsEnabled() bool { + if m != nil { + return m.IsEnabled + } + return false +} + +func (m *AssetInfo) GetIbcPath() string { + if m != nil { + return m.IbcPath + } + return "" +} + +func (m *AssetInfo) GetIbcChannel() string { + if m != nil { + return m.IbcChannel + } + return "" +} + +func (m *AssetInfo) GetIbcPort() string { + if m != nil { + return m.IbcPort + } + return "" +} + +// ChainInfo defines the chain info +type ChainInfo struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Symbol string `protobuf:"bytes,4,opt,name=symbol,proto3" json:"symbol,omitempty"` + Bech32Prefix string `protobuf:"bytes,5,opt,name=bech32_prefix,json=bech32Prefix,proto3" json:"bech32_prefix,omitempty"` + GenesisTime string `protobuf:"bytes,6,opt,name=genesis_time,json=genesisTime,proto3" json:"genesis_time,omitempty"` + GrpcEndpoints []*ChainInfo_Endpoint `protobuf:"bytes,7,rep,name=grpc_endpoints,json=grpcEndpoints,proto3" json:"grpc_endpoints,omitempty"` + RestEndpoints []*ChainInfo_Endpoint `protobuf:"bytes,8,rep,name=rest_endpoints,json=restEndpoints,proto3" json:"rest_endpoints,omitempty"` + Explorer *ChainInfo_ExplorerInfo `protobuf:"bytes,9,opt,name=explorer,proto3" json:"explorer,omitempty"` + FeeInfo *ChainInfo_FeeInfo `protobuf:"bytes,10,opt,name=fee_info,json=feeInfo,proto3" json:"fee_info,omitempty"` +} + +func (m *ChainInfo) Reset() { *m = ChainInfo{} } +func (m *ChainInfo) String() string { return proto.CompactTextString(m) } +func (*ChainInfo) ProtoMessage() {} +func (*ChainInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_fda181cae44f7c00, []int{3} +} +func (m *ChainInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ChainInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ChainInfo.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 *ChainInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChainInfo.Merge(m, src) +} +func (m *ChainInfo) XXX_Size() int { + return m.Size() +} +func (m *ChainInfo) XXX_DiscardUnknown() { + xxx_messageInfo_ChainInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_ChainInfo proto.InternalMessageInfo + +func (m *ChainInfo) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *ChainInfo) GetChainId() string { + if m != nil { + return m.ChainId + } + return "" +} + +func (m *ChainInfo) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *ChainInfo) GetSymbol() string { + if m != nil { + return m.Symbol + } + return "" +} + +func (m *ChainInfo) GetBech32Prefix() string { + if m != nil { + return m.Bech32Prefix + } + return "" +} + +func (m *ChainInfo) GetGenesisTime() string { + if m != nil { + return m.GenesisTime + } + return "" +} + +func (m *ChainInfo) GetGrpcEndpoints() []*ChainInfo_Endpoint { + if m != nil { + return m.GrpcEndpoints + } + return nil +} + +func (m *ChainInfo) GetRestEndpoints() []*ChainInfo_Endpoint { + if m != nil { + return m.RestEndpoints + } + return nil +} + +func (m *ChainInfo) GetExplorer() *ChainInfo_ExplorerInfo { + if m != nil { + return m.Explorer + } + return nil +} + +func (m *ChainInfo) GetFeeInfo() *ChainInfo_FeeInfo { + if m != nil { + return m.FeeInfo + } + return nil +} + +// Endpoint defines an endpoint +type ChainInfo_Endpoint struct { + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + IsPrimary bool `protobuf:"varint,2,opt,name=is_primary,json=isPrimary,proto3" json:"is_primary,omitempty"` +} + +func (m *ChainInfo_Endpoint) Reset() { *m = ChainInfo_Endpoint{} } +func (m *ChainInfo_Endpoint) String() string { return proto.CompactTextString(m) } +func (*ChainInfo_Endpoint) ProtoMessage() {} +func (*ChainInfo_Endpoint) Descriptor() ([]byte, []int) { + return fileDescriptor_fda181cae44f7c00, []int{3, 0} +} +func (m *ChainInfo_Endpoint) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ChainInfo_Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ChainInfo_Endpoint.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 *ChainInfo_Endpoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChainInfo_Endpoint.Merge(m, src) +} +func (m *ChainInfo_Endpoint) XXX_Size() int { + return m.Size() +} +func (m *ChainInfo_Endpoint) XXX_DiscardUnknown() { + xxx_messageInfo_ChainInfo_Endpoint.DiscardUnknown(m) +} + +var xxx_messageInfo_ChainInfo_Endpoint proto.InternalMessageInfo + +func (m *ChainInfo_Endpoint) GetUrl() string { + if m != nil { + return m.Url + } + return "" +} + +func (m *ChainInfo_Endpoint) GetIsPrimary() bool { + if m != nil { + return m.IsPrimary + } + return false +} + +// ExplorerInfo defines the explorer info +type ChainInfo_ExplorerInfo struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` +} + +func (m *ChainInfo_ExplorerInfo) Reset() { *m = ChainInfo_ExplorerInfo{} } +func (m *ChainInfo_ExplorerInfo) String() string { return proto.CompactTextString(m) } +func (*ChainInfo_ExplorerInfo) ProtoMessage() {} +func (*ChainInfo_ExplorerInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_fda181cae44f7c00, []int{3, 1} +} +func (m *ChainInfo_ExplorerInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ChainInfo_ExplorerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ChainInfo_ExplorerInfo.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 *ChainInfo_ExplorerInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChainInfo_ExplorerInfo.Merge(m, src) +} +func (m *ChainInfo_ExplorerInfo) XXX_Size() int { + return m.Size() +} +func (m *ChainInfo_ExplorerInfo) XXX_DiscardUnknown() { + xxx_messageInfo_ChainInfo_ExplorerInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_ChainInfo_ExplorerInfo proto.InternalMessageInfo + +func (m *ChainInfo_ExplorerInfo) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *ChainInfo_ExplorerInfo) GetUrl() string { + if m != nil { + return m.Url + } + return "" +} + +// FeeInfo defines a fee info +type ChainInfo_FeeInfo struct { + BaseDenom string `protobuf:"bytes,1,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty"` + FeeRates []string `protobuf:"bytes,2,rep,name=fee_rates,json=feeRates,proto3" json:"fee_rates,omitempty"` + InitGasLimit int32 `protobuf:"varint,3,opt,name=init_gas_limit,json=initGasLimit,proto3" json:"init_gas_limit,omitempty"` + IsSimulable bool `protobuf:"varint,4,opt,name=is_simulable,json=isSimulable,proto3" json:"is_simulable,omitempty"` + GasMultiply float64 `protobuf:"fixed64,5,opt,name=gas_multiply,json=gasMultiply,proto3" json:"gas_multiply,omitempty"` +} + +func (m *ChainInfo_FeeInfo) Reset() { *m = ChainInfo_FeeInfo{} } +func (m *ChainInfo_FeeInfo) String() string { return proto.CompactTextString(m) } +func (*ChainInfo_FeeInfo) ProtoMessage() {} +func (*ChainInfo_FeeInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_fda181cae44f7c00, []int{3, 2} +} +func (m *ChainInfo_FeeInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ChainInfo_FeeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ChainInfo_FeeInfo.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 *ChainInfo_FeeInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChainInfo_FeeInfo.Merge(m, src) +} +func (m *ChainInfo_FeeInfo) XXX_Size() int { + return m.Size() +} +func (m *ChainInfo_FeeInfo) XXX_DiscardUnknown() { + xxx_messageInfo_ChainInfo_FeeInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_ChainInfo_FeeInfo proto.InternalMessageInfo + +func (m *ChainInfo_FeeInfo) GetBaseDenom() string { + if m != nil { + return m.BaseDenom + } + return "" +} + +func (m *ChainInfo_FeeInfo) GetFeeRates() []string { + if m != nil { + return m.FeeRates + } + return nil +} + +func (m *ChainInfo_FeeInfo) GetInitGasLimit() int32 { + if m != nil { + return m.InitGasLimit + } + return 0 +} + +func (m *ChainInfo_FeeInfo) GetIsSimulable() bool { + if m != nil { + return m.IsSimulable + } + return false +} + +func (m *ChainInfo_FeeInfo) GetGasMultiply() float64 { + if m != nil { + return m.GasMultiply + } + return 0 +} + +// KeyInfo defines information for accepted PubKey types +type KeyInfo struct { + Kind KeyType `protobuf:"varint,1,opt,name=kind,proto3,enum=did.v1.KeyType" json:"kind,omitempty"` + Algorithm string `protobuf:"bytes,2,opt,name=algorithm,proto3" json:"algorithm,omitempty"` + Curve string `protobuf:"bytes,3,opt,name=curve,proto3" json:"curve,omitempty"` + Encoding string `protobuf:"bytes,4,opt,name=encoding,proto3" json:"encoding,omitempty"` +} + +func (m *KeyInfo) Reset() { *m = KeyInfo{} } +func (m *KeyInfo) String() string { return proto.CompactTextString(m) } +func (*KeyInfo) ProtoMessage() {} +func (*KeyInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_fda181cae44f7c00, []int{4} +} +func (m *KeyInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *KeyInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_KeyInfo.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 *KeyInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_KeyInfo.Merge(m, src) +} +func (m *KeyInfo) XXX_Size() int { + return m.Size() +} +func (m *KeyInfo) XXX_DiscardUnknown() { + xxx_messageInfo_KeyInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_KeyInfo proto.InternalMessageInfo + +func (m *KeyInfo) GetKind() KeyType { + if m != nil { + return m.Kind + } + return KeyType_KEY_TYPE_UNSPECIFIED +} + +func (m *KeyInfo) GetAlgorithm() string { + if m != nil { + return m.Algorithm + } + return "" +} + +func (m *KeyInfo) GetCurve() string { + if m != nil { + return m.Curve + } + return "" +} + +func (m *KeyInfo) GetEncoding() string { + if m != nil { + return m.Encoding + } + return "" +} + func init() { + proto.RegisterEnum("did.v1.DIDNamespace", DIDNamespace_name, DIDNamespace_value) + proto.RegisterEnum("did.v1.KeyType", KeyType_name, KeyType_value) + proto.RegisterEnum("did.v1.PermissionScope", PermissionScope_name, PermissionScope_value) proto.RegisterType((*GenesisState)(nil), "did.v1.GenesisState") proto.RegisterType((*Params)(nil), "did.v1.Params") + proto.RegisterType((*AssetInfo)(nil), "did.v1.AssetInfo") + proto.RegisterType((*ChainInfo)(nil), "did.v1.ChainInfo") + proto.RegisterType((*ChainInfo_Endpoint)(nil), "did.v1.ChainInfo.Endpoint") + proto.RegisterType((*ChainInfo_ExplorerInfo)(nil), "did.v1.ChainInfo.ExplorerInfo") + proto.RegisterType((*ChainInfo_FeeInfo)(nil), "did.v1.ChainInfo.FeeInfo") + proto.RegisterType((*KeyInfo)(nil), "did.v1.KeyInfo") } func init() { proto.RegisterFile("did/v1/genesis.proto", fileDescriptor_fda181cae44f7c00) } var fileDescriptor_fda181cae44f7c00 = []byte{ - // 289 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x49, 0xc9, 0x4c, 0xd1, - 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, - 0x17, 0x62, 0x4b, 0xc9, 0x4c, 0xd1, 0x2b, 0x33, 0x94, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x0b, - 0xe9, 0x83, 0x58, 0x10, 0x59, 0x29, 0xc1, 0xc4, 0xdc, 0xcc, 0xbc, 0x7c, 0x7d, 0x30, 0x09, 0x15, - 0x12, 0x82, 0x1a, 0x53, 0x52, 0x59, 0x90, 0x0a, 0x35, 0x44, 0xc9, 0x86, 0x8b, 0xc7, 0x1d, 0x62, - 0x6a, 0x70, 0x49, 0x62, 0x49, 0xaa, 0x90, 0x0e, 0x17, 0x5b, 0x41, 0x62, 0x51, 0x62, 0x6e, 0xb1, - 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xb7, 0x11, 0x9f, 0x1e, 0xc4, 0x16, 0xbd, 0x00, 0xb0, 0xa8, 0x13, - 0xcb, 0x89, 0x7b, 0xf2, 0x0c, 0x41, 0x50, 0x35, 0x4a, 0x4b, 0x19, 0xb9, 0xd8, 0x20, 0x12, 0x42, - 0x0e, 0x5c, 0x42, 0xe5, 0x19, 0x99, 0x25, 0xa9, 0x39, 0x99, 0xc5, 0x25, 0xa9, 0x29, 0xf1, 0x89, - 0xc5, 0xc5, 0xa9, 0x25, 0x20, 0x43, 0x98, 0x35, 0xb8, 0x8d, 0x04, 0x61, 0x86, 0x38, 0x82, 0x44, - 0x3d, 0xf3, 0xd2, 0xf2, 0x83, 0x04, 0x91, 0x14, 0x83, 0x45, 0x31, 0x4c, 0x48, 0xce, 0x48, 0xcc, - 0xcc, 0x2b, 0x96, 0x60, 0x42, 0x35, 0xc1, 0x19, 0x24, 0x8a, 0x61, 0x02, 0x58, 0xb4, 0xd8, 0x4a, - 0x7c, 0xc6, 0x02, 0x79, 0x86, 0x17, 0x0b, 0xe4, 0x19, 0xbb, 0x9e, 0x6f, 0xd0, 0xe2, 0x02, 0xf9, - 0x16, 0xe2, 0x4e, 0x27, 0x9b, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, - 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x52, - 0x4a, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0xcf, 0x2b, 0xce, 0xcf, - 0x2b, 0xd2, 0xcf, 0x28, 0x4f, 0xac, 0xd4, 0xaf, 0xd0, 0x07, 0x69, 0x07, 0x87, 0x54, 0x12, 0x1b, - 0x38, 0xa8, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x77, 0x5b, 0x51, 0x23, 0x87, 0x01, 0x00, - 0x00, + // 1336 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x96, 0xcd, 0x6e, 0xdb, 0xc6, + 0x16, 0xc7, 0x4d, 0x7d, 0xeb, 0x48, 0x76, 0xe8, 0x89, 0x93, 0x4b, 0x2b, 0x89, 0xec, 0xd8, 0xc1, + 0x8d, 0xe1, 0x7b, 0x61, 0xc1, 0x4a, 0x52, 0xb4, 0x69, 0x80, 0x96, 0xa2, 0xe8, 0x84, 0xb0, 0x2d, + 0x09, 0xa4, 0x9c, 0x34, 0xdd, 0x10, 0x14, 0x39, 0x96, 0x06, 0xe1, 0x17, 0x38, 0x74, 0x12, 0x6d, + 0xfa, 0x00, 0x5d, 0x75, 0xd9, 0x5d, 0x83, 0x6e, 0xbb, 0x69, 0xdf, 0x22, 0xdd, 0x05, 0x5d, 0x75, + 0x55, 0x14, 0x09, 0xd0, 0xf6, 0x31, 0x8a, 0x19, 0x52, 0x8a, 0x54, 0x39, 0xee, 0x46, 0xe0, 0xfc, + 0xce, 0xff, 0xfc, 0xe7, 0xe3, 0x9c, 0x19, 0x08, 0xd6, 0x1c, 0xe2, 0x34, 0x9e, 0xef, 0x37, 0x86, + 0xd8, 0xc7, 0x94, 0xd0, 0xbd, 0x30, 0x0a, 0xe2, 0x00, 0x15, 0x1c, 0xe2, 0xec, 0x3d, 0xdf, 0xaf, + 0xad, 0x0d, 0x83, 0x61, 0xc0, 0x51, 0x83, 0x7d, 0x25, 0xd1, 0xda, 0xaa, 0xe5, 0x11, 0x3f, 0x68, + 0xf0, 0xdf, 0x04, 0x6d, 0x3d, 0x80, 0xea, 0xc3, 0xc4, 0xc1, 0x88, 0xad, 0x18, 0xa3, 0xff, 0x43, + 0x21, 0xb4, 0x22, 0xcb, 0xa3, 0x92, 0xb0, 0x29, 0xec, 0x54, 0x9a, 0x2b, 0x7b, 0x89, 0xe3, 0x5e, + 0x8f, 0xd3, 0x56, 0xee, 0xf5, 0x6f, 0x1b, 0x4b, 0x7a, 0xaa, 0xd9, 0xfa, 0x43, 0x80, 0x42, 0x12, + 0x40, 0x9f, 0x03, 0x7a, 0x31, 0x22, 0x31, 0x76, 0x09, 0x8d, 0xb1, 0x63, 0x5a, 0x94, 0xe2, 0x98, + 0x99, 0x64, 0x77, 0x2a, 0xcd, 0xd5, 0x89, 0x89, 0xcc, 0xa8, 0xe6, 0x9f, 0x06, 0xfa, 0xea, 0x8c, + 0x98, 0xd3, 0x05, 0x07, 0x7b, 0x64, 0x11, 0x9f, 0x4a, 0x99, 0x79, 0x07, 0x85, 0xd1, 0x05, 0x07, + 0x4e, 0x29, 0xfa, 0x0c, 0x2e, 0x5b, 0xae, 0x1b, 0xbc, 0xc0, 0x8e, 0x19, 0x9e, 0x0d, 0x5c, 0x62, + 0x9b, 0xcf, 0xf0, 0x98, 0x4a, 0x59, 0x6e, 0x71, 0x69, 0x62, 0x71, 0x88, 0xc7, 0x89, 0x41, 0xaa, + 0xed, 0x71, 0xe9, 0x21, 0x1e, 0xd3, 0xfb, 0xff, 0xf9, 0xf6, 0xd5, 0xc6, 0xd2, 0x5f, 0xaf, 0x36, + 0x84, 0xaf, 0xff, 0xfc, 0x71, 0x17, 0xd8, 0x09, 0xa7, 0x1b, 0xfd, 0x3e, 0x0b, 0xe5, 0xe9, 0xe2, + 0xd1, 0x0a, 0x64, 0x88, 0xc3, 0x0f, 0xa8, 0xac, 0x67, 0x88, 0x83, 0xd6, 0x20, 0xef, 0x60, 0x3f, + 0xf0, 0xa4, 0x0c, 0x47, 0xc9, 0x00, 0x5d, 0x85, 0x02, 0x1d, 0x7b, 0x83, 0xc0, 0x95, 0xb2, 0x1c, + 0xa7, 0x23, 0x74, 0x03, 0x80, 0x9f, 0x8e, 0x19, 0x8f, 0x43, 0x2c, 0xe5, 0x78, 0xac, 0xcc, 0x49, + 0x7f, 0x1c, 0x62, 0x74, 0x13, 0xaa, 0x41, 0x44, 0x86, 0xc4, 0x4f, 0x4e, 0x40, 0xca, 0x73, 0x41, + 0x25, 0x61, 0x7c, 0xa3, 0x33, 0x92, 0x64, 0xda, 0xc2, 0xac, 0xa4, 0xcd, 0x27, 0xaf, 0x41, 0xc9, + 0xc1, 0x36, 0xf1, 0x2c, 0x97, 0x4a, 0xc5, 0x4d, 0x61, 0x27, 0xaf, 0x4f, 0xc7, 0x68, 0x13, 0x2a, + 0x0e, 0xa6, 0x76, 0x44, 0xc2, 0x98, 0x04, 0xbe, 0x54, 0x4a, 0xb2, 0x67, 0x10, 0xba, 0x06, 0x65, + 0xe2, 0x59, 0x43, 0x6c, 0x9e, 0x45, 0xae, 0x54, 0xe6, 0xf1, 0x12, 0x07, 0x27, 0x91, 0xcb, 0x66, + 0xb7, 0x03, 0xe2, 0x0f, 0xb1, 0xfd, 0x2c, 0x30, 0x89, 0x23, 0x41, 0x92, 0x3f, 0x65, 0x9a, 0xc3, + 0xb6, 0x48, 0xa8, 0x89, 0x7d, 0x6b, 0xe0, 0x62, 0x47, 0xaa, 0x6c, 0x0a, 0x3b, 0x25, 0xbd, 0x4c, + 0xa8, 0x9a, 0x00, 0xb4, 0x0e, 0x25, 0x32, 0xb0, 0xcd, 0xd0, 0x8a, 0x47, 0x52, 0x95, 0x67, 0x17, + 0xc9, 0xc0, 0xee, 0x59, 0xf1, 0x08, 0x6d, 0x40, 0x85, 0x85, 0xec, 0x91, 0xe5, 0xfb, 0xd8, 0x95, + 0x96, 0x79, 0x14, 0xc8, 0xc0, 0x56, 0x12, 0x32, 0xcd, 0x0d, 0xa2, 0x58, 0x5a, 0x79, 0x9f, 0x1b, + 0x44, 0xf1, 0xd6, 0xcf, 0x79, 0x28, 0x4f, 0xfb, 0x63, 0xa1, 0x48, 0xeb, 0x50, 0xe2, 0x07, 0xca, + 0x96, 0x9c, 0xd4, 0xa9, 0xc8, 0xc7, 0x9a, 0x83, 0x10, 0xe4, 0x7c, 0xcb, 0xc3, 0x69, 0x9d, 0xf8, + 0xf7, 0x4c, 0xf5, 0x72, 0x73, 0xd5, 0xdb, 0x86, 0xe5, 0x01, 0xb6, 0x47, 0x77, 0x9a, 0x66, 0x18, + 0xe1, 0x53, 0xf2, 0x32, 0xad, 0x4f, 0x35, 0x81, 0x3d, 0xce, 0xd8, 0x11, 0xa5, 0xf7, 0xd2, 0x8c, + 0x89, 0x87, 0x27, 0x05, 0x4a, 0x59, 0x9f, 0x78, 0x18, 0xc9, 0xb0, 0x32, 0x8c, 0x42, 0xdb, 0xc4, + 0xbe, 0x13, 0x06, 0xc4, 0x8f, 0x59, 0x99, 0x58, 0x9b, 0xd6, 0x16, 0x3a, 0x7d, 0x4f, 0x4d, 0x25, + 0xfa, 0x32, 0xcb, 0x98, 0x8c, 0x28, 0xb3, 0x88, 0x30, 0x8d, 0x67, 0x2c, 0x4a, 0xff, 0x6e, 0xc1, + 0x32, 0xde, 0x5b, 0xdc, 0x87, 0x12, 0x7e, 0x19, 0xba, 0x41, 0x84, 0x23, 0x5e, 0xe7, 0x4a, 0xb3, + 0x7e, 0x4e, 0x72, 0xaa, 0xe0, 0xb7, 0x66, 0xaa, 0x47, 0x77, 0xa1, 0x74, 0x8a, 0xb1, 0x49, 0xfc, + 0xd3, 0x80, 0xf7, 0x40, 0xa5, 0xb9, 0xbe, 0x98, 0x7b, 0x80, 0x31, 0x4f, 0x2b, 0x9e, 0x26, 0x1f, + 0xb5, 0x4f, 0xa1, 0x34, 0x99, 0x1e, 0x89, 0x90, 0x65, 0x0d, 0x96, 0xd4, 0x88, 0x7d, 0xa6, 0x8d, + 0x13, 0x46, 0xc4, 0xb3, 0xa2, 0x31, 0x2f, 0x13, 0x6f, 0x9c, 0x5e, 0x02, 0x6a, 0x77, 0xa1, 0x3a, + 0xbb, 0x98, 0x69, 0xe1, 0x84, 0x99, 0xc2, 0xa5, 0xa6, 0x99, 0xa9, 0x69, 0xed, 0x27, 0x01, 0x8a, + 0xe9, 0x3a, 0xd8, 0x04, 0x03, 0x8b, 0xe2, 0xf4, 0xe2, 0x24, 0x79, 0x65, 0x46, 0x92, 0x6b, 0x73, + 0x0d, 0xca, 0x6c, 0x4f, 0x91, 0x15, 0xe3, 0xe4, 0xe9, 0x29, 0xeb, 0x6c, 0x93, 0x3a, 0x1b, 0xa3, + 0x5b, 0xb0, 0x42, 0x7c, 0x12, 0x9b, 0x43, 0x8b, 0x9a, 0x2e, 0xf1, 0x48, 0xcc, 0x1b, 0x26, 0xaf, + 0x57, 0x19, 0x7d, 0x68, 0xd1, 0x23, 0xc6, 0x58, 0xed, 0x09, 0x35, 0x29, 0xf1, 0xce, 0x5c, 0xd6, + 0xed, 0xbc, 0x7d, 0x4a, 0x7a, 0x85, 0x50, 0x63, 0x82, 0x78, 0x7b, 0x58, 0xd4, 0xf4, 0xce, 0xdc, + 0x98, 0x84, 0xee, 0x98, 0xb7, 0x90, 0xa0, 0x57, 0x86, 0x16, 0x3d, 0x4e, 0xd1, 0xd6, 0x57, 0x50, + 0x4c, 0xdf, 0x29, 0xb4, 0x0d, 0xb9, 0x67, 0xc4, 0x4f, 0x5a, 0x79, 0x65, 0xee, 0x19, 0x63, 0xef, + 0x85, 0xce, 0x83, 0xe8, 0x3a, 0x94, 0x2d, 0x77, 0x18, 0x44, 0x24, 0x1e, 0x4d, 0x9e, 0xa1, 0xf7, + 0x80, 0x3d, 0x50, 0xf6, 0x59, 0xf4, 0x7c, 0xd2, 0xe1, 0xc9, 0x80, 0xbd, 0x11, 0xd8, 0xb7, 0x03, + 0x87, 0xf8, 0xc3, 0xb4, 0xc9, 0xa7, 0xe3, 0xdd, 0x1f, 0x04, 0xa8, 0xb6, 0xb5, 0x76, 0xc7, 0xf2, + 0x30, 0x0d, 0x2d, 0x1b, 0xa3, 0x1b, 0xb0, 0xde, 0xd6, 0xda, 0x66, 0x47, 0x3e, 0x56, 0x8d, 0x9e, + 0xac, 0xa8, 0xe6, 0x49, 0xc7, 0xe8, 0xa9, 0x8a, 0x76, 0xa0, 0xa9, 0x6d, 0x71, 0x09, 0x5d, 0x05, + 0x34, 0x1f, 0xd6, 0x7a, 0x07, 0x86, 0x28, 0x2c, 0x72, 0xa3, 0xdb, 0xd1, 0xc5, 0x0c, 0x5a, 0x87, + 0x2b, 0xf3, 0xbc, 0xa5, 0xf5, 0x95, 0xae, 0xd6, 0x11, 0xb3, 0xa8, 0x06, 0x57, 0xe7, 0x43, 0x6a, + 0xff, 0x91, 0xaa, 0xab, 0x27, 0xc7, 0x62, 0x0e, 0x5d, 0x81, 0xd5, 0x7f, 0x4c, 0xd3, 0x52, 0xc4, + 0xfc, 0xee, 0x2f, 0x02, 0x3f, 0x2e, 0xfe, 0x7e, 0x4a, 0xb0, 0x76, 0xa8, 0x3e, 0x35, 0xfb, 0x4f, + 0x7b, 0xe7, 0xac, 0x71, 0x1a, 0x31, 0x54, 0xa5, 0xd7, 0xbc, 0xf7, 0xd1, 0xe1, 0xbe, 0x28, 0xa0, + 0x35, 0x10, 0xa7, 0x5c, 0x6d, 0x37, 0xef, 0xdd, 0xdb, 0xff, 0x44, 0xcc, 0xa0, 0xcb, 0x70, 0x69, + 0x4a, 0x0f, 0x55, 0x45, 0x91, 0x0f, 0xc5, 0x2c, 0x9b, 0x7f, 0x0a, 0x5b, 0x47, 0xc6, 0x7e, 0xf3, + 0xce, 0xc7, 0xfb, 0x62, 0x6e, 0x4e, 0xfb, 0x45, 0x62, 0x90, 0x9f, 0xb3, 0x35, 0x94, 0x47, 0x9d, + 0xae, 0xae, 0x8b, 0x85, 0x39, 0x87, 0x27, 0x6a, 0x4b, 0x3e, 0xe9, 0x3f, 0xea, 0x88, 0x45, 0xb4, + 0x0a, 0xcb, 0x53, 0x7c, 0xa0, 0xb5, 0xbb, 0x62, 0x69, 0xf7, 0xbb, 0x1c, 0x5c, 0xea, 0xe1, 0xc8, + 0x23, 0x94, 0x92, 0xc0, 0x37, 0xec, 0x20, 0xc4, 0x68, 0x13, 0xae, 0xf7, 0x54, 0xfd, 0x58, 0x33, + 0x0c, 0xad, 0xdb, 0x31, 0x0d, 0xa5, 0xbb, 0xb0, 0xc9, 0x0d, 0xb8, 0xb6, 0xa0, 0x68, 0xc9, 0x86, + 0xa6, 0x98, 0x5a, 0xe7, 0xa0, 0x2b, 0x0a, 0xe8, 0x26, 0xdc, 0x58, 0x10, 0xe8, 0xaa, 0xd2, 0xd5, + 0xdb, 0x86, 0xa9, 0xab, 0x72, 0x5b, 0xcc, 0xa0, 0x2d, 0xa8, 0x7f, 0x50, 0xf2, 0x44, 0xd7, 0xfa, + 0xaa, 0x98, 0x45, 0xff, 0x85, 0xad, 0x05, 0x4d, 0x5f, 0x97, 0x3b, 0x86, 0xac, 0xf4, 0xb5, 0x6e, + 0x27, 0xf5, 0xca, 0xa1, 0xdb, 0xb0, 0x7d, 0xb1, 0x2e, 0x31, 0xcc, 0x9f, 0xbb, 0xae, 0x27, 0xf2, + 0xd1, 0x91, 0xda, 0x4f, 0xbd, 0x0a, 0x68, 0x1b, 0x36, 0x3e, 0x28, 0x51, 0x74, 0x55, 0xee, 0xab, + 0x62, 0xf1, 0xdc, 0x85, 0x4d, 0x44, 0xc6, 0x49, 0xcb, 0x50, 0x74, 0xad, 0xa5, 0x8a, 0xa5, 0x0b, + 0xcd, 0x4e, 0x7a, 0x6d, 0x66, 0x56, 0x46, 0x3b, 0x70, 0xeb, 0xe2, 0xd5, 0x3f, 0x56, 0x75, 0xed, + 0xe0, 0xa9, 0x08, 0xe8, 0x7f, 0x70, 0xfb, 0x62, 0x65, 0x4b, 0xef, 0xca, 0x6d, 0x45, 0x36, 0xfa, + 0x62, 0xe5, 0xdc, 0x22, 0xc9, 0xed, 0x63, 0xad, 0x63, 0x9e, 0x18, 0xaa, 0x2e, 0x56, 0xd1, 0x2d, + 0xd8, 0xfc, 0x80, 0xe0, 0xb1, 0x7c, 0xa4, 0xb5, 0xe5, 0x7e, 0x57, 0x17, 0x97, 0x5b, 0x0f, 0x5e, + 0xbf, 0xad, 0x0b, 0x6f, 0xde, 0xd6, 0x85, 0xdf, 0xdf, 0xd6, 0x85, 0x6f, 0xde, 0xd5, 0x97, 0xde, + 0xbc, 0xab, 0x2f, 0xfd, 0xfa, 0xae, 0xbe, 0xf4, 0xe5, 0xd6, 0x90, 0xc4, 0xa3, 0xb3, 0xc1, 0x9e, + 0x1d, 0x78, 0x8d, 0xc0, 0xa7, 0x81, 0x1f, 0x35, 0x46, 0x2f, 0xac, 0x71, 0xe3, 0x65, 0x83, 0xfd, + 0xa9, 0x61, 0x7f, 0x3c, 0xe8, 0xa0, 0xc0, 0xff, 0x01, 0xde, 0xf9, 0x3b, 0x00, 0x00, 0xff, 0xff, + 0x56, 0xab, 0x9f, 0xc0, 0x4a, 0x0a, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -189,6 +940,14 @@ func (this *Params) Equal(that interface{}) bool { return false } } + if len(this.AllowedPublicKeys) != len(that1.AllowedPublicKeys) { + return false + } + for i := range this.AllowedPublicKeys { + if !this.AllowedPublicKeys[i].Equal(that1.AllowedPublicKeys[i]) { + return false + } + } return true } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -244,6 +1003,20 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.AllowedPublicKeys) > 0 { + for iNdEx := len(m.AllowedPublicKeys) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AllowedPublicKeys[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } if len(m.WhitelistedChains) > 0 { for iNdEx := len(m.WhitelistedChains) - 1; iNdEx >= 0; iNdEx-- { { @@ -275,6 +1048,431 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *AssetInfo) 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 *AssetInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AssetInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.IbcPort) > 0 { + i -= len(m.IbcPort) + copy(dAtA[i:], m.IbcPort) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.IbcPort))) + i-- + dAtA[i] = 0x72 + } + if len(m.IbcChannel) > 0 { + i -= len(m.IbcChannel) + copy(dAtA[i:], m.IbcChannel) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.IbcChannel))) + i-- + dAtA[i] = 0x6a + } + if len(m.IbcPath) > 0 { + i -= len(m.IbcPath) + copy(dAtA[i:], m.IbcPath) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.IbcPath))) + i-- + dAtA[i] = 0x62 + } + if m.IsEnabled { + i-- + if m.IsEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } + if len(m.CoingeckoId) > 0 { + i -= len(m.CoingeckoId) + copy(dAtA[i:], m.CoingeckoId) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.CoingeckoId))) + i-- + dAtA[i] = 0x52 + } + if len(m.ImageUrl) > 0 { + i -= len(m.ImageUrl) + copy(dAtA[i:], m.ImageUrl) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.ImageUrl))) + i-- + dAtA[i] = 0x4a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x42 + } + if m.Decimals != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Decimals)) + i-- + dAtA[i] = 0x38 + } + if len(m.OriginDenom) > 0 { + i -= len(m.OriginDenom) + copy(dAtA[i:], m.OriginDenom) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.OriginDenom))) + i-- + dAtA[i] = 0x32 + } + if len(m.OriginChain) > 0 { + i -= len(m.OriginChain) + copy(dAtA[i:], m.OriginChain) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.OriginChain))) + i-- + dAtA[i] = 0x2a + } + if len(m.AssetType) > 0 { + i -= len(m.AssetType) + copy(dAtA[i:], m.AssetType) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.AssetType))) + i-- + dAtA[i] = 0x22 + } + if len(m.Symbol) > 0 { + i -= len(m.Symbol) + copy(dAtA[i:], m.Symbol) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Symbol))) + i-- + dAtA[i] = 0x1a + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ChainInfo) 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 *ChainInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChainInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.FeeInfo != nil { + { + size, err := m.FeeInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + if m.Explorer != nil { + { + size, err := m.Explorer.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + if len(m.RestEndpoints) > 0 { + for iNdEx := len(m.RestEndpoints) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.RestEndpoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + } + if len(m.GrpcEndpoints) > 0 { + for iNdEx := len(m.GrpcEndpoints) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.GrpcEndpoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if len(m.GenesisTime) > 0 { + i -= len(m.GenesisTime) + copy(dAtA[i:], m.GenesisTime) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.GenesisTime))) + i-- + dAtA[i] = 0x32 + } + if len(m.Bech32Prefix) > 0 { + i -= len(m.Bech32Prefix) + copy(dAtA[i:], m.Bech32Prefix) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Bech32Prefix))) + i-- + dAtA[i] = 0x2a + } + if len(m.Symbol) > 0 { + i -= len(m.Symbol) + copy(dAtA[i:], m.Symbol) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Symbol))) + i-- + dAtA[i] = 0x22 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x1a + } + if len(m.ChainId) > 0 { + i -= len(m.ChainId) + copy(dAtA[i:], m.ChainId) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.ChainId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ChainInfo_Endpoint) 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 *ChainInfo_Endpoint) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChainInfo_Endpoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.IsPrimary { + i-- + if m.IsPrimary { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.Url) > 0 { + i -= len(m.Url) + copy(dAtA[i:], m.Url) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Url))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ChainInfo_ExplorerInfo) 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 *ChainInfo_ExplorerInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChainInfo_ExplorerInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Url) > 0 { + i -= len(m.Url) + copy(dAtA[i:], m.Url) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Url))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ChainInfo_FeeInfo) 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 *ChainInfo_FeeInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChainInfo_FeeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GasMultiply != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.GasMultiply)))) + i-- + dAtA[i] = 0x29 + } + if m.IsSimulable { + i-- + if m.IsSimulable { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.InitGasLimit != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.InitGasLimit)) + i-- + dAtA[i] = 0x18 + } + if len(m.FeeRates) > 0 { + for iNdEx := len(m.FeeRates) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.FeeRates[iNdEx]) + copy(dAtA[i:], m.FeeRates[iNdEx]) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.FeeRates[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.BaseDenom) > 0 { + i -= len(m.BaseDenom) + copy(dAtA[i:], m.BaseDenom) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.BaseDenom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *KeyInfo) 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 *KeyInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *KeyInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Encoding) > 0 { + i -= len(m.Encoding) + copy(dAtA[i:], m.Encoding) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Encoding))) + i-- + dAtA[i] = 0x22 + } + if len(m.Curve) > 0 { + i -= len(m.Curve) + copy(dAtA[i:], m.Curve) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Curve))) + i-- + dAtA[i] = 0x1a + } + if len(m.Algorithm) > 0 { + i -= len(m.Algorithm) + copy(dAtA[i:], m.Algorithm) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Algorithm))) + i-- + dAtA[i] = 0x12 + } + if m.Kind != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Kind)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { offset -= sovGenesis(v) base := offset @@ -315,6 +1513,213 @@ func (m *Params) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } + if len(m.AllowedPublicKeys) > 0 { + for _, e := range m.AllowedPublicKeys { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *AssetInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Symbol) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.AssetType) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.OriginChain) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.OriginDenom) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if m.Decimals != 0 { + n += 1 + sovGenesis(uint64(m.Decimals)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.ImageUrl) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.CoingeckoId) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if m.IsEnabled { + n += 2 + } + l = len(m.IbcPath) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.IbcChannel) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.IbcPort) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + return n +} + +func (m *ChainInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.ChainId) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Symbol) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Bech32Prefix) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.GenesisTime) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if len(m.GrpcEndpoints) > 0 { + for _, e := range m.GrpcEndpoints { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.RestEndpoints) > 0 { + for _, e := range m.RestEndpoints { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if m.Explorer != nil { + l = m.Explorer.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + if m.FeeInfo != nil { + l = m.FeeInfo.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + return n +} + +func (m *ChainInfo_Endpoint) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Url) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if m.IsPrimary { + n += 2 + } + return n +} + +func (m *ChainInfo_ExplorerInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Url) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + return n +} + +func (m *ChainInfo_FeeInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.BaseDenom) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if len(m.FeeRates) > 0 { + for _, s := range m.FeeRates { + l = len(s) + n += 1 + l + sovGenesis(uint64(l)) + } + } + if m.InitGasLimit != 0 { + n += 1 + sovGenesis(uint64(m.InitGasLimit)) + } + if m.IsSimulable { + n += 2 + } + if m.GasMultiply != 0 { + n += 9 + } + return n +} + +func (m *KeyInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Kind != 0 { + n += 1 + sovGenesis(uint64(m.Kind)) + } + l = len(m.Algorithm) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Curve) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Encoding) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } return n } @@ -504,6 +1909,1440 @@ func (m *Params) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowedPublicKeys", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AllowedPublicKeys = append(m.AllowedPublicKeys, &KeyInfo{}) + if err := m.AllowedPublicKeys[len(m.AllowedPublicKeys)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AssetInfo) 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 ErrIntOverflowGenesis + } + 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: AssetInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AssetInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Symbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AssetType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AssetType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OriginChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OriginChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OriginDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OriginDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Decimals", wireType) + } + m.Decimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Decimals |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ImageUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ImageUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CoingeckoId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CoingeckoId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsEnabled = bool(v != 0) + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IbcPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IbcPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IbcChannel", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IbcChannel = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IbcPort", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IbcPort = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ChainInfo) 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 ErrIntOverflowGenesis + } + 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: ChainInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ChainInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChainId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Symbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bech32Prefix", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bech32Prefix = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GenesisTime", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GenesisTime = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GrpcEndpoints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GrpcEndpoints = append(m.GrpcEndpoints, &ChainInfo_Endpoint{}) + if err := m.GrpcEndpoints[len(m.GrpcEndpoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RestEndpoints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RestEndpoints = append(m.RestEndpoints, &ChainInfo_Endpoint{}) + if err := m.RestEndpoints[len(m.RestEndpoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Explorer", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Explorer == nil { + m.Explorer = &ChainInfo_ExplorerInfo{} + } + if err := m.Explorer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FeeInfo == nil { + m.FeeInfo = &ChainInfo_FeeInfo{} + } + if err := m.FeeInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ChainInfo_Endpoint) 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 ErrIntOverflowGenesis + } + 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: Endpoint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Endpoint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Url = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsPrimary", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsPrimary = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ChainInfo_ExplorerInfo) 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 ErrIntOverflowGenesis + } + 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: ExplorerInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExplorerInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Url = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ChainInfo_FeeInfo) 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 ErrIntOverflowGenesis + } + 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: FeeInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FeeInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BaseDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeRates", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FeeRates = append(m.FeeRates, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InitGasLimit", wireType) + } + m.InitGasLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.InitGasLimit |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsSimulable", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsSimulable = bool(v != 0) + case 5: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field GasMultiply", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.GasMultiply = float64(math.Float64frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *KeyInfo) 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 ErrIntOverflowGenesis + } + 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: KeyInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KeyInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + m.Kind = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Kind |= KeyType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Algorithm", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Algorithm = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Curve", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Curve = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Encoding", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Encoding = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/did/types/models.pb.go b/x/did/types/models.pb.go new file mode 100644 index 000000000..464f9c0a9 --- /dev/null +++ b/x/did/types/models.pb.go @@ -0,0 +1,3695 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: did/v1/models.proto + +package types + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// DID defines a parsed DID string +type DID struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Method DIDNamespace `protobuf:"varint,2,opt,name=method,proto3,enum=did.v1.DIDNamespace" json:"method,omitempty"` + Network string `protobuf:"bytes,3,opt,name=network,proto3" json:"network,omitempty"` + Identifier string `protobuf:"bytes,4,opt,name=identifier,proto3" json:"identifier,omitempty"` + Paths []string `protobuf:"bytes,5,rep,name=paths,proto3" json:"paths,omitempty"` +} + +func (m *DID) Reset() { *m = DID{} } +func (m *DID) String() string { return proto.CompactTextString(m) } +func (*DID) ProtoMessage() {} +func (*DID) Descriptor() ([]byte, []int) { + return fileDescriptor_739bb5ab5cb60751, []int{0} +} +func (m *DID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DID.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 *DID) XXX_Merge(src proto.Message) { + xxx_messageInfo_DID.Merge(m, src) +} +func (m *DID) XXX_Size() int { + return m.Size() +} +func (m *DID) XXX_DiscardUnknown() { + xxx_messageInfo_DID.DiscardUnknown(m) +} + +var xxx_messageInfo_DID proto.InternalMessageInfo + +func (m *DID) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *DID) GetMethod() DIDNamespace { + if m != nil { + return m.Method + } + return DIDNamespace_DID_NAMESPACE_UNSPECIFIED +} + +func (m *DID) GetNetwork() string { + if m != nil { + return m.Network + } + return "" +} + +func (m *DID) GetIdentifier() string { + if m != nil { + return m.Identifier + } + return "" +} + +func (m *DID) GetPaths() []string { + if m != nil { + return m.Paths + } + return nil +} + +// Credential defines a WebAuthn credential +type Credential struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + CredentialType string `protobuf:"bytes,2,opt,name=credential_type,json=credentialType,proto3" json:"credential_type,omitempty"` + CredentialId []byte `protobuf:"bytes,3,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"` + Transport []string `protobuf:"bytes,4,rep,name=transport,proto3" json:"transport,omitempty"` + Subject string `protobuf:"bytes,6,opt,name=subject,proto3" json:"subject,omitempty"` + Controller string `protobuf:"bytes,7,opt,name=controller,proto3" json:"controller,omitempty"` +} + +func (m *Credential) Reset() { *m = Credential{} } +func (m *Credential) String() string { return proto.CompactTextString(m) } +func (*Credential) ProtoMessage() {} +func (*Credential) Descriptor() ([]byte, []int) { + return fileDescriptor_739bb5ab5cb60751, []int{1} +} +func (m *Credential) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Credential) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Credential.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 *Credential) XXX_Merge(src proto.Message) { + xxx_messageInfo_Credential.Merge(m, src) +} +func (m *Credential) XXX_Size() int { + return m.Size() +} +func (m *Credential) XXX_DiscardUnknown() { + xxx_messageInfo_Credential.DiscardUnknown(m) +} + +var xxx_messageInfo_Credential proto.InternalMessageInfo + +func (m *Credential) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *Credential) GetCredentialType() string { + if m != nil { + return m.CredentialType + } + return "" +} + +func (m *Credential) GetCredentialId() []byte { + if m != nil { + return m.CredentialId + } + return nil +} + +func (m *Credential) GetTransport() []string { + if m != nil { + return m.Transport + } + return nil +} + +func (m *Credential) GetSubject() string { + if m != nil { + return m.Subject + } + return "" +} + +func (m *Credential) GetController() string { + if m != nil { + return m.Controller + } + return "" +} + +// Document defines a DID document +type Document struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + VerificationMethods []*VerificationMethod `protobuf:"bytes,2,rep,name=verification_methods,json=verificationMethods,proto3" json:"verification_methods,omitempty"` + Authentication []string `protobuf:"bytes,4,rep,name=authentication,proto3" json:"authentication,omitempty"` + AssertionMethod []string `protobuf:"bytes,5,rep,name=assertion_method,json=assertionMethod,proto3" json:"assertion_method,omitempty"` + CapabilityDelegation []string `protobuf:"bytes,7,rep,name=capability_delegation,json=capabilityDelegation,proto3" json:"capability_delegation,omitempty"` + CapabilityInvocation []string `protobuf:"bytes,8,rep,name=capability_invocation,json=capabilityInvocation,proto3" json:"capability_invocation,omitempty"` +} + +func (m *Document) Reset() { *m = Document{} } +func (m *Document) String() string { return proto.CompactTextString(m) } +func (*Document) ProtoMessage() {} +func (*Document) Descriptor() ([]byte, []int) { + return fileDescriptor_739bb5ab5cb60751, []int{2} +} +func (m *Document) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Document) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Document.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 *Document) XXX_Merge(src proto.Message) { + xxx_messageInfo_Document.Merge(m, src) +} +func (m *Document) XXX_Size() int { + return m.Size() +} +func (m *Document) XXX_DiscardUnknown() { + xxx_messageInfo_Document.DiscardUnknown(m) +} + +var xxx_messageInfo_Document proto.InternalMessageInfo + +func (m *Document) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *Document) GetVerificationMethods() []*VerificationMethod { + if m != nil { + return m.VerificationMethods + } + return nil +} + +func (m *Document) GetAuthentication() []string { + if m != nil { + return m.Authentication + } + return nil +} + +func (m *Document) GetAssertionMethod() []string { + if m != nil { + return m.AssertionMethod + } + return nil +} + +func (m *Document) GetCapabilityDelegation() []string { + if m != nil { + return m.CapabilityDelegation + } + return nil +} + +func (m *Document) GetCapabilityInvocation() []string { + if m != nil { + return m.CapabilityInvocation + } + return nil +} + +// Metadata defines additional information provided to a did +type Metadata struct { + OriginUri string `protobuf:"bytes,1,opt,name=origin_uri,json=originUri,proto3" json:"origin_uri,omitempty"` + Public map[string]string `protobuf:"bytes,2,rep,name=public,proto3" json:"public,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Private map[string]*Property `protobuf:"bytes,3,rep,name=private,proto3" json:"private,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *Metadata) Reset() { *m = Metadata{} } +func (m *Metadata) String() string { return proto.CompactTextString(m) } +func (*Metadata) ProtoMessage() {} +func (*Metadata) Descriptor() ([]byte, []int) { + return fileDescriptor_739bb5ab5cb60751, []int{3} +} +func (m *Metadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Metadata.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 *Metadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_Metadata.Merge(m, src) +} +func (m *Metadata) XXX_Size() int { + return m.Size() +} +func (m *Metadata) XXX_DiscardUnknown() { + xxx_messageInfo_Metadata.DiscardUnknown(m) +} + +var xxx_messageInfo_Metadata proto.InternalMessageInfo + +func (m *Metadata) GetOriginUri() string { + if m != nil { + return m.OriginUri + } + return "" +} + +func (m *Metadata) GetPublic() map[string]string { + if m != nil { + return m.Public + } + return nil +} + +func (m *Metadata) GetPrivate() map[string]*Property { + if m != nil { + return m.Private + } + return nil +} + +// Permissions contains a list of grants and access control rules for +// a Service. +type Permissions struct { + Grants []DIDNamespace `protobuf:"varint,1,rep,packed,name=grants,proto3,enum=did.v1.DIDNamespace" json:"grants,omitempty"` + Scopes []PermissionScope `protobuf:"varint,2,rep,packed,name=scopes,proto3,enum=did.v1.PermissionScope" json:"scopes,omitempty"` +} + +func (m *Permissions) Reset() { *m = Permissions{} } +func (m *Permissions) String() string { return proto.CompactTextString(m) } +func (*Permissions) ProtoMessage() {} +func (*Permissions) Descriptor() ([]byte, []int) { + return fileDescriptor_739bb5ab5cb60751, []int{4} +} +func (m *Permissions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Permissions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Permissions.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 *Permissions) XXX_Merge(src proto.Message) { + xxx_messageInfo_Permissions.Merge(m, src) +} +func (m *Permissions) XXX_Size() int { + return m.Size() +} +func (m *Permissions) XXX_DiscardUnknown() { + xxx_messageInfo_Permissions.DiscardUnknown(m) +} + +var xxx_messageInfo_Permissions proto.InternalMessageInfo + +func (m *Permissions) GetGrants() []DIDNamespace { + if m != nil { + return m.Grants + } + return nil +} + +func (m *Permissions) GetScopes() []PermissionScope { + if m != nil { + return m.Scopes + } + return nil +} + +// Profile defines an associated public identity for a did subject +type Profile struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` + Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"` + Credentials []*Credential `protobuf:"bytes,4,rep,name=credentials,proto3" json:"credentials,omitempty"` + Attestations []*VerificationMethod `protobuf:"bytes,5,rep,name=attestations,proto3" json:"attestations,omitempty"` + Metadata *Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` +} + +func (m *Profile) Reset() { *m = Profile{} } +func (m *Profile) String() string { return proto.CompactTextString(m) } +func (*Profile) ProtoMessage() {} +func (*Profile) Descriptor() ([]byte, []int) { + return fileDescriptor_739bb5ab5cb60751, []int{5} +} +func (m *Profile) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Profile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Profile.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 *Profile) XXX_Merge(src proto.Message) { + xxx_messageInfo_Profile.Merge(m, src) +} +func (m *Profile) XXX_Size() int { + return m.Size() +} +func (m *Profile) XXX_DiscardUnknown() { + xxx_messageInfo_Profile.DiscardUnknown(m) +} + +var xxx_messageInfo_Profile proto.InternalMessageInfo + +func (m *Profile) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *Profile) GetSubject() string { + if m != nil { + return m.Subject + } + return "" +} + +func (m *Profile) GetController() string { + if m != nil { + return m.Controller + } + return "" +} + +func (m *Profile) GetCredentials() []*Credential { + if m != nil { + return m.Credentials + } + return nil +} + +func (m *Profile) GetAttestations() []*VerificationMethod { + if m != nil { + return m.Attestations + } + return nil +} + +func (m *Profile) GetMetadata() *Metadata { + if m != nil { + return m.Metadata + } + return nil +} + +// Property defines a Zero-Knowledge accumulator which can be used to +// anonymously prove a given value to a DID subject +type Property struct { + Accumulator []byte `protobuf:"bytes,1,opt,name=accumulator,proto3" json:"accumulator,omitempty"` + Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` +} + +func (m *Property) Reset() { *m = Property{} } +func (m *Property) String() string { return proto.CompactTextString(m) } +func (*Property) ProtoMessage() {} +func (*Property) Descriptor() ([]byte, []int) { + return fileDescriptor_739bb5ab5cb60751, []int{6} +} +func (m *Property) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Property) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Property.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 *Property) XXX_Merge(src proto.Message) { + xxx_messageInfo_Property.Merge(m, src) +} +func (m *Property) XXX_Size() int { + return m.Size() +} +func (m *Property) XXX_DiscardUnknown() { + xxx_messageInfo_Property.DiscardUnknown(m) +} + +var xxx_messageInfo_Property proto.InternalMessageInfo + +func (m *Property) GetAccumulator() []byte { + if m != nil { + return m.Accumulator + } + return nil +} + +func (m *Property) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +// PubKey defines a public key for a did +type PubKey struct { + Namespace DIDNamespace `protobuf:"varint,1,opt,name=namespace,proto3,enum=did.v1.DIDNamespace" json:"namespace,omitempty"` + Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + Kind KeyType `protobuf:"varint,3,opt,name=kind,proto3,enum=did.v1.KeyType" json:"kind,omitempty"` + Multibase string `protobuf:"bytes,5,opt,name=multibase,proto3" json:"multibase,omitempty"` + Jwks map[string]string `protobuf:"bytes,6,rep,name=jwks,proto3" json:"jwks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *PubKey) Reset() { *m = PubKey{} } +func (m *PubKey) String() string { return proto.CompactTextString(m) } +func (*PubKey) ProtoMessage() {} +func (*PubKey) Descriptor() ([]byte, []int) { + return fileDescriptor_739bb5ab5cb60751, []int{7} +} +func (m *PubKey) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PubKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PubKey.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 *PubKey) XXX_Merge(src proto.Message) { + xxx_messageInfo_PubKey.Merge(m, src) +} +func (m *PubKey) XXX_Size() int { + return m.Size() +} +func (m *PubKey) XXX_DiscardUnknown() { + xxx_messageInfo_PubKey.DiscardUnknown(m) +} + +var xxx_messageInfo_PubKey proto.InternalMessageInfo + +func (m *PubKey) GetNamespace() DIDNamespace { + if m != nil { + return m.Namespace + } + return DIDNamespace_DID_NAMESPACE_UNSPECIFIED +} + +func (m *PubKey) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +func (m *PubKey) GetKind() KeyType { + if m != nil { + return m.Kind + } + return KeyType_KEY_TYPE_UNSPECIFIED +} + +func (m *PubKey) GetMultibase() string { + if m != nil { + return m.Multibase + } + return "" +} + +func (m *PubKey) GetJwks() map[string]string { + if m != nil { + return m.Jwks + } + return nil +} + +// VerificationMethod defines a verification method +type VerificationMethod struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` + PublicKey *PubKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` +} + +func (m *VerificationMethod) Reset() { *m = VerificationMethod{} } +func (m *VerificationMethod) String() string { return proto.CompactTextString(m) } +func (*VerificationMethod) ProtoMessage() {} +func (*VerificationMethod) Descriptor() ([]byte, []int) { + return fileDescriptor_739bb5ab5cb60751, []int{8} +} +func (m *VerificationMethod) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *VerificationMethod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_VerificationMethod.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 *VerificationMethod) XXX_Merge(src proto.Message) { + xxx_messageInfo_VerificationMethod.Merge(m, src) +} +func (m *VerificationMethod) XXX_Size() int { + return m.Size() +} +func (m *VerificationMethod) XXX_DiscardUnknown() { + xxx_messageInfo_VerificationMethod.DiscardUnknown(m) +} + +var xxx_messageInfo_VerificationMethod proto.InternalMessageInfo + +func (m *VerificationMethod) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *VerificationMethod) GetController() string { + if m != nil { + return m.Controller + } + return "" +} + +func (m *VerificationMethod) GetPublicKey() *PubKey { + if m != nil { + return m.PublicKey + } + return nil +} + +func init() { + proto.RegisterType((*DID)(nil), "did.v1.DID") + proto.RegisterType((*Credential)(nil), "did.v1.Credential") + proto.RegisterType((*Document)(nil), "did.v1.Document") + proto.RegisterType((*Metadata)(nil), "did.v1.Metadata") + proto.RegisterMapType((map[string]*Property)(nil), "did.v1.Metadata.PrivateEntry") + proto.RegisterMapType((map[string]string)(nil), "did.v1.Metadata.PublicEntry") + proto.RegisterType((*Permissions)(nil), "did.v1.Permissions") + proto.RegisterType((*Profile)(nil), "did.v1.Profile") + proto.RegisterType((*Property)(nil), "did.v1.Property") + proto.RegisterType((*PubKey)(nil), "did.v1.PubKey") + proto.RegisterMapType((map[string]string)(nil), "did.v1.PubKey.JwksEntry") + proto.RegisterType((*VerificationMethod)(nil), "did.v1.VerificationMethod") +} + +func init() { proto.RegisterFile("did/v1/models.proto", fileDescriptor_739bb5ab5cb60751) } + +var fileDescriptor_739bb5ab5cb60751 = []byte{ + // 861 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x4d, 0x6f, 0xe3, 0x44, + 0x18, 0xae, 0xed, 0x36, 0x1f, 0x6f, 0x42, 0x5a, 0xcd, 0x06, 0x61, 0x45, 0xbb, 0x51, 0xe4, 0x95, + 0x96, 0x22, 0x95, 0x44, 0x9b, 0x5d, 0x69, 0x01, 0xa1, 0x3d, 0x40, 0x38, 0x94, 0x52, 0x14, 0x99, + 0x8f, 0x03, 0x97, 0x68, 0x62, 0x4f, 0x93, 0xd9, 0xd8, 0x1e, 0x6b, 0x66, 0x9c, 0xe2, 0x7f, 0x81, + 0xc4, 0x2f, 0xe0, 0xc2, 0x0f, 0xe1, 0xc4, 0x71, 0x8f, 0x1c, 0x51, 0xfb, 0x23, 0xe0, 0x88, 0x3c, + 0xe3, 0xaf, 0xd6, 0xec, 0x4a, 0x7b, 0xf3, 0x3c, 0xcf, 0xf3, 0xbe, 0x7e, 0x3f, 0x67, 0xe0, 0x81, + 0x4f, 0xfd, 0xd9, 0xfe, 0xe9, 0x2c, 0x64, 0x3e, 0x09, 0xc4, 0x34, 0xe6, 0x4c, 0x32, 0xd4, 0xf2, + 0xa9, 0x3f, 0xdd, 0x3f, 0x1d, 0x0d, 0x73, 0x72, 0x43, 0x22, 0x22, 0x68, 0xce, 0x3a, 0xbf, 0x1a, + 0x60, 0x2d, 0xce, 0x17, 0x68, 0x00, 0x26, 0xf5, 0x6d, 0x63, 0x62, 0x9c, 0x76, 0x5d, 0x93, 0xfa, + 0xe8, 0x0c, 0x5a, 0x21, 0x91, 0x5b, 0xe6, 0xdb, 0xe6, 0xc4, 0x38, 0x1d, 0xcc, 0x87, 0x53, 0xed, + 0x66, 0xba, 0x38, 0x5f, 0x7c, 0x8b, 0x43, 0x22, 0x62, 0xec, 0x11, 0x37, 0xd7, 0x20, 0x1b, 0xda, + 0x11, 0x91, 0xd7, 0x8c, 0xef, 0x6c, 0x4b, 0xb9, 0x28, 0x8e, 0x68, 0x0c, 0x40, 0x7d, 0x12, 0x49, + 0x7a, 0x45, 0x09, 0xb7, 0x0f, 0x15, 0x59, 0x43, 0xd0, 0x10, 0x8e, 0x62, 0x2c, 0xb7, 0xc2, 0x3e, + 0x9a, 0x58, 0xa7, 0x5d, 0x57, 0x1f, 0x9c, 0x3f, 0x0c, 0x80, 0x2f, 0x39, 0x51, 0x32, 0x1c, 0x34, + 0x82, 0xfb, 0x10, 0x8e, 0xbd, 0x92, 0x5d, 0xc9, 0x34, 0x26, 0x2a, 0xca, 0xae, 0x3b, 0xa8, 0xe0, + 0xef, 0xd3, 0x98, 0xa0, 0xc7, 0xf0, 0x5e, 0x4d, 0x48, 0x7d, 0x15, 0x5d, 0xdf, 0xed, 0x57, 0xe0, + 0xb9, 0x8f, 0x1e, 0x42, 0x57, 0x72, 0x1c, 0x89, 0x98, 0x71, 0x69, 0x1f, 0xaa, 0x30, 0x2a, 0x20, + 0x4b, 0x4d, 0x24, 0xeb, 0x57, 0xc4, 0x93, 0x76, 0x4b, 0xa7, 0x96, 0x1f, 0xb3, 0xd4, 0x3c, 0x16, + 0x49, 0xce, 0x82, 0x80, 0x70, 0xbb, 0xad, 0x53, 0xab, 0x10, 0xe7, 0x77, 0x13, 0x3a, 0x0b, 0xe6, + 0x25, 0x21, 0x89, 0x64, 0x23, 0x85, 0x4b, 0x18, 0xee, 0x09, 0xa7, 0x57, 0xd4, 0xc3, 0x92, 0xb2, + 0x68, 0xa5, 0x0b, 0x29, 0x6c, 0x73, 0x62, 0x9d, 0xf6, 0xe6, 0xa3, 0xa2, 0xda, 0x3f, 0xd6, 0x34, + 0x97, 0x4a, 0xe2, 0x3e, 0xd8, 0x37, 0x30, 0x81, 0x9e, 0xc0, 0x00, 0x27, 0x72, 0x9b, 0xe5, 0xa4, + 0x89, 0x3c, 0x91, 0x7b, 0x28, 0xfa, 0x08, 0x4e, 0xb0, 0x10, 0x84, 0xd7, 0xfe, 0x99, 0x57, 0xfe, + 0xb8, 0xc4, 0xb5, 0x4f, 0xf4, 0x0c, 0xde, 0xf7, 0x70, 0x8c, 0xd7, 0x34, 0xa0, 0x32, 0x5d, 0xf9, + 0x24, 0x20, 0x1b, 0xed, 0xb9, 0xad, 0xf4, 0xc3, 0x8a, 0x5c, 0x94, 0xdc, 0x3d, 0x23, 0x1a, 0xed, + 0x59, 0x1e, 0x4e, 0xe7, 0xbe, 0xd1, 0x79, 0xc9, 0x39, 0xbf, 0x99, 0xd0, 0xb9, 0x24, 0x12, 0xfb, + 0x58, 0x62, 0xf4, 0x08, 0x80, 0x71, 0xba, 0xa1, 0xd1, 0x2a, 0xe1, 0x34, 0x2f, 0x58, 0x57, 0x23, + 0x3f, 0x70, 0x8a, 0x9e, 0x43, 0x2b, 0x4e, 0xd6, 0x01, 0xf5, 0xf2, 0x4a, 0x3d, 0x2c, 0x2a, 0x55, + 0x38, 0x98, 0x2e, 0x15, 0xfd, 0x55, 0x24, 0x79, 0xea, 0xe6, 0x5a, 0xf4, 0x02, 0xda, 0x31, 0xa7, + 0x7b, 0x2c, 0x89, 0x6d, 0x29, 0xb3, 0x47, 0x4d, 0x33, 0xcd, 0x6b, 0xbb, 0x42, 0x3d, 0xfa, 0x14, + 0x7a, 0x35, 0x7f, 0xe8, 0x04, 0xac, 0x1d, 0x49, 0xf3, 0xa8, 0xb2, 0xcf, 0x6c, 0x7e, 0xf7, 0x38, + 0x48, 0x8a, 0x01, 0xd4, 0x87, 0xcf, 0xcc, 0x4f, 0x8c, 0xd1, 0x37, 0xd0, 0xaf, 0xfb, 0xfc, 0x1f, + 0xdb, 0x27, 0x75, 0xdb, 0xde, 0xfc, 0xa4, 0x88, 0x69, 0xc9, 0x59, 0x4c, 0xb8, 0x4c, 0x6b, 0xde, + 0x9c, 0x00, 0x7a, 0x4b, 0xc2, 0x43, 0x2a, 0x04, 0x65, 0x91, 0xc8, 0xd6, 0x73, 0xc3, 0x71, 0x24, + 0x85, 0x6d, 0x4c, 0xac, 0x37, 0xaf, 0xa7, 0xd6, 0xa0, 0x19, 0xb4, 0x84, 0xc7, 0x62, 0xa2, 0xc7, + 0x6b, 0x30, 0xff, 0xa0, 0xfc, 0x53, 0xe9, 0xf2, 0xbb, 0x8c, 0x77, 0x73, 0x99, 0xf3, 0x8f, 0x01, + 0xed, 0x25, 0x67, 0x57, 0x34, 0x20, 0x8d, 0xc9, 0xad, 0x2d, 0x84, 0xf9, 0xb6, 0x85, 0xb0, 0xee, + 0x2f, 0x04, 0x7a, 0x0e, 0xbd, 0x6a, 0xf1, 0x84, 0x9a, 0xd0, 0xde, 0x1c, 0x15, 0xb1, 0x54, 0xfb, + 0xee, 0xd6, 0x65, 0xe8, 0x25, 0xf4, 0xb1, 0x94, 0x44, 0x48, 0x35, 0x2c, 0xfa, 0xa2, 0x78, 0xfb, + 0x86, 0xdc, 0xd1, 0xa3, 0x33, 0xe8, 0x84, 0x79, 0x93, 0xd5, 0x06, 0xd7, 0x0a, 0x5d, 0x34, 0xdf, + 0x2d, 0x15, 0xce, 0x4b, 0xe8, 0x14, 0xe5, 0x47, 0x13, 0xe8, 0x61, 0xcf, 0x4b, 0xc2, 0x24, 0xc0, + 0x92, 0x71, 0x55, 0x82, 0xbe, 0x5b, 0x87, 0x8a, 0x9e, 0x9a, 0x8a, 0xc9, 0x3e, 0x9d, 0x7f, 0x0d, + 0x68, 0x2d, 0x93, 0xf5, 0x05, 0x49, 0xd1, 0x1c, 0xba, 0x51, 0xd1, 0x0a, 0x65, 0xfc, 0xa6, 0x36, + 0x55, 0xb2, 0xa6, 0x43, 0xf4, 0x18, 0x0e, 0x77, 0x34, 0xd2, 0x37, 0xd7, 0x60, 0x7e, 0x5c, 0x38, + 0xb8, 0x20, 0x69, 0x76, 0xc3, 0xb9, 0x8a, 0xcc, 0xae, 0xb0, 0x30, 0x09, 0x24, 0x5d, 0x63, 0x41, + 0xec, 0x23, 0xbd, 0x33, 0x25, 0x80, 0xce, 0xe0, 0xf0, 0xd5, 0xf5, 0x4e, 0xd8, 0x2d, 0x55, 0x39, + 0xbb, 0x6c, 0xbe, 0x0a, 0x73, 0xfa, 0xf5, 0xf5, 0x4e, 0xe8, 0xa9, 0x57, 0xaa, 0xd1, 0x0b, 0xe8, + 0x96, 0xd0, 0xbb, 0x0c, 0xbc, 0x23, 0x00, 0x35, 0x9b, 0xd1, 0x18, 0x9f, 0xbb, 0x43, 0x62, 0x36, + 0x86, 0xe4, 0x63, 0x00, 0xbd, 0xb4, 0xab, 0xec, 0xc7, 0x96, 0x6a, 0xd8, 0xe0, 0x6e, 0xc8, 0x6e, + 0x57, 0x2b, 0x2e, 0x48, 0xfa, 0xc5, 0xe7, 0x7f, 0xde, 0x8c, 0x8d, 0xd7, 0x37, 0x63, 0xe3, 0xef, + 0x9b, 0xb1, 0xf1, 0xcb, 0xed, 0xf8, 0xe0, 0xf5, 0xed, 0xf8, 0xe0, 0xaf, 0xdb, 0xf1, 0xc1, 0x4f, + 0xce, 0x86, 0xca, 0x6d, 0xb2, 0x9e, 0x7a, 0x2c, 0x9c, 0xb1, 0x48, 0xb0, 0x88, 0xcf, 0xb6, 0xd7, + 0x38, 0x9d, 0xfd, 0x3c, 0xcb, 0x1e, 0xc2, 0xec, 0xd1, 0x10, 0xeb, 0x96, 0x7a, 0x04, 0x9f, 0xfd, + 0x17, 0x00, 0x00, 0xff, 0xff, 0x25, 0x90, 0xfd, 0x6b, 0x39, 0x07, 0x00, 0x00, +} + +func (m *DID) 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 *DID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Paths) > 0 { + for iNdEx := len(m.Paths) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Paths[iNdEx]) + copy(dAtA[i:], m.Paths[iNdEx]) + i = encodeVarintModels(dAtA, i, uint64(len(m.Paths[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Identifier) > 0 { + i -= len(m.Identifier) + copy(dAtA[i:], m.Identifier) + i = encodeVarintModels(dAtA, i, uint64(len(m.Identifier))) + i-- + dAtA[i] = 0x22 + } + if len(m.Network) > 0 { + i -= len(m.Network) + copy(dAtA[i:], m.Network) + i = encodeVarintModels(dAtA, i, uint64(len(m.Network))) + i-- + dAtA[i] = 0x1a + } + if m.Method != 0 { + i = encodeVarintModels(dAtA, i, uint64(m.Method)) + i-- + dAtA[i] = 0x10 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintModels(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Credential) 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 *Credential) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Credential) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Controller) > 0 { + i -= len(m.Controller) + copy(dAtA[i:], m.Controller) + i = encodeVarintModels(dAtA, i, uint64(len(m.Controller))) + i-- + dAtA[i] = 0x3a + } + if len(m.Subject) > 0 { + i -= len(m.Subject) + copy(dAtA[i:], m.Subject) + i = encodeVarintModels(dAtA, i, uint64(len(m.Subject))) + i-- + dAtA[i] = 0x32 + } + if len(m.Transport) > 0 { + for iNdEx := len(m.Transport) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Transport[iNdEx]) + copy(dAtA[i:], m.Transport[iNdEx]) + i = encodeVarintModels(dAtA, i, uint64(len(m.Transport[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.CredentialId) > 0 { + i -= len(m.CredentialId) + copy(dAtA[i:], m.CredentialId) + i = encodeVarintModels(dAtA, i, uint64(len(m.CredentialId))) + i-- + dAtA[i] = 0x1a + } + if len(m.CredentialType) > 0 { + i -= len(m.CredentialType) + copy(dAtA[i:], m.CredentialType) + i = encodeVarintModels(dAtA, i, uint64(len(m.CredentialType))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintModels(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Document) 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 *Document) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Document) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CapabilityInvocation) > 0 { + for iNdEx := len(m.CapabilityInvocation) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.CapabilityInvocation[iNdEx]) + copy(dAtA[i:], m.CapabilityInvocation[iNdEx]) + i = encodeVarintModels(dAtA, i, uint64(len(m.CapabilityInvocation[iNdEx]))) + i-- + dAtA[i] = 0x42 + } + } + if len(m.CapabilityDelegation) > 0 { + for iNdEx := len(m.CapabilityDelegation) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.CapabilityDelegation[iNdEx]) + copy(dAtA[i:], m.CapabilityDelegation[iNdEx]) + i = encodeVarintModels(dAtA, i, uint64(len(m.CapabilityDelegation[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } + if len(m.AssertionMethod) > 0 { + for iNdEx := len(m.AssertionMethod) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AssertionMethod[iNdEx]) + copy(dAtA[i:], m.AssertionMethod[iNdEx]) + i = encodeVarintModels(dAtA, i, uint64(len(m.AssertionMethod[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Authentication) > 0 { + for iNdEx := len(m.Authentication) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Authentication[iNdEx]) + copy(dAtA[i:], m.Authentication[iNdEx]) + i = encodeVarintModels(dAtA, i, uint64(len(m.Authentication[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.VerificationMethods) > 0 { + for iNdEx := len(m.VerificationMethods) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.VerificationMethods[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintModels(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Metadata) 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 *Metadata) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Private) > 0 { + for k := range m.Private { + v := m.Private[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintModels(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintModels(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Public) > 0 { + for k := range m.Public { + v := m.Public[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintModels(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintModels(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintModels(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.OriginUri) > 0 { + i -= len(m.OriginUri) + copy(dAtA[i:], m.OriginUri) + i = encodeVarintModels(dAtA, i, uint64(len(m.OriginUri))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Permissions) 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 *Permissions) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Permissions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + 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 = encodeVarintModels(dAtA, i, uint64(j2)) + i-- + dAtA[i] = 0x12 + } + if len(m.Grants) > 0 { + dAtA5 := make([]byte, len(m.Grants)*10) + var j4 int + for _, num := range m.Grants { + for num >= 1<<7 { + dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j4++ + } + dAtA5[j4] = uint8(num) + j4++ + } + i -= j4 + copy(dAtA[i:], dAtA5[:j4]) + i = encodeVarintModels(dAtA, i, uint64(j4)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Profile) 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 *Profile) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Profile) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Metadata != nil { + { + size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if len(m.Attestations) > 0 { + for iNdEx := len(m.Attestations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attestations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if len(m.Credentials) > 0 { + for iNdEx := len(m.Credentials) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Credentials[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.Controller) > 0 { + i -= len(m.Controller) + copy(dAtA[i:], m.Controller) + i = encodeVarintModels(dAtA, i, uint64(len(m.Controller))) + i-- + dAtA[i] = 0x1a + } + if len(m.Subject) > 0 { + i -= len(m.Subject) + copy(dAtA[i:], m.Subject) + i = encodeVarintModels(dAtA, i, uint64(len(m.Subject))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintModels(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Property) 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 *Property) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Property) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintModels(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0x12 + } + if len(m.Accumulator) > 0 { + i -= len(m.Accumulator) + copy(dAtA[i:], m.Accumulator) + i = encodeVarintModels(dAtA, i, uint64(len(m.Accumulator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PubKey) 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 *PubKey) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PubKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Jwks) > 0 { + for k := range m.Jwks { + v := m.Jwks[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintModels(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintModels(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintModels(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x32 + } + } + if len(m.Multibase) > 0 { + i -= len(m.Multibase) + copy(dAtA[i:], m.Multibase) + i = encodeVarintModels(dAtA, i, uint64(len(m.Multibase))) + i-- + dAtA[i] = 0x2a + } + if m.Kind != 0 { + i = encodeVarintModels(dAtA, i, uint64(m.Kind)) + i-- + dAtA[i] = 0x18 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintModels(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0x12 + } + if m.Namespace != 0 { + i = encodeVarintModels(dAtA, i, uint64(m.Namespace)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *VerificationMethod) 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 *VerificationMethod) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *VerificationMethod) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.PublicKey != nil { + { + size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.Controller) > 0 { + i -= len(m.Controller) + copy(dAtA[i:], m.Controller) + i = encodeVarintModels(dAtA, i, uint64(len(m.Controller))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintModels(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintModels(dAtA []byte, offset int, v uint64) int { + offset -= sovModels(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *DID) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + if m.Method != 0 { + n += 1 + sovModels(uint64(m.Method)) + } + l = len(m.Network) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.Identifier) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + if len(m.Paths) > 0 { + for _, s := range m.Paths { + l = len(s) + n += 1 + l + sovModels(uint64(l)) + } + } + return n +} + +func (m *Credential) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.CredentialType) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.CredentialId) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + if len(m.Transport) > 0 { + for _, s := range m.Transport { + l = len(s) + n += 1 + l + sovModels(uint64(l)) + } + } + l = len(m.Subject) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.Controller) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + return n +} + +func (m *Document) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + if len(m.VerificationMethods) > 0 { + for _, e := range m.VerificationMethods { + l = e.Size() + n += 1 + l + sovModels(uint64(l)) + } + } + if len(m.Authentication) > 0 { + for _, s := range m.Authentication { + l = len(s) + n += 1 + l + sovModels(uint64(l)) + } + } + if len(m.AssertionMethod) > 0 { + for _, s := range m.AssertionMethod { + l = len(s) + n += 1 + l + sovModels(uint64(l)) + } + } + if len(m.CapabilityDelegation) > 0 { + for _, s := range m.CapabilityDelegation { + l = len(s) + n += 1 + l + sovModels(uint64(l)) + } + } + if len(m.CapabilityInvocation) > 0 { + for _, s := range m.CapabilityInvocation { + l = len(s) + n += 1 + l + sovModels(uint64(l)) + } + } + return n +} + +func (m *Metadata) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OriginUri) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + if len(m.Public) > 0 { + for k, v := range m.Public { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovModels(uint64(len(k))) + 1 + len(v) + sovModels(uint64(len(v))) + n += mapEntrySize + 1 + sovModels(uint64(mapEntrySize)) + } + } + if len(m.Private) > 0 { + for k, v := range m.Private { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovModels(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovModels(uint64(len(k))) + l + n += mapEntrySize + 1 + sovModels(uint64(mapEntrySize)) + } + } + return n +} + +func (m *Permissions) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Grants) > 0 { + l = 0 + for _, e := range m.Grants { + l += sovModels(uint64(e)) + } + n += 1 + sovModels(uint64(l)) + l + } + if len(m.Scopes) > 0 { + l = 0 + for _, e := range m.Scopes { + l += sovModels(uint64(e)) + } + n += 1 + sovModels(uint64(l)) + l + } + return n +} + +func (m *Profile) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.Subject) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.Controller) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + if len(m.Credentials) > 0 { + for _, e := range m.Credentials { + l = e.Size() + n += 1 + l + sovModels(uint64(l)) + } + } + if len(m.Attestations) > 0 { + for _, e := range m.Attestations { + l = e.Size() + n += 1 + l + sovModels(uint64(l)) + } + } + if m.Metadata != nil { + l = m.Metadata.Size() + n += 1 + l + sovModels(uint64(l)) + } + return n +} + +func (m *Property) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Accumulator) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.Key) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + return n +} + +func (m *PubKey) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Namespace != 0 { + n += 1 + sovModels(uint64(m.Namespace)) + } + l = len(m.Key) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + if m.Kind != 0 { + n += 1 + sovModels(uint64(m.Kind)) + } + l = len(m.Multibase) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + if len(m.Jwks) > 0 { + for k, v := range m.Jwks { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovModels(uint64(len(k))) + 1 + len(v) + sovModels(uint64(len(v))) + n += mapEntrySize + 1 + sovModels(uint64(mapEntrySize)) + } + } + return n +} + +func (m *VerificationMethod) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.Controller) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + if m.PublicKey != nil { + l = m.PublicKey.Size() + n += 1 + l + sovModels(uint64(l)) + } + return n +} + +func sovModels(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozModels(x uint64) (n int) { + return sovModels(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *DID) 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 ErrIntOverflowModels + } + 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: DID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DID: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) + } + m.Method = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Method |= DIDNamespace(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Network = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identifier", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identifier = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Paths = append(m.Paths, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Credential) 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 ErrIntOverflowModels + } + 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: Credential: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Credential: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CredentialType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CredentialType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CredentialId", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CredentialId = append(m.CredentialId[:0], dAtA[iNdEx:postIndex]...) + if m.CredentialId == nil { + m.CredentialId = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Transport", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Transport = append(m.Transport, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Subject = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + 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 ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Controller = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Document) 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 ErrIntOverflowModels + } + 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: Document: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Document: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerificationMethods", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VerificationMethods = append(m.VerificationMethods, &VerificationMethod{}) + if err := m.VerificationMethods[len(m.VerificationMethods)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authentication", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authentication = append(m.Authentication, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AssertionMethod", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AssertionMethod = append(m.AssertionMethod, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CapabilityDelegation", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CapabilityDelegation = append(m.CapabilityDelegation, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CapabilityInvocation", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CapabilityInvocation = append(m.CapabilityInvocation, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Metadata) 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 ErrIntOverflowModels + } + 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: Metadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OriginUri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Public", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Public == nil { + m.Public = 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 ErrIntOverflowModels + } + 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 ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthModels + } + 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 ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthModels + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Public[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Private", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Private == nil { + m.Private = make(map[string]*Property) + } + var mapkey string + var mapvalue *Property + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + 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 ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthModels + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthModels + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthModels + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Property{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Private[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Permissions) 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 ErrIntOverflowModels + } + 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: Permissions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Permissions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v DIDNamespace + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= DIDNamespace(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Grants = append(m.Grants, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.Grants) == 0 { + m.Grants = make([]DIDNamespace, 0, elementCount) + } + for iNdEx < postIndex { + var v DIDNamespace + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= DIDNamespace(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Grants = append(m.Grants, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Grants", wireType) + } + case 2: + if wireType == 0 { + var v PermissionScope + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + 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 ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + 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 ErrIntOverflowModels + } + 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 := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Profile) 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 ErrIntOverflowModels + } + 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: Profile: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Profile: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Subject = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + 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 ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Controller = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Credentials = append(m.Credentials, &Credential{}) + if err := m.Credentials[len(m.Credentials)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attestations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attestations = append(m.Attestations, &VerificationMethod{}) + if err := m.Attestations[len(m.Attestations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metadata == nil { + m.Metadata = &Metadata{} + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Property) 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 ErrIntOverflowModels + } + 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: Property: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Property: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Accumulator", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Accumulator = append(m.Accumulator[:0], dAtA[iNdEx:postIndex]...) + if m.Accumulator == nil { + m.Accumulator = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) + if m.Key == nil { + m.Key = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PubKey) 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 ErrIntOverflowModels + } + 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: PubKey: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PubKey: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + m.Namespace = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Namespace |= DIDNamespace(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) + if m.Key == nil { + m.Key = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + m.Kind = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Kind |= KeyType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Multibase", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Multibase = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Jwks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Jwks == nil { + m.Jwks = 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 ErrIntOverflowModels + } + 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 ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthModels + } + 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 ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthModels + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Jwks[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VerificationMethod) 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 ErrIntOverflowModels + } + 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: VerificationMethod: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VerificationMethod: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Controller = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PublicKey == nil { + m.PublicKey = &PubKey{} + } + if err := m.PublicKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipModels(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowModels + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowModels + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowModels + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthModels + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupModels + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthModels + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthModels = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowModels = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupModels = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/did/types/query.pb.go b/x/did/types/query.pb.go index c820c2b90..a093fbd7f 100644 --- a/x/did/types/query.pb.go +++ b/x/did/types/query.pb.go @@ -598,49 +598,49 @@ func init() { func init() { proto.RegisterFile("did/v1/query.proto", fileDescriptor_ae1fa9bb626e2869) } var fileDescriptor_ae1fa9bb626e2869 = []byte{ - // 665 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x94, 0x4f, 0x4f, 0xd4, 0x4e, - 0x18, 0xc7, 0xe9, 0xf2, 0x63, 0xe1, 0xf7, 0xac, 0x1a, 0x32, 0x2c, 0xb0, 0x29, 0x50, 0x70, 0x0e, - 0x42, 0x8c, 0x6e, 0x05, 0x2f, 0xc6, 0xa8, 0x89, 0x82, 0x07, 0x4d, 0x4c, 0xb4, 0x24, 0x1c, 0x3c, - 0x59, 0x3a, 0xe3, 0x32, 0x61, 0x99, 0x29, 0xed, 0xb4, 0xd2, 0x10, 0x2e, 0xbe, 0x02, 0x13, 0x5f, - 0x88, 0x6f, 0xc3, 0x23, 0x89, 0x17, 0x8f, 0x06, 0x7c, 0x0b, 0xde, 0xcd, 0xce, 0x4c, 0x77, 0xdb, - 0xb2, 0xc5, 0x5b, 0xe7, 0xf9, 0xf3, 0xfd, 0x3c, 0x33, 0xf3, 0x9d, 0x02, 0x22, 0x8c, 0xb8, 0xe9, - 0xa6, 0x7b, 0x9c, 0xd0, 0x28, 0xeb, 0x86, 0x91, 0x90, 0x02, 0x35, 0x09, 0x23, 0xdd, 0x74, 0xd3, - 0x5e, 0xee, 0x09, 0xd1, 0xeb, 0x53, 0xd7, 0x0f, 0x99, 0xeb, 0x73, 0x2e, 0xa4, 0x2f, 0x99, 0xe0, - 0xb1, 0xae, 0xb2, 0xdb, 0xa6, 0xb3, 0x47, 0x39, 0x8d, 0x59, 0x1e, 0xcd, 0xf5, 0x64, 0x16, 0x52, - 0x13, 0xc3, 0x6d, 0x40, 0xef, 0x06, 0xf2, 0x6f, 0xfd, 0xc8, 0x3f, 0x8a, 0x3d, 0x7a, 0x9c, 0xd0, - 0x58, 0xe2, 0xa7, 0x30, 0x57, 0x8a, 0xc6, 0xa1, 0xe0, 0x31, 0x45, 0x77, 0xa0, 0x19, 0xaa, 0x48, - 0xc7, 0x5a, 0xb3, 0x36, 0x5a, 0x5b, 0xb7, 0xba, 0x7a, 0x9a, 0xae, 0xa9, 0x33, 0x59, 0xbc, 0x01, - 0x6d, 0xd5, 0xfe, 0x3c, 0x08, 0x44, 0xc2, 0x65, 0x2e, 0x8b, 0x66, 0x61, 0x92, 0x30, 0xa2, 0x9a, - 0xff, 0xf7, 0x06, 0x9f, 0xd8, 0x85, 0xf9, 0x4a, 0xa5, 0x41, 0x2d, 0x40, 0x93, 0x9e, 0xb0, 0x58, - 0x6a, 0xd4, 0x8c, 0x67, 0x56, 0x78, 0x1b, 0x16, 0x55, 0xc3, 0x76, 0x44, 0x09, 0xe5, 0x92, 0xf9, - 0xfd, 0x7a, 0xf5, 0x81, 0x88, 0x88, 0x58, 0x8f, 0xf1, 0x4e, 0x43, 0x05, 0xcd, 0x0a, 0x7f, 0xb3, - 0xa0, 0x73, 0x55, 0xc5, 0x90, 0x77, 0xa1, 0x15, 0x8c, 0xc2, 0x1d, 0x6b, 0x6d, 0x72, 0xa3, 0xb5, - 0xb5, 0x99, 0xef, 0xb4, 0xae, 0xad, 0x5b, 0x88, 0xbd, 0xe4, 0x32, 0xca, 0xbc, 0xa2, 0x8a, 0xfd, - 0x0c, 0x66, 0xab, 0x05, 0x83, 0x79, 0x0f, 0x69, 0x96, 0xcf, 0x7b, 0x48, 0x33, 0xd4, 0x86, 0xa9, - 0xd4, 0xef, 0x27, 0x54, 0x8d, 0x7b, 0xc3, 0xd3, 0x8b, 0xc7, 0x8d, 0x47, 0x16, 0xbe, 0x0b, 0x0b, - 0x8a, 0xfc, 0x4a, 0x49, 0x48, 0x46, 0xaf, 0x39, 0xd3, 0x33, 0x73, 0x44, 0xc5, 0xda, 0xeb, 0x4f, - 0x15, 0xbd, 0x06, 0x94, 0xd2, 0x88, 0x7d, 0x64, 0x81, 0xb2, 0xd1, 0x1b, 0x2a, 0x0f, 0x04, 0xe9, - 0x34, 0xd4, 0xd6, 0xed, 0x7c, 0xeb, 0x7b, 0x57, 0x2a, 0xbc, 0x31, 0x5d, 0x78, 0xdd, 0x78, 0xc7, - 0xa3, 0xb1, 0xe8, 0xa7, 0xb4, 0x7e, 0xce, 0x1d, 0xe3, 0x92, 0x61, 0xa1, 0x19, 0xf2, 0x1e, 0xcc, - 0x10, 0x11, 0x24, 0x47, 0x94, 0x4b, 0xe3, 0xb3, 0xd9, 0x7c, 0x84, 0x1d, 0x13, 0xf7, 0x86, 0x15, - 0xf8, 0xbe, 0xc1, 0xed, 0xd2, 0x28, 0x65, 0xc1, 0x10, 0x37, 0xba, 0x7a, 0xab, 0x74, 0xf5, 0x0f, - 0x0c, 0x74, 0x58, 0x6e, 0xa0, 0x1d, 0x98, 0x16, 0xa1, 0x7a, 0x42, 0xa6, 0x21, 0x5f, 0x6e, 0xfd, - 0xf9, 0x0f, 0xa6, 0x54, 0x0b, 0xda, 0x83, 0xa6, 0x36, 0x3a, 0xb2, 0x4b, 0x76, 0x28, 0xbd, 0x1d, - 0x7b, 0x69, 0x6c, 0x4e, 0x63, 0xf0, 0xdc, 0xe7, 0x1f, 0xbf, 0xbf, 0x36, 0x6e, 0xa2, 0x96, 0x3b, - 0x78, 0x8b, 0xfa, 0xb9, 0x20, 0x02, 0x33, 0xb9, 0xff, 0xd1, 0x72, 0xa9, 0xbb, 0xf2, 0x80, 0xec, - 0x95, 0x9a, 0xac, 0x51, 0x5f, 0x52, 0xea, 0xf3, 0x68, 0x4e, 0xa9, 0x9f, 0x12, 0x46, 0xce, 0x5c, - 0x3f, 0x57, 0xce, 0xa0, 0x55, 0xb0, 0x20, 0x5a, 0xad, 0x77, 0xb4, 0x66, 0xad, 0xfd, 0xcb, 0xf2, - 0x78, 0x5d, 0xe1, 0x6e, 0xa3, 0xd5, 0x02, 0xee, 0x54, 0x9f, 0xf3, 0x99, 0x5b, 0x70, 0x3f, 0xea, - 0x03, 0x8c, 0xcc, 0x88, 0x9c, 0x92, 0xf0, 0x15, 0x47, 0xdb, 0xab, 0xb5, 0x79, 0xc3, 0x5d, 0x51, - 0xdc, 0x45, 0x34, 0x5f, 0xe0, 0xb2, 0x91, 0xfe, 0x07, 0x98, 0x36, 0x96, 0x42, 0xe5, 0xbb, 0x28, - 0x3b, 0xd2, 0x5e, 0x1e, 0x9f, 0x34, 0x10, 0x5b, 0x41, 0xda, 0x08, 0x29, 0x48, 0xa4, 0xb3, 0x1a, - 0x86, 0x02, 0x98, 0x36, 0xfe, 0xa9, 0x10, 0xca, 0x26, 0xac, 0x10, 0x2a, 0x96, 0xab, 0x6c, 0x23, - 0xd6, 0xd9, 0xe1, 0x01, 0xbe, 0x78, 0xf2, 0xfd, 0xc2, 0xb1, 0xce, 0x2f, 0x1c, 0xeb, 0xd7, 0x85, - 0x63, 0x7d, 0xb9, 0x74, 0x26, 0xce, 0x2f, 0x9d, 0x89, 0x9f, 0x97, 0xce, 0xc4, 0x7b, 0xdc, 0x63, - 0xf2, 0x20, 0xd9, 0xef, 0x06, 0xe2, 0xc8, 0x15, 0x3c, 0x16, 0x3c, 0x72, 0x0f, 0x3e, 0xf9, 0x99, - 0x7b, 0xa2, 0x84, 0xd4, 0xdf, 0x7d, 0xbf, 0xa9, 0x7e, 0xef, 0x0f, 0xff, 0x06, 0x00, 0x00, 0xff, - 0xff, 0x70, 0x63, 0x8a, 0x47, 0x44, 0x06, 0x00, 0x00, + // 669 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x94, 0x4f, 0x4f, 0x13, 0x4f, + 0x18, 0xc7, 0xd9, 0xf2, 0xa3, 0xf0, 0x7b, 0xaa, 0x86, 0x4c, 0x0b, 0x34, 0x0b, 0x2c, 0xb8, 0x07, + 0x21, 0x46, 0xbb, 0x82, 0x17, 0x63, 0xd4, 0x44, 0xc1, 0x83, 0x26, 0x26, 0xba, 0x24, 0x1c, 0x3c, + 0xb9, 0xec, 0x8c, 0x65, 0x42, 0x3b, 0x53, 0x76, 0xa7, 0x95, 0x0d, 0xe1, 0xe2, 0x2b, 0x30, 0xf1, + 0x85, 0xf8, 0x36, 0x3c, 0x92, 0x78, 0xf1, 0x68, 0xc0, 0xb7, 0xe0, 0xdd, 0x74, 0xe6, 0xd9, 0x76, + 0x77, 0xe9, 0xe2, 0xad, 0xf3, 0xfc, 0xf9, 0x7e, 0x9e, 0x99, 0xfd, 0x3e, 0x05, 0x42, 0x39, 0xf5, + 0x06, 0x5b, 0xde, 0x71, 0x9f, 0x45, 0x49, 0xab, 0x17, 0x49, 0x25, 0x49, 0x95, 0x72, 0xda, 0x1a, + 0x6c, 0xd9, 0x2b, 0x6d, 0x29, 0xdb, 0x1d, 0xe6, 0x05, 0x3d, 0xee, 0x05, 0x42, 0x48, 0x15, 0x28, + 0x2e, 0x45, 0x6c, 0xaa, 0xec, 0x06, 0x76, 0xb6, 0x99, 0x60, 0x31, 0x4f, 0xa3, 0x75, 0x8c, 0x76, + 0x25, 0x65, 0x1d, 0x0c, 0xba, 0x0d, 0x20, 0xef, 0x86, 0xfa, 0x6f, 0x83, 0x28, 0xe8, 0xc6, 0x3e, + 0x3b, 0xee, 0xb3, 0x58, 0xb9, 0x4f, 0xa1, 0x9e, 0x8b, 0xc6, 0x3d, 0x29, 0x62, 0x46, 0xee, 0x40, + 0xb5, 0xa7, 0x23, 0x4d, 0x6b, 0xdd, 0xda, 0xac, 0x6d, 0xdf, 0x6a, 0x99, 0x71, 0x5a, 0x58, 0x87, + 0x59, 0x77, 0x13, 0x1a, 0xba, 0xfd, 0x79, 0x18, 0xca, 0xbe, 0x50, 0xa9, 0x2c, 0x99, 0x87, 0x69, + 0xca, 0xa9, 0x6e, 0xfe, 0xdf, 0x1f, 0xfe, 0x74, 0x3d, 0x58, 0x28, 0x54, 0x22, 0x6a, 0x11, 0xaa, + 0xec, 0x84, 0xc7, 0xca, 0xa0, 0xe6, 0x7c, 0x3c, 0xb9, 0x3b, 0xb0, 0xa4, 0x1b, 0x76, 0x22, 0x46, + 0x99, 0x50, 0x3c, 0xe8, 0x94, 0xab, 0x0f, 0x45, 0x64, 0xc4, 0xdb, 0x5c, 0x34, 0x2b, 0x3a, 0x88, + 0x27, 0xf7, 0x9b, 0x05, 0xcd, 0xab, 0x2a, 0x48, 0xde, 0x83, 0x5a, 0x38, 0x0e, 0x37, 0xad, 0xf5, + 0xe9, 0xcd, 0xda, 0xf6, 0x56, 0x7a, 0xd3, 0xb2, 0xb6, 0x56, 0x26, 0xf6, 0x52, 0xa8, 0x28, 0xf1, + 0xb3, 0x2a, 0xf6, 0x33, 0x98, 0x2f, 0x16, 0x0c, 0xe7, 0x3d, 0x62, 0x49, 0x3a, 0xef, 0x11, 0x4b, + 0x48, 0x03, 0x66, 0x06, 0x41, 0xa7, 0xcf, 0xf4, 0xb8, 0x37, 0x7c, 0x73, 0x78, 0x5c, 0x79, 0x64, + 0xb9, 0x77, 0x61, 0x51, 0x93, 0x5f, 0x69, 0x09, 0xc5, 0xd9, 0x35, 0x6f, 0x7a, 0x86, 0x4f, 0x94, + 0xad, 0xbd, 0xfe, 0x55, 0xc9, 0x6b, 0x20, 0x03, 0x16, 0xf1, 0x8f, 0x3c, 0xd4, 0x3e, 0x7a, 0xc3, + 0xd4, 0xa1, 0xa4, 0xcd, 0x8a, 0xbe, 0xba, 0x9d, 0x5e, 0x7d, 0xff, 0x4a, 0x85, 0x3f, 0xa1, 0xcb, + 0xdd, 0x40, 0xef, 0xf8, 0x2c, 0x96, 0x9d, 0x01, 0x2b, 0x9f, 0x73, 0x17, 0x5d, 0x32, 0x2a, 0xc4, + 0x21, 0xef, 0xc1, 0x1c, 0x95, 0x61, 0xbf, 0xcb, 0x84, 0x42, 0x9f, 0xcd, 0xa7, 0x23, 0xec, 0x62, + 0xdc, 0x1f, 0x55, 0xb8, 0xf7, 0x11, 0xb7, 0xc7, 0xa2, 0x01, 0x0f, 0x47, 0xb8, 0xf1, 0xa7, 0xb7, + 0x72, 0x9f, 0xfe, 0x01, 0x42, 0x47, 0xe5, 0x08, 0x6d, 0xc2, 0xac, 0xec, 0xe9, 0x1d, 0xc2, 0x86, + 0xf4, 0xb8, 0xfd, 0xe7, 0x3f, 0x98, 0xd1, 0x2d, 0x64, 0x1f, 0xaa, 0xc6, 0xe8, 0xc4, 0xce, 0xd9, + 0x21, 0xb7, 0x3b, 0xf6, 0xf2, 0xc4, 0x9c, 0xc1, 0xb8, 0xf5, 0xcf, 0x3f, 0x7e, 0x7f, 0xad, 0xdc, + 0x24, 0x35, 0x6f, 0xb8, 0x8c, 0x66, 0x5d, 0x08, 0x85, 0xb9, 0xd4, 0xff, 0x64, 0x25, 0xd7, 0x5d, + 0x58, 0x20, 0x7b, 0xb5, 0x24, 0x8b, 0xea, 0xcb, 0x5a, 0x7d, 0x81, 0xd4, 0xb5, 0xfa, 0x29, 0xe5, + 0xf4, 0xcc, 0x0b, 0x52, 0xe5, 0x04, 0x6a, 0x19, 0x0b, 0x92, 0xb5, 0x72, 0x47, 0x1b, 0xd6, 0xfa, + 0xbf, 0x2c, 0xef, 0x6e, 0x68, 0xdc, 0x6d, 0xb2, 0x96, 0xc1, 0x9d, 0x9a, 0x77, 0x3e, 0xf3, 0x32, + 0xee, 0x27, 0x1d, 0x80, 0xb1, 0x19, 0x89, 0x93, 0x13, 0xbe, 0xe2, 0x68, 0x7b, 0xad, 0x34, 0x8f, + 0xdc, 0x55, 0xcd, 0x5d, 0x22, 0x0b, 0x19, 0x2e, 0x1f, 0xeb, 0x7f, 0x80, 0x59, 0xb4, 0x14, 0xc9, + 0x7f, 0x8b, 0xbc, 0x23, 0xed, 0x95, 0xc9, 0x49, 0x84, 0xd8, 0x1a, 0xd2, 0x20, 0x44, 0x43, 0x22, + 0x93, 0x35, 0x30, 0x12, 0xc2, 0x2c, 0xfa, 0xa7, 0x40, 0xc8, 0x9b, 0xb0, 0x40, 0x28, 0x58, 0xae, + 0x70, 0x8d, 0xd8, 0x64, 0x47, 0x0f, 0xf8, 0xe2, 0xc9, 0xf7, 0x0b, 0xc7, 0x3a, 0xbf, 0x70, 0xac, + 0x5f, 0x17, 0x8e, 0xf5, 0xe5, 0xd2, 0x99, 0x3a, 0xbf, 0x74, 0xa6, 0x7e, 0x5e, 0x3a, 0x53, 0xef, + 0xdd, 0x36, 0x57, 0x87, 0xfd, 0x83, 0x56, 0x28, 0xbb, 0x9e, 0x14, 0xb1, 0x14, 0x91, 0x77, 0xf8, + 0x29, 0x48, 0xbc, 0x13, 0x2d, 0xa4, 0x92, 0x1e, 0x8b, 0x0f, 0xaa, 0xfa, 0xef, 0xfd, 0xe1, 0xdf, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x2a, 0xc4, 0xb0, 0x4a, 0x45, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/did/types/state.pb.go b/x/did/types/state.pb.go index 7acc6adfb..985683f43 100644 --- a/x/did/types/state.pb.go +++ b/x/did/types/state.pb.go @@ -109,14 +109,14 @@ func (m *Aliases) GetExpiration() uint64 { type Assertion struct { // The unique identifier of the attestation Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // Key type (e.g., "passkey", "ssh", "gpg", "native-secure-enclave") - KeyType string `protobuf:"bytes,2,opt,name=key_type,json=keyType,proto3" json:"key_type,omitempty"` - // The value of the linked identifier - Credential []byte `protobuf:"bytes,3,opt,name=credential,proto3" json:"credential,omitempty"` - // Metadata is optional additional information about the assertion - Metadata map[string]string `protobuf:"bytes,4,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // The controller of the attestation - Controller string `protobuf:"bytes,5,opt,name=controller,proto3" json:"controller,omitempty"` + Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` + // Key type (e.g., "passkey", "ssh", "gpg", "native-secure-enclave") + PublicKey *PubKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // The value of the linked identifier + CredentialId []byte `protobuf:"bytes,4,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"` + // Metadata is optional additional information about the assertion + Metadata *Metadata `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"` } func (m *Assertion) Reset() { *m = Assertion{} } @@ -159,27 +159,6 @@ func (m *Assertion) GetId() string { return "" } -func (m *Assertion) GetKeyType() string { - if m != nil { - return m.KeyType - } - return "" -} - -func (m *Assertion) GetCredential() []byte { - if m != nil { - return m.Credential - } - return nil -} - -func (m *Assertion) GetMetadata() map[string]string { - if m != nil { - return m.Metadata - } - return nil -} - func (m *Assertion) GetController() string { if m != nil { return m.Controller @@ -187,18 +166,37 @@ func (m *Assertion) GetController() string { return "" } +func (m *Assertion) GetPublicKey() *PubKey { + if m != nil { + return m.PublicKey + } + return nil +} + +func (m *Assertion) GetCredentialId() []byte { + if m != nil { + return m.CredentialId + } + return nil +} + +func (m *Assertion) GetMetadata() *Metadata { + if m != nil { + return m.Metadata + } + return nil +} + // Attestation represents linked identifiers (e.g., Crypto Accounts, Github, Email, Phone) type Attestation struct { // The unique identifier of the attestation Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The type of the linked identifier (e.g., "crypto", "github", "email", "phone") - KeyType string `protobuf:"bytes,2,opt,name=key_type,json=keyType,proto3" json:"key_type,omitempty"` + Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` // The value of the linked identifier - Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` - // The proof or verification method for this attestation - Proof string `protobuf:"bytes,4,opt,name=proof,proto3" json:"proof,omitempty"` + PublicKey *PubKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // The controller of the attestation - Controller string `protobuf:"bytes,5,opt,name=controller,proto3" json:"controller,omitempty"` + Metadata *Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` } func (m *Attestation) Reset() { *m = Attestation{} } @@ -241,27 +239,6 @@ func (m *Attestation) GetId() string { return "" } -func (m *Attestation) GetKeyType() string { - if m != nil { - return m.KeyType - } - return "" -} - -func (m *Attestation) GetValue() string { - if m != nil { - return m.Value - } - return "" -} - -func (m *Attestation) GetProof() string { - if m != nil { - return m.Proof - } - return "" -} - func (m *Attestation) GetController() string { if m != nil { return m.Controller @@ -269,18 +246,30 @@ func (m *Attestation) GetController() string { return "" } +func (m *Attestation) GetPublicKey() *PubKey { + if m != nil { + return m.PublicKey + } + return nil +} + +func (m *Attestation) GetMetadata() *Metadata { + if m != nil { + return m.Metadata + } + return nil +} + // Controller represents a Sonr DWN Vault type Controller struct { // The unique identifier of the controller Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The DID of the controller - Did string `protobuf:"bytes,2,opt,name=did,proto3" json:"did,omitempty"` - // The public key of the controller - PublicKeyMultibase string `protobuf:"bytes,3,opt,name=public_key_multibase,json=publicKeyMultibase,proto3" json:"public_key_multibase,omitempty"` + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // PubKey is the verification method + PublicKey *PubKey `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // The vault address or identifier - VaultCid string `protobuf:"bytes,4,opt,name=vault_cid,json=vaultCid,proto3" json:"vault_cid,omitempty"` - // Fingerprint is the Accumulator of discrete credential identifiers - Fingerprint []byte `protobuf:"bytes,5,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"` + VaultCid string `protobuf:"bytes,5,opt,name=vault_cid,json=vaultCid,proto3" json:"vault_cid,omitempty"` } func (m *Controller) Reset() { *m = Controller{} } @@ -323,18 +312,18 @@ func (m *Controller) GetId() string { return "" } -func (m *Controller) GetDid() string { +func (m *Controller) GetAddress() string { if m != nil { - return m.Did + return m.Address } return "" } -func (m *Controller) GetPublicKeyMultibase() string { +func (m *Controller) GetPublicKey() *PubKey { if m != nil { - return m.PublicKeyMultibase + return m.PublicKey } - return "" + return nil } func (m *Controller) GetVaultCid() string { @@ -344,31 +333,16 @@ func (m *Controller) GetVaultCid() string { return "" } -func (m *Controller) GetFingerprint() []byte { - if m != nil { - return m.Fingerprint - } - return nil -} - // Delegation represents IBC Account Controllers for various chains (e.g., ETH, BTC) type Delegation struct { // The unique identifier of the delegation Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The Decentralized Identifier of the delegated account - Did string `protobuf:"bytes,2,opt,name=did,proto3" json:"did,omitempty"` - // The chain type (e.g., "ETH", "BTC") - ChainType string `protobuf:"bytes,3,opt,name=chain_type,json=chainType,proto3" json:"chain_type,omitempty"` - // The address on the target chain - ChainAddress string `protobuf:"bytes,4,opt,name=chain_address,json=chainAddress,proto3" json:"chain_address,omitempty"` - // The controller DID - ControllerDid string `protobuf:"bytes,5,opt,name=controller_did,json=controllerDid,proto3" json:"controller_did,omitempty"` + Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` + // Resolved from module parameters + ChainInfoId string `protobuf:"bytes,3,opt,name=chain_info_id,json=chainInfoId,proto3" json:"chain_info_id,omitempty"` // The delegation proof or verification method - PublicKeyMultibase string `protobuf:"bytes,6,opt,name=public_key_multibase,json=publicKeyMultibase,proto3" json:"public_key_multibase,omitempty"` - // Public Key JWKS is a map of the associated public keys - PublicKeyJwks map[string]string `protobuf:"bytes,7,rep,name=public_key_jwks,json=publicKeyJwks,proto3" json:"public_key_jwks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // IBC Channel ID - ChannelId uint64 `protobuf:"varint,8,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + PublicKey *PubKey `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` } func (m *Delegation) Reset() { *m = Delegation{} } @@ -411,55 +385,27 @@ func (m *Delegation) GetId() string { return "" } -func (m *Delegation) GetDid() string { +func (m *Delegation) GetController() string { if m != nil { - return m.Did + return m.Controller } return "" } -func (m *Delegation) GetChainType() string { +func (m *Delegation) GetChainInfoId() string { if m != nil { - return m.ChainType + return m.ChainInfoId } return "" } -func (m *Delegation) GetChainAddress() string { +func (m *Delegation) GetPublicKey() *PubKey { if m != nil { - return m.ChainAddress - } - return "" -} - -func (m *Delegation) GetControllerDid() string { - if m != nil { - return m.ControllerDid - } - return "" -} - -func (m *Delegation) GetPublicKeyMultibase() string { - if m != nil { - return m.PublicKeyMultibase - } - return "" -} - -func (m *Delegation) GetPublicKeyJwks() map[string]string { - if m != nil { - return m.PublicKeyJwks + return m.PublicKey } return nil } -func (m *Delegation) GetChannelId() uint64 { - if m != nil { - return m.ChannelId - } - return 0 -} - // Service represents a service in a DID Document type Service struct { // The ID of the service @@ -473,7 +419,7 @@ type Service struct { // 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"` + Permissions *Permissions `protobuf:"bytes,6,opt,name=permissions,proto3" json:"permissions,omitempty"` } func (m *Service) Reset() { *m = Service{} } @@ -544,9 +490,9 @@ func (m *Service) GetServiceEndpoints() map[string]string { return nil } -func (m *Service) GetScopes() []PermissionScope { +func (m *Service) GetPermissions() *Permissions { if m != nil { - return m.Scopes + return m.Permissions } return nil } @@ -554,11 +500,9 @@ func (m *Service) GetScopes() []PermissionScope { func init() { proto.RegisterType((*Aliases)(nil), "did.v1.Aliases") proto.RegisterType((*Assertion)(nil), "did.v1.Assertion") - proto.RegisterMapType((map[string]string)(nil), "did.v1.Assertion.MetadataEntry") proto.RegisterType((*Attestation)(nil), "did.v1.Attestation") proto.RegisterType((*Controller)(nil), "did.v1.Controller") 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") } @@ -566,55 +510,48 @@ func init() { func init() { proto.RegisterFile("did/v1/state.proto", fileDescriptor_f44bb702879c34b4) } var fileDescriptor_f44bb702879c34b4 = []byte{ - // 760 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xbd, 0x6e, 0x2b, 0x45, - 0x14, 0xc7, 0xb3, 0x5e, 0x7f, 0x1e, 0x7f, 0x60, 0x46, 0x81, 0x2c, 0x46, 0x31, 0xc6, 0xe8, 0x4a, - 0xae, 0xbc, 0xdc, 0x4b, 0x83, 0x72, 0x29, 0x30, 0x49, 0x0a, 0x40, 0x91, 0x22, 0x07, 0x1a, 0x1a, - 0x6b, 0xbd, 0x33, 0x71, 0x26, 0xde, 0x9d, 0x59, 0xcd, 0xcc, 0x3a, 0xd9, 0x8e, 0x1e, 0x09, 0x51, - 0x50, 0xf3, 0x00, 0x34, 0xbc, 0x06, 0x65, 0x24, 0x1a, 0x0a, 0x0a, 0x94, 0xbc, 0x01, 0x4f, 0x80, - 0x76, 0x67, 0xd6, 0xde, 0xd8, 0x01, 0x84, 0x52, 0xd9, 0xf3, 0x3f, 0x67, 0xe6, 0xfc, 0xce, 0x7f, - 0x8e, 0x3d, 0x80, 0x30, 0xc5, 0xee, 0xea, 0xa5, 0x2b, 0x95, 0xa7, 0xc8, 0x38, 0x12, 0x5c, 0x71, - 0x54, 0xc5, 0x14, 0x8f, 0x57, 0x2f, 0x7b, 0x07, 0x3e, 0x97, 0x21, 0x97, 0x2e, 0x17, 0x61, 0x9a, - 0xc2, 0x45, 0xa8, 0x13, 0x7a, 0xfb, 0x66, 0xd3, 0x82, 0x30, 0x22, 0xa9, 0x34, 0x6a, 0x7e, 0x14, - 0x61, 0x71, 0x68, 0xb4, 0xe1, 0xcf, 0x16, 0xd4, 0x26, 0x01, 0xf5, 0x24, 0x91, 0xa8, 0x03, 0x25, - 0x8a, 0x1d, 0x6b, 0x60, 0x8d, 0x1a, 0xd3, 0x12, 0xc5, 0xe8, 0x6d, 0xa8, 0x72, 0x41, 0x17, 0x94, - 0x39, 0xa5, 0x4c, 0x33, 0x2b, 0xe4, 0x40, 0x4d, 0xc6, 0xf3, 0x6b, 0xe2, 0x2b, 0xc7, 0xce, 0x02, - 0xf9, 0x12, 0xf5, 0x01, 0x7c, 0xce, 0x94, 0xe0, 0x41, 0x40, 0x84, 0x53, 0xce, 0x82, 0x05, 0x25, - 0x8d, 0x93, 0xdb, 0x88, 0x0a, 0x4f, 0x51, 0xce, 0x9c, 0xca, 0xc0, 0x1a, 0x95, 0xa7, 0x05, 0xe5, - 0xe8, 0xf0, 0xaf, 0x9f, 0x7e, 0xfb, 0xde, 0x3e, 0x80, 0x72, 0x4a, 0x82, 0xda, 0xeb, 0x3a, 0x5d, - 0xcb, 0xb1, 0x1c, 0x6b, 0xf8, 0x6d, 0x09, 0x1a, 0x13, 0x29, 0x89, 0x48, 0x93, 0x77, 0x70, 0xdf, - 0x81, 0xfa, 0x92, 0x24, 0x33, 0x95, 0x44, 0xc4, 0x00, 0xd7, 0x96, 0x24, 0xf9, 0x2a, 0x89, 0x48, - 0xc6, 0x25, 0x08, 0x26, 0x4c, 0x51, 0x2f, 0xc8, 0xa0, 0x5b, 0xd3, 0x82, 0x82, 0x5e, 0x43, 0x3d, - 0x24, 0xca, 0xc3, 0x9e, 0xf2, 0x9c, 0xf2, 0xc0, 0x1e, 0x35, 0x5f, 0xbd, 0x37, 0xd6, 0x1e, 0x8f, - 0xd7, 0xf5, 0xc6, 0x67, 0x26, 0xe3, 0x94, 0x29, 0x91, 0x4c, 0xd7, 0x1b, 0xb6, 0x9a, 0xae, 0x6c, - 0x37, 0xdd, 0x7b, 0x0d, 0xed, 0x47, 0x5b, 0x51, 0x17, 0xec, 0x25, 0x49, 0x0c, 0x79, 0xfa, 0x15, - 0xed, 0x43, 0x65, 0xe5, 0x05, 0x71, 0xce, 0xad, 0x17, 0x47, 0xa5, 0x8f, 0xad, 0xa3, 0x4e, 0xe6, - 0x48, 0x5d, 0x3b, 0xe2, 0x94, 0x86, 0x3f, 0x5a, 0xd0, 0x9c, 0x28, 0x45, 0xd2, 0x71, 0xf8, 0x9f, - 0x26, 0xac, 0x8b, 0xd8, 0x85, 0x22, 0xa9, 0x1a, 0x09, 0xce, 0x2f, 0xcd, 0x6d, 0xe9, 0xc5, 0x7f, - 0xf5, 0xb4, 0x85, 0x65, 0x0f, 0x7f, 0xb1, 0x00, 0x8e, 0x37, 0xf7, 0xbc, 0x4d, 0xd5, 0x05, 0x1b, - 0xa7, 0xf8, 0xba, 0x63, 0x4c, 0x31, 0xfa, 0x10, 0xf6, 0xa3, 0x78, 0x1e, 0x50, 0x7f, 0x96, 0xe2, - 0x86, 0x71, 0xa0, 0xe8, 0xdc, 0x93, 0x39, 0x1b, 0xd2, 0xb1, 0x2f, 0x49, 0x72, 0x96, 0x47, 0xd0, - 0xbb, 0xd0, 0x58, 0x79, 0x71, 0xa0, 0x66, 0x3e, 0xc5, 0x06, 0xb6, 0x9e, 0x09, 0xc7, 0x14, 0xa3, - 0x01, 0x34, 0x2f, 0x29, 0x5b, 0x10, 0x11, 0x09, 0xca, 0x54, 0x06, 0xdc, 0x9a, 0x16, 0xa5, 0x2d, - 0xe2, 0xf2, 0xf0, 0x3b, 0x1b, 0xe0, 0x84, 0x04, 0x64, 0xf1, 0xb4, 0x8f, 0xbb, 0xc4, 0x87, 0x00, - 0xfe, 0x95, 0x47, 0x99, 0xf6, 0x56, 0x73, 0x36, 0x32, 0x25, 0x73, 0xf7, 0x03, 0x68, 0xeb, 0xb0, - 0x87, 0xb1, 0x20, 0x52, 0x1a, 0xc4, 0x56, 0x26, 0x4e, 0xb4, 0x86, 0x5e, 0x40, 0x67, 0x63, 0xe2, - 0x2c, 0x2d, 0xa0, 0xad, 0x6d, 0x6f, 0xd4, 0x93, 0x7f, 0x31, 0xa7, 0xfa, 0x8f, 0xe6, 0x9c, 0xc1, - 0x1b, 0x85, 0x1d, 0xd7, 0x37, 0x4b, 0xe9, 0xd4, 0xb2, 0x39, 0x7e, 0x91, 0xcf, 0xf1, 0xa6, 0xd7, - 0xf1, 0x79, 0xbe, 0xff, 0x8b, 0x9b, 0xa5, 0xd4, 0xd3, 0xdc, 0x8e, 0x8a, 0x9a, 0xe9, 0x95, 0x31, - 0x12, 0xcc, 0x28, 0x76, 0xea, 0xd9, 0xef, 0xb4, 0x61, 0x94, 0xcf, 0x71, 0xef, 0x53, 0x40, 0xbb, - 0x67, 0x3c, 0x63, 0xac, 0x2b, 0xc3, 0x3f, 0x4a, 0x50, 0xbb, 0x20, 0x62, 0x45, 0x7d, 0xb2, 0x73, - 0x15, 0xef, 0x43, 0x4b, 0xea, 0x50, 0x71, 0xac, 0x9b, 0x46, 0xcb, 0xcc, 0xdf, 0xf5, 0xd5, 0x7e, - 0xca, 0xd7, 0x43, 0x00, 0xfd, 0x17, 0x36, 0x8b, 0x05, 0x35, 0x17, 0xd4, 0xd0, 0xca, 0xd7, 0x82, - 0xa2, 0x29, 0xbc, 0x99, 0x17, 0x22, 0x0c, 0x47, 0x9c, 0x32, 0x25, 0x9d, 0xca, 0x63, 0x1b, 0x0d, - 0x64, 0xfe, 0x79, 0x9a, 0xe7, 0x69, 0x1b, 0xbb, 0x72, 0x4b, 0x46, 0x2e, 0x54, 0xa5, 0xcf, 0x23, - 0x22, 0x9d, 0xea, 0xc0, 0x1e, 0x75, 0x5e, 0x1d, 0xe4, 0x07, 0x9d, 0x13, 0x11, 0x52, 0x29, 0x29, - 0x67, 0x17, 0x69, 0x7c, 0x6a, 0xd2, 0x7a, 0xc7, 0xf0, 0xd6, 0x93, 0x67, 0x3f, 0xc3, 0xde, 0xea, - 0x67, 0x9f, 0xfc, 0x7a, 0xdf, 0xb7, 0xee, 0xee, 0xfb, 0xd6, 0x9f, 0xf7, 0x7d, 0xeb, 0x87, 0x87, - 0xfe, 0xde, 0xdd, 0x43, 0x7f, 0xef, 0xf7, 0x87, 0xfe, 0xde, 0x37, 0xc3, 0x05, 0x55, 0x57, 0xf1, - 0x7c, 0xec, 0xf3, 0xd0, 0xe5, 0x4c, 0x72, 0x26, 0xdc, 0xab, 0x1b, 0x2f, 0x71, 0x6f, 0xdd, 0xf4, - 0xb1, 0x48, 0xfd, 0x96, 0xf3, 0x6a, 0xf6, 0x54, 0x7c, 0xf4, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x54, 0xb1, 0xb7, 0x51, 0x8b, 0x06, 0x00, 0x00, + // 645 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0xcf, 0x6e, 0xd3, 0x4a, + 0x14, 0xc6, 0x3b, 0xf9, 0xdb, 0x1c, 0x37, 0x51, 0xee, 0xb4, 0xf7, 0xd6, 0xea, 0x55, 0xad, 0x62, + 0x54, 0xa9, 0x0b, 0x88, 0xd5, 0x22, 0x24, 0x54, 0xb1, 0x29, 0x6d, 0x17, 0x55, 0x85, 0x84, 0x0c, + 0x6c, 0xd8, 0x58, 0x8e, 0x67, 0x9a, 0x0e, 0xd8, 0x33, 0xd6, 0xcc, 0x38, 0xd4, 0x2f, 0x81, 0x10, + 0x0f, 0x00, 0x7b, 0x9e, 0x84, 0x0d, 0x52, 0x25, 0x36, 0x2c, 0x51, 0xfa, 0x06, 0x3c, 0x01, 0xf2, + 0xbf, 0x24, 0xa4, 0x48, 0xa8, 0x2c, 0x58, 0x25, 0xe7, 0x3b, 0x5f, 0x72, 0x7e, 0xe7, 0xb3, 0x67, + 0x00, 0x13, 0x46, 0x9c, 0xf1, 0xae, 0xa3, 0xb4, 0xaf, 0xe9, 0x20, 0x96, 0x42, 0x0b, 0xdc, 0x22, + 0x8c, 0x0c, 0xc6, 0xbb, 0x1b, 0xeb, 0x81, 0x50, 0x91, 0x50, 0x8e, 0x90, 0x51, 0x66, 0x11, 0x32, + 0x2a, 0x0c, 0x1b, 0x6b, 0xe5, 0x8f, 0x46, 0x94, 0x53, 0xc5, 0x54, 0xa9, 0xae, 0x96, 0x6a, 0x24, + 0x08, 0x0d, 0x4b, 0xd1, 0xfe, 0x88, 0xa0, 0x7d, 0x10, 0x32, 0x5f, 0x51, 0x85, 0x7b, 0x50, 0x63, + 0xc4, 0x44, 0x5b, 0x68, 0xa7, 0xe3, 0xd6, 0x18, 0xc1, 0xff, 0x41, 0x4b, 0x48, 0x36, 0x62, 0xdc, + 0xac, 0xe5, 0x5a, 0x59, 0x61, 0x13, 0xda, 0x2a, 0x19, 0xbe, 0xa4, 0x81, 0x36, 0xeb, 0x79, 0xa3, + 0x2a, 0xb1, 0x05, 0x10, 0x08, 0xae, 0xa5, 0x08, 0x43, 0x2a, 0xcd, 0x46, 0xde, 0x9c, 0x53, 0xb2, + 0x3e, 0xbd, 0x88, 0x99, 0xf4, 0x35, 0x13, 0xdc, 0x6c, 0x6e, 0xa1, 0x9d, 0x86, 0x3b, 0xa7, 0xec, + 0x6f, 0x7e, 0x7f, 0xff, 0xe5, 0x4d, 0x7d, 0x1d, 0x1a, 0x19, 0x09, 0xee, 0x4e, 0xe7, 0xf4, 0x91, + 0x89, 0x4c, 0x64, 0x7f, 0x46, 0xd0, 0x39, 0x50, 0x8a, 0xca, 0xcc, 0x7c, 0x0d, 0xf7, 0xe7, 0xe1, + 0xb5, 0x6b, 0xc3, 0xef, 0x02, 0xc4, 0xc9, 0x30, 0x64, 0x81, 0xf7, 0x8a, 0xa6, 0x39, 0xb9, 0xb1, + 0xd7, 0x1b, 0x14, 0x59, 0x0e, 0x9e, 0x24, 0xc3, 0x53, 0x9a, 0xba, 0x9d, 0xc2, 0x71, 0x4a, 0x53, + 0x7c, 0x1b, 0xba, 0x81, 0xa4, 0x84, 0x72, 0xcd, 0xfc, 0xd0, 0x63, 0x24, 0x5f, 0x67, 0xc5, 0x5d, + 0x99, 0x89, 0x27, 0x04, 0xdf, 0x81, 0xe5, 0x88, 0x6a, 0x9f, 0xf8, 0xda, 0xcf, 0xd7, 0x31, 0xf6, + 0xfa, 0xd5, 0x3f, 0x3e, 0x2e, 0x75, 0x77, 0xea, 0xd8, 0xef, 0xe5, 0xeb, 0x2d, 0x17, 0xeb, 0x99, + 0xb5, 0x2c, 0x7c, 0xe3, 0x40, 0x6b, 0x9a, 0x3d, 0xdc, 0xbf, 0xb0, 0xd1, 0x3c, 0x6c, 0xe3, 0x86, + 0xb0, 0x75, 0xfb, 0x1d, 0x02, 0x38, 0x9c, 0xcd, 0x5e, 0x64, 0x35, 0xa1, 0xed, 0x13, 0x22, 0xa9, + 0x52, 0x25, 0x68, 0x55, 0x2e, 0x50, 0x36, 0x7e, 0x47, 0xf9, 0x3f, 0x74, 0xc6, 0x7e, 0x12, 0x6a, + 0x2f, 0x60, 0x24, 0xcf, 0xb4, 0xe3, 0x2e, 0xe7, 0xc2, 0x21, 0x23, 0x0b, 0x50, 0x0d, 0xfb, 0x03, + 0x02, 0x38, 0xa2, 0x21, 0x1d, 0xfd, 0x59, 0x80, 0x36, 0x74, 0x83, 0x73, 0x9f, 0x71, 0x8f, 0xf1, + 0x33, 0x91, 0x3d, 0xe3, 0xe2, 0x7d, 0x36, 0x72, 0xf1, 0x84, 0x9f, 0x89, 0x13, 0x72, 0x43, 0xfc, + 0x05, 0xc2, 0xa6, 0x3d, 0xa9, 0x41, 0xfb, 0x29, 0x95, 0x63, 0x16, 0xd0, 0x6b, 0x78, 0xb7, 0x60, + 0x45, 0x15, 0x2d, 0x4f, 0xa7, 0x31, 0x2d, 0x01, 0x8d, 0x52, 0x7b, 0x96, 0xc6, 0x14, 0x6f, 0x43, + 0x6f, 0xc6, 0xeb, 0x91, 0x29, 0x62, 0x77, 0xa6, 0x1e, 0x31, 0x82, 0x37, 0x01, 0x8a, 0xc3, 0xe9, + 0x25, 0x92, 0x95, 0x07, 0xaf, 0x53, 0x28, 0xcf, 0x25, 0xc3, 0x2e, 0xfc, 0x53, 0x0d, 0xa2, 0x9c, + 0xc4, 0x82, 0x71, 0xad, 0xcc, 0xe6, 0x56, 0x7d, 0xc7, 0xd8, 0xdb, 0xae, 0x56, 0x29, 0x21, 0xab, + 0xcf, 0xe3, 0xca, 0x77, 0xcc, 0xb5, 0x4c, 0xdd, 0xbe, 0x5a, 0x90, 0xf1, 0x7d, 0x30, 0x62, 0x2a, + 0x23, 0xa6, 0x14, 0x13, 0x5c, 0x99, 0xad, 0x3c, 0x98, 0xd5, 0x69, 0x30, 0xb3, 0x96, 0x3b, 0xef, + 0xdb, 0x38, 0x84, 0x7f, 0x7f, 0x39, 0x01, 0xf7, 0xa1, 0x9e, 0x05, 0x5c, 0xa4, 0x93, 0x7d, 0xc5, + 0x6b, 0xd0, 0x1c, 0xfb, 0x61, 0x52, 0xe5, 0x52, 0x14, 0xfb, 0xb5, 0x07, 0x68, 0x21, 0xe4, 0xd6, + 0xa3, 0x87, 0x9f, 0x26, 0x16, 0xba, 0x9c, 0x58, 0xe8, 0xdb, 0xc4, 0x42, 0x6f, 0xaf, 0xac, 0xa5, + 0xcb, 0x2b, 0x6b, 0xe9, 0xeb, 0x95, 0xb5, 0xf4, 0xc2, 0x1e, 0x31, 0x7d, 0x9e, 0x0c, 0x07, 0x81, + 0x88, 0x1c, 0xc1, 0x95, 0xe0, 0xd2, 0x39, 0x7f, 0xed, 0xa7, 0xce, 0x85, 0x93, 0xdd, 0x86, 0x59, + 0xea, 0x6a, 0xd8, 0xca, 0xaf, 0xc2, 0x7b, 0x3f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x4a, 0x67, + 0x3c, 0x6c, 0x05, 0x00, 0x00, } func (m *Aliases) Marshal() (dAtA []byte, err error) { @@ -693,44 +630,42 @@ func (m *Assertion) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Metadata != nil { + { + size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintState(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if len(m.CredentialId) > 0 { + i -= len(m.CredentialId) + copy(dAtA[i:], m.CredentialId) + i = encodeVarintState(dAtA, i, uint64(len(m.CredentialId))) + i-- + dAtA[i] = 0x22 + } + if m.PublicKey != nil { + { + size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintState(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } if len(m.Controller) > 0 { i -= len(m.Controller) copy(dAtA[i:], m.Controller) i = encodeVarintState(dAtA, i, uint64(len(m.Controller))) i-- - dAtA[i] = 0x2a - } - if len(m.Metadata) > 0 { - for k := range m.Metadata { - v := m.Metadata[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] = 0x22 - } - } - if len(m.Credential) > 0 { - i -= len(m.Credential) - copy(dAtA[i:], m.Credential) - i = encodeVarintState(dAtA, i, uint64(len(m.Credential))) - i-- - dAtA[i] = 0x1a - } - if len(m.KeyType) > 0 { - i -= len(m.KeyType) - copy(dAtA[i:], m.KeyType) - i = encodeVarintState(dAtA, i, uint64(len(m.KeyType))) - i-- dAtA[i] = 0x12 } if len(m.Id) > 0 { @@ -763,32 +698,35 @@ func (m *Attestation) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Metadata != nil { + { + size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintState(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.PublicKey != nil { + { + size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintState(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } if len(m.Controller) > 0 { i -= len(m.Controller) copy(dAtA[i:], m.Controller) i = encodeVarintState(dAtA, i, uint64(len(m.Controller))) i-- - dAtA[i] = 0x2a - } - if len(m.Proof) > 0 { - i -= len(m.Proof) - copy(dAtA[i:], m.Proof) - i = encodeVarintState(dAtA, i, uint64(len(m.Proof))) - i-- - dAtA[i] = 0x22 - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintState(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x1a - } - if len(m.KeyType) > 0 { - i -= len(m.KeyType) - copy(dAtA[i:], m.KeyType) - i = encodeVarintState(dAtA, i, uint64(len(m.KeyType))) - i-- dAtA[i] = 0x12 } if len(m.Id) > 0 { @@ -821,31 +759,29 @@ func (m *Controller) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Fingerprint) > 0 { - i -= len(m.Fingerprint) - copy(dAtA[i:], m.Fingerprint) - i = encodeVarintState(dAtA, i, uint64(len(m.Fingerprint))) - i-- - dAtA[i] = 0x2a - } if len(m.VaultCid) > 0 { i -= len(m.VaultCid) copy(dAtA[i:], m.VaultCid) i = encodeVarintState(dAtA, i, uint64(len(m.VaultCid))) i-- + dAtA[i] = 0x2a + } + if m.PublicKey != nil { + { + size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintState(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x22 } - if len(m.PublicKeyMultibase) > 0 { - i -= len(m.PublicKeyMultibase) - copy(dAtA[i:], m.PublicKeyMultibase) - i = encodeVarintState(dAtA, i, uint64(len(m.PublicKeyMultibase))) - i-- - dAtA[i] = 0x1a - } - if len(m.Did) > 0 { - i -= len(m.Did) - copy(dAtA[i:], m.Did) - i = encodeVarintState(dAtA, i, uint64(len(m.Did))) + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintState(dAtA, i, uint64(len(m.Address))) i-- dAtA[i] = 0x12 } @@ -879,62 +815,29 @@ func (m *Delegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.ChannelId != 0 { - i = encodeVarintState(dAtA, i, uint64(m.ChannelId)) - i-- - dAtA[i] = 0x40 - } - if len(m.PublicKeyJwks) > 0 { - for k := range m.PublicKeyJwks { - v := m.PublicKeyJwks[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] = 0x3a + if m.PublicKey != nil { + { + size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintState(dAtA, i, uint64(size)) } - } - if len(m.PublicKeyMultibase) > 0 { - i -= len(m.PublicKeyMultibase) - copy(dAtA[i:], m.PublicKeyMultibase) - i = encodeVarintState(dAtA, i, uint64(len(m.PublicKeyMultibase))) - i-- - dAtA[i] = 0x32 - } - 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] = 0x2a - } - if len(m.ChainAddress) > 0 { - i -= len(m.ChainAddress) - copy(dAtA[i:], m.ChainAddress) - i = encodeVarintState(dAtA, i, uint64(len(m.ChainAddress))) i-- dAtA[i] = 0x22 } - if len(m.ChainType) > 0 { - i -= len(m.ChainType) - copy(dAtA[i:], m.ChainType) - i = encodeVarintState(dAtA, i, uint64(len(m.ChainType))) + if len(m.ChainInfoId) > 0 { + i -= len(m.ChainInfoId) + copy(dAtA[i:], m.ChainInfoId) + i = encodeVarintState(dAtA, i, uint64(len(m.ChainInfoId))) i-- dAtA[i] = 0x1a } - if len(m.Did) > 0 { - i -= len(m.Did) - copy(dAtA[i:], m.Did) - i = encodeVarintState(dAtA, i, uint64(len(m.Did))) + if len(m.Controller) > 0 { + i -= len(m.Controller) + copy(dAtA[i:], m.Controller) + i = encodeVarintState(dAtA, i, uint64(len(m.Controller))) i-- dAtA[i] = 0x12 } @@ -968,21 +871,15 @@ 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++ + if m.Permissions != nil { + { + size, err := m.Permissions.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - dAtA2[j1] = uint8(num) - j1++ + i -= size + i = encodeVarintState(dAtA, i, uint64(size)) } - i -= j1 - copy(dAtA[i:], dAtA2[:j1]) - i = encodeVarintState(dAtA, i, uint64(j1)) i-- dAtA[i] = 0x32 } @@ -1085,26 +982,22 @@ func (m *Assertion) Size() (n int) { if l > 0 { n += 1 + l + sovState(uint64(l)) } - l = len(m.KeyType) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - l = len(m.Credential) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - if len(m.Metadata) > 0 { - for k, v := range m.Metadata { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovState(uint64(len(k))) + 1 + len(v) + sovState(uint64(len(v))) - n += mapEntrySize + 1 + sovState(uint64(mapEntrySize)) - } - } l = len(m.Controller) if l > 0 { n += 1 + l + sovState(uint64(l)) } + if m.PublicKey != nil { + l = m.PublicKey.Size() + n += 1 + l + sovState(uint64(l)) + } + l = len(m.CredentialId) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } + if m.Metadata != nil { + l = m.Metadata.Size() + n += 1 + l + sovState(uint64(l)) + } return n } @@ -1118,22 +1011,18 @@ func (m *Attestation) Size() (n int) { if l > 0 { n += 1 + l + sovState(uint64(l)) } - l = len(m.KeyType) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - l = len(m.Proof) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } l = len(m.Controller) if l > 0 { n += 1 + l + sovState(uint64(l)) } + if m.PublicKey != nil { + l = m.PublicKey.Size() + n += 1 + l + sovState(uint64(l)) + } + if m.Metadata != nil { + l = m.Metadata.Size() + n += 1 + l + sovState(uint64(l)) + } return n } @@ -1147,22 +1036,18 @@ func (m *Controller) Size() (n int) { if l > 0 { n += 1 + l + sovState(uint64(l)) } - l = len(m.Did) + l = len(m.Address) if l > 0 { n += 1 + l + sovState(uint64(l)) } - l = len(m.PublicKeyMultibase) - if l > 0 { + if m.PublicKey != nil { + l = m.PublicKey.Size() n += 1 + l + sovState(uint64(l)) } l = len(m.VaultCid) if l > 0 { n += 1 + l + sovState(uint64(l)) } - l = len(m.Fingerprint) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } return n } @@ -1176,37 +1061,18 @@ func (m *Delegation) Size() (n int) { if l > 0 { n += 1 + l + sovState(uint64(l)) } - l = len(m.Did) + l = len(m.Controller) if l > 0 { n += 1 + l + sovState(uint64(l)) } - l = len(m.ChainType) + l = len(m.ChainInfoId) if l > 0 { n += 1 + l + sovState(uint64(l)) } - l = len(m.ChainAddress) - if l > 0 { + if m.PublicKey != nil { + l = m.PublicKey.Size() n += 1 + l + sovState(uint64(l)) } - l = len(m.ControllerDid) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - l = len(m.PublicKeyMultibase) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - if len(m.PublicKeyJwks) > 0 { - for k, v := range m.PublicKeyJwks { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovState(uint64(len(k))) + 1 + len(v) + sovState(uint64(len(v))) - n += mapEntrySize + 1 + sovState(uint64(mapEntrySize)) - } - } - if m.ChannelId != 0 { - n += 1 + sovState(uint64(m.ChannelId)) - } return n } @@ -1240,12 +1106,9 @@ func (m *Service) Size() (n int) { 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 + if m.Permissions != nil { + l = m.Permissions.Size() + n += 1 + l + sovState(uint64(l)) } return n } @@ -1515,199 +1378,6 @@ func (m *Assertion) Unmarshal(dAtA []byte) error { m.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KeyType", 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.KeyType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Credential", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Credential = append(m.Credential[:0], dAtA[iNdEx:postIndex]...) - if m.Credential == nil { - m.Credential = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata == nil { - m.Metadata = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 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.Metadata[mapkey] = mapvalue - iNdEx = postIndex - case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) } @@ -1739,6 +1409,112 @@ func (m *Assertion) Unmarshal(dAtA []byte) error { } m.Controller = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", 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.PublicKey == nil { + m.PublicKey = &PubKey{} + } + if err := m.PublicKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CredentialId", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CredentialId = append(m.CredentialId[:0], dAtA[iNdEx:postIndex]...) + if m.CredentialId == nil { + m.CredentialId = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata == nil { + m.Metadata = &Metadata{} + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipState(dAtA[iNdEx:]) @@ -1822,102 +1598,6 @@ func (m *Attestation) Unmarshal(dAtA []byte) error { m.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KeyType", 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.KeyType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", 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.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proof", 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.Proof = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) } @@ -1949,6 +1629,78 @@ func (m *Attestation) Unmarshal(dAtA []byte) error { } m.Controller = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", 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.PublicKey == nil { + m.PublicKey = &PubKey{} + } + if err := m.PublicKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata == nil { + m.Metadata = &Metadata{} + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipState(dAtA[iNdEx:]) @@ -2033,7 +1785,7 @@ func (m *Controller) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2061,41 +1813,45 @@ func (m *Controller) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Did = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKeyMultibase", 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.PublicKeyMultibase = string(dAtA[iNdEx:postIndex]) + m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", 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.PublicKey == nil { + m.PublicKey = &PubKey{} + } + if err := m.PublicKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field VaultCid", wireType) } @@ -2127,40 +1883,6 @@ func (m *Controller) Unmarshal(dAtA []byte) error { } m.VaultCid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fingerprint", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Fingerprint = append(m.Fingerprint[:0], dAtA[iNdEx:postIndex]...) - if m.Fingerprint == nil { - m.Fingerprint = []byte{} - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipState(dAtA[iNdEx:]) @@ -2245,7 +1967,7 @@ func (m *Delegation) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2273,11 +1995,11 @@ func (m *Delegation) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Did = string(dAtA[iNdEx:postIndex]) + m.Controller = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainType", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ChainInfoId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2305,107 +2027,11 @@ func (m *Delegation) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ChainType = string(dAtA[iNdEx:postIndex]) + m.ChainInfoId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainAddress", 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.ChainAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ControllerDid", 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.ControllerDid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKeyMultibase", 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.PublicKeyMultibase = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKeyJwks", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2432,123 +2058,13 @@ func (m *Delegation) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.PublicKeyJwks == nil { - m.PublicKeyJwks = make(map[string]string) + if m.PublicKey == nil { + m.PublicKey = &PubKey{} } - 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 - } + if err := m.PublicKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.PublicKeyJwks[mapkey] = mapvalue iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) - } - m.ChannelId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ChannelId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipState(dAtA[iNdEx:]) @@ -2855,74 +2371,41 @@ func (m *Service) Unmarshal(dAtA []byte) error { 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 - } + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState } - 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 { + if iNdEx >= l { return io.ErrUnexpectedEOF } - var elementCount int - if elementCount != 0 && len(m.Scopes) == 0 { - m.Scopes = make([]PermissionScope, 0, elementCount) + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break } - 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) } + if msglen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Permissions == nil { + m.Permissions = &Permissions{} + } + if err := m.Permissions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex 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 7ea9d4544..370bc42d8 100644 --- a/x/did/types/tx.pb.go +++ b/x/did/types/tx.pb.go @@ -470,7 +470,7 @@ 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"` + Cid string `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,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. @@ -517,11 +517,11 @@ func (m *MsgRegisterController) GetAuthority() string { return "" } -func (m *MsgRegisterController) GetAssertions() [][]byte { +func (m *MsgRegisterController) GetCid() string { if m != nil { - return m.Assertions + return m.Cid } - return nil + return "" } func (m *MsgRegisterController) GetKeyshares() [][]byte { @@ -721,57 +721,57 @@ func init() { func init() { proto.RegisterFile("did/v1/tx.proto", fileDescriptor_d73284df019ff211) } var fileDescriptor_d73284df019ff211 = []byte{ - // 797 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x41, 0x6f, 0xe3, 0x44, - 0x14, 0x8e, 0x37, 0xdd, 0x6c, 0xf3, 0x36, 0xdb, 0x20, 0x2b, 0x90, 0xac, 0xb5, 0xcd, 0x56, 0x16, - 0x48, 0x55, 0x05, 0x31, 0x4d, 0xa5, 0xaa, 0x2a, 0x48, 0xa8, 0x45, 0x48, 0xbd, 0x44, 0x2d, 0x8e, - 0x0a, 0x52, 0x2f, 0x95, 0x6b, 0x0f, 0xce, 0xa8, 0xf1, 0x8c, 0x35, 0x33, 0x4e, 0x9b, 0x1b, 0x82, - 0x03, 0x47, 0xf8, 0x21, 0x1c, 0x7a, 0xe0, 0x1f, 0x70, 0xe9, 0xb1, 0xe2, 0x84, 0x38, 0x00, 0x6a, - 0x0f, 0xfd, 0x1b, 0x68, 0x3c, 0x13, 0xc7, 0x69, 0xd2, 0x94, 0xcd, 0x6d, 0xde, 0xfb, 0xde, 0xfb, - 0xe6, 0x7d, 0x7e, 0x6f, 0x5e, 0x02, 0xd5, 0x00, 0x07, 0xce, 0x60, 0xd3, 0x11, 0x97, 0xad, 0x98, - 0x51, 0x41, 0xcd, 0x52, 0x80, 0x83, 0xd6, 0x60, 0xd3, 0xaa, 0xfb, 0x94, 0x47, 0x94, 0x3b, 0x11, - 0x0f, 0x25, 0x1e, 0xf1, 0x50, 0x05, 0x58, 0xa6, 0xce, 0x40, 0x24, 0x89, 0xb8, 0xf6, 0xd5, 0xb4, - 0x2f, 0x44, 0x04, 0x71, 0x9c, 0x79, 0x43, 0x1a, 0xd2, 0xf4, 0xe8, 0xc8, 0x93, 0xf6, 0xbe, 0x56, - 0xc4, 0xa7, 0x0a, 0x50, 0x86, 0x82, 0xec, 0x9f, 0x0c, 0xa8, 0x76, 0x78, 0x78, 0x1c, 0x07, 0x9e, - 0x40, 0x47, 0x1e, 0xf3, 0x22, 0x6e, 0x6e, 0x43, 0xd9, 0x4b, 0x44, 0x8f, 0x32, 0x2c, 0x86, 0x0d, - 0x63, 0xcd, 0x58, 0x2f, 0xef, 0x37, 0xfe, 0xf8, 0xed, 0x93, 0x9a, 0x4e, 0xdc, 0x0b, 0x02, 0x86, - 0x38, 0xef, 0x0a, 0x86, 0x49, 0xe8, 0x8e, 0x43, 0xcd, 0x8f, 0xa1, 0x14, 0xa7, 0x0c, 0x8d, 0x67, - 0x6b, 0xc6, 0xfa, 0xcb, 0xf6, 0x4a, 0x4b, 0x09, 0x6b, 0x29, 0xde, 0xfd, 0xa5, 0xeb, 0xbf, 0xdf, - 0x16, 0x5c, 0x1d, 0xb3, 0xbb, 0xf2, 0xc3, 0xfd, 0xd5, 0xc6, 0x38, 0xdb, 0x7e, 0x0d, 0xf5, 0x07, - 0x85, 0xb8, 0x88, 0xc7, 0x94, 0x70, 0x64, 0xff, 0xa3, 0x8a, 0xdc, 0x4b, 0x44, 0x0f, 0x11, 0x81, - 0x7d, 0x4f, 0xa0, 0x85, 0x8b, 0xdc, 0x01, 0xf0, 0x29, 0x11, 0x8c, 0xf6, 0xfb, 0x88, 0xa5, 0x85, - 0xce, 0x4b, 0xcc, 0xc5, 0x9a, 0x6d, 0x78, 0xe1, 0x29, 0xb0, 0x51, 0x7c, 0x22, 0x6d, 0x14, 0x68, - 0x7e, 0x00, 0x25, 0xca, 0x70, 0x88, 0x49, 0x63, 0x49, 0xa6, 0xb8, 0xda, 0x7a, 0x44, 0x7c, 0x5e, - 0x60, 0x26, 0xfe, 0x67, 0x25, 0xfe, 0x88, 0xd1, 0x01, 0xfa, 0x16, 0x0b, 0x22, 0x69, 0x17, 0x15, - 0x6f, 0xc1, 0x72, 0xcc, 0x68, 0x8c, 0x98, 0x18, 0x2a, 0xe9, 0x6e, 0x66, 0x9b, 0x0d, 0x78, 0x71, - 0xa1, 0xe8, 0x53, 0x79, 0x15, 0x77, 0x64, 0x4e, 0x15, 0x7b, 0x98, 0x16, 0x9b, 0x2f, 0x68, 0x54, - 0xac, 0x24, 0xe1, 0x89, 0xef, 0x4b, 0x12, 0x59, 0xd6, 0xb2, 0x3b, 0x32, 0xe7, 0x5d, 0x6d, 0xff, - 0x68, 0x40, 0xa5, 0xc3, 0xc3, 0xee, 0x90, 0xf8, 0xdf, 0x78, 0x49, 0x5f, 0x3c, 0x68, 0x92, 0xf1, - 0x0e, 0x4d, 0x7a, 0x0f, 0x8a, 0x3e, 0x0e, 0xf4, 0x0d, 0xf2, 0x28, 0x5b, 0x10, 0x79, 0x3e, 0xa3, - 0x44, 0xcb, 0xd2, 0xd6, 0x6e, 0x55, 0xaa, 0xca, 0xa5, 0xda, 0x9f, 0x42, 0x2d, 0x5f, 0xc4, 0xd3, - 0x9a, 0xec, 0xdf, 0x0d, 0x78, 0xbf, 0xc3, 0x43, 0x17, 0x85, 0x98, 0x0b, 0xc4, 0xbe, 0x1c, 0x97, - 0xb1, 0x68, 0x83, 0x9a, 0x00, 0x1e, 0xe7, 0x88, 0x09, 0x4c, 0x89, 0x7c, 0x46, 0xc5, 0xf5, 0x8a, - 0x9b, 0xf3, 0x98, 0x6f, 0xa0, 0x7c, 0x8e, 0x86, 0xbc, 0xe7, 0x31, 0x24, 0xdb, 0x24, 0xe1, 0xb1, - 0xc3, 0xfc, 0x10, 0x5e, 0x0d, 0x10, 0xc3, 0xdf, 0xc9, 0x01, 0x4a, 0x09, 0x96, 0xd2, 0x88, 0x49, - 0xe7, 0x54, 0x3b, 0xef, 0x0d, 0x58, 0x9d, 0xa9, 0x22, 0xfb, 0x02, 0x8b, 0xb7, 0xe3, 0x10, 0x96, - 0x3d, 0xdf, 0xa7, 0x09, 0x11, 0x4a, 0xcd, 0xcb, 0xf6, 0xd6, 0x68, 0x29, 0xcc, 0xbd, 0xb2, 0xb5, - 0xa7, 0xb3, 0xbe, 0x22, 0x82, 0x0d, 0xdd, 0x8c, 0xc4, 0xfa, 0x0c, 0x5e, 0x4d, 0x40, 0xb2, 0xe1, - 0xe7, 0x48, 0x7f, 0x63, 0x57, 0x1e, 0xcd, 0x1a, 0x3c, 0x1f, 0x78, 0xfd, 0x04, 0xe9, 0x21, 0x50, - 0xc6, 0xee, 0xb3, 0x1d, 0xc3, 0xfe, 0xd5, 0x00, 0x33, 0x77, 0x6d, 0x17, 0xb1, 0x01, 0xf6, 0x17, - 0x5f, 0x25, 0xab, 0x00, 0xea, 0x39, 0x9f, 0x26, 0x0c, 0xeb, 0xdb, 0xca, 0xca, 0x73, 0xcc, 0xb0, - 0xe9, 0x40, 0x89, 0xfb, 0x34, 0xd6, 0x8d, 0x5a, 0x69, 0xd7, 0xb3, 0x75, 0x88, 0x58, 0x84, 0x39, - 0xc7, 0x94, 0x74, 0x25, 0xee, 0xea, 0xb0, 0xa9, 0xc6, 0x6c, 0x83, 0x35, 0x5d, 0xed, 0xd3, 0x63, - 0xd9, 0xfe, 0xab, 0x08, 0xc5, 0x0e, 0x0f, 0xcd, 0x03, 0xa8, 0x4c, 0xec, 0xf5, 0x7a, 0xee, 0xd3, - 0xe7, 0x01, 0xeb, 0xed, 0x23, 0x40, 0x76, 0xd7, 0x01, 0x54, 0x26, 0x96, 0x6f, 0x9e, 0x29, 0x0f, - 0x4c, 0x30, 0xcd, 0xda, 0x66, 0x92, 0x69, 0x62, 0x93, 0xe5, 0x99, 0xf2, 0xc0, 0x04, 0xd3, 0xcc, - 0x55, 0xf3, 0x05, 0x94, 0xc7, 0x0b, 0xa3, 0x96, 0x8b, 0xce, 0xbc, 0xd6, 0x9b, 0x59, 0xde, 0x8c, - 0xe0, 0x04, 0xcc, 0x19, 0x2f, 0x77, 0x75, 0xee, 0x7c, 0x5a, 0x1f, 0xfd, 0xaf, 0xf1, 0x35, 0xbf, - 0x86, 0xea, 0xc3, 0x29, 0xb3, 0x66, 0x64, 0x6a, 0xcc, 0xb2, 0x1f, 0xc7, 0x46, 0x94, 0xd6, 0xf3, - 0xef, 0xef, 0xaf, 0x36, 0x8c, 0xfd, 0xcf, 0xaf, 0x6f, 0x9b, 0xc6, 0xcd, 0x6d, 0xd3, 0xf8, 0xf7, - 0xb6, 0x69, 0xfc, 0x72, 0xd7, 0x2c, 0xdc, 0xdc, 0x35, 0x0b, 0x7f, 0xde, 0x35, 0x0b, 0x27, 0x76, - 0x88, 0x45, 0x2f, 0x39, 0x6b, 0xf9, 0x34, 0x72, 0x28, 0xe1, 0x94, 0x30, 0xa7, 0x77, 0xe1, 0x0d, - 0x9d, 0x4b, 0x47, 0xfe, 0x55, 0x10, 0xc3, 0x18, 0xf1, 0xb3, 0x52, 0xfa, 0xab, 0xbf, 0xf5, 0x5f, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xd0, 0x69, 0xc4, 0x75, 0x84, 0x08, 0x00, 0x00, + // 788 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4f, 0x4f, 0xdb, 0x48, + 0x14, 0x8f, 0x09, 0x04, 0xf2, 0x08, 0x64, 0xe5, 0xcd, 0x6e, 0x82, 0x05, 0x01, 0x59, 0xbb, 0x52, + 0x84, 0x76, 0xe3, 0x25, 0x48, 0x08, 0xb1, 0x2b, 0xad, 0x60, 0xb5, 0x12, 0x97, 0x08, 0xd6, 0x11, + 0x5b, 0x89, 0x0b, 0x32, 0xf6, 0xd4, 0x19, 0x11, 0x7b, 0xac, 0x99, 0x71, 0x20, 0xb7, 0xaa, 0x3d, + 0xf4, 0xd8, 0x7e, 0x90, 0x1e, 0x38, 0xb4, 0xdf, 0x81, 0x23, 0xea, 0xa9, 0xea, 0xa1, 0xad, 0xe0, + 0xc0, 0xd7, 0xa8, 0x26, 0x9e, 0x38, 0x0e, 0x09, 0xa1, 0xcd, 0x6d, 0xde, 0xbf, 0xdf, 0xfb, 0xfd, + 0xe6, 0x8d, 0x5f, 0x02, 0x79, 0x07, 0x3b, 0x46, 0x7b, 0xc3, 0xe0, 0x17, 0xd5, 0x80, 0x12, 0x4e, + 0xd4, 0x8c, 0x83, 0x9d, 0x6a, 0x7b, 0x43, 0x2b, 0xda, 0x84, 0x79, 0x84, 0x19, 0x1e, 0x73, 0x45, + 0xdc, 0x63, 0x6e, 0x94, 0xa0, 0xfd, 0x28, 0x2b, 0x3c, 0xe2, 0xa0, 0x16, 0x93, 0xce, 0x82, 0x74, + 0xba, 0xc8, 0x47, 0x0c, 0xc7, 0x5e, 0x97, 0xb8, 0xa4, 0x7b, 0x34, 0xc4, 0x49, 0x7a, 0x97, 0x22, + 0xe4, 0x93, 0x28, 0x10, 0x19, 0x51, 0x48, 0x7f, 0xa9, 0x40, 0xbe, 0xce, 0xdc, 0xa3, 0xc0, 0xb1, + 0x38, 0x3a, 0xb4, 0xa8, 0xe5, 0x31, 0x75, 0x0b, 0xb2, 0x56, 0xc8, 0x9b, 0x84, 0x62, 0xde, 0x29, + 0x29, 0x6b, 0x4a, 0x25, 0xbb, 0x57, 0x7a, 0xff, 0xf6, 0xf7, 0x82, 0x2c, 0xdc, 0x75, 0x1c, 0x8a, + 0x18, 0x6b, 0x70, 0x8a, 0x7d, 0xd7, 0xec, 0xa7, 0xaa, 0xbf, 0x41, 0x26, 0xe8, 0x22, 0x94, 0xa6, + 0xd6, 0x94, 0xca, 0x7c, 0x6d, 0xb1, 0x1a, 0x29, 0xab, 0x46, 0xb8, 0x7b, 0xd3, 0x57, 0x9f, 0x56, + 0x53, 0xa6, 0xcc, 0xd9, 0x59, 0x7c, 0x7e, 0x77, 0xb9, 0xde, 0xaf, 0xd6, 0x97, 0xa0, 0x78, 0x8f, + 0x88, 0x89, 0x58, 0x40, 0x7c, 0x86, 0xf4, 0xcf, 0x11, 0xc9, 0xdd, 0x90, 0x37, 0x91, 0xcf, 0xb1, + 0x6d, 0x71, 0x34, 0x31, 0xc9, 0x6d, 0x00, 0x9b, 0xf8, 0x9c, 0x92, 0x56, 0x0b, 0xd1, 0x2e, 0xd1, + 0x71, 0x85, 0x89, 0x5c, 0xb5, 0x06, 0xb3, 0x56, 0x14, 0x2c, 0xa5, 0x1f, 0x29, 0xeb, 0x25, 0xaa, + 0x3f, 0x43, 0x86, 0x50, 0xec, 0x62, 0xbf, 0x34, 0x2d, 0x4a, 0x4c, 0x69, 0x3d, 0x20, 0x3e, 0x29, + 0x30, 0x16, 0xff, 0x2a, 0x12, 0x7f, 0x48, 0x49, 0x1b, 0x3d, 0xc1, 0xdc, 0x17, 0xb0, 0x93, 0x8a, + 0xd7, 0x60, 0x2e, 0xa0, 0x24, 0x40, 0x94, 0x77, 0x22, 0xe9, 0x66, 0x6c, 0xab, 0x25, 0x98, 0x3d, + 0x8f, 0xe0, 0xbb, 0xf2, 0x72, 0x66, 0xcf, 0x1c, 0x22, 0x7b, 0xd0, 0x25, 0x9b, 0x24, 0xd4, 0x23, + 0x2b, 0x40, 0x58, 0x68, 0xdb, 0x02, 0x44, 0xd0, 0x9a, 0x33, 0x7b, 0xe6, 0xb8, 0xd6, 0xfa, 0x0b, + 0x05, 0x72, 0x75, 0xe6, 0x36, 0x3a, 0xbe, 0xfd, 0xbf, 0x15, 0xb6, 0xf8, 0xbd, 0x21, 0x29, 0xdf, + 0x31, 0xa4, 0x1f, 0x20, 0x6d, 0x63, 0x47, 0x76, 0x10, 0x47, 0x31, 0x02, 0xcf, 0xb2, 0x29, 0xf1, + 0xa5, 0x2c, 0x69, 0xed, 0xe4, 0x85, 0xaa, 0x44, 0xa9, 0xfe, 0x07, 0x14, 0x92, 0x24, 0x1e, 0xd7, + 0xa4, 0xbf, 0x53, 0xe0, 0xa7, 0x3a, 0x73, 0x4d, 0xe4, 0x62, 0xc6, 0x11, 0xfd, 0xa7, 0x4f, 0x63, + 0xd2, 0x01, 0x0d, 0xd3, 0x5f, 0x86, 0xec, 0x19, 0xea, 0xb0, 0xa6, 0x45, 0x91, 0x18, 0x4c, 0xba, + 0x92, 0x33, 0xfb, 0x0e, 0xf5, 0x17, 0x58, 0x68, 0x23, 0x8a, 0x9f, 0x8a, 0x27, 0x83, 0x89, 0xcf, + 0x4a, 0xd3, 0xdd, 0x8c, 0x41, 0xe7, 0xd0, 0x00, 0xef, 0x14, 0x58, 0x19, 0xc9, 0x3b, 0xd6, 0x3c, + 0xf9, 0x00, 0x0e, 0x60, 0xce, 0xb2, 0x6d, 0x12, 0xfa, 0x5c, 0xac, 0x81, 0x74, 0x65, 0xbe, 0xb6, + 0xd9, 0x5b, 0x03, 0x63, 0x5b, 0x56, 0x77, 0x65, 0xd5, 0xbf, 0x3e, 0xa7, 0x1d, 0x33, 0x06, 0xd1, + 0xfe, 0x84, 0x85, 0x81, 0x90, 0xb8, 0xa3, 0x33, 0x24, 0x6f, 0xd5, 0x14, 0x47, 0xb5, 0x00, 0x33, + 0x6d, 0xab, 0x15, 0x22, 0x79, 0x6f, 0x91, 0xb1, 0x33, 0xb5, 0xad, 0xe8, 0x6f, 0x14, 0x50, 0x13, + 0x6d, 0x1b, 0x88, 0xb6, 0xb1, 0x3d, 0xf9, 0xf2, 0x58, 0x01, 0x88, 0x3e, 0xe0, 0x93, 0x90, 0x62, + 0xd9, 0x2d, 0x1b, 0x79, 0x8e, 0x28, 0x56, 0x0d, 0xc8, 0x30, 0x9b, 0x04, 0x72, 0x50, 0x8b, 0xb5, + 0x62, 0xbc, 0x00, 0x11, 0xf5, 0x30, 0x63, 0x98, 0xf8, 0x0d, 0x11, 0x37, 0x65, 0xda, 0xd0, 0x60, + 0xb6, 0x40, 0x1b, 0x66, 0xfb, 0xf8, 0x43, 0xac, 0x7d, 0x4c, 0x43, 0xba, 0xce, 0x5c, 0x75, 0x1f, + 0x72, 0x03, 0x9b, 0xbc, 0x98, 0xb8, 0xfa, 0x64, 0x40, 0x5b, 0x7d, 0x20, 0x10, 0xf7, 0xda, 0x87, + 0xdc, 0xc0, 0xba, 0x4d, 0x22, 0x25, 0x03, 0x03, 0x48, 0xa3, 0xf6, 0x97, 0x40, 0x1a, 0xd8, 0x5d, + 0x49, 0xa4, 0x64, 0x60, 0x00, 0x69, 0xe4, 0x72, 0xf9, 0x1b, 0xb2, 0xfd, 0x15, 0x51, 0x48, 0x64, + 0xc7, 0x5e, 0x6d, 0x79, 0x94, 0x37, 0x06, 0x38, 0x06, 0x75, 0xc4, 0xb7, 0xba, 0x32, 0xf6, 0x7d, + 0x6a, 0xbf, 0x7e, 0xd3, 0xf3, 0x55, 0xff, 0x83, 0xfc, 0xfd, 0x57, 0xa6, 0x8d, 0xa8, 0x94, 0x31, + 0x4d, 0x7f, 0x38, 0xd6, 0x83, 0xd4, 0x66, 0x9e, 0xdd, 0x5d, 0xae, 0x2b, 0x7b, 0x7f, 0x5d, 0xdd, + 0x94, 0x95, 0xeb, 0x9b, 0xb2, 0xf2, 0xe5, 0xa6, 0xac, 0xbc, 0xbe, 0x2d, 0xa7, 0xae, 0x6f, 0xcb, + 0xa9, 0x0f, 0xb7, 0xe5, 0xd4, 0xb1, 0xee, 0x62, 0xde, 0x0c, 0x4f, 0xab, 0x36, 0xf1, 0x0c, 0xe2, + 0x33, 0xe2, 0x53, 0xa3, 0x79, 0x6e, 0x75, 0x8c, 0x0b, 0x43, 0xfc, 0x39, 0xe0, 0x9d, 0x00, 0xb1, + 0xd3, 0x4c, 0xf7, 0x77, 0x7e, 0xf3, 0x6b, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb5, 0xd3, 0x5a, 0x47, + 0x77, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1386,14 +1386,12 @@ func (m *MsgRegisterController) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x1a } } - if len(m.Assertions) > 0 { - for iNdEx := len(m.Assertions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Assertions[iNdEx]) - copy(dAtA[i:], m.Assertions[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.Assertions[iNdEx]))) - i-- - dAtA[i] = 0x12 - } + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = encodeVarintTx(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0x12 } if len(m.Authority) > 0 { i -= len(m.Authority) @@ -1691,11 +1689,9 @@ func (m *MsgRegisterController) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if len(m.Assertions) > 0 { - for _, b := range m.Assertions { - l = len(b) - n += 1 + l + sovTx(uint64(l)) - } + l = len(m.Cid) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) } if len(m.Keyshares) > 0 { for _, b := range m.Keyshares { @@ -2699,9 +2695,9 @@ func (m *MsgRegisterController) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Assertions", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -2711,23 +2707,23 @@ func (m *MsgRegisterController) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen 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]) + m.Cid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { diff --git a/x/did/types/types.pb.go b/x/did/types/types.pb.go index 3329dca2e..75ec7c838 100644 --- a/x/did/types/types.pb.go +++ b/x/did/types/types.pb.go @@ -4,7 +4,6 @@ package types import ( - encoding_binary "encoding/binary" fmt "fmt" _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types/msgservice" @@ -26,272 +25,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// AssetInfo defines the asset info -type AssetInfo struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` - Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` - AssetType string `protobuf:"bytes,4,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` - OriginChain string `protobuf:"bytes,5,opt,name=origin_chain,json=originChain,proto3" json:"origin_chain,omitempty"` - OriginDenom string `protobuf:"bytes,6,opt,name=origin_denom,json=originDenom,proto3" json:"origin_denom,omitempty"` - Decimals int32 `protobuf:"varint,7,opt,name=decimals,proto3" json:"decimals,omitempty"` - Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` - ImageUrl string `protobuf:"bytes,9,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"` - CoingeckoId string `protobuf:"bytes,10,opt,name=coingecko_id,json=coingeckoId,proto3" json:"coingecko_id,omitempty"` - IsEnabled bool `protobuf:"varint,11,opt,name=is_enabled,json=isEnabled,proto3" json:"is_enabled,omitempty"` - IbcPath string `protobuf:"bytes,12,opt,name=ibc_path,json=ibcPath,proto3" json:"ibc_path,omitempty"` - IbcChannel string `protobuf:"bytes,13,opt,name=ibc_channel,json=ibcChannel,proto3" json:"ibc_channel,omitempty"` - IbcPort string `protobuf:"bytes,14,opt,name=ibc_port,json=ibcPort,proto3" json:"ibc_port,omitempty"` -} - -func (m *AssetInfo) Reset() { *m = AssetInfo{} } -func (m *AssetInfo) String() string { return proto.CompactTextString(m) } -func (*AssetInfo) ProtoMessage() {} -func (*AssetInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{0} -} -func (m *AssetInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AssetInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AssetInfo.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 *AssetInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_AssetInfo.Merge(m, src) -} -func (m *AssetInfo) XXX_Size() int { - return m.Size() -} -func (m *AssetInfo) XXX_DiscardUnknown() { - xxx_messageInfo_AssetInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_AssetInfo proto.InternalMessageInfo - -func (m *AssetInfo) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *AssetInfo) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -func (m *AssetInfo) GetSymbol() string { - if m != nil { - return m.Symbol - } - return "" -} - -func (m *AssetInfo) GetAssetType() string { - if m != nil { - return m.AssetType - } - return "" -} - -func (m *AssetInfo) GetOriginChain() string { - if m != nil { - return m.OriginChain - } - return "" -} - -func (m *AssetInfo) GetOriginDenom() string { - if m != nil { - return m.OriginDenom - } - return "" -} - -func (m *AssetInfo) GetDecimals() int32 { - if m != nil { - return m.Decimals - } - return 0 -} - -func (m *AssetInfo) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *AssetInfo) GetImageUrl() string { - if m != nil { - return m.ImageUrl - } - return "" -} - -func (m *AssetInfo) GetCoingeckoId() string { - if m != nil { - return m.CoingeckoId - } - return "" -} - -func (m *AssetInfo) GetIsEnabled() bool { - if m != nil { - return m.IsEnabled - } - return false -} - -func (m *AssetInfo) GetIbcPath() string { - if m != nil { - return m.IbcPath - } - return "" -} - -func (m *AssetInfo) GetIbcChannel() string { - if m != nil { - return m.IbcChannel - } - return "" -} - -func (m *AssetInfo) GetIbcPort() string { - if m != nil { - return m.IbcPort - } - return "" -} - -// ChainInfo defines the chain info -type ChainInfo struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Symbol string `protobuf:"bytes,4,opt,name=symbol,proto3" json:"symbol,omitempty"` - Bech32Prefix string `protobuf:"bytes,5,opt,name=bech32_prefix,json=bech32Prefix,proto3" json:"bech32_prefix,omitempty"` - GenesisTime string `protobuf:"bytes,6,opt,name=genesis_time,json=genesisTime,proto3" json:"genesis_time,omitempty"` - GrpcEndpoints []*Endpoint `protobuf:"bytes,7,rep,name=grpc_endpoints,json=grpcEndpoints,proto3" json:"grpc_endpoints,omitempty"` - RestEndpoints []*Endpoint `protobuf:"bytes,8,rep,name=rest_endpoints,json=restEndpoints,proto3" json:"rest_endpoints,omitempty"` - Explorer *ExplorerInfo `protobuf:"bytes,9,opt,name=explorer,proto3" json:"explorer,omitempty"` - FeeInfo *FeeInfo `protobuf:"bytes,10,opt,name=fee_info,json=feeInfo,proto3" json:"fee_info,omitempty"` -} - -func (m *ChainInfo) Reset() { *m = ChainInfo{} } -func (m *ChainInfo) String() string { return proto.CompactTextString(m) } -func (*ChainInfo) ProtoMessage() {} -func (*ChainInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{1} -} -func (m *ChainInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ChainInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ChainInfo.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 *ChainInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChainInfo.Merge(m, src) -} -func (m *ChainInfo) XXX_Size() int { - return m.Size() -} -func (m *ChainInfo) XXX_DiscardUnknown() { - xxx_messageInfo_ChainInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_ChainInfo proto.InternalMessageInfo - -func (m *ChainInfo) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *ChainInfo) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -func (m *ChainInfo) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *ChainInfo) GetSymbol() string { - if m != nil { - return m.Symbol - } - return "" -} - -func (m *ChainInfo) GetBech32Prefix() string { - if m != nil { - return m.Bech32Prefix - } - return "" -} - -func (m *ChainInfo) GetGenesisTime() string { - if m != nil { - return m.GenesisTime - } - return "" -} - -func (m *ChainInfo) GetGrpcEndpoints() []*Endpoint { - if m != nil { - return m.GrpcEndpoints - } - return nil -} - -func (m *ChainInfo) GetRestEndpoints() []*Endpoint { - if m != nil { - return m.RestEndpoints - } - return nil -} - -func (m *ChainInfo) GetExplorer() *ExplorerInfo { - if m != nil { - return m.Explorer - } - return nil -} - -func (m *ChainInfo) GetFeeInfo() *FeeInfo { - if m != nil { - return m.FeeInfo - } - return nil -} - // Credential defines a WebAuthn credential type Credential struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` @@ -307,7 +40,7 @@ func (m *Credential) Reset() { *m = Credential{} } func (m *Credential) String() string { return proto.CompactTextString(m) } func (*Credential) ProtoMessage() {} func (*Credential) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{2} + return fileDescriptor_e3176cd2dbe76ac1, []int{0} } func (m *Credential) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -399,7 +132,7 @@ func (m *Document) Reset() { *m = Document{} } func (m *Document) String() string { return proto.CompactTextString(m) } func (*Document) ProtoMessage() {} func (*Document) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{3} + return fileDescriptor_e3176cd2dbe76ac1, []int{1} } func (m *Document) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -470,189 +203,6 @@ func (m *Document) GetCapabilityInvocation() []string { return nil } -// Endpoint defines an endpoint -type Endpoint struct { - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` - IsPrimary bool `protobuf:"varint,2,opt,name=is_primary,json=isPrimary,proto3" json:"is_primary,omitempty"` -} - -func (m *Endpoint) Reset() { *m = Endpoint{} } -func (m *Endpoint) String() string { return proto.CompactTextString(m) } -func (*Endpoint) ProtoMessage() {} -func (*Endpoint) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{4} -} -func (m *Endpoint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Endpoint.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 *Endpoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_Endpoint.Merge(m, src) -} -func (m *Endpoint) XXX_Size() int { - return m.Size() -} -func (m *Endpoint) XXX_DiscardUnknown() { - xxx_messageInfo_Endpoint.DiscardUnknown(m) -} - -var xxx_messageInfo_Endpoint proto.InternalMessageInfo - -func (m *Endpoint) GetUrl() string { - if m != nil { - return m.Url - } - return "" -} - -func (m *Endpoint) GetIsPrimary() bool { - if m != nil { - return m.IsPrimary - } - return false -} - -// ExplorerInfo defines the explorer info -type ExplorerInfo struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` -} - -func (m *ExplorerInfo) Reset() { *m = ExplorerInfo{} } -func (m *ExplorerInfo) String() string { return proto.CompactTextString(m) } -func (*ExplorerInfo) ProtoMessage() {} -func (*ExplorerInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{5} -} -func (m *ExplorerInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExplorerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExplorerInfo.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 *ExplorerInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExplorerInfo.Merge(m, src) -} -func (m *ExplorerInfo) XXX_Size() int { - return m.Size() -} -func (m *ExplorerInfo) XXX_DiscardUnknown() { - xxx_messageInfo_ExplorerInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_ExplorerInfo proto.InternalMessageInfo - -func (m *ExplorerInfo) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *ExplorerInfo) GetUrl() string { - if m != nil { - return m.Url - } - return "" -} - -// FeeInfo defines a fee info -type FeeInfo struct { - BaseDenom string `protobuf:"bytes,1,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty"` - FeeRates []string `protobuf:"bytes,2,rep,name=fee_rates,json=feeRates,proto3" json:"fee_rates,omitempty"` - InitGasLimit int32 `protobuf:"varint,3,opt,name=init_gas_limit,json=initGasLimit,proto3" json:"init_gas_limit,omitempty"` - IsSimulable bool `protobuf:"varint,4,opt,name=is_simulable,json=isSimulable,proto3" json:"is_simulable,omitempty"` - GasMultiply float64 `protobuf:"fixed64,5,opt,name=gas_multiply,json=gasMultiply,proto3" json:"gas_multiply,omitempty"` -} - -func (m *FeeInfo) Reset() { *m = FeeInfo{} } -func (m *FeeInfo) String() string { return proto.CompactTextString(m) } -func (*FeeInfo) ProtoMessage() {} -func (*FeeInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{6} -} -func (m *FeeInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FeeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FeeInfo.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 *FeeInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_FeeInfo.Merge(m, src) -} -func (m *FeeInfo) XXX_Size() int { - return m.Size() -} -func (m *FeeInfo) XXX_DiscardUnknown() { - xxx_messageInfo_FeeInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_FeeInfo proto.InternalMessageInfo - -func (m *FeeInfo) GetBaseDenom() string { - if m != nil { - return m.BaseDenom - } - return "" -} - -func (m *FeeInfo) GetFeeRates() []string { - if m != nil { - return m.FeeRates - } - return nil -} - -func (m *FeeInfo) GetInitGasLimit() int32 { - if m != nil { - return m.InitGasLimit - } - return 0 -} - -func (m *FeeInfo) GetIsSimulable() bool { - if m != nil { - return m.IsSimulable - } - return false -} - -func (m *FeeInfo) GetGasMultiply() float64 { - if m != nil { - return m.GasMultiply - } - return 0 -} - // Identity defines an associated profile for a did subject type Identity struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` @@ -666,7 +216,7 @@ func (m *Identity) Reset() { *m = Identity{} } func (m *Identity) String() string { return proto.CompactTextString(m) } func (*Identity) ProtoMessage() {} func (*Identity) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{7} + return fileDescriptor_e3176cd2dbe76ac1, []int{2} } func (m *Identity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -742,7 +292,7 @@ func (m *PubKey) Reset() { *m = PubKey{} } func (m *PubKey) String() string { return proto.CompactTextString(m) } func (*PubKey) ProtoMessage() {} func (*PubKey) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{8} + return fileDescriptor_e3176cd2dbe76ac1, []int{3} } func (m *PubKey) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -813,7 +363,7 @@ func (m *VerificationMethod) Reset() { *m = VerificationMethod{} } func (m *VerificationMethod) String() string { return proto.CompactTextString(m) } func (*VerificationMethod) ProtoMessage() {} func (*VerificationMethod) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{9} + return fileDescriptor_e3176cd2dbe76ac1, []int{4} } func (m *VerificationMethod) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -871,13 +421,8 @@ func (m *VerificationMethod) GetPublicKeyJwks() map[string]string { } func init() { - proto.RegisterType((*AssetInfo)(nil), "did.v1.AssetInfo") - proto.RegisterType((*ChainInfo)(nil), "did.v1.ChainInfo") proto.RegisterType((*Credential)(nil), "did.v1.Credential") proto.RegisterType((*Document)(nil), "did.v1.Document") - proto.RegisterType((*Endpoint)(nil), "did.v1.Endpoint") - proto.RegisterType((*ExplorerInfo)(nil), "did.v1.ExplorerInfo") - proto.RegisterType((*FeeInfo)(nil), "did.v1.FeeInfo") proto.RegisterType((*Identity)(nil), "did.v1.Identity") proto.RegisterType((*PubKey)(nil), "did.v1.PubKey") proto.RegisterType((*VerificationMethod)(nil), "did.v1.VerificationMethod") @@ -887,317 +432,47 @@ func init() { func init() { proto.RegisterFile("did/v1/types.proto", fileDescriptor_e3176cd2dbe76ac1) } var fileDescriptor_e3176cd2dbe76ac1 = []byte{ - // 1133 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcd, 0x72, 0xe3, 0x44, - 0x10, 0x8e, 0xec, 0x38, 0x96, 0xda, 0x8e, 0x93, 0x1a, 0x0c, 0x28, 0x59, 0x30, 0xc1, 0x4b, 0x41, - 0xa0, 0x0a, 0x7b, 0x37, 0xd9, 0x2a, 0x28, 0xe0, 0x00, 0x24, 0x81, 0x32, 0x4b, 0xa8, 0x94, 0xd8, - 0xe5, 0xc0, 0x45, 0x35, 0x92, 0xc6, 0xf2, 0xac, 0x25, 0x8d, 0x4a, 0x33, 0x76, 0xa2, 0xa7, 0x80, - 0x67, 0xe0, 0xc0, 0x9d, 0xb7, 0xe0, 0xb8, 0x47, 0xb8, 0x51, 0xc9, 0x3b, 0x70, 0xe0, 0x44, 0xcd, - 0x8c, 0x24, 0x2b, 0x31, 0xb9, 0x70, 0x9b, 0xfe, 0xba, 0x7b, 0x7e, 0xfa, 0xfb, 0xba, 0x6b, 0x00, - 0x05, 0x34, 0x18, 0x2f, 0x1f, 0x8f, 0x45, 0x9e, 0x12, 0x3e, 0x4a, 0x33, 0x26, 0x18, 0xda, 0x0a, - 0x68, 0x30, 0x5a, 0x3e, 0xde, 0x7f, 0xdd, 0x67, 0x3c, 0x66, 0x7c, 0x1c, 0xf3, 0x50, 0x86, 0xc4, - 0x3c, 0xd4, 0x01, 0xfb, 0xfd, 0x90, 0x85, 0x4c, 0x2d, 0xc7, 0x72, 0x55, 0xa0, 0x7b, 0x3a, 0xdc, - 0xd5, 0x0e, 0x6d, 0x68, 0xd7, 0xf0, 0x97, 0x26, 0x58, 0x5f, 0x70, 0x4e, 0xc4, 0x24, 0x99, 0x32, - 0xd4, 0x83, 0x06, 0x0d, 0x6c, 0xe3, 0xc0, 0x38, 0xb4, 0x9c, 0x06, 0x0d, 0x50, 0x1f, 0x5a, 0x01, - 0x49, 0x58, 0x6c, 0x37, 0x14, 0xa4, 0x0d, 0xf4, 0x1a, 0x6c, 0xf1, 0x3c, 0xf6, 0x58, 0x64, 0x37, - 0x15, 0x5c, 0x58, 0xe8, 0x4d, 0x00, 0x2c, 0xb7, 0x72, 0xe5, 0x95, 0xed, 0x4d, 0xe5, 0xb3, 0x14, - 0xf2, 0x2c, 0x4f, 0x09, 0x7a, 0x1b, 0xba, 0x2c, 0xa3, 0x21, 0x4d, 0x5c, 0x7f, 0x86, 0x69, 0x62, - 0xb7, 0x54, 0x40, 0x47, 0x63, 0x27, 0x12, 0xaa, 0x85, 0xe8, 0x63, 0xb7, 0xea, 0x21, 0xa7, 0xea, - 0xf0, 0x7d, 0x30, 0x03, 0xe2, 0xd3, 0x18, 0x47, 0xdc, 0x6e, 0x1f, 0x18, 0x87, 0x2d, 0xa7, 0xb2, - 0xd1, 0x01, 0x74, 0x02, 0xc2, 0xfd, 0x8c, 0xa6, 0x82, 0xb2, 0xc4, 0x36, 0x75, 0x76, 0x0d, 0x42, - 0x0f, 0xc0, 0xa2, 0x31, 0x0e, 0x89, 0xbb, 0xc8, 0x22, 0xdb, 0x52, 0x7e, 0x53, 0x01, 0xcf, 0xb3, - 0x48, 0x9e, 0xee, 0x33, 0x9a, 0x84, 0xc4, 0x9f, 0x33, 0x97, 0x06, 0x36, 0xe8, 0xfc, 0x0a, 0x9b, - 0x04, 0xf2, 0x89, 0x94, 0xbb, 0x24, 0xc1, 0x5e, 0x44, 0x02, 0xbb, 0x73, 0x60, 0x1c, 0x9a, 0x8e, - 0x45, 0xf9, 0x99, 0x06, 0xd0, 0x1e, 0x98, 0xd4, 0xf3, 0xdd, 0x14, 0x8b, 0x99, 0xdd, 0x55, 0xd9, - 0x6d, 0xea, 0xf9, 0x17, 0x58, 0xcc, 0xd0, 0x5b, 0xd0, 0x91, 0x2e, 0x7f, 0x86, 0x93, 0x84, 0x44, - 0xf6, 0xb6, 0xf2, 0x02, 0xf5, 0xfc, 0x13, 0x8d, 0x54, 0xb9, 0x2c, 0x13, 0x76, 0x6f, 0x95, 0xcb, - 0x32, 0x31, 0xfc, 0xa7, 0x01, 0x96, 0x2a, 0xd0, 0x7f, 0x92, 0xb4, 0x07, 0xa6, 0x2a, 0xa8, 0xbc, - 0xb2, 0xe6, 0xa9, 0xad, 0xec, 0x49, 0x80, 0x10, 0x6c, 0x26, 0x38, 0x26, 0x05, 0x4f, 0x6a, 0x5d, - 0x63, 0x6f, 0xf3, 0x16, 0x7b, 0x0f, 0x61, 0xdb, 0x23, 0xfe, 0xec, 0xf8, 0xc8, 0x4d, 0x33, 0x32, - 0xa5, 0x57, 0x05, 0x3f, 0x5d, 0x0d, 0x5e, 0x28, 0x4c, 0x96, 0x28, 0x24, 0x09, 0xe1, 0x94, 0xbb, - 0x82, 0xc6, 0xa4, 0x24, 0xa8, 0xc0, 0x9e, 0xd1, 0x98, 0xa0, 0x8f, 0xa0, 0x17, 0x66, 0xa9, 0xef, - 0x92, 0x24, 0x48, 0x19, 0x4d, 0x84, 0xa4, 0xa9, 0x79, 0xd8, 0x39, 0xda, 0x1d, 0x69, 0xf1, 0x8e, - 0xce, 0x0a, 0x87, 0xb3, 0x2d, 0xe3, 0x4a, 0x8b, 0xcb, 0xc4, 0x8c, 0x70, 0x51, 0x4b, 0x34, 0xef, - 0x4b, 0x94, 0x71, 0xab, 0xc4, 0x47, 0x60, 0x92, 0xab, 0x34, 0x62, 0x19, 0xc9, 0x14, 0xa7, 0x9d, - 0xa3, 0x7e, 0x95, 0x52, 0xe0, 0xb2, 0x70, 0x4e, 0x15, 0x85, 0x3e, 0x00, 0x73, 0x4a, 0x88, 0x4b, - 0x93, 0x29, 0x53, 0x2c, 0x77, 0x8e, 0x76, 0xca, 0x8c, 0xaf, 0x08, 0x51, 0xc1, 0xed, 0xa9, 0x5e, - 0x0c, 0xff, 0x36, 0x00, 0x4e, 0x32, 0x12, 0x90, 0x44, 0x50, 0x1c, 0xad, 0x55, 0xff, 0x3d, 0xd8, - 0xf1, 0x2b, 0xaf, 0x56, 0xbe, 0x26, 0xa1, 0xb7, 0x82, 0x95, 0xfc, 0x1f, 0xc2, 0x76, 0x2d, 0x90, - 0x06, 0x8a, 0x94, 0xae, 0xd3, 0x5d, 0x81, 0x93, 0x00, 0xbd, 0x01, 0x96, 0xc8, 0x70, 0xc2, 0x95, - 0x0a, 0x36, 0x0f, 0x9a, 0xb2, 0x83, 0x2a, 0x00, 0xbd, 0x0f, 0xbb, 0x58, 0x08, 0xc2, 0x05, 0x96, - 0x62, 0xd6, 0x87, 0x69, 0x96, 0x76, 0x6a, 0x78, 0xd9, 0x6c, 0x01, 0xe5, 0x69, 0x84, 0x73, 0x57, - 0x29, 0xa0, 0x20, 0xaa, 0xc0, 0xbe, 0x93, 0x42, 0x18, 0x00, 0xf8, 0x2c, 0x11, 0x19, 0x8b, 0x22, - 0x92, 0xa9, 0x5e, 0xb2, 0x9c, 0x1a, 0x32, 0xfc, 0xb5, 0x01, 0xe6, 0x29, 0xf3, 0x17, 0x31, 0x49, - 0xc4, 0xda, 0xb3, 0xcf, 0xa1, 0xbf, 0x24, 0x19, 0x9d, 0x52, 0x5f, 0xdf, 0x25, 0x26, 0x62, 0xc6, - 0x02, 0x6e, 0x37, 0x14, 0x65, 0xfb, 0x65, 0x35, 0x7f, 0xa8, 0xc5, 0x9c, 0xab, 0x10, 0xe7, 0x95, - 0xe5, 0x1a, 0xc6, 0xd1, 0xbb, 0xd0, 0xc3, 0x0b, 0x31, 0x93, 0x75, 0xd0, 0x8e, 0xe2, 0xf1, 0x77, - 0x50, 0x55, 0x01, 0xce, 0x49, 0x56, 0x3b, 0xd3, 0x6e, 0xa9, 0xc8, 0x9d, 0x0a, 0xd7, 0x7b, 0xa2, - 0x63, 0x78, 0xd5, 0xc7, 0x29, 0xf6, 0x68, 0x44, 0x45, 0xee, 0x06, 0x24, 0x22, 0xa1, 0xde, 0xb9, - 0xad, 0xe2, 0xfb, 0x2b, 0xe7, 0x69, 0xe5, 0xbb, 0x93, 0x44, 0x93, 0x25, 0x2b, 0xae, 0x63, 0xde, - 0x4d, 0x9a, 0x54, 0xbe, 0xe1, 0xa7, 0x60, 0x96, 0x62, 0x44, 0xbb, 0xd0, 0x94, 0xa3, 0x45, 0x17, - 0x4a, 0x2e, 0x8b, 0x91, 0x91, 0x66, 0x34, 0xc6, 0x59, 0xae, 0xb4, 0xa1, 0x46, 0xc6, 0x85, 0x06, - 0x86, 0x4f, 0xa0, 0x5b, 0x17, 0x69, 0xd5, 0xb2, 0x46, 0xad, 0x65, 0x8b, 0x4d, 0x1b, 0xd5, 0xa6, - 0xc3, 0xdf, 0x0c, 0x68, 0x17, 0x4a, 0x95, 0x07, 0x78, 0x98, 0x93, 0x62, 0x64, 0xea, 0x3c, 0x4b, - 0x22, 0x7a, 0x60, 0x3e, 0x00, 0x4b, 0x6a, 0x3d, 0xc3, 0x82, 0x68, 0x7a, 0x2c, 0x47, 0x8a, 0xdf, - 0x91, 0x36, 0x7a, 0x07, 0x7a, 0x34, 0xa1, 0xc2, 0x0d, 0x31, 0x77, 0x23, 0x1a, 0x53, 0xa1, 0x54, - 0xd9, 0x72, 0xba, 0x12, 0xfd, 0x1a, 0xf3, 0x6f, 0x25, 0x26, 0xc5, 0x44, 0xb9, 0xcb, 0x69, 0xbc, - 0x88, 0xe4, 0x9c, 0x53, 0x83, 0xc3, 0x74, 0x3a, 0x94, 0x7f, 0x5f, 0x42, 0x6a, 0x30, 0x60, 0xee, - 0xc6, 0x8b, 0x48, 0xd0, 0x34, 0xca, 0x95, 0x2c, 0x0d, 0xa7, 0x13, 0x62, 0x7e, 0x5e, 0x40, 0xc3, - 0x3f, 0x0d, 0x30, 0x27, 0x4a, 0xea, 0x22, 0x5f, 0xd3, 0x93, 0x0d, 0x6d, 0xbe, 0xf0, 0x5e, 0x10, - 0x5f, 0x94, 0x33, 0xac, 0x30, 0xef, 0xc8, 0xb4, 0x79, 0x57, 0xa6, 0xe8, 0x09, 0x74, 0x56, 0x2d, - 0xc4, 0x95, 0x6e, 0x3a, 0x47, 0xa8, 0x14, 0xe0, 0xaa, 0x73, 0x9d, 0x7a, 0xd8, 0xbd, 0xfa, 0x6d, - 0xfd, 0x2f, 0xfd, 0x0e, 0x09, 0x6c, 0x5d, 0x2c, 0xbc, 0xa7, 0x64, 0xfd, 0x61, 0xbb, 0xd0, 0x9c, - 0x13, 0xcd, 0x7b, 0xd7, 0x91, 0x4b, 0x39, 0xaf, 0xe7, 0x24, 0xd7, 0xdd, 0xab, 0x9f, 0xd3, 0x9e, - 0x93, 0x5c, 0x75, 0xed, 0xed, 0xb7, 0x6e, 0xae, 0xb5, 0xe4, 0x4f, 0x0d, 0x40, 0xeb, 0x57, 0x5a, - 0x3b, 0xf3, 0xf6, 0x36, 0x8d, 0xb5, 0x92, 0x3d, 0x82, 0x7e, 0xba, 0xf0, 0x22, 0xea, 0xbb, 0xf2, - 0x22, 0x8a, 0x33, 0xa9, 0x97, 0xe2, 0x36, 0x48, 0xfb, 0x9e, 0x92, 0xfc, 0xbc, 0xf4, 0xa0, 0xe7, - 0xb0, 0x53, 0xcb, 0x78, 0x71, 0x39, 0x2f, 0x0b, 0xfd, 0xe1, 0xfd, 0x95, 0x1a, 0x5d, 0x94, 0xfb, - 0x7c, 0x73, 0x39, 0xe7, 0x67, 0x89, 0xc8, 0x72, 0x67, 0x3b, 0xad, 0x63, 0xfb, 0x9f, 0x03, 0x5a, - 0x0f, 0x2a, 0x4b, 0x56, 0xf4, 0x90, 0x2c, 0x59, 0x1f, 0x5a, 0x4b, 0x1c, 0x2d, 0xca, 0xd1, 0xaa, - 0x8d, 0x4f, 0x1a, 0x1f, 0x1b, 0x5f, 0x7e, 0xf6, 0xfb, 0xf5, 0xc0, 0x78, 0x79, 0x3d, 0x30, 0xfe, - 0xba, 0x1e, 0x18, 0x3f, 0xdf, 0x0c, 0x36, 0x5e, 0xde, 0x0c, 0x36, 0xfe, 0xb8, 0x19, 0x6c, 0xfc, - 0x38, 0x0c, 0xa9, 0x98, 0x2d, 0xbc, 0x91, 0xcf, 0xe2, 0x31, 0x4b, 0x38, 0x4b, 0xb2, 0xf1, 0xec, - 0x12, 0xe7, 0xe3, 0xab, 0xb1, 0xfc, 0x58, 0xa9, 0x5f, 0x95, 0xb7, 0xa5, 0x3e, 0x41, 0xc7, 0xff, - 0x06, 0x00, 0x00, 0xff, 0xff, 0x81, 0xc0, 0xc2, 0xed, 0x6c, 0x09, 0x00, 0x00, -} - -func (m *AssetInfo) 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 *AssetInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AssetInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.IbcPort) > 0 { - i -= len(m.IbcPort) - copy(dAtA[i:], m.IbcPort) - i = encodeVarintTypes(dAtA, i, uint64(len(m.IbcPort))) - i-- - dAtA[i] = 0x72 - } - if len(m.IbcChannel) > 0 { - i -= len(m.IbcChannel) - copy(dAtA[i:], m.IbcChannel) - i = encodeVarintTypes(dAtA, i, uint64(len(m.IbcChannel))) - i-- - dAtA[i] = 0x6a - } - if len(m.IbcPath) > 0 { - i -= len(m.IbcPath) - copy(dAtA[i:], m.IbcPath) - i = encodeVarintTypes(dAtA, i, uint64(len(m.IbcPath))) - i-- - dAtA[i] = 0x62 - } - if m.IsEnabled { - i-- - if m.IsEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - } - if len(m.CoingeckoId) > 0 { - i -= len(m.CoingeckoId) - copy(dAtA[i:], m.CoingeckoId) - i = encodeVarintTypes(dAtA, i, uint64(len(m.CoingeckoId))) - i-- - dAtA[i] = 0x52 - } - if len(m.ImageUrl) > 0 { - i -= len(m.ImageUrl) - copy(dAtA[i:], m.ImageUrl) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ImageUrl))) - i-- - dAtA[i] = 0x4a - } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x42 - } - if m.Decimals != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Decimals)) - i-- - dAtA[i] = 0x38 - } - if len(m.OriginDenom) > 0 { - i -= len(m.OriginDenom) - copy(dAtA[i:], m.OriginDenom) - i = encodeVarintTypes(dAtA, i, uint64(len(m.OriginDenom))) - i-- - dAtA[i] = 0x32 - } - if len(m.OriginChain) > 0 { - i -= len(m.OriginChain) - copy(dAtA[i:], m.OriginChain) - i = encodeVarintTypes(dAtA, i, uint64(len(m.OriginChain))) - i-- - dAtA[i] = 0x2a - } - if len(m.AssetType) > 0 { - i -= len(m.AssetType) - copy(dAtA[i:], m.AssetType) - i = encodeVarintTypes(dAtA, i, uint64(len(m.AssetType))) - i-- - dAtA[i] = 0x22 - } - if len(m.Symbol) > 0 { - i -= len(m.Symbol) - copy(dAtA[i:], m.Symbol) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Symbol))) - i-- - dAtA[i] = 0x1a - } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ChainInfo) 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 *ChainInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ChainInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.FeeInfo != nil { - { - size, err := m.FeeInfo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - if m.Explorer != nil { - { - size, err := m.Explorer.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - if len(m.RestEndpoints) > 0 { - for iNdEx := len(m.RestEndpoints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.RestEndpoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - } - if len(m.GrpcEndpoints) > 0 { - for iNdEx := len(m.GrpcEndpoints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.GrpcEndpoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if len(m.GenesisTime) > 0 { - i -= len(m.GenesisTime) - copy(dAtA[i:], m.GenesisTime) - i = encodeVarintTypes(dAtA, i, uint64(len(m.GenesisTime))) - i-- - dAtA[i] = 0x32 - } - if len(m.Bech32Prefix) > 0 { - i -= len(m.Bech32Prefix) - copy(dAtA[i:], m.Bech32Prefix) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Bech32Prefix))) - i-- - dAtA[i] = 0x2a - } - if len(m.Symbol) > 0 { - i -= len(m.Symbol) - copy(dAtA[i:], m.Symbol) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Symbol))) - i-- - dAtA[i] = 0x22 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x1a - } - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + // 628 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xcf, 0x6e, 0xd3, 0x4e, + 0x10, 0xae, 0x9d, 0xe6, 0x4f, 0x27, 0x69, 0x53, 0xed, 0x2f, 0x3f, 0xe1, 0x46, 0xc8, 0x0a, 0x41, + 0x82, 0x70, 0x20, 0xa6, 0x2d, 0x07, 0x84, 0x38, 0x20, 0x28, 0x87, 0x52, 0x15, 0x55, 0x16, 0x70, + 0xe0, 0x12, 0xad, 0xed, 0x25, 0xd9, 0xc6, 0xf6, 0x5a, 0xde, 0x75, 0x8a, 0x9f, 0x02, 0x9e, 0x82, + 0x67, 0xe1, 0xd8, 0x23, 0xdc, 0x50, 0xfb, 0x0e, 0x9c, 0x91, 0x77, 0xe3, 0xd8, 0x8d, 0xd5, 0x0b, + 0xb7, 0xdd, 0xef, 0xfb, 0x76, 0x67, 0xe6, 0x9b, 0xd1, 0x00, 0xf2, 0xa8, 0x67, 0x2d, 0xf6, 0x2d, + 0x91, 0x46, 0x84, 0x8f, 0xa3, 0x98, 0x09, 0x86, 0x1a, 0x1e, 0xf5, 0xc6, 0x8b, 0xfd, 0xfe, 0x1d, + 0x97, 0xf1, 0x80, 0x71, 0x2b, 0xe0, 0xd3, 0x4c, 0x12, 0xf0, 0xa9, 0x12, 0xf4, 0x7b, 0x53, 0x36, + 0x65, 0xf2, 0x68, 0x65, 0xa7, 0x25, 0xba, 0xa7, 0xe4, 0x13, 0x45, 0xa8, 0x8b, 0xa2, 0x86, 0x7f, + 0x34, 0x80, 0xd7, 0x31, 0xf1, 0x48, 0x28, 0x28, 0xf6, 0xd1, 0x0e, 0xe8, 0xd4, 0x33, 0xb4, 0x81, + 0x36, 0xda, 0xb2, 0x75, 0xea, 0xa1, 0x87, 0xd0, 0x75, 0x57, 0xec, 0x24, 0x4b, 0xc5, 0xd0, 0x25, + 0xb9, 0x53, 0xc0, 0xef, 0xd3, 0x88, 0xa0, 0xfb, 0xb0, 0x5d, 0x12, 0x52, 0xcf, 0xa8, 0x0d, 0xb4, + 0x51, 0xc7, 0xee, 0x14, 0xe0, 0xb1, 0x87, 0xee, 0xc2, 0x96, 0x88, 0x71, 0xc8, 0x23, 0x16, 0x0b, + 0x63, 0x73, 0x50, 0x1b, 0x6d, 0xd9, 0x05, 0x80, 0x1e, 0xc1, 0x2e, 0x16, 0x82, 0x70, 0x81, 0x05, + 0x65, 0xa1, 0x0a, 0x56, 0x97, 0xc1, 0xba, 0x25, 0x5c, 0x46, 0xbb, 0x07, 0x1d, 0x8f, 0xf2, 0xc8, + 0xc7, 0xe9, 0x24, 0xc4, 0x01, 0x31, 0x1a, 0x52, 0xd6, 0x5e, 0x62, 0xef, 0x70, 0x40, 0x90, 0x09, + 0xe0, 0xb2, 0x50, 0xc4, 0xcc, 0xf7, 0x49, 0x6c, 0x34, 0xa5, 0xa0, 0x84, 0x0c, 0xbf, 0xeb, 0xd0, + 0x3a, 0x62, 0x6e, 0x12, 0x90, 0x50, 0x54, 0xca, 0x3e, 0x85, 0xde, 0x82, 0xc4, 0xf4, 0x33, 0x75, + 0x55, 0x2e, 0x01, 0x11, 0x33, 0xe6, 0x71, 0x43, 0x1f, 0xd4, 0x46, 0xed, 0x83, 0xfe, 0x58, 0xb5, + 0x61, 0xfc, 0xb1, 0xa4, 0x39, 0x95, 0x12, 0xfb, 0xbf, 0x45, 0x05, 0xe3, 0xe8, 0x01, 0xec, 0xe0, + 0x44, 0xcc, 0x32, 0x1f, 0x14, 0xb1, 0x2c, 0x7e, 0x0d, 0x95, 0x0e, 0x70, 0x4e, 0xe2, 0x52, 0x4c, + 0xa3, 0x2e, 0x95, 0xdd, 0x15, 0xae, 0xfe, 0x44, 0x87, 0xf0, 0xbf, 0x8b, 0x23, 0xec, 0x50, 0x9f, + 0x8a, 0x74, 0xe2, 0x11, 0x9f, 0x4c, 0xd5, 0xcf, 0x4d, 0xa9, 0xef, 0x15, 0xe4, 0xd1, 0x8a, 0x5b, + 0x7b, 0x44, 0xc3, 0x05, 0x5b, 0xa6, 0xd3, 0x5a, 0x7f, 0x74, 0xbc, 0xe2, 0x86, 0xbf, 0x34, 0x68, + 0x1d, 0xcb, 0x1e, 0x8a, 0xb4, 0x62, 0x94, 0x01, 0x4d, 0x9e, 0x38, 0xe7, 0xc4, 0x15, 0xcb, 0xb9, + 0xc8, 0xaf, 0x6b, 0xfe, 0xd7, 0xd6, 0xfd, 0x47, 0x4f, 0xa1, 0x5d, 0xcc, 0x06, 0x97, 0x86, 0xb4, + 0x0f, 0x50, 0xee, 0x6c, 0x31, 0x92, 0x76, 0x59, 0x76, 0x6b, 0x63, 0xea, 0xff, 0xd4, 0x98, 0x21, + 0x81, 0xc6, 0x59, 0xe2, 0x9c, 0x90, 0x6a, 0x61, 0xbb, 0x50, 0x9b, 0x93, 0x54, 0x16, 0xd5, 0xb1, + 0xb3, 0x23, 0xda, 0x83, 0xd6, 0x9c, 0xa4, 0x6a, 0x2c, 0x55, 0x39, 0xcd, 0x39, 0x49, 0xe5, 0x38, + 0xde, 0xac, 0x75, 0xb3, 0x32, 0x6b, 0x5f, 0x75, 0x40, 0xd5, 0x94, 0x2a, 0x31, 0x6f, 0x7e, 0xa3, + 0x57, 0x2c, 0x7b, 0x02, 0xbd, 0x28, 0x71, 0x7c, 0xea, 0x4e, 0xb2, 0x44, 0x82, 0xc4, 0x17, 0xd4, + 0xc1, 0x3c, 0xcf, 0x06, 0x29, 0xee, 0x84, 0xa4, 0xa7, 0x39, 0x83, 0x3e, 0x40, 0xb7, 0xf4, 0xe2, + 0xfc, 0x62, 0x9e, 0x1b, 0xfd, 0xf8, 0x76, 0xa7, 0xc6, 0x67, 0xf9, 0x3f, 0x6f, 0x2f, 0xe6, 0xfc, + 0x4d, 0x28, 0xe2, 0xd4, 0xde, 0x8e, 0xca, 0x58, 0xff, 0x25, 0xa0, 0xaa, 0x28, 0xb7, 0x4c, 0xd5, + 0x23, 0x2d, 0xeb, 0x41, 0x7d, 0x81, 0xfd, 0x24, 0xdf, 0x19, 0xea, 0xf2, 0x5c, 0x7f, 0xa6, 0xbd, + 0x7a, 0xf1, 0xe3, 0xca, 0xd4, 0x2e, 0xaf, 0x4c, 0xed, 0xf7, 0x95, 0xa9, 0x7d, 0xbb, 0x36, 0x37, + 0x2e, 0xaf, 0xcd, 0x8d, 0x9f, 0xd7, 0xe6, 0xc6, 0xa7, 0xe1, 0x94, 0x8a, 0x59, 0xe2, 0x8c, 0x5d, + 0x16, 0x58, 0x2c, 0xe4, 0x2c, 0x8c, 0xad, 0xd9, 0x05, 0x4e, 0xad, 0x2f, 0x56, 0xb6, 0x0f, 0xe5, + 0x32, 0x74, 0x1a, 0x72, 0x77, 0x1d, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x43, 0x8a, 0x36, 0x63, + 0x23, 0x05, 0x00, 0x00, } func (m *Credential) Marshal() (dAtA []byte, err error) { @@ -1354,143 +629,6 @@ func (m *Document) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Endpoint) 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 *Endpoint) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Endpoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IsPrimary { - i-- - if m.IsPrimary { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.Url) > 0 { - i -= len(m.Url) - copy(dAtA[i:], m.Url) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Url))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ExplorerInfo) 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 *ExplorerInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExplorerInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Url) > 0 { - i -= len(m.Url) - copy(dAtA[i:], m.Url) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Url))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *FeeInfo) 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 *FeeInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FeeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.GasMultiply != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.GasMultiply)))) - i-- - dAtA[i] = 0x29 - } - if m.IsSimulable { - i-- - if m.IsSimulable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if m.InitGasLimit != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.InitGasLimit)) - i-- - dAtA[i] = 0x18 - } - if len(m.FeeRates) > 0 { - for iNdEx := len(m.FeeRates) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.FeeRates[iNdEx]) - copy(dAtA[i:], m.FeeRates[iNdEx]) - i = encodeVarintTypes(dAtA, i, uint64(len(m.FeeRates[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.BaseDenom) > 0 { - i -= len(m.BaseDenom) - copy(dAtA[i:], m.BaseDenom) - i = encodeVarintTypes(dAtA, i, uint64(len(m.BaseDenom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *Identity) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1688,122 +826,6 @@ func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *AssetInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Symbol) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.AssetType) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.OriginChain) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.OriginDenom) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.Decimals != 0 { - n += 1 + sovTypes(uint64(m.Decimals)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.ImageUrl) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.CoingeckoId) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.IsEnabled { - n += 2 - } - l = len(m.IbcPath) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.IbcChannel) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.IbcPort) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *ChainInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Symbol) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Bech32Prefix) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.GenesisTime) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if len(m.GrpcEndpoints) > 0 { - for _, e := range m.GrpcEndpoints { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.RestEndpoints) > 0 { - for _, e := range m.RestEndpoints { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - if m.Explorer != nil { - l = m.Explorer.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.FeeInfo != nil { - l = m.FeeInfo.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - func (m *Credential) Size() (n int) { if m == nil { return 0 @@ -1886,67 +908,6 @@ func (m *Document) Size() (n int) { return n } -func (m *Endpoint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Url) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.IsPrimary { - n += 2 - } - return n -} - -func (m *ExplorerInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Url) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *FeeInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.BaseDenom) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if len(m.FeeRates) > 0 { - for _, s := range m.FeeRates { - l = len(s) - n += 1 + l + sovTypes(uint64(l)) - } - } - if m.InitGasLimit != 0 { - n += 1 + sovTypes(uint64(m.InitGasLimit)) - } - if m.IsSimulable { - n += 2 - } - if m.GasMultiply != 0 { - n += 9 - } - return n -} - func (m *Identity) Size() (n int) { if m == nil { return 0 @@ -2040,861 +1001,6 @@ func sovTypes(x uint64) (n int) { func sozTypes(x uint64) (n int) { return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *AssetInfo) 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 ErrIntOverflowTypes - } - 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: AssetInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AssetInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Symbol = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssetType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AssetType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginChain", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OriginChain = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OriginDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Decimals", wireType) - } - m.Decimals = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Decimals |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ImageUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ImageUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CoingeckoId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CoingeckoId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsEnabled = bool(v != 0) - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IbcPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IbcPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IbcChannel", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IbcChannel = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IbcPort", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IbcPort = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ChainInfo) 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 ErrIntOverflowTypes - } - 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: ChainInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ChainInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Symbol = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bech32Prefix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Bech32Prefix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GenesisTime", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GenesisTime = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GrpcEndpoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GrpcEndpoints = append(m.GrpcEndpoints, &Endpoint{}) - if err := m.GrpcEndpoints[len(m.GrpcEndpoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RestEndpoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RestEndpoints = append(m.RestEndpoints, &Endpoint{}) - if err := m.RestEndpoints[len(m.RestEndpoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Explorer", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Explorer == nil { - m.Explorer = &ExplorerInfo{} - } - if err := m.Explorer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FeeInfo == nil { - m.FeeInfo = &FeeInfo{} - } - if err := m.FeeInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *Credential) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3415,386 +1521,6 @@ func (m *Document) Unmarshal(dAtA []byte) error { } return nil } -func (m *Endpoint) 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 ErrIntOverflowTypes - } - 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: Endpoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Endpoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Url = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsPrimary", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsPrimary = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExplorerInfo) 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 ErrIntOverflowTypes - } - 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: ExplorerInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExplorerInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Url = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FeeInfo) 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 ErrIntOverflowTypes - } - 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: FeeInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FeeInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BaseDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BaseDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeRates", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FeeRates = append(m.FeeRates, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InitGasLimit", wireType) - } - m.InitGasLimit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.InitGasLimit |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsSimulable", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsSimulable = bool(v != 0) - case 5: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field GasMultiply", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.GasMultiply = float64(math.Float64frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *Identity) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0