From 775150830fb17a3ecda29da4a16c7571e68a28ea Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Sat, 6 Jul 2024 00:55:50 -0400 Subject: [PATCH] (no commit message provided) --- api/did/v1/account.pulsar.go | 767 +++-------------------------------- api/did/v1/state.pulsar.go | 212 ++++------ go.mod | 14 +- go.sum | 26 +- proto/did/v1/account.proto | 21 - proto/did/v1/state.proto | 4 +- x/did/types/account.pb.go | 365 ++--------------- x/did/types/account_eth.go | 146 ------- x/did/types/codec.go | 18 +- x/did/types/pubkey.go | 71 ---- x/did/types/state.pb.go | 133 +++--- x/did/types/tx.pb.go | 71 +--- x/did/types/types.go | 15 - 13 files changed, 262 insertions(+), 1601 deletions(-) delete mode 100644 x/did/types/account_eth.go delete mode 100644 x/did/types/pubkey.go delete mode 100644 x/did/types/types.go diff --git a/api/did/v1/account.pulsar.go b/api/did/v1/account.pulsar.go index c2af24c95..eda9bf608 100644 --- a/api/did/v1/account.pulsar.go +++ b/api/did/v1/account.pulsar.go @@ -2,7 +2,6 @@ package didv1 import ( - v1beta1 "cosmossdk.io/api/cosmos/auth/v1beta1" fmt "fmt" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" @@ -15,569 +14,6 @@ import ( sync "sync" ) -var ( - md_EthAccount protoreflect.MessageDescriptor - fd_EthAccount_base_account protoreflect.FieldDescriptor - fd_EthAccount_code_hash protoreflect.FieldDescriptor - fd_EthAccount_controller protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_account_proto_init() - md_EthAccount = File_did_v1_account_proto.Messages().ByName("EthAccount") - fd_EthAccount_base_account = md_EthAccount.Fields().ByName("base_account") - fd_EthAccount_code_hash = md_EthAccount.Fields().ByName("code_hash") - fd_EthAccount_controller = md_EthAccount.Fields().ByName("controller") -} - -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_account_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_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) { - if x.BaseAccount != nil { - value := protoreflect.ValueOfMessage(x.BaseAccount.ProtoReflect()) - if !f(fd_EthAccount_base_account, value) { - return - } - } - if x.CodeHash != "" { - value := protoreflect.ValueOfString(x.CodeHash) - if !f(fd_EthAccount_code_hash, value) { - return - } - } - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_EthAccount_controller, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_EthAccount) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.EthAccount.base_account": - return x.BaseAccount != nil - case "did.v1.EthAccount.code_hash": - return x.CodeHash != "" - case "did.v1.EthAccount.controller": - return x.Controller != "" - 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() { - case "did.v1.EthAccount.base_account": - x.BaseAccount = nil - case "did.v1.EthAccount.code_hash": - x.CodeHash = "" - case "did.v1.EthAccount.controller": - x.Controller = "" - 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() { - case "did.v1.EthAccount.base_account": - value := x.BaseAccount - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "did.v1.EthAccount.code_hash": - value := x.CodeHash - return protoreflect.ValueOfString(value) - case "did.v1.EthAccount.controller": - value := x.Controller - return protoreflect.ValueOfString(value) - 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() { - case "did.v1.EthAccount.base_account": - x.BaseAccount = value.Message().Interface().(*v1beta1.BaseAccount) - case "did.v1.EthAccount.code_hash": - x.CodeHash = value.Interface().(string) - case "did.v1.EthAccount.controller": - x.Controller = value.Interface().(string) - 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() { - case "did.v1.EthAccount.base_account": - if x.BaseAccount == nil { - x.BaseAccount = new(v1beta1.BaseAccount) - } - return protoreflect.ValueOfMessage(x.BaseAccount.ProtoReflect()) - case "did.v1.EthAccount.code_hash": - panic(fmt.Errorf("field code_hash of message did.v1.EthAccount is not mutable")) - case "did.v1.EthAccount.controller": - panic(fmt.Errorf("field controller of message did.v1.EthAccount is not mutable")) - 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() { - case "did.v1.EthAccount.base_account": - m := new(v1beta1.BaseAccount) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "did.v1.EthAccount.code_hash": - return protoreflect.ValueOfString("") - case "did.v1.EthAccount.controller": - return protoreflect.ValueOfString("") - 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.BaseAccount != nil { - l = options.Size(x.BaseAccount) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.CodeHash) - 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.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 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] = 0x1a - } - if len(x.CodeHash) > 0 { - i -= len(x.CodeHash) - copy(dAtA[i:], x.CodeHash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CodeHash))) - i-- - dAtA[i] = 0x12 - } - if x.BaseAccount != nil { - encoded, err := options.Marshal(x.BaseAccount) - 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] = 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().(*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 { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BaseAccount", 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.BaseAccount == nil { - x.BaseAccount = &v1beta1.BaseAccount{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BaseAccount); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CodeHash", 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.CodeHash = 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 Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - var _ protoreflect.List = (*_DIDDocument_2_list)(nil) type _DIDDocument_2_list struct { @@ -843,7 +279,7 @@ func (x *DIDDocument) ProtoReflect() protoreflect.Message { } func (x *DIDDocument) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_account_proto_msgTypes[1] + mi := &file_did_v1_account_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1656,7 +1092,7 @@ func (x *VerificationMethod) ProtoReflect() protoreflect.Message { } func (x *VerificationMethod) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_account_proto_msgTypes[2] + mi := &file_did_v1_account_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2211,62 +1647,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// EthAccount implements the authtypes.AccountI interface and embeds an -// authtypes.BaseAccount type. It is compatible with the auth AccountKeeper. -type EthAccount struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // base_account is an authtypes.BaseAccount - BaseAccount *v1beta1.BaseAccount `protobuf:"bytes,1,opt,name=base_account,json=baseAccount,proto3" json:"base_account,omitempty"` - // code_hash is the hash calculated from the code contents - CodeHash string `protobuf:"bytes,2,opt,name=code_hash,json=codeHash,proto3" json:"code_hash,omitempty"` - // controller is the address of the controller - Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"` -} - -func (x *EthAccount) Reset() { - *x = EthAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_account_proto_msgTypes[0] - 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_account_proto_rawDescGZIP(), []int{0} -} - -func (x *EthAccount) GetBaseAccount() *v1beta1.BaseAccount { - if x != nil { - return x.BaseAccount - } - return nil -} - -func (x *EthAccount) GetCodeHash() string { - if x != nil { - return x.CodeHash - } - return "" -} - -func (x *EthAccount) GetController() string { - if x != nil { - return x.Controller - } - return "" -} - // DIDDocument defines a DID document type DIDDocument struct { state protoimpl.MessageState @@ -2284,7 +1664,7 @@ type DIDDocument struct { func (x *DIDDocument) Reset() { *x = DIDDocument{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_account_proto_msgTypes[1] + mi := &file_did_v1_account_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2298,7 +1678,7 @@ func (*DIDDocument) ProtoMessage() {} // Deprecated: Use DIDDocument.ProtoReflect.Descriptor instead. func (*DIDDocument) Descriptor() ([]byte, []int) { - return file_did_v1_account_proto_rawDescGZIP(), []int{1} + return file_did_v1_account_proto_rawDescGZIP(), []int{0} } func (x *DIDDocument) GetId() string { @@ -2357,7 +1737,7 @@ type VerificationMethod struct { func (x *VerificationMethod) Reset() { *x = VerificationMethod{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_account_proto_msgTypes[2] + mi := &file_did_v1_account_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2371,7 +1751,7 @@ func (*VerificationMethod) ProtoMessage() {} // Deprecated: Use VerificationMethod.ProtoReflect.Descriptor instead. func (*VerificationMethod) Descriptor() ([]byte, []int) { - return file_did_v1_account_proto_rawDescGZIP(), []int{2} + return file_did_v1_account_proto_rawDescGZIP(), []int{1} } func (x *VerificationMethod) GetId() string { @@ -2399,68 +1779,46 @@ var File_did_v1_account_proto protoreflect.FileDescriptor var file_did_v1_account_proto_rawDesc = []byte{ 0x0a, 0x14, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x1e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 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, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb0, 0x02, 0x0a, 0x0a, 0x45, 0x74, 0x68, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x60, 0x0a, 0x0c, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x42, 0x61, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x1b, 0xd0, 0xde, - 0x1f, 0x01, 0xf2, 0xde, 0x1f, 0x13, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x62, 0x61, 0x73, 0x65, - 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x52, 0x0b, 0x62, 0x61, 0x73, 0x65, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x31, 0x0a, 0x09, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x68, - 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xf2, 0xde, 0x1f, 0x10, 0x79, - 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x22, 0x52, - 0x08, 0x63, 0x6f, 0x64, 0x65, 0x48, 0x61, 0x73, 0x68, 0x12, 0x35, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x15, 0xf2, - 0xde, 0x1f, 0x11, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x22, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x3a, 0x56, 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0xca, 0xb4, - 0x2d, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, - 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x22, 0xa9, 0x02, 0x0a, 0x0b, 0x44, 0x49, 0x44, - 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, 0x76, 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, 0x0a, 0x70, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, - 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, - 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x42, 0x7c, 0x0a, 0x0a, - 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 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, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa9, 0x02, 0x0a, 0x0b, 0x44, 0x49, 0x44, 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, 0x76, 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, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x09, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x42, 0x7c, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, + 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 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 ( @@ -2475,23 +1833,20 @@ func file_did_v1_account_proto_rawDescGZIP() []byte { return file_did_v1_account_proto_rawDescData } -var file_did_v1_account_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_did_v1_account_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_did_v1_account_proto_goTypes = []interface{}{ - (*EthAccount)(nil), // 0: did.v1.EthAccount - (*DIDDocument)(nil), // 1: did.v1.DIDDocument - (*VerificationMethod)(nil), // 2: did.v1.VerificationMethod - (*v1beta1.BaseAccount)(nil), // 3: cosmos.auth.v1beta1.BaseAccount - (*PublicKey)(nil), // 4: did.v1.PublicKey + (*DIDDocument)(nil), // 0: did.v1.DIDDocument + (*VerificationMethod)(nil), // 1: did.v1.VerificationMethod + (*PublicKey)(nil), // 2: did.v1.PublicKey } var file_did_v1_account_proto_depIdxs = []int32{ - 3, // 0: did.v1.EthAccount.base_account:type_name -> cosmos.auth.v1beta1.BaseAccount - 2, // 1: did.v1.DIDDocument.verification_methods:type_name -> did.v1.VerificationMethod - 4, // 2: did.v1.VerificationMethod.public_key:type_name -> did.v1.PublicKey - 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 + 1, // 0: did.v1.DIDDocument.verification_methods:type_name -> did.v1.VerificationMethod + 2, // 1: did.v1.VerificationMethod.public_key:type_name -> did.v1.PublicKey + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_did_v1_account_proto_init() } @@ -2502,18 +1857,6 @@ func file_did_v1_account_proto_init() { file_did_v1_genesis_proto_init() if !protoimpl.UnsafeEnabled { file_did_v1_account_proto_msgTypes[0].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_account_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DIDDocument); i { case 0: return &v.state @@ -2525,7 +1868,7 @@ func file_did_v1_account_proto_init() { return nil } } - file_did_v1_account_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_did_v1_account_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*VerificationMethod); i { case 0: return &v.state @@ -2544,7 +1887,7 @@ func file_did_v1_account_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_account_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 2, NumExtensions: 0, NumServices: 0, }, diff --git a/api/did/v1/state.pulsar.go b/api/did/v1/state.pulsar.go index 004c5dd99..6fc698836 100644 --- a/api/did/v1/state.pulsar.go +++ b/api/did/v1/state.pulsar.go @@ -785,8 +785,8 @@ func (x *fastReflection_Controller) Range(f func(protoreflect.FieldDescriptor, p return } } - if x.PublicKey != nil { - value := protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) + if len(x.PublicKey) != 0 { + value := protoreflect.ValueOfBytes(x.PublicKey) if !f(fd_Controller_public_key, value) { return } @@ -823,7 +823,7 @@ func (x *fastReflection_Controller) Has(fd protoreflect.FieldDescriptor) bool { case "did.v1.Controller.did": return x.Did != "" case "did.v1.Controller.public_key": - return x.PublicKey != nil + return len(x.PublicKey) != 0 case "did.v1.Controller.vault_cid": return x.VaultCid != "" case "did.v1.Controller.fingerprint": @@ -878,7 +878,7 @@ func (x *fastReflection_Controller) Get(descriptor protoreflect.FieldDescriptor) return protoreflect.ValueOfString(value) case "did.v1.Controller.public_key": value := x.PublicKey - return protoreflect.ValueOfMessage(value.ProtoReflect()) + return protoreflect.ValueOfBytes(value) case "did.v1.Controller.vault_cid": value := x.VaultCid return protoreflect.ValueOfString(value) @@ -910,7 +910,7 @@ func (x *fastReflection_Controller) Set(fd protoreflect.FieldDescriptor, value p case "did.v1.Controller.did": x.Did = value.Interface().(string) case "did.v1.Controller.public_key": - x.PublicKey = value.Message().Interface().(*PublicKey) + x.PublicKey = value.Bytes() case "did.v1.Controller.vault_cid": x.VaultCid = value.Interface().(string) case "did.v1.Controller.fingerprint": @@ -935,15 +935,12 @@ 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(PublicKey) - } - 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": + panic(fmt.Errorf("field public_key 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": @@ -966,8 +963,7 @@ func (x *fastReflection_Controller) NewField(fd protoreflect.FieldDescriptor) pr case "did.v1.Controller.did": return protoreflect.ValueOfString("") case "did.v1.Controller.public_key": - m := new(PublicKey) - return protoreflect.ValueOfMessage(m.ProtoReflect()) + return protoreflect.ValueOfBytes(nil) case "did.v1.Controller.vault_cid": return protoreflect.ValueOfString("") case "did.v1.Controller.fingerprint": @@ -1049,8 +1045,8 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.PublicKey != nil { - l = options.Size(x.PublicKey) + l = len(x.PublicKey) + if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.VaultCid) @@ -1104,17 +1100,10 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { 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))) + if len(x.PublicKey) > 0 { + i -= len(x.PublicKey) + copy(dAtA[i:], x.PublicKey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PublicKey))) i-- dAtA[i] = 0x1a } @@ -1249,7 +1238,7 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { 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 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -1259,26 +1248,24 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + msglen + 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.PublicKey = append(x.PublicKey[:0], dAtA[iNdEx:postIndex]...) if x.PublicKey == nil { - x.PublicKey = &PublicKey{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PublicKey); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + x.PublicKey = []byte{} } iNdEx = postIndex case 4: @@ -1500,8 +1487,8 @@ func (x *fastReflection_Delegation) Range(f func(protoreflect.FieldDescriptor, p return } } - if x.PublicKey != nil { - value := protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) + if len(x.PublicKey) != 0 { + value := protoreflect.ValueOfBytes(x.PublicKey) if !f(fd_Delegation_public_key, value) { return } @@ -1538,7 +1525,7 @@ func (x *fastReflection_Delegation) Has(fd protoreflect.FieldDescriptor) bool { case "did.v1.Delegation.controller_did": return x.ControllerDid != "" case "did.v1.Delegation.public_key": - return x.PublicKey != nil + return len(x.PublicKey) != 0 case "did.v1.Delegation.channel_id": return x.ChannelId != uint64(0) default: @@ -1604,7 +1591,7 @@ func (x *fastReflection_Delegation) Get(descriptor protoreflect.FieldDescriptor) return protoreflect.ValueOfString(value) case "did.v1.Delegation.public_key": value := x.PublicKey - return protoreflect.ValueOfMessage(value.ProtoReflect()) + return protoreflect.ValueOfBytes(value) case "did.v1.Delegation.channel_id": value := x.ChannelId return protoreflect.ValueOfUint64(value) @@ -1639,7 +1626,7 @@ func (x *fastReflection_Delegation) Set(fd protoreflect.FieldDescriptor, value p case "did.v1.Delegation.controller_did": x.ControllerDid = value.Interface().(string) case "did.v1.Delegation.public_key": - x.PublicKey = value.Message().Interface().(*PublicKey) + x.PublicKey = value.Bytes() case "did.v1.Delegation.channel_id": x.ChannelId = value.Uint() default: @@ -1662,11 +1649,6 @@ 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": - if x.PublicKey == nil { - x.PublicKey = new(PublicKey) - } - 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": @@ -1677,6 +1659,8 @@ func (x *fastReflection_Delegation) Mutable(fd protoreflect.FieldDescriptor) pro 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": + panic(fmt.Errorf("field public_key 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")) default: @@ -1703,8 +1687,7 @@ func (x *fastReflection_Delegation) NewField(fd protoreflect.FieldDescriptor) pr case "did.v1.Delegation.controller_did": return protoreflect.ValueOfString("") case "did.v1.Delegation.public_key": - m := new(PublicKey) - return protoreflect.ValueOfMessage(m.ProtoReflect()) + return protoreflect.ValueOfBytes(nil) case "did.v1.Delegation.channel_id": return protoreflect.ValueOfUint64(uint64(0)) default: @@ -1796,8 +1779,8 @@ func (x *fastReflection_Delegation) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.PublicKey != nil { - l = options.Size(x.PublicKey) + l = len(x.PublicKey) + if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.ChannelId != 0 { @@ -1837,17 +1820,10 @@ func (x *fastReflection_Delegation) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x38 } - 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))) + if len(x.PublicKey) > 0 { + i -= len(x.PublicKey) + copy(dAtA[i:], x.PublicKey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PublicKey))) i-- dAtA[i] = 0x32 } @@ -2099,7 +2075,7 @@ func (x *fastReflection_Delegation) ProtoMethods() *protoiface.Methods { 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 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2109,26 +2085,24 @@ func (x *fastReflection_Delegation) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + msglen + 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.PublicKey = append(x.PublicKey[:0], dAtA[iNdEx:postIndex]...) if x.PublicKey == nil { - x.PublicKey = &PublicKey{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PublicKey); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + x.PublicKey = []byte{} } iNdEx = postIndex case 7: @@ -2894,7 +2868,7 @@ type Controller struct { // The DID of the controller Did string `protobuf:"bytes,2,opt,name=did,proto3" json:"did,omitempty"` // The public key of the controller - PublicKey *PublicKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + PublicKey []byte `protobuf:"bytes,3,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 @@ -2935,7 +2909,7 @@ func (x *Controller) GetDid() string { return "" } -func (x *Controller) GetPublicKey() *PublicKey { +func (x *Controller) GetPublicKey() []byte { if x != nil { return x.PublicKey } @@ -2973,7 +2947,7 @@ type Delegation struct { // The controller DID ControllerDid string `protobuf:"bytes,5,opt,name=controller_did,json=controllerDid,proto3" json:"controller_did,omitempty"` // The delegation proof or verification method - PublicKey *PublicKey `protobuf:"bytes,6,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + PublicKey []byte `protobuf:"bytes,6,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // IBC Channel ID ChannelId uint64 `protobuf:"varint,7,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` } @@ -3033,7 +3007,7 @@ func (x *Delegation) GetControllerDid() string { return "" } -func (x *Delegation) GetPublicKey() *PublicKey { +func (x *Delegation) GetPublicKey() []byte { if x != nil { return x.PublicKey } @@ -3128,52 +3102,49 @@ var file_did_v1_state_proto_rawDesc = []byte{ 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, 0x01, 0x22, 0xaf, 0x01, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, + 0x18, 0x01, 0x22, 0x9c, 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, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, - 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 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, 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, 0x02, 0x22, 0xfa, 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, 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, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, - 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, - 0x64, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x03, 0x22, 0x9e, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, - 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x29, 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x44, - 0x69, 0x64, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x04, 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, + 0x64, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 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, + 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, + 0x02, 0x22, 0xe7, 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, 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, 0x1d, 0x0a, + 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a, + 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, + 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x22, 0x9e, 0x01, 0x0a, 0x07, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x44, 0x69, 0x64, 0x3a, 0x0e, 0xf2, 0x9e, + 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x04, 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 ( @@ -3194,16 +3165,13 @@ var file_did_v1_state_proto_goTypes = []interface{}{ (*Controller)(nil), // 1: did.v1.Controller (*Delegation)(nil), // 2: did.v1.Delegation (*Service)(nil), // 3: did.v1.Service - (*PublicKey)(nil), // 4: did.v1.PublicKey } var file_did_v1_state_proto_depIdxs = []int32{ - 4, // 0: did.v1.Controller.public_key:type_name -> did.v1.PublicKey - 4, // 1: did.v1.Delegation.public_key:type_name -> did.v1.PublicKey - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 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_state_proto_init() } diff --git a/go.mod b/go.mod index c1c540aec..5ae6c08f5 100644 --- a/go.mod +++ b/go.mod @@ -44,23 +44,20 @@ require ( cosmossdk.io/x/nft v0.1.0 cosmossdk.io/x/tx v0.13.3 cosmossdk.io/x/upgrade v0.1.1 - github.com/a-h/templ v0.2.731 github.com/cometbft/cometbft v0.38.8 github.com/cosmos/cosmos-db v1.0.2 github.com/cosmos/cosmos-proto v1.0.0-beta.5 - github.com/cosmos/cosmos-sdk v0.50.7 + github.com/cosmos/cosmos-sdk v0.50.5 github.com/cosmos/gogoproto v1.4.12 github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.2-0.20240228211029-91e486ec4dbb github.com/cosmos/ibc-go/modules/capability v1.0.0 github.com/cosmos/ibc-go/v8 v8.2.0 - github.com/ethereum/go-ethereum v1.14.6 github.com/go-webauthn/webauthn v0.10.2 github.com/golang/protobuf v1.5.4 github.com/gorilla/mux v1.8.1 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/ipfs/boxo v0.19.0 github.com/ipfs/kubo v0.27.0 - github.com/onsonr/crypto v0.0.0-20240705234659-e4ee4e4218b9 github.com/spf13/cast v1.6.0 github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 @@ -69,7 +66,6 @@ require ( github.com/strangelove-ventures/poa v0.50.0 github.com/strangelove-ventures/tokenfactory v0.50.0 github.com/stretchr/testify v1.9.0 - golang.org/x/crypto v0.25.0 google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de google.golang.org/grpc v1.63.2 google.golang.org/protobuf v1.33.0 @@ -86,6 +82,7 @@ require ( github.com/99designs/keyring v1.2.1 // indirect github.com/DataDog/datadog-go v3.2.0+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 // indirect github.com/aws/aws-sdk-go v1.44.224 // indirect github.com/beorn7/perks v1.0.1 // indirect @@ -96,7 +93,6 @@ require ( github.com/btcsuite/btcd/btcec/v2 v2.3.3 // indirect github.com/btcsuite/btcd/btcutil v1.1.5 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect - github.com/bwesterb/go-ristretto v1.2.3 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect @@ -109,8 +105,6 @@ require ( github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/cometbft/cometbft-db v0.9.1 // indirect - github.com/consensys/bavard v0.1.13 // indirect - github.com/consensys/gnark-crypto v0.12.1 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect @@ -179,7 +173,6 @@ require ( github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect - github.com/holiman/uint256 v1.2.4 // indirect github.com/huandu/skiplist v1.2.0 // indirect github.com/iancoleman/orderedmap v0.3.0 // indirect github.com/iancoleman/strcase v0.3.0 // indirect @@ -233,7 +226,6 @@ require ( github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/mr-tron/base58 v1.2.0 // indirect github.com/mtibben/percent v0.2.1 // indirect github.com/multiformats/go-base32 v0.1.0 // indirect @@ -292,6 +284,7 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect go4.org v0.0.0-20230225012048-214862532bf5 // indirect + golang.org/x/crypto v0.25.0 // indirect golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect golang.org/x/mod v0.17.0 // indirect golang.org/x/net v0.25.0 // indirect @@ -315,6 +308,5 @@ require ( lukechampine.com/blake3 v1.3.0 // indirect nhooyr.io/websocket v1.8.10 // indirect pgregory.net/rapid v1.1.0 // indirect - rsc.io/tmplfunc v0.0.3 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/go.sum b/go.sum index 878573bc5..dc1ed71b4 100644 --- a/go.sum +++ b/go.sum @@ -831,8 +831,6 @@ github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/a-h/templ v0.2.731 h1:yiv4C7whSUsa36y65O06DPr/U/j3+WGB0RmvLOoVFXc= -github.com/a-h/templ v0.2.731/go.mod h1:IejA/ecDD0ul0dCvgCwp9t7bUZXVpGClEAdsqZQigi8= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= @@ -904,8 +902,6 @@ github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtE github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= -github.com/bwesterb/go-ristretto v1.2.3 h1:1w53tCkGhCQ5djbat3+MH0BAQ5Kfgbt56UZQ/JMzngw= -github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= @@ -974,10 +970,6 @@ github.com/cometbft/cometbft v0.38.8 h1:XyJ9Cu3xqap6xtNxiemrO8roXZ+KS2Zlu7qQ0w1t github.com/cometbft/cometbft v0.38.8/go.mod h1:xOoGZrtUT+A5izWfHSJgl0gYZUE7lu7Z2XIS1vWG/QQ= github.com/cometbft/cometbft-db v0.9.1 h1:MIhVX5ja5bXNHF8EYrThkG9F7r9kSfv8BX4LWaxWJ4M= github.com/cometbft/cometbft-db v0.9.1/go.mod h1:iliyWaoV0mRwBJoizElCwwRA9Tf7jZJOURcRZF9m60U= -github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= -github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= -github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= -github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= @@ -992,8 +984,8 @@ github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAK github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= -github.com/cosmos/cosmos-sdk v0.50.7 h1:LsBGKxifENR/DN4E1RZaitsyL93HU44x0p8EnMHp4V4= -github.com/cosmos/cosmos-sdk v0.50.7/go.mod h1:84xDDJEHttRT7NDGwBaUOLVOMN0JNE9x7NbsYIxXs1s= +github.com/cosmos/cosmos-sdk v0.50.5 h1:MOEi+DKYgW67YaPgB+Pf+nHbD3V9S/ayitRKJYLfGIA= +github.com/cosmos/cosmos-sdk v0.50.5/go.mod h1:oV/k6GJgXV9QPoM2fsYDPPsyPBgQbdotv532O6Mz1OQ= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= @@ -1097,8 +1089,6 @@ github.com/envoyproxy/protoc-gen-validate v1.0.1/go.mod h1:0vj8bNkYbSTNS2PIyH87K github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= -github.com/ethereum/go-ethereum v1.14.6 h1:ZTxnErSopkDyxdvB8zW/KcK+/AVrdil/TzoWXVKaaC8= -github.com/ethereum/go-ethereum v1.14.6/go.mod h1:hglUZo/5pVIYXNyYjWzsAUDpT/zI+WbWo/Nih7ot+G0= github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5 h1:BBso6MBKW8ncyZLv37o+KNyy0HrrHgfnOaGQC2qvN+A= github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5/go.mod h1:JpoxHjuQauoxiFMl1ie8Xc/7TfLuMZ5eOCONd1sUBHg= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -1307,7 +1297,6 @@ github.com/google/s2a-go v0.1.3/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkj github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= -github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -1420,8 +1409,6 @@ github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= -github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= -github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= @@ -1596,8 +1583,6 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= -github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= @@ -1703,9 +1688,6 @@ github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUb github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= -github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= -github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= @@ -1774,8 +1756,6 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= -github.com/onsonr/crypto v0.0.0-20240705234659-e4ee4e4218b9 h1:ekM9q3amwCs/B1J9kMkt6wYMY6C7iVRiXAQx+nItvxY= -github.com/onsonr/crypto v0.0.0-20240705234659-e4ee4e4218b9/go.mod h1:rfMIvVAaLEXHJ21p+k1X/UHFPZjXjVvzr5/XJiLrpdA= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= @@ -3023,8 +3003,6 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= -rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/proto/did/v1/account.proto b/proto/did/v1/account.proto index 50c898921..2976951cb 100644 --- a/proto/did/v1/account.proto +++ b/proto/did/v1/account.proto @@ -3,33 +3,12 @@ syntax = "proto3"; package did.v1; -import "cosmos/auth/v1beta1/auth.proto"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; import "did/v1/genesis.proto"; option go_package = "github.com/onsonr/hway/x/did/types"; -// EthAccount implements the authtypes.AccountI interface and embeds an -// authtypes.BaseAccount type. It is compatible with the auth AccountKeeper. -message EthAccount { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - option (gogoproto.equal) = false; - - option (cosmos_proto.implements_interface) = "github.com/cosmos/cosmos-sdk/x/auth/types.cosmos.auth.v1beta1.AccountI"; - - // base_account is an authtypes.BaseAccount - cosmos.auth.v1beta1.BaseAccount base_account = 1 - [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"base_account\""]; - - // code_hash is the hash calculated from the code contents - string code_hash = 2 [(gogoproto.moretags) = "yaml:\"code_hash\""]; - - // controller is the address of the controller - string controller = 3 [(gogoproto.moretags) = "yaml:\"controller\""]; -} - // DIDDocument defines a DID document message DIDDocument { string id = 1; diff --git a/proto/did/v1/state.proto b/proto/did/v1/state.proto index d05fc38a2..126e21053 100644 --- a/proto/did/v1/state.proto +++ b/proto/did/v1/state.proto @@ -43,7 +43,7 @@ message Controller { string did = 2; // The public key of the controller - PublicKey public_key = 3; + bytes public_key = 3; // The vault address or identifier string vault_cid = 4; @@ -75,7 +75,7 @@ message Delegation { string controller_did = 5; // The delegation proof or verification method - PublicKey public_key = 6; + bytes public_key = 6; // IBC Channel ID uint64 channel_id = 7; diff --git a/x/did/types/account.pb.go b/x/did/types/account.pb.go index 9cc56b704..902a39c19 100644 --- a/x/did/types/account.pb.go +++ b/x/did/types/account.pb.go @@ -5,22 +5,18 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - _ "github.com/cosmos/cosmos-proto" - types "github.com/cosmos/cosmos-sdk/x/auth/types" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. -var ( - _ = proto.Marshal - _ = fmt.Errorf - _ = math.Inf -) +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. @@ -28,54 +24,6 @@ var ( // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// EthAccount implements the authtypes.AccountI interface and embeds an -// authtypes.BaseAccount type. It is compatible with the auth AccountKeeper. -type EthAccount struct { - // base_account is an authtypes.BaseAccount - *types.BaseAccount `protobuf:"bytes,1,opt,name=base_account,json=baseAccount,proto3,embedded=base_account" json:"base_account,omitempty" yaml:"base_account"` - // code_hash is the hash calculated from the code contents - CodeHash string `protobuf:"bytes,2,opt,name=code_hash,json=codeHash,proto3" json:"code_hash,omitempty" yaml:"code_hash"` - // controller is the address of the controller - Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty" yaml:"controller"` -} - -func (m *EthAccount) Reset() { *m = EthAccount{} } -func (*EthAccount) ProtoMessage() {} -func (*EthAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_f1c7ebf7d0ca3c72, []int{0} -} - -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 - // DIDDocument defines a DID document type DIDDocument struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` @@ -90,13 +38,11 @@ func (m *DIDDocument) Reset() { *m = DIDDocument{} } func (m *DIDDocument) String() string { return proto.CompactTextString(m) } func (*DIDDocument) ProtoMessage() {} func (*DIDDocument) Descriptor() ([]byte, []int) { - return fileDescriptor_f1c7ebf7d0ca3c72, []int{1} + return fileDescriptor_f1c7ebf7d0ca3c72, []int{0} } - func (m *DIDDocument) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *DIDDocument) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_DIDDocument.Marshal(b, m, deterministic) @@ -109,15 +55,12 @@ func (m *DIDDocument) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } - func (m *DIDDocument) XXX_Merge(src proto.Message) { xxx_messageInfo_DIDDocument.Merge(m, src) } - func (m *DIDDocument) XXX_Size() int { return m.Size() } - func (m *DIDDocument) XXX_DiscardUnknown() { xxx_messageInfo_DIDDocument.DiscardUnknown(m) } @@ -177,13 +120,11 @@ 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_f1c7ebf7d0ca3c72, []int{2} + return fileDescriptor_f1c7ebf7d0ca3c72, []int{1} } - 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) @@ -196,15 +137,12 @@ func (m *VerificationMethod) XXX_Marshal(b []byte, deterministic bool) ([]byte, 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) } @@ -233,7 +171,6 @@ func (m *VerificationMethod) GetPublicKey() *PublicKey { } func init() { - proto.RegisterType((*EthAccount)(nil), "did.v1.EthAccount") proto.RegisterType((*DIDDocument)(nil), "did.v1.DIDDocument") proto.RegisterType((*VerificationMethod)(nil), "did.v1.VerificationMethod") } @@ -241,90 +178,31 @@ func init() { func init() { proto.RegisterFile("did/v1/account.proto", fileDescriptor_f1c7ebf7d0ca3c72) } var fileDescriptor_f1c7ebf7d0ca3c72 = []byte{ - // 544 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x53, 0x3d, 0x6f, 0xd3, 0x40, - 0x18, 0xb6, 0x5d, 0x28, 0xcd, 0x05, 0x95, 0xf6, 0x9a, 0x4a, 0x26, 0x48, 0x76, 0xe4, 0x01, 0x85, - 0xa1, 0x36, 0x49, 0xc5, 0x52, 0xb1, 0x10, 0x05, 0x44, 0x84, 0x2a, 0x21, 0x0f, 0x1d, 0x58, 0xcc, - 0xd9, 0x3e, 0xe2, 0x53, 0x1d, 0x5f, 0xe4, 0xbb, 0x98, 0xfa, 0x1f, 0x30, 0x32, 0x32, 0x66, 0x65, - 0x63, 0xe0, 0x47, 0x20, 0xa6, 0x8c, 0x4c, 0x11, 0x4a, 0x16, 0xe6, 0xfc, 0x02, 0x94, 0xf3, 0x39, - 0x35, 0x09, 0x93, 0xef, 0x7d, 0x9f, 0xe7, 0x79, 0xbf, 0x0d, 0x1a, 0x21, 0x09, 0x9d, 0xac, 0xe3, - 0xa0, 0x20, 0xa0, 0x93, 0x84, 0xdb, 0xe3, 0x94, 0x72, 0x0a, 0xf7, 0x43, 0x12, 0xda, 0x59, 0xa7, - 0x69, 0x04, 0x94, 0x8d, 0x28, 0x73, 0xd0, 0x84, 0x47, 0x4e, 0xd6, 0xf1, 0x31, 0x47, 0x1d, 0x61, - 0x14, 0xbc, 0xe6, 0xc3, 0x02, 0xf7, 0x84, 0xe5, 0x14, 0x86, 0x84, 0x1a, 0x43, 0x3a, 0xa4, 0x85, - 0x7f, 0xfd, 0x2a, 0xbd, 0x32, 0xdd, 0x10, 0x27, 0x98, 0x11, 0xc9, 0xb5, 0xbe, 0x69, 0x00, 0xbc, - 0xe4, 0xd1, 0x8b, 0xa2, 0x06, 0xf8, 0x1e, 0xdc, 0xf7, 0x11, 0xc3, 0x9e, 0xac, 0x49, 0x57, 0x5b, - 0x6a, 0xbb, 0xde, 0x6d, 0xd9, 0x32, 0xbe, 0xc8, 0x2f, 0x8b, 0xb1, 0x7b, 0x88, 0x61, 0xa9, 0xeb, - 0x3d, 0x9a, 0xcd, 0x4d, 0x75, 0x35, 0x37, 0x4f, 0x72, 0x34, 0x8a, 0x2f, 0xac, 0x6a, 0x0c, 0xcb, - 0xad, 0xfb, 0xb7, 0x4c, 0xd8, 0x01, 0xb5, 0x80, 0x86, 0xd8, 0x8b, 0x10, 0x8b, 0x74, 0xad, 0xa5, - 0xb6, 0x6b, 0xbd, 0xc6, 0x6a, 0x6e, 0x1e, 0x15, 0xc2, 0x0d, 0x64, 0xb9, 0x07, 0xeb, 0xf7, 0x6b, - 0xc4, 0x22, 0xf8, 0x0c, 0x80, 0x80, 0x26, 0x3c, 0xa5, 0x71, 0x8c, 0x53, 0x7d, 0x4f, 0x68, 0x4e, - 0x57, 0x73, 0xf3, 0xb8, 0xd4, 0x94, 0x98, 0xe5, 0x56, 0x88, 0x17, 0x57, 0x9f, 0xa6, 0xa6, 0xf2, - 0x65, 0x6a, 0x2a, 0x7f, 0xa6, 0xa6, 0xf2, 0xf3, 0xfb, 0xd9, 0xab, 0x21, 0xe1, 0xd1, 0xc4, 0xb7, - 0x03, 0x3a, 0x92, 0xf3, 0x92, 0x9f, 0x33, 0x16, 0x5e, 0x3b, 0x37, 0xc5, 0xa4, 0x79, 0x3e, 0xc6, - 0xec, 0xbf, 0xed, 0xca, 0x06, 0x06, 0xd6, 0x57, 0x0d, 0xd4, 0xfb, 0x83, 0x7e, 0x9f, 0x06, 0x93, - 0x11, 0x4e, 0x38, 0x3c, 0x04, 0x1a, 0x09, 0xc5, 0xa4, 0x6a, 0xae, 0x46, 0x42, 0x78, 0x09, 0x1a, - 0x19, 0x4e, 0xc9, 0x07, 0x12, 0x20, 0x4e, 0x68, 0xe2, 0x8d, 0x30, 0x8f, 0x68, 0xc8, 0x74, 0xad, - 0xb5, 0xd7, 0xae, 0x77, 0x9b, 0x76, 0xb1, 0x60, 0xfb, 0xaa, 0xc2, 0xb9, 0x14, 0x14, 0xf7, 0x24, - 0xdb, 0xf1, 0x31, 0xf8, 0x18, 0x1c, 0xae, 0xeb, 0xc0, 0x09, 0x97, 0x80, 0x7e, 0xa7, 0xb5, 0xd7, - 0xae, 0xb9, 0x5b, 0x5e, 0xf8, 0x04, 0x1c, 0x21, 0xc6, 0x70, 0x5a, 0xc9, 0xa9, 0xdf, 0x15, 0xcc, - 0x07, 0x1b, 0x7f, 0x11, 0x13, 0x9e, 0x83, 0xd3, 0x00, 0x8d, 0x91, 0x4f, 0x62, 0xc2, 0x73, 0x2f, - 0xc4, 0x31, 0x1e, 0x16, 0x91, 0xef, 0x09, 0x7e, 0xe3, 0x16, 0xec, 0x6f, 0xb0, 0x2d, 0x11, 0x49, - 0x32, 0x2a, 0xcb, 0x39, 0xd8, 0x16, 0x0d, 0x36, 0x98, 0x95, 0x01, 0xb8, 0xdb, 0xe7, 0xce, 0xc4, - 0x8c, 0x7f, 0x16, 0x2c, 0x8e, 0xa2, 0xba, 0x49, 0xf8, 0x14, 0x80, 0xf1, 0xc4, 0x8f, 0x49, 0xe0, - 0x5d, 0xe3, 0x5c, 0x1c, 0x40, 0xbd, 0x7b, 0x5c, 0xce, 0xf1, 0xad, 0x40, 0xde, 0xe0, 0xdc, 0xad, - 0x8d, 0xcb, 0x67, 0xef, 0xf9, 0x8f, 0x85, 0xa1, 0xce, 0x16, 0x86, 0xfa, 0x7b, 0x61, 0xa8, 0x9f, - 0x97, 0x86, 0x32, 0x5b, 0x1a, 0xca, 0xaf, 0xa5, 0xa1, 0xbc, 0xb3, 0x2a, 0x57, 0x40, 0x13, 0x46, - 0x93, 0xd4, 0x89, 0x3e, 0xa2, 0xdc, 0xb9, 0x71, 0xd6, 0xff, 0x87, 0x58, 0xbf, 0xbf, 0x2f, 0xfe, - 0x8d, 0xf3, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x6c, 0xbf, 0x4c, 0xf3, 0xa2, 0x03, 0x00, 0x00, -} - -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 - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintAccount(dAtA, i, uint64(len(m.Controller))) - i-- - dAtA[i] = 0x1a - } - if len(m.CodeHash) > 0 { - i -= len(m.CodeHash) - copy(dAtA[i:], m.CodeHash) - i = encodeVarintAccount(dAtA, i, uint64(len(m.CodeHash))) - i-- - dAtA[i] = 0x12 - } - if m.BaseAccount != nil { - { - size, err := m.BaseAccount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAccount(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + // 374 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0xb1, 0x8e, 0x9b, 0x40, + 0x10, 0x86, 0x0d, 0x4e, 0x9c, 0x78, 0x2d, 0x39, 0xc9, 0x86, 0x48, 0xc4, 0x05, 0x42, 0x2e, 0x22, + 0xd2, 0x40, 0x6c, 0xb7, 0xa9, 0x22, 0x1a, 0x2b, 0xb2, 0x14, 0x51, 0xa4, 0x48, 0x83, 0x60, 0x77, + 0x03, 0xab, 0x83, 0x1d, 0xc4, 0x2e, 0xdc, 0xf1, 0x16, 0xf7, 0x1a, 0xf7, 0x26, 0x57, 0xba, 0xbc, + 0xf2, 0x64, 0xbf, 0xc8, 0xc9, 0x80, 0x7d, 0x96, 0xdd, 0x0d, 0xdf, 0xff, 0xcf, 0xcf, 0xec, 0x0c, + 0x32, 0x28, 0xa7, 0x5e, 0xbd, 0xf0, 0x22, 0x42, 0xa0, 0x12, 0xca, 0x2d, 0x4a, 0x50, 0x80, 0x47, + 0x94, 0x53, 0xb7, 0x5e, 0xcc, 0xbe, 0x12, 0x90, 0x39, 0xc8, 0xb0, 0xa5, 0x5e, 0xf7, 0xd1, 0x59, + 0x66, 0x46, 0x02, 0x09, 0x74, 0xfc, 0x50, 0x1d, 0x69, 0x1f, 0x97, 0x30, 0xc1, 0x24, 0xef, 0xbd, + 0xf3, 0x07, 0x1d, 0x4d, 0xfc, 0xb5, 0xef, 0x03, 0xa9, 0x72, 0x26, 0x14, 0x9e, 0x22, 0x9d, 0x53, + 0x53, 0xb3, 0x35, 0x67, 0x1c, 0xe8, 0x9c, 0xe2, 0x0d, 0x32, 0x6a, 0x56, 0xf2, 0xff, 0x9c, 0x44, + 0x8a, 0x83, 0x08, 0x73, 0xa6, 0x52, 0xa0, 0xd2, 0xd4, 0xed, 0xa1, 0x33, 0x59, 0xce, 0xdc, 0x6e, + 0x1a, 0xf7, 0xef, 0x99, 0x67, 0xd3, 0x5a, 0x82, 0xcf, 0xf5, 0x15, 0x93, 0xf8, 0x1b, 0x9a, 0x46, + 0x95, 0x4a, 0x99, 0x50, 0xbd, 0x60, 0xbe, 0xb1, 0x87, 0xce, 0x38, 0xb8, 0xa0, 0xf8, 0x3b, 0xfa, + 0x18, 0x49, 0xc9, 0xca, 0xb3, 0x7f, 0x9a, 0x6f, 0x5b, 0xe7, 0x87, 0x13, 0xef, 0x32, 0xf1, 0x0a, + 0x7d, 0x21, 0x51, 0x11, 0xc5, 0x3c, 0xe3, 0xaa, 0x09, 0x29, 0xcb, 0x58, 0xd2, 0x25, 0xbf, 0x6b, + 0xfd, 0xc6, 0xab, 0xe8, 0x9f, 0xb4, 0x8b, 0x26, 0x2e, 0x6a, 0xe8, 0xc7, 0x79, 0x7f, 0xd9, 0xb4, + 0x3e, 0x69, 0xf3, 0x1a, 0xe1, 0xeb, 0x77, 0x5e, 0x6d, 0xcc, 0x42, 0x88, 0x80, 0x50, 0x25, 0x64, + 0x19, 0x2b, 0x4d, 0xbd, 0xe5, 0x67, 0x04, 0xff, 0x40, 0xa8, 0xa8, 0xe2, 0x8c, 0x93, 0xf0, 0x86, + 0x35, 0xe6, 0xd0, 0xd6, 0x9c, 0xc9, 0xf2, 0xd3, 0x71, 0x8f, 0x7f, 0x5a, 0xe5, 0x37, 0x6b, 0x82, + 0x71, 0x71, 0x2c, 0x7f, 0xfd, 0x7c, 0xdc, 0x59, 0xda, 0x76, 0x67, 0x69, 0xcf, 0x3b, 0x4b, 0xbb, + 0xdf, 0x5b, 0x83, 0xed, 0xde, 0x1a, 0x3c, 0xed, 0xad, 0xc1, 0xbf, 0x79, 0xc2, 0x55, 0x5a, 0xc5, + 0x2e, 0x81, 0xdc, 0x03, 0x21, 0x41, 0x94, 0x5e, 0x7a, 0x1b, 0x35, 0xde, 0x9d, 0x77, 0x38, 0xb6, + 0x6a, 0x0a, 0x26, 0xe3, 0x51, 0x7b, 0xe8, 0xd5, 0x4b, 0x00, 0x00, 0x00, 0xff, 0xff, 0x30, 0x7a, + 0x87, 0xb1, 0x4f, 0x02, 0x00, 0x00, } func (m *DIDDocument) Marshal() (dAtA []byte, err error) { @@ -467,28 +345,6 @@ func encodeVarintAccount(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } - -func (m *EthAccount) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BaseAccount != nil { - l = m.BaseAccount.Size() - n += 1 + l + sovAccount(uint64(l)) - } - l = len(m.CodeHash) - if l > 0 { - n += 1 + l + sovAccount(uint64(l)) - } - l = len(m.Controller) - if l > 0 { - n += 1 + l + sovAccount(uint64(l)) - } - return n -} - func (m *DIDDocument) Size() (n int) { if m == nil { return 0 @@ -556,162 +412,9 @@ func (m *VerificationMethod) Size() (n int) { func sovAccount(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } - func sozAccount(x uint64) (n int) { return sovAccount(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } - -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 ErrIntOverflowAccount - } - 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 { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BaseAccount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BaseAccount == nil { - m.BaseAccount = &types.BaseAccount{} - } - if err := m.BaseAccount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CodeHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - 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 ErrInvalidLengthAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CodeHash = 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 ErrIntOverflowAccount - } - 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 ErrInvalidLengthAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccount(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} - func (m *DIDDocument) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -956,7 +659,6 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error { } return nil } - func (m *VerificationMethod) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1107,7 +809,6 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error { } return nil } - func skipAccount(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/did/types/account_eth.go b/x/did/types/account_eth.go deleted file mode 100644 index b78646394..000000000 --- a/x/did/types/account_eth.go +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) -package types - -import ( - "bytes" - - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" -) - -var ( - _ authtypes.AccountI = (*EthAccount)(nil) - _ EthAccountI = (*EthAccount)(nil) - _ authtypes.GenesisAccount = (*EthAccount)(nil) - _ codectypes.UnpackInterfacesMessage = (*EthAccount)(nil) -) - -var emptyCodeHash = crypto.Keccak256(nil) - -const ( - // AccountTypeEOA defines the type for externally owned accounts (EOAs) - AccountTypeEOA = int8(iota + 1) - // AccountTypeContract defines the type for contract accounts - AccountTypeContract -) - -// EthAccountI represents the interface of an EVM compatible account -type EthAccountI interface { - authtypes.AccountI - // EthAddress returns the ethereum Address representation of the AccAddress - EthAddress() common.Address - // CodeHash is the keccak256 hash of the contract code (if any) - GetCodeHash() common.Hash - // SetCodeHash sets the code hash to the account fields - SetCodeHash(code common.Hash) error - // Type returns the type of Ethereum Account (EOA or Contract) - Type() int8 -} - -// ---------------------------------------------------------------------------- -// Main Evmos account -// ---------------------------------------------------------------------------- - -// ProtoAccount defines the prototype function for BaseAccount used for an -// AccountKeeper. -func ProtoAccount() authtypes.AccountI { - return &EthAccount{ - BaseAccount: &authtypes.BaseAccount{}, - CodeHash: common.BytesToHash(emptyCodeHash).String(), - } -} - -// GetAccountNumber returns account number. -func (acc EthAccount) GetAccountNumber() uint64 { - return acc.BaseAccount.AccountNumber -} - -// GetAddress returns account address. -func (acc EthAccount) GetAddress() sdk.AccAddress { - addr, _ := sdk.AccAddressFromBech32(acc.BaseAccount.Address) - return addr -} - -// GetBaseAccount returns base account. -func (acc EthAccount) GetBaseAccount() *authtypes.BaseAccount { - return acc.BaseAccount -} - -// GetPubKey returns the PubKey -func (acc EthAccount) GetPubKey() cryptotypes.PubKey { - return acc.GetBaseAccount().GetPubKey() -} - -// GetSequence returns the sequence -func (acc EthAccount) GetSequence() uint64 { - return acc.BaseAccount.Sequence -} - -// EthAddress returns the account address ethereum format. -func (acc EthAccount) EthAddress() common.Address { - return common.BytesToAddress(acc.GetAddress().Bytes()) -} - -// GetCodeHash returns the account code hash in byte format -func (acc EthAccount) GetCodeHash() common.Hash { - return common.HexToHash(acc.CodeHash) -} - -// SetAccountNumber sets the account number -func (acc *EthAccount) SetAccountNumber(accNum uint64) error { - acc.BaseAccount.AccountNumber = accNum - return nil -} - -// SetAddress sets the address -func (acc *EthAccount) SetAddress(addr sdk.AccAddress) error { - acc.BaseAccount.Address = addr.String() - return nil -} - -// SetCodeHash sets the account code hash to the EthAccount fields -func (acc *EthAccount) SetCodeHash(codeHash common.Hash) error { - acc.CodeHash = codeHash.Hex() - return nil -} - -// SetPubKey sets the pubkey -func (acc *EthAccount) SetPubKey(pubkey cryptotypes.PubKey) error { - acc.BaseAccount.PubKey = codectypes.UnsafePackAny(pubkey) - return nil -} - -// SetSequence sets the sequence -func (acc *EthAccount) SetSequence(seq uint64) error { - acc.BaseAccount.Sequence = seq - return nil -} - -// Type returns the type of Ethereum Account (EOA or Contract) -func (acc EthAccount) Type() int8 { - if bytes.Equal(emptyCodeHash, common.HexToHash(acc.CodeHash).Bytes()) { - return AccountTypeEOA - } - return AccountTypeContract -} - -// Stringreturns the string representation of the EthAccount -func (acc EthAccount) String() string { - return acc.EthAddress().String() -} - -// Validate checks if the Evmos account fields are valid -func (acc EthAccount) Validate() error { - return nil -} - -// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces -func (acc EthAccount) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { - return nil -} diff --git a/x/did/types/codec.go b/x/did/types/codec.go index 28f60afe0..303293b86 100644 --- a/x/did/types/codec.go +++ b/x/did/types/codec.go @@ -4,10 +4,8 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" // this line is used by starport scaffolding # 1 ) @@ -28,18 +26,10 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { } func RegisterInterfaces(registry types.InterfaceRegistry) { - registry.RegisterImplementations( - (*authtypes.AccountI)(nil), - &EthAccount{}, - ) - registry.RegisterImplementations( - (*authtypes.GenesisAccount)(nil), - &EthAccount{}, - ) - registry.RegisterImplementations( - (*cryptotypes.PubKey)(nil), - &PublicKey{}, - ) + //registry.RegisterImplementations( + //(*cryptotypes.PubKey)(nil), + // &PublicKey{}, + //) registry.RegisterImplementations( (*sdk.Msg)(nil), diff --git a/x/did/types/pubkey.go b/x/did/types/pubkey.go deleted file mode 100644 index 39c63ccee..000000000 --- a/x/did/types/pubkey.go +++ /dev/null @@ -1,71 +0,0 @@ -package types - -import ( - "bytes" - "encoding/hex" - fmt "fmt" - "math/big" - - cmtcrypto "github.com/cometbft/cometbft/crypto" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - "golang.org/x/crypto/sha3" - - "github.com/onsonr/crypto/core/curves" - "github.com/onsonr/crypto/signatures/ecdsa" -) - -// Address returns the address of the public key -func (k *PublicKey) Address() cryptotypes.Address { - return cmtcrypto.AddressHash(k.Key) -} - -// Bytes returns the byte representation of the public key -func (k *PublicKey) Bytes() []byte { - return k.Key -} - -// String returns the hex string representation of the public key -func (k *PublicKey) String() string { - return hex.EncodeToString(k.Key) -} - -// VerifySignature verifies the signature of a message -func (k *PublicKey) VerifySignature(msg []byte, sig []byte) bool { - pp, err := BuildEcPoint(k.Key) - if err != nil { - return false - } - sigEd, err := ecdsa.DeserializeSecp256k1Signature(sig) - if err != nil { - return false - } - hash := sha3.New256() - _, err = hash.Write(msg) - if err != nil { - return false - } - digest := hash.Sum(nil) - return curves.VerifyEcdsa(pp, digest[:], sigEd) -} - -// Equals returns true if the public keys are equal -func (k *PublicKey) Equals(other cryptotypes.PubKey) bool { - return bytes.Equal(k.Key, other.Bytes()) -} - -// Type returns the public key type -func (k *PublicKey) Type() string { - return k.KeyType -} - -// BuildEcPoint builds an elliptic curve point from a compressed byte slice -func BuildEcPoint(pubKey []byte) (*curves.EcPoint, error) { - crv := curves.K256() - x := new(big.Int).SetBytes(pubKey[1:33]) - y := new(big.Int).SetBytes(pubKey[33:]) - ecCurve, err := crv.ToEllipticCurve() - if err != nil { - return nil, fmt.Errorf("error converting curve: %v", err) - } - return &curves.EcPoint{X: x, Y: y, Curve: ecCurve}, nil -} diff --git a/x/did/types/state.pb.go b/x/did/types/state.pb.go index 9b3087d5a..a5cb89793 100644 --- a/x/did/types/state.pb.go +++ b/x/did/types/state.pb.go @@ -112,7 +112,7 @@ type Controller struct { // The DID of the controller Did string `protobuf:"bytes,2,opt,name=did,proto3" json:"did,omitempty"` // The public key of the controller - PublicKey *PublicKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + PublicKey []byte `protobuf:"bytes,3,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 @@ -166,7 +166,7 @@ func (m *Controller) GetDid() string { return "" } -func (m *Controller) GetPublicKey() *PublicKey { +func (m *Controller) GetPublicKey() []byte { if m != nil { return m.PublicKey } @@ -200,7 +200,7 @@ type Delegation struct { // The controller DID ControllerDid string `protobuf:"bytes,5,opt,name=controller_did,json=controllerDid,proto3" json:"controller_did,omitempty"` // The delegation proof or verification method - PublicKey *PublicKey `protobuf:"bytes,6,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + PublicKey []byte `protobuf:"bytes,6,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // IBC Channel ID ChannelId uint64 `protobuf:"varint,7,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` } @@ -273,7 +273,7 @@ func (m *Delegation) GetControllerDid() string { return "" } -func (m *Delegation) GetPublicKey() *PublicKey { +func (m *Delegation) GetPublicKey() []byte { if m != nil { return m.PublicKey } @@ -370,38 +370,37 @@ func init() { func init() { proto.RegisterFile("did/v1/state.proto", fileDescriptor_f44bb702879c34b4) } var fileDescriptor_f44bb702879c34b4 = []byte{ - // 491 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x3f, 0x6f, 0x13, 0x31, - 0x18, 0x87, 0xe3, 0x24, 0xcd, 0x9f, 0x37, 0x69, 0x28, 0x56, 0x25, 0x8e, 0x22, 0x4e, 0x21, 0x08, - 0xa9, 0x2c, 0x39, 0x0a, 0x1b, 0x62, 0x29, 0x2d, 0x03, 0x62, 0x41, 0x81, 0x89, 0xe5, 0x74, 0x39, - 0xbf, 0x4d, 0xac, 0x5c, 0xec, 0x93, 0xed, 0x1c, 0xdc, 0x97, 0x40, 0x0c, 0xcc, 0xfd, 0x0a, 0x7c, - 0x0d, 0xc6, 0x4a, 0x2c, 0x8c, 0x28, 0xf9, 0x06, 0x8c, 0x4c, 0xe8, 0xec, 0x2b, 0x8d, 0x92, 0x0c, - 0x6c, 0xf6, 0xf3, 0xbe, 0x77, 0x7e, 0xde, 0x9f, 0x6c, 0xa0, 0x8c, 0xb3, 0x20, 0x3b, 0x09, 0xb4, - 0x89, 0x0c, 0x0e, 0x53, 0x25, 0x8d, 0xa4, 0x0d, 0xc6, 0xd9, 0x30, 0x3b, 0x39, 0xba, 0x13, 0x4b, - 0x3d, 0x97, 0x3a, 0x90, 0x6a, 0x5e, 0xb4, 0x48, 0x35, 0x77, 0x0d, 0x47, 0x87, 0xe5, 0x47, 0x13, - 0x14, 0xa8, 0xb9, 0x76, 0x74, 0xf0, 0x95, 0x40, 0xe7, 0xd4, 0x18, 0x2c, 0x7e, 0xc5, 0xa5, 0xa0, - 0x3d, 0xa8, 0x72, 0xe6, 0x91, 0x3e, 0x39, 0x6e, 0x8f, 0xaa, 0x9c, 0xd1, 0xbb, 0xd0, 0x9a, 0x61, - 0x1e, 0x9a, 0x3c, 0x45, 0xaf, 0x6a, 0x69, 0x73, 0x86, 0xf9, 0xfb, 0x3c, 0x45, 0x7a, 0x08, 0x7b, - 0x59, 0x94, 0x2c, 0xd0, 0xab, 0x59, 0xee, 0x36, 0x05, 0x4d, 0x95, 0x94, 0x17, 0x5e, 0xdd, 0x51, - 0xbb, 0xa1, 0x3e, 0x40, 0x2c, 0x85, 0x51, 0x32, 0x49, 0x50, 0x79, 0x7b, 0xb6, 0xb4, 0x46, 0x9e, - 0xf7, 0x7e, 0x5f, 0xfe, 0xf8, 0x5c, 0x6b, 0x41, 0xdd, 0x1d, 0x3f, 0xf8, 0x46, 0x00, 0xce, 0xfe, - 0x95, 0xb7, 0xac, 0x0e, 0xa0, 0xc6, 0x38, 0x2b, 0x85, 0x8a, 0x25, 0x7d, 0x02, 0x90, 0x2e, 0xc6, - 0x09, 0x8f, 0xc3, 0x19, 0xe6, 0xd6, 0xa8, 0xf3, 0xf4, 0xf6, 0xd0, 0x65, 0x32, 0x7c, 0x6b, 0x2b, - 0x6f, 0x30, 0x1f, 0xb5, 0xd3, 0xeb, 0x25, 0xbd, 0x07, 0xed, 0x2c, 0x5a, 0x24, 0x26, 0x8c, 0x39, - 0x2b, 0x65, 0x5b, 0x16, 0x9c, 0x71, 0x46, 0xfb, 0xd0, 0xb9, 0xe0, 0x62, 0x82, 0x2a, 0x55, 0x5c, - 0x18, 0x2b, 0xdc, 0x1d, 0xad, 0xa3, 0x0d, 0xe3, 0xea, 0xe0, 0x0f, 0x01, 0x38, 0xc7, 0x04, 0x27, - 0xbb, 0x73, 0xdc, 0x36, 0xbe, 0x0f, 0x10, 0x4f, 0x23, 0x2e, 0x5c, 0xb6, 0x2e, 0xc3, 0xb6, 0x25, - 0x36, 0xdd, 0x87, 0xb0, 0xef, 0xca, 0x11, 0x63, 0x0a, 0xb5, 0x2e, 0x15, 0xbb, 0x16, 0x9e, 0x3a, - 0x46, 0x1f, 0x41, 0xef, 0x26, 0xc4, 0xb0, 0x38, 0xc0, 0x45, 0xbb, 0x7f, 0x43, 0xcf, 0xb7, 0xc2, - 0x69, 0xfc, 0x47, 0x38, 0x4e, 0x4e, 0x08, 0x4c, 0x42, 0xce, 0xbc, 0x66, 0x9f, 0x1c, 0xd7, 0xad, - 0x5c, 0x41, 0x5e, 0xb3, 0x8d, 0xe1, 0x6b, 0x83, 0x4b, 0x02, 0xcd, 0x77, 0xa8, 0x32, 0x1e, 0xe3, - 0xd6, 0xe4, 0x0f, 0xa0, 0xab, 0x5d, 0x69, 0xfd, 0x16, 0x75, 0x4a, 0x66, 0x67, 0x7d, 0x0c, 0x07, - 0xd7, 0x2d, 0x28, 0x58, 0x2a, 0x8b, 0xc8, 0x5d, 0x20, 0xb7, 0x4a, 0xfe, 0xaa, 0xc4, 0x3b, 0x26, - 0xae, 0xef, 0x98, 0x78, 0x43, 0xb0, 0xfe, 0xf2, 0xc5, 0xf7, 0xa5, 0x4f, 0xae, 0x96, 0x3e, 0xf9, - 0xb5, 0xf4, 0xc9, 0x97, 0x95, 0x5f, 0xb9, 0x5a, 0xf9, 0x95, 0x9f, 0x2b, 0xbf, 0xf2, 0x61, 0x30, - 0xe1, 0x66, 0xba, 0x18, 0x0f, 0x63, 0x39, 0x0f, 0xa4, 0xd0, 0x52, 0xa8, 0x60, 0xfa, 0x31, 0xca, - 0x83, 0x4f, 0x41, 0xf1, 0x5e, 0x0a, 0x63, 0x3d, 0x6e, 0xd8, 0xb7, 0xf2, 0xec, 0x6f, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x01, 0xe3, 0x83, 0xf7, 0x78, 0x03, 0x00, 0x00, + // 475 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x93, 0x3f, 0x6f, 0xd3, 0x40, + 0x18, 0xc6, 0x7b, 0x89, 0x9b, 0x3f, 0x6f, 0xd2, 0x50, 0x9d, 0x2a, 0x61, 0x8a, 0xb0, 0x82, 0x11, + 0x52, 0x59, 0x62, 0x55, 0x6c, 0x88, 0xa5, 0xb4, 0x0c, 0x88, 0x2d, 0x30, 0xb1, 0x58, 0x8e, 0xef, + 0x6d, 0x72, 0x8a, 0x73, 0x67, 0xdd, 0x5d, 0x0c, 0xfe, 0x12, 0x88, 0x81, 0x11, 0xf5, 0xf3, 0x30, + 0x56, 0x62, 0x61, 0x44, 0xc9, 0xc0, 0xce, 0x27, 0x40, 0xbe, 0x33, 0x34, 0x4a, 0xb2, 0xf9, 0x7e, + 0xef, 0xd9, 0xf7, 0x7b, 0x1e, 0xf9, 0x80, 0x32, 0xce, 0xa2, 0xe2, 0x3c, 0xd2, 0x26, 0x31, 0x38, + 0xca, 0x95, 0x34, 0x92, 0xb6, 0x18, 0x67, 0xa3, 0xe2, 0xfc, 0xf4, 0x7e, 0x2a, 0xf5, 0x42, 0xea, + 0x48, 0xaa, 0x45, 0xb5, 0x45, 0xaa, 0x85, 0xdb, 0x70, 0x7a, 0x52, 0xbf, 0x34, 0x45, 0x81, 0x9a, + 0x6b, 0x47, 0xc3, 0xaf, 0x04, 0x7a, 0x17, 0xc6, 0x60, 0xf5, 0x29, 0x2e, 0x05, 0x1d, 0x40, 0x83, + 0x33, 0x9f, 0x0c, 0xc9, 0x59, 0x77, 0xdc, 0xe0, 0x8c, 0x3e, 0x80, 0xce, 0x1c, 0xcb, 0xd8, 0x94, + 0x39, 0xfa, 0x0d, 0x4b, 0xdb, 0x73, 0x2c, 0xdf, 0x97, 0x39, 0xd2, 0x13, 0x38, 0x2c, 0x92, 0x6c, + 0x89, 0x7e, 0xd3, 0x72, 0xb7, 0xa8, 0x68, 0xae, 0xa4, 0xbc, 0xf6, 0x3d, 0x47, 0xed, 0x82, 0x06, + 0x00, 0xa9, 0x14, 0x46, 0xc9, 0x2c, 0x43, 0xe5, 0x1f, 0xda, 0xd1, 0x06, 0x79, 0x31, 0xf8, 0x73, + 0xf3, 0xe3, 0x73, 0xb3, 0x03, 0x9e, 0x3b, 0x3e, 0xfc, 0x46, 0x00, 0x2e, 0xff, 0x8f, 0x77, 0xac, + 0x8e, 0xa1, 0xc9, 0x38, 0xab, 0x85, 0xaa, 0x47, 0xfa, 0x08, 0x20, 0x5f, 0x4e, 0x32, 0x9e, 0xc6, + 0x73, 0x2c, 0xad, 0x51, 0x7f, 0xdc, 0x75, 0xe4, 0x2d, 0x96, 0xf4, 0x21, 0x74, 0x8b, 0x64, 0x99, + 0x99, 0x38, 0xe5, 0xac, 0x36, 0xeb, 0x58, 0x70, 0xc9, 0x19, 0x1d, 0x42, 0xef, 0x9a, 0x8b, 0x29, + 0xaa, 0x5c, 0x71, 0x61, 0xac, 0x5d, 0x7f, 0xbc, 0x89, 0xb6, 0xf4, 0x1a, 0xe1, 0x6f, 0x02, 0x70, + 0x85, 0x19, 0x4e, 0xf7, 0x97, 0xb6, 0x57, 0x2f, 0x9d, 0x25, 0x5c, 0xb8, 0x22, 0x5d, 0x61, 0x5d, + 0x4b, 0x6c, 0x95, 0x4f, 0xe0, 0xc8, 0x8d, 0x13, 0xc6, 0x14, 0x6a, 0x5d, 0x2b, 0xf6, 0x2d, 0xbc, + 0x70, 0x8c, 0x3e, 0x85, 0xc1, 0x5d, 0x63, 0x71, 0x75, 0x80, 0xeb, 0xf1, 0xe8, 0x8e, 0x5e, 0xed, + 0x34, 0xd1, 0xda, 0x6e, 0xc2, 0x99, 0x08, 0x81, 0x59, 0xcc, 0x99, 0xdf, 0x1e, 0x92, 0x33, 0xcf, + 0x9a, 0x54, 0xe4, 0x0d, 0xdb, 0x4a, 0xda, 0x0c, 0x6f, 0x08, 0xb4, 0xdf, 0xa1, 0x2a, 0x78, 0x8a, + 0x3b, 0x31, 0x1f, 0x43, 0x5f, 0xbb, 0xd1, 0xe6, 0xff, 0xd1, 0xab, 0x99, 0x0d, 0xf6, 0x0c, 0x8e, + 0xff, 0x6d, 0x41, 0xc1, 0x72, 0x59, 0xf5, 0xeb, 0xd2, 0xdf, 0xab, 0xf9, 0xeb, 0x1a, 0xef, 0x89, + 0xe7, 0xed, 0x89, 0xb7, 0x25, 0xe8, 0xbd, 0x7a, 0xf9, 0x7d, 0x15, 0x90, 0xdb, 0x55, 0x40, 0x7e, + 0xad, 0x02, 0xf2, 0x65, 0x1d, 0x1c, 0xdc, 0xae, 0x83, 0x83, 0x9f, 0xeb, 0xe0, 0xe0, 0x43, 0x38, + 0xe5, 0x66, 0xb6, 0x9c, 0x8c, 0x52, 0xb9, 0x88, 0xa4, 0xd0, 0x52, 0xa8, 0x68, 0xf6, 0x31, 0x29, + 0xa3, 0x4f, 0x51, 0x75, 0x13, 0x2a, 0x63, 0x3d, 0x69, 0xd9, 0x5b, 0xf0, 0xfc, 0x6f, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xa0, 0x45, 0x5a, 0xc7, 0x52, 0x03, 0x00, 0x00, } func (m *Attestation) Marshal() (dAtA []byte, err error) { @@ -496,15 +495,10 @@ func (m *Controller) MarshalToSizedBuffer(dAtA []byte) (int, error) { 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)) - } + if len(m.PublicKey) > 0 { + i -= len(m.PublicKey) + copy(dAtA[i:], m.PublicKey) + i = encodeVarintState(dAtA, i, uint64(len(m.PublicKey))) i-- dAtA[i] = 0x1a } @@ -550,15 +544,10 @@ func (m *Delegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x38 } - 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.PublicKey) > 0 { + i -= len(m.PublicKey) + copy(dAtA[i:], m.PublicKey) + i = encodeVarintState(dAtA, i, uint64(len(m.PublicKey))) i-- dAtA[i] = 0x32 } @@ -705,8 +694,8 @@ func (m *Controller) Size() (n int) { if l > 0 { n += 1 + l + sovState(uint64(l)) } - if m.PublicKey != nil { - l = m.PublicKey.Size() + l = len(m.PublicKey) + if l > 0 { n += 1 + l + sovState(uint64(l)) } l = len(m.VaultCid) @@ -746,8 +735,8 @@ func (m *Delegation) Size() (n int) { if l > 0 { n += 1 + l + sovState(uint64(l)) } - if m.PublicKey != nil { - l = m.PublicKey.Size() + l = len(m.PublicKey) + if l > 0 { n += 1 + l + sovState(uint64(l)) } if m.ChannelId != 0 { @@ -1094,7 +1083,7 @@ func (m *Controller) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowState @@ -1104,26 +1093,24 @@ func (m *Controller) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthState } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthState } if postIndex > l { return io.ErrUnexpectedEOF } + m.PublicKey = append(m.PublicKey[:0], dAtA[iNdEx:postIndex]...) if m.PublicKey == nil { - m.PublicKey = &PublicKey{} - } - if err := m.PublicKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.PublicKey = []byte{} } iNdEx = postIndex case 4: @@ -1406,7 +1393,7 @@ func (m *Delegation) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowState @@ -1416,26 +1403,24 @@ func (m *Delegation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthState } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthState } if postIndex > l { return io.ErrUnexpectedEOF } + m.PublicKey = append(m.PublicKey[:0], dAtA[iNdEx:postIndex]...) if m.PublicKey == nil { - m.PublicKey = &PublicKey{} - } - if err := m.PublicKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.PublicKey = []byte{} } iNdEx = postIndex case 7: diff --git a/x/did/types/tx.pb.go b/x/did/types/tx.pb.go index 3b53280f0..b76afaa50 100644 --- a/x/did/types/tx.pb.go +++ b/x/did/types/tx.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/gogoproto/gogoproto" @@ -18,14 +14,15 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. -var ( - _ = proto.Marshal - _ = fmt.Errorf - _ = math.Inf -) +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. @@ -51,11 +48,9 @@ func (*MsgUpdateParams) ProtoMessage() {} func (*MsgUpdateParams) Descriptor() ([]byte, []int) { return fileDescriptor_d73284df019ff211, []int{0} } - func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgUpdateParams.Marshal(b, m, deterministic) @@ -68,15 +63,12 @@ func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return b[:n], nil } } - func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgUpdateParams.Merge(m, src) } - func (m *MsgUpdateParams) XXX_Size() int { return m.Size() } - func (m *MsgUpdateParams) XXX_DiscardUnknown() { xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) } @@ -101,7 +93,8 @@ func (m *MsgUpdateParams) GetParams() Params { // MsgUpdateParams message. // // Since: cosmos-sdk 0.47 -type MsgUpdateParamsResponse struct{} +type MsgUpdateParamsResponse struct { +} func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } @@ -109,11 +102,9 @@ func (*MsgUpdateParamsResponse) ProtoMessage() {} func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_d73284df019ff211, []int{1} } - func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic) @@ -126,15 +117,12 @@ func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } - func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) } - func (m *MsgUpdateParamsResponse) XXX_Size() int { return m.Size() } - func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) } @@ -159,11 +147,9 @@ func (*MsgInitializeController) ProtoMessage() {} func (*MsgInitializeController) Descriptor() ([]byte, []int) { return fileDescriptor_d73284df019ff211, []int{2} } - func (m *MsgInitializeController) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgInitializeController) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgInitializeController.Marshal(b, m, deterministic) @@ -176,15 +162,12 @@ func (m *MsgInitializeController) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } - func (m *MsgInitializeController) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgInitializeController.Merge(m, src) } - func (m *MsgInitializeController) XXX_Size() int { return m.Size() } - func (m *MsgInitializeController) XXX_DiscardUnknown() { xxx_messageInfo_MsgInitializeController.DiscardUnknown(m) } @@ -231,11 +214,9 @@ func (*MsgInitializeControllerResponse) ProtoMessage() {} func (*MsgInitializeControllerResponse) Descriptor() ([]byte, []int) { return fileDescriptor_d73284df019ff211, []int{3} } - func (m *MsgInitializeControllerResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgInitializeControllerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgInitializeControllerResponse.Marshal(b, m, deterministic) @@ -248,15 +229,12 @@ func (m *MsgInitializeControllerResponse) XXX_Marshal(b []byte, deterministic bo return b[:n], nil } } - func (m *MsgInitializeControllerResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgInitializeControllerResponse.Merge(m, src) } - func (m *MsgInitializeControllerResponse) XXX_Size() int { return m.Size() } - func (m *MsgInitializeControllerResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgInitializeControllerResponse.DiscardUnknown(m) } @@ -288,11 +266,9 @@ func (*MsgAuthenticateController) ProtoMessage() {} func (*MsgAuthenticateController) Descriptor() ([]byte, []int) { return fileDescriptor_d73284df019ff211, []int{4} } - func (m *MsgAuthenticateController) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgAuthenticateController) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgAuthenticateController.Marshal(b, m, deterministic) @@ -305,15 +281,12 @@ func (m *MsgAuthenticateController) XXX_Marshal(b []byte, deterministic bool) ([ return b[:n], nil } } - func (m *MsgAuthenticateController) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgAuthenticateController.Merge(m, src) } - func (m *MsgAuthenticateController) XXX_Size() int { return m.Size() } - func (m *MsgAuthenticateController) XXX_DiscardUnknown() { xxx_messageInfo_MsgAuthenticateController.DiscardUnknown(m) } @@ -349,7 +322,8 @@ func (m *MsgAuthenticateController) GetOrigin() string { } // MsgAuthenticateControllerResponse is the response type for the Authenticate RPC. -type MsgAuthenticateControllerResponse struct{} +type MsgAuthenticateControllerResponse struct { +} func (m *MsgAuthenticateControllerResponse) Reset() { *m = MsgAuthenticateControllerResponse{} } func (m *MsgAuthenticateControllerResponse) String() string { return proto.CompactTextString(m) } @@ -357,11 +331,9 @@ func (*MsgAuthenticateControllerResponse) ProtoMessage() {} func (*MsgAuthenticateControllerResponse) Descriptor() ([]byte, []int) { return fileDescriptor_d73284df019ff211, []int{5} } - func (m *MsgAuthenticateControllerResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgAuthenticateControllerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgAuthenticateControllerResponse.Marshal(b, m, deterministic) @@ -374,15 +346,12 @@ func (m *MsgAuthenticateControllerResponse) XXX_Marshal(b []byte, deterministic return b[:n], nil } } - func (m *MsgAuthenticateControllerResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgAuthenticateControllerResponse.Merge(m, src) } - func (m *MsgAuthenticateControllerResponse) XXX_Size() int { return m.Size() } - func (m *MsgAuthenticateControllerResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgAuthenticateControllerResponse.DiscardUnknown(m) } @@ -438,10 +407,8 @@ var fileDescriptor_d73284df019ff211 = []byte{ } // Reference imports to suppress errors if they are not otherwise used. -var ( - _ context.Context - _ grpc.ClientConn -) +var _ context.Context +var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. @@ -509,16 +476,15 @@ type MsgServer interface { } // UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct{} +type UnimplementedMsgServer struct { +} func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } - func (*UnimplementedMsgServer) InitializeController(ctx context.Context, req *MsgInitializeController) (*MsgInitializeControllerResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method InitializeController not implemented") } - func (*UnimplementedMsgServer) AuthenticateController(ctx context.Context, req *MsgAuthenticateController) (*MsgAuthenticateControllerResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AuthenticateController not implemented") } @@ -837,7 +803,6 @@ func encodeVarintTx(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } - func (m *MsgUpdateParams) Size() (n int) { if m == nil { return 0 @@ -943,11 +908,9 @@ func (m *MsgAuthenticateControllerResponse) Size() (n int) { func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } - func sozTx(x uint64) (n int) { return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } - func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1063,7 +1026,6 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1114,7 +1076,6 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgInitializeController) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1293,7 +1254,6 @@ func (m *MsgInitializeController) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgInitializeControllerResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1376,7 +1336,6 @@ func (m *MsgInitializeControllerResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgAuthenticateController) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1555,7 +1514,6 @@ func (m *MsgAuthenticateController) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgAuthenticateControllerResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1606,7 +1564,6 @@ func (m *MsgAuthenticateControllerResponse) Unmarshal(dAtA []byte) error { } return nil } - func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/did/types/types.go b/x/did/types/types.go deleted file mode 100644 index fbc143bb3..000000000 --- a/x/did/types/types.go +++ /dev/null @@ -1,15 +0,0 @@ -package types - -import ( - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" -) - -// PublicKey defines the interface for all public keys -type SonrPublicKey interface { - Address() cryptotypes.Address - Bytes() []byte - String() string - VerifySignature(msg []byte, sig []byte) bool - Equals(other cryptotypes.PubKey) bool - Type() string -}