diff --git a/api/cosmos/auth/v1beta1/query.pulsar.go b/api/cosmos/auth/v1beta1/query.pulsar.go index c688885fa4d5..7ce7eb0d6570 100644 --- a/api/cosmos/auth/v1beta1/query.pulsar.go +++ b/api/cosmos/auth/v1beta1/query.pulsar.go @@ -8564,6 +8564,830 @@ func (x *fastReflection_QueryAccountInfoResponse) ProtoMethods() *protoiface.Met } } +var ( + md_QueryAccountAddressByIDRequest protoreflect.MessageDescriptor + fd_QueryAccountAddressByIDRequest_id protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_auth_v1beta1_query_proto_init() + md_QueryAccountAddressByIDRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryAccountAddressByIDRequest") + fd_QueryAccountAddressByIDRequest_id = md_QueryAccountAddressByIDRequest.Fields().ByName("id") +} + +var _ protoreflect.Message = (*fastReflection_QueryAccountAddressByIDRequest)(nil) + +type fastReflection_QueryAccountAddressByIDRequest QueryAccountAddressByIDRequest + +func (x *QueryAccountAddressByIDRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAccountAddressByIDRequest)(x) +} + +func (x *QueryAccountAddressByIDRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[14] + 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_QueryAccountAddressByIDRequest_messageType fastReflection_QueryAccountAddressByIDRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryAccountAddressByIDRequest_messageType{} + +type fastReflection_QueryAccountAddressByIDRequest_messageType struct{} + +func (x fastReflection_QueryAccountAddressByIDRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAccountAddressByIDRequest)(nil) +} +func (x fastReflection_QueryAccountAddressByIDRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAccountAddressByIDRequest) +} +func (x fastReflection_QueryAccountAddressByIDRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountAddressByIDRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAccountAddressByIDRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountAddressByIDRequest +} + +// 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_QueryAccountAddressByIDRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryAccountAddressByIDRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAccountAddressByIDRequest) New() protoreflect.Message { + return new(fastReflection_QueryAccountAddressByIDRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAccountAddressByIDRequest) Interface() protoreflect.ProtoMessage { + return (*QueryAccountAddressByIDRequest)(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_QueryAccountAddressByIDRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != int64(0) { + value := protoreflect.ValueOfInt64(x.Id) + if !f(fd_QueryAccountAddressByIDRequest_id, 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_QueryAccountAddressByIDRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.id": + return x.Id != int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDRequest 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_QueryAccountAddressByIDRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.id": + x.Id = int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDRequest 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_QueryAccountAddressByIDRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.id": + value := x.Id + return protoreflect.ValueOfInt64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDRequest 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_QueryAccountAddressByIDRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.id": + x.Id = value.Int() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDRequest 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_QueryAccountAddressByIDRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.id": + panic(fmt.Errorf("field id of message cosmos.auth.v1beta1.QueryAccountAddressByIDRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDRequest 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_QueryAccountAddressByIDRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.id": + return protoreflect.ValueOfInt64(int64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDRequest 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_QueryAccountAddressByIDRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryAccountAddressByIDRequest", 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_QueryAccountAddressByIDRequest) 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_QueryAccountAddressByIDRequest) 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_QueryAccountAddressByIDRequest) 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_QueryAccountAddressByIDRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAccountAddressByIDRequest) + 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.Id != 0 { + n += 1 + runtime.Sov(uint64(x.Id)) + } + 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().(*QueryAccountAddressByIDRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Id != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAccountAddressByIDRequest) + 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: QueryAccountAddressByIDRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountAddressByIDRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + x.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Id |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryAccountAddressByIDResponse protoreflect.MessageDescriptor + fd_QueryAccountAddressByIDResponse_account_address protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_auth_v1beta1_query_proto_init() + md_QueryAccountAddressByIDResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryAccountAddressByIDResponse") + fd_QueryAccountAddressByIDResponse_account_address = md_QueryAccountAddressByIDResponse.Fields().ByName("account_address") +} + +var _ protoreflect.Message = (*fastReflection_QueryAccountAddressByIDResponse)(nil) + +type fastReflection_QueryAccountAddressByIDResponse QueryAccountAddressByIDResponse + +func (x *QueryAccountAddressByIDResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAccountAddressByIDResponse)(x) +} + +func (x *QueryAccountAddressByIDResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[15] + 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_QueryAccountAddressByIDResponse_messageType fastReflection_QueryAccountAddressByIDResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAccountAddressByIDResponse_messageType{} + +type fastReflection_QueryAccountAddressByIDResponse_messageType struct{} + +func (x fastReflection_QueryAccountAddressByIDResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAccountAddressByIDResponse)(nil) +} +func (x fastReflection_QueryAccountAddressByIDResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAccountAddressByIDResponse) +} +func (x fastReflection_QueryAccountAddressByIDResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountAddressByIDResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAccountAddressByIDResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountAddressByIDResponse +} + +// 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_QueryAccountAddressByIDResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAccountAddressByIDResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAccountAddressByIDResponse) New() protoreflect.Message { + return new(fastReflection_QueryAccountAddressByIDResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAccountAddressByIDResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAccountAddressByIDResponse)(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_QueryAccountAddressByIDResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.AccountAddress != "" { + value := protoreflect.ValueOfString(x.AccountAddress) + if !f(fd_QueryAccountAddressByIDResponse_account_address, 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_QueryAccountAddressByIDResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountAddressByIDResponse.account_address": + return x.AccountAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDResponse 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_QueryAccountAddressByIDResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountAddressByIDResponse.account_address": + x.AccountAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDResponse 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_QueryAccountAddressByIDResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.auth.v1beta1.QueryAccountAddressByIDResponse.account_address": + value := x.AccountAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDResponse 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_QueryAccountAddressByIDResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountAddressByIDResponse.account_address": + x.AccountAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDResponse 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_QueryAccountAddressByIDResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountAddressByIDResponse.account_address": + panic(fmt.Errorf("field account_address of message cosmos.auth.v1beta1.QueryAccountAddressByIDResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDResponse 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_QueryAccountAddressByIDResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountAddressByIDResponse.account_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDResponse 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_QueryAccountAddressByIDResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryAccountAddressByIDResponse", 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_QueryAccountAddressByIDResponse) 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_QueryAccountAddressByIDResponse) 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_QueryAccountAddressByIDResponse) 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_QueryAccountAddressByIDResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAccountAddressByIDResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.AccountAddress) + 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().(*QueryAccountAddressByIDResponse) + 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.AccountAddress) > 0 { + i -= len(x.AccountAddress) + copy(dAtA[i:], x.AccountAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AccountAddress))) + 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().(*QueryAccountAddressByIDResponse) + 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: QueryAccountAddressByIDResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountAddressByIDResponse: 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 AccountAddress", 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.AccountAddress = 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, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -9140,28 +9964,19 @@ func (x *AddressStringToBytesResponse) GetAddressBytes() []byte { return nil } -// QueryAccountAddressByIDRequest is the request type for AccountAddressByID rpc method +// QueryAccountAddressByIDRequest is the request type for AccountAddressById rpc method type QueryAccountAddressByIDRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Deprecated, use account_id instead - // - // id is the account number of the address to be queried. This field - // should have been an uint64 (like all account numbers), and will be - // updated to uint64 in a future version of the auth query. - // - // Deprecated: Do not use. Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - // account_id is the account number of the address to be queried. - AccountId uint64 `protobuf:"varint,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` } func (x *QueryAccountAddressByIDRequest) Reset() { *x = QueryAccountAddressByIDRequest{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[16] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9175,10 +9990,9 @@ func (*QueryAccountAddressByIDRequest) ProtoMessage() {} // Deprecated: Use QueryAccountAddressByIDRequest.ProtoReflect.Descriptor instead. func (*QueryAccountAddressByIDRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{16} + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{14} } -// Deprecated: Do not use. func (x *QueryAccountAddressByIDRequest) GetId() int64 { if x != nil { return x.Id @@ -9186,14 +10000,7 @@ func (x *QueryAccountAddressByIDRequest) GetId() int64 { return 0 } -func (x *QueryAccountAddressByIDRequest) GetAccountId() uint64 { - if x != nil { - return x.AccountId - } - return 0 -} - -// QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method +// QueryAccountAddressByIDResponse is the response type for AccountAddressById rpc method type QueryAccountAddressByIDResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -9205,7 +10012,7 @@ type QueryAccountAddressByIDResponse struct { func (x *QueryAccountAddressByIDResponse) Reset() { *x = QueryAccountAddressByIDResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[17] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9219,7 +10026,7 @@ func (*QueryAccountAddressByIDResponse) ProtoMessage() {} // Deprecated: Use QueryAccountAddressByIDResponse.ProtoReflect.Descriptor instead. func (*QueryAccountAddressByIDResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{17} + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{15} } func (x *QueryAccountAddressByIDResponse) GetAccountAddress() string { @@ -9229,80 +10036,6 @@ func (x *QueryAccountAddressByIDResponse) GetAccountAddress() string { return "" } -// QueryAccountInfoRequest is the Query/AccountInfo request type. -type QueryAccountInfoRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address is the account address string. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (x *QueryAccountInfoRequest) Reset() { - *x = QueryAccountInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAccountInfoRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAccountInfoRequest) ProtoMessage() {} - -// Deprecated: Use QueryAccountInfoRequest.ProtoReflect.Descriptor instead. -func (*QueryAccountInfoRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{18} -} - -func (x *QueryAccountInfoRequest) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -// QueryAccountInfoResponse is the Query/AccountInfo response type. -type QueryAccountInfoResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // info is the account info which is represented by BaseAccount. - Info *BaseAccount `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` -} - -func (x *QueryAccountInfoResponse) Reset() { - *x = QueryAccountInfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAccountInfoResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAccountInfoResponse) ProtoMessage() {} - -// Deprecated: Use QueryAccountInfoResponse.ProtoReflect.Descriptor instead. -func (*QueryAccountInfoResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{19} -} - -func (x *QueryAccountInfoResponse) GetInfo() *BaseAccount { - if x != nil { - return x.Info - } - return nil -} - var File_cosmos_auth_v1beta1_query_proto protoreflect.FileDescriptor var file_cosmos_auth_v1beta1_query_proto_rawDesc = []byte{ @@ -9402,124 +10135,82 @@ var file_cosmos_auth_v1beta1_query_proto_rawDesc = []byte{ 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x13, 0xd2, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, 0x34, 0x36, 0x22, 0x59, 0x0a, 0x1b, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3a, - 0x13, 0xd2, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, - 0x30, 0x2e, 0x34, 0x36, 0x22, 0x58, 0x0a, 0x1c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, - 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x3a, 0x13, 0xd2, 0xb4, 0x2d, 0x0f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, 0x34, 0x36, 0x22, 0x7f, - 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x12, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x02, 0x18, 0x01, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x32, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x13, 0xda, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, 0x34, 0x37, 0x52, 0x09, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x3a, 0x15, 0xd2, 0xb4, 0x2d, 0x11, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, 0x34, 0x36, 0x2e, 0x32, 0x22, - 0x7b, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, - 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x15, 0xd2, 0xb4, 0x2d, 0x11, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, 0x34, 0x36, 0x2e, 0x32, 0x22, 0x62, 0x0a, 0x17, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x13, 0xd2, 0xb4, 0x2d, - 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, 0x34, 0x37, - 0x22, 0x65, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x04, - 0x69, 0x6e, 0x66, 0x6f, 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, 0x52, 0x04, 0x69, 0x6e, - 0x66, 0x6f, 0x3a, 0x13, 0xd2, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, - 0x64, 0x6b, 0x20, 0x30, 0x2e, 0x34, 0x37, 0x32, 0x80, 0x0e, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x12, 0xa0, 0x01, 0x0a, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x29, + 0x72, 0x69, 0x6e, 0x67, 0x22, 0x44, 0x0a, 0x1b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x43, 0x0a, 0x1c, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, + 0x30, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, + 0x64, 0x22, 0x64, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, + 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x32, 0xf0, 0x09, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x12, 0x88, 0x01, 0x0a, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0xca, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, 0x34, 0x33, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x8f, 0x01, 0x0a, + 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x73, 0x12, 0x94, 0x01, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, + 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0xb0, + 0x01, 0x0a, 0x12, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x42, 0x79, 0x49, 0x44, 0x12, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, + 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x29, 0x12, 0x27, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0xd2, 0x01, 0x0a, 0x12, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, - 0x49, 0x44, 0x12, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x51, 0xca, - 0xb4, 0x2d, 0x11, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, - 0x34, 0x36, 0x2e, 0x32, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, - 0x2f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x62, 0x79, - 0x5f, 0x69, 0x64, 0x2f, 0x7b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, - 0x12, 0x85, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x27, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, - 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0xbb, 0x01, 0x0a, 0x0e, 0x4d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x69, 0x64, 0x2f, 0x7b, 0x69, 0x64, + 0x7d, 0x12, 0x80, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x46, - 0xca, 0xb4, 0x2d, 0x11, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, - 0x2e, 0x34, 0x36, 0x2e, 0x32, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, - 0x12, 0x24, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0xbc, 0x01, 0x0a, 0x13, 0x4d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x34, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x79, 0x4e, - 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x88, 0xe7, 0xb0, - 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x7b, - 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x9b, 0x01, 0x0a, 0x0c, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, - 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x65, 0x63, - 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0xca, 0xb4, 0x2d, - 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, 0x34, 0x36, + 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0xa1, 0x01, 0x0a, 0x0e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x26, 0x12, 0x24, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x88, 0x01, 0x0a, 0x0c, 0x42, 0x65, 0x63, + 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, + 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, + 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x63, - 0x68, 0x33, 0x32, 0x12, 0xc3, 0x01, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, + 0x68, 0x33, 0x32, 0x12, 0xb0, 0x01, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, @@ -9527,35 +10218,21 @@ var file_cosmos_auth_v1beta1_query_proto_rawDesc = []byte{ 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x46, 0xca, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x20, 0x30, 0x2e, 0x34, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x63, + 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x7d, 0x12, 0xb1, 0x01, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, + 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x7d, 0x12, 0xc4, 0x01, 0x0a, 0x14, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, - 0x65, 0x73, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x47, 0xca, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, 0x34, 0x36, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x2f, - 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x7d, - 0x12, 0xb7, 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, - 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0xca, - 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, - 0x34, 0x37, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, - 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x42, 0xc5, 0x01, 0x0a, 0x17, 0x63, + 0x73, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x7d, 0x42, 0xc5, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, @@ -9583,68 +10260,57 @@ func file_cosmos_auth_v1beta1_query_proto_rawDescGZIP() []byte { return file_cosmos_auth_v1beta1_query_proto_rawDescData } -var file_cosmos_auth_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_cosmos_auth_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_cosmos_auth_v1beta1_query_proto_goTypes = []interface{}{ - (*QueryAccountsRequest)(nil), // 0: cosmos.auth.v1beta1.QueryAccountsRequest - (*QueryAccountsResponse)(nil), // 1: cosmos.auth.v1beta1.QueryAccountsResponse - (*QueryAccountRequest)(nil), // 2: cosmos.auth.v1beta1.QueryAccountRequest - (*QueryAccountResponse)(nil), // 3: cosmos.auth.v1beta1.QueryAccountResponse - (*QueryParamsRequest)(nil), // 4: cosmos.auth.v1beta1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 5: cosmos.auth.v1beta1.QueryParamsResponse - (*QueryModuleAccountsRequest)(nil), // 6: cosmos.auth.v1beta1.QueryModuleAccountsRequest - (*QueryModuleAccountsResponse)(nil), // 7: cosmos.auth.v1beta1.QueryModuleAccountsResponse - (*QueryModuleAccountByNameRequest)(nil), // 8: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest - (*QueryModuleAccountByNameResponse)(nil), // 9: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse - (*Bech32PrefixRequest)(nil), // 10: cosmos.auth.v1beta1.Bech32PrefixRequest - (*Bech32PrefixResponse)(nil), // 11: cosmos.auth.v1beta1.Bech32PrefixResponse - (*AddressBytesToStringRequest)(nil), // 12: cosmos.auth.v1beta1.AddressBytesToStringRequest - (*AddressBytesToStringResponse)(nil), // 13: cosmos.auth.v1beta1.AddressBytesToStringResponse - (*AddressStringToBytesRequest)(nil), // 14: cosmos.auth.v1beta1.AddressStringToBytesRequest - (*AddressStringToBytesResponse)(nil), // 15: cosmos.auth.v1beta1.AddressStringToBytesResponse - (*QueryAccountAddressByIDRequest)(nil), // 16: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest - (*QueryAccountAddressByIDResponse)(nil), // 17: cosmos.auth.v1beta1.QueryAccountAddressByIDResponse - (*QueryAccountInfoRequest)(nil), // 18: cosmos.auth.v1beta1.QueryAccountInfoRequest - (*QueryAccountInfoResponse)(nil), // 19: cosmos.auth.v1beta1.QueryAccountInfoResponse - (*v1beta1.PageRequest)(nil), // 20: cosmos.base.query.v1beta1.PageRequest - (*anypb.Any)(nil), // 21: google.protobuf.Any - (*v1beta1.PageResponse)(nil), // 22: cosmos.base.query.v1beta1.PageResponse - (*Params)(nil), // 23: cosmos.auth.v1beta1.Params - (*BaseAccount)(nil), // 24: cosmos.auth.v1beta1.BaseAccount + (*QueryAccountsRequest)(nil), // 0: cosmos.auth.v1beta1.QueryAccountsRequest + (*QueryAccountsResponse)(nil), // 1: cosmos.auth.v1beta1.QueryAccountsResponse + (*QueryAccountRequest)(nil), // 2: cosmos.auth.v1beta1.QueryAccountRequest + (*QueryModuleAccountsRequest)(nil), // 3: cosmos.auth.v1beta1.QueryModuleAccountsRequest + (*QueryParamsResponse)(nil), // 4: cosmos.auth.v1beta1.QueryParamsResponse + (*QueryAccountResponse)(nil), // 5: cosmos.auth.v1beta1.QueryAccountResponse + (*QueryParamsRequest)(nil), // 6: cosmos.auth.v1beta1.QueryParamsRequest + (*QueryModuleAccountsResponse)(nil), // 7: cosmos.auth.v1beta1.QueryModuleAccountsResponse + (*Bech32PrefixRequest)(nil), // 8: cosmos.auth.v1beta1.Bech32PrefixRequest + (*Bech32PrefixResponse)(nil), // 9: cosmos.auth.v1beta1.Bech32PrefixResponse + (*AddressBytesToStringRequest)(nil), // 10: cosmos.auth.v1beta1.AddressBytesToStringRequest + (*AddressBytesToStringResponse)(nil), // 11: cosmos.auth.v1beta1.AddressBytesToStringResponse + (*AddressStringToBytesRequest)(nil), // 12: cosmos.auth.v1beta1.AddressStringToBytesRequest + (*AddressStringToBytesResponse)(nil), // 13: cosmos.auth.v1beta1.AddressStringToBytesResponse + (*QueryAccountAddressByIDRequest)(nil), // 14: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest + (*QueryAccountAddressByIDResponse)(nil), // 15: cosmos.auth.v1beta1.QueryAccountAddressByIDResponse + (*v1beta1.PageRequest)(nil), // 16: cosmos.base.query.v1beta1.PageRequest + (*anypb.Any)(nil), // 17: google.protobuf.Any + (*v1beta1.PageResponse)(nil), // 18: cosmos.base.query.v1beta1.PageResponse + (*Params)(nil), // 19: cosmos.auth.v1beta1.Params } var file_cosmos_auth_v1beta1_query_proto_depIdxs = []int32{ - 20, // 0: cosmos.auth.v1beta1.QueryAccountsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 21, // 1: cosmos.auth.v1beta1.QueryAccountsResponse.accounts:type_name -> google.protobuf.Any - 22, // 2: cosmos.auth.v1beta1.QueryAccountsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 21, // 3: cosmos.auth.v1beta1.QueryAccountResponse.account:type_name -> google.protobuf.Any - 23, // 4: cosmos.auth.v1beta1.QueryParamsResponse.params:type_name -> cosmos.auth.v1beta1.Params - 21, // 5: cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts:type_name -> google.protobuf.Any - 21, // 6: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account:type_name -> google.protobuf.Any - 24, // 7: cosmos.auth.v1beta1.QueryAccountInfoResponse.info:type_name -> cosmos.auth.v1beta1.BaseAccount - 0, // 8: cosmos.auth.v1beta1.Query.Accounts:input_type -> cosmos.auth.v1beta1.QueryAccountsRequest - 2, // 9: cosmos.auth.v1beta1.Query.Account:input_type -> cosmos.auth.v1beta1.QueryAccountRequest - 16, // 10: cosmos.auth.v1beta1.Query.AccountAddressByID:input_type -> cosmos.auth.v1beta1.QueryAccountAddressByIDRequest - 4, // 11: cosmos.auth.v1beta1.Query.Params:input_type -> cosmos.auth.v1beta1.QueryParamsRequest - 6, // 12: cosmos.auth.v1beta1.Query.ModuleAccounts:input_type -> cosmos.auth.v1beta1.QueryModuleAccountsRequest - 8, // 13: cosmos.auth.v1beta1.Query.ModuleAccountByName:input_type -> cosmos.auth.v1beta1.QueryModuleAccountByNameRequest - 10, // 14: cosmos.auth.v1beta1.Query.Bech32Prefix:input_type -> cosmos.auth.v1beta1.Bech32PrefixRequest - 12, // 15: cosmos.auth.v1beta1.Query.AddressBytesToString:input_type -> cosmos.auth.v1beta1.AddressBytesToStringRequest - 14, // 16: cosmos.auth.v1beta1.Query.AddressStringToBytes:input_type -> cosmos.auth.v1beta1.AddressStringToBytesRequest - 18, // 17: cosmos.auth.v1beta1.Query.AccountInfo:input_type -> cosmos.auth.v1beta1.QueryAccountInfoRequest - 1, // 18: cosmos.auth.v1beta1.Query.Accounts:output_type -> cosmos.auth.v1beta1.QueryAccountsResponse - 3, // 19: cosmos.auth.v1beta1.Query.Account:output_type -> cosmos.auth.v1beta1.QueryAccountResponse - 17, // 20: cosmos.auth.v1beta1.Query.AccountAddressByID:output_type -> cosmos.auth.v1beta1.QueryAccountAddressByIDResponse - 5, // 21: cosmos.auth.v1beta1.Query.Params:output_type -> cosmos.auth.v1beta1.QueryParamsResponse - 7, // 22: cosmos.auth.v1beta1.Query.ModuleAccounts:output_type -> cosmos.auth.v1beta1.QueryModuleAccountsResponse - 9, // 23: cosmos.auth.v1beta1.Query.ModuleAccountByName:output_type -> cosmos.auth.v1beta1.QueryModuleAccountByNameResponse - 11, // 24: cosmos.auth.v1beta1.Query.Bech32Prefix:output_type -> cosmos.auth.v1beta1.Bech32PrefixResponse - 13, // 25: cosmos.auth.v1beta1.Query.AddressBytesToString:output_type -> cosmos.auth.v1beta1.AddressBytesToStringResponse - 15, // 26: cosmos.auth.v1beta1.Query.AddressStringToBytes:output_type -> cosmos.auth.v1beta1.AddressStringToBytesResponse - 19, // 27: cosmos.auth.v1beta1.Query.AccountInfo:output_type -> cosmos.auth.v1beta1.QueryAccountInfoResponse - 18, // [18:28] is the sub-list for method output_type - 8, // [8:18] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 16, // 0: cosmos.auth.v1beta1.QueryAccountsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 17, // 1: cosmos.auth.v1beta1.QueryAccountsResponse.accounts:type_name -> google.protobuf.Any + 18, // 2: cosmos.auth.v1beta1.QueryAccountsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 19, // 3: cosmos.auth.v1beta1.QueryParamsResponse.params:type_name -> cosmos.auth.v1beta1.Params + 17, // 4: cosmos.auth.v1beta1.QueryAccountResponse.account:type_name -> google.protobuf.Any + 17, // 5: cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts:type_name -> google.protobuf.Any + 0, // 6: cosmos.auth.v1beta1.Query.Accounts:input_type -> cosmos.auth.v1beta1.QueryAccountsRequest + 2, // 7: cosmos.auth.v1beta1.Query.Account:input_type -> cosmos.auth.v1beta1.QueryAccountRequest + 14, // 8: cosmos.auth.v1beta1.Query.AccountAddressByID:input_type -> cosmos.auth.v1beta1.QueryAccountAddressByIDRequest + 6, // 9: cosmos.auth.v1beta1.Query.Params:input_type -> cosmos.auth.v1beta1.QueryParamsRequest + 3, // 10: cosmos.auth.v1beta1.Query.ModuleAccounts:input_type -> cosmos.auth.v1beta1.QueryModuleAccountsRequest + 8, // 11: cosmos.auth.v1beta1.Query.Bech32Prefix:input_type -> cosmos.auth.v1beta1.Bech32PrefixRequest + 10, // 12: cosmos.auth.v1beta1.Query.AddressBytesToString:input_type -> cosmos.auth.v1beta1.AddressBytesToStringRequest + 12, // 13: cosmos.auth.v1beta1.Query.AddressStringToBytes:input_type -> cosmos.auth.v1beta1.AddressStringToBytesRequest + 1, // 14: cosmos.auth.v1beta1.Query.Accounts:output_type -> cosmos.auth.v1beta1.QueryAccountsResponse + 5, // 15: cosmos.auth.v1beta1.Query.Account:output_type -> cosmos.auth.v1beta1.QueryAccountResponse + 15, // 16: cosmos.auth.v1beta1.Query.AccountAddressByID:output_type -> cosmos.auth.v1beta1.QueryAccountAddressByIDResponse + 4, // 17: cosmos.auth.v1beta1.Query.Params:output_type -> cosmos.auth.v1beta1.QueryParamsResponse + 7, // 18: cosmos.auth.v1beta1.Query.ModuleAccounts:output_type -> cosmos.auth.v1beta1.QueryModuleAccountsResponse + 9, // 19: cosmos.auth.v1beta1.Query.Bech32Prefix:output_type -> cosmos.auth.v1beta1.Bech32PrefixResponse + 11, // 20: cosmos.auth.v1beta1.Query.AddressBytesToString:output_type -> cosmos.auth.v1beta1.AddressBytesToStringResponse + 13, // 21: cosmos.auth.v1beta1.Query.AddressStringToBytes:output_type -> cosmos.auth.v1beta1.AddressStringToBytesResponse + 14, // [14:22] is the sub-list for method output_type + 6, // [6:14] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_cosmos_auth_v1beta1_query_proto_init() } @@ -9846,7 +10512,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { return nil } } - file_cosmos_auth_v1beta1_query_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_cosmos_auth_v1beta1_query_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryAccountAddressByIDRequest); i { case 0: return &v.state @@ -9858,7 +10524,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { return nil } } - file_cosmos_auth_v1beta1_query_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_cosmos_auth_v1beta1_query_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryAccountAddressByIDResponse); i { case 0: return &v.state @@ -9870,30 +10536,6 @@ func file_cosmos_auth_v1beta1_query_proto_init() { return nil } } - file_cosmos_auth_v1beta1_query_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAccountInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_auth_v1beta1_query_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAccountInfoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } type x struct{} out := protoimpl.TypeBuilder{ @@ -9901,7 +10543,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_auth_v1beta1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 20, + NumMessages: 16, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/auth/v1beta1/query_grpc.pb.go b/api/cosmos/auth/v1beta1/query_grpc.pb.go index c04f1cc4773a..a800fdb2a291 100644 --- a/api/cosmos/auth/v1beta1/query_grpc.pb.go +++ b/api/cosmos/auth/v1beta1/query_grpc.pb.go @@ -43,7 +43,7 @@ type QueryClient interface { Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) // Account returns account details based on address. Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*QueryAccountResponse, error) - // AccountAddressByID returns account address based on account number. + // AccountAddressByID returns account address based on account id AccountAddressByID(ctx context.Context, in *QueryAccountAddressByIDRequest, opts ...grpc.CallOption) (*QueryAccountAddressByIDResponse, error) // Params queries all parameters. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) @@ -99,6 +99,15 @@ func (c *queryClient) AccountAddressByID(ctx context.Context, in *QueryAccountAd return out, nil } +func (c *queryClient) AccountAddressByID(ctx context.Context, in *QueryAccountAddressByIDRequest, opts ...grpc.CallOption) (*QueryAccountAddressByIDResponse, error) { + out := new(QueryAccountAddressByIDResponse) + err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/AccountAddressByID", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryParamsResponse) @@ -181,7 +190,7 @@ type QueryServer interface { Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error) // Account returns account details based on address. Account(context.Context, *QueryAccountRequest) (*QueryAccountResponse, error) - // AccountAddressByID returns account address based on account number. + // AccountAddressByID returns account address based on account id AccountAddressByID(context.Context, *QueryAccountAddressByIDRequest) (*QueryAccountAddressByIDResponse, error) // Params queries all parameters. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) @@ -304,7 +313,7 @@ func _Query_AccountAddressByID_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Query_AccountAddressByID_FullMethodName, + FullMethod: "/cosmos.auth.v1beta1.Query/AccountAddressByID", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).AccountAddressByID(ctx, req.(*QueryAccountAddressByIDRequest)) diff --git a/baseapp/block_gas_test.go b/baseapp/block_gas_test.go index 9a1be3a5f48f..94d3e8bf7864 100644 --- a/baseapp/block_gas_test.go +++ b/baseapp/block_gas_test.go @@ -123,7 +123,7 @@ func TestBaseApp_BlockGas(t *testing.T) { require.Equal(t, []byte("ok"), okValue) } // check block gas is always consumed - baseGas := uint64(59142) // baseGas is the gas consumed before tx msg + baseGas := uint64(70184) // baseGas is the gas consumed before tx msg expGasConsumed := addUint64Saturating(tc.gasToConsume, baseGas) if expGasConsumed > txtypes.MaxGasWanted { // capped by gasLimit diff --git a/proto/cosmos/auth/v1beta1/query.proto b/proto/cosmos/auth/v1beta1/query.proto index 352d941fd3a5..122c691db461 100644 --- a/proto/cosmos/auth/v1beta1/query.proto +++ b/proto/cosmos/auth/v1beta1/query.proto @@ -35,6 +35,11 @@ service Query { option (google.api.http).get = "/cosmos/auth/v1beta1/address_by_id/{account_id}"; } + // AccountAddressByID returns account address based on account id + rpc AccountAddressByID(QueryAccountAddressByIDRequest) returns (QueryAccountAddressByIDResponse) { + option (google.api.http).get = "/cosmos/auth/v1beta1/address_by_id/{id}"; + } + // Params queries all parameters. rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (cosmos.query.v1.module_query_safe) = true; @@ -135,7 +140,19 @@ message QueryModuleAccountByNameRequest { string name = 1; } -// QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. -message QueryModuleAccountByNameResponse { - google.protobuf.Any account = 1 [(cosmos_proto.accepts_interface) = "ModuleAccountI"]; -} \ No newline at end of file +// AddressStringToBytesResponse is the response type for AddressBytes rpc method. +// +// Since: cosmos-sdk 0.46 +message AddressStringToBytesResponse { + bytes address_bytes = 1; +} + +// QueryAccountAddressByIDRequest is the request type for AccountAddressByID rpc method +message QueryAccountAddressByIDRequest{ + int64 id = 1; +} + +// QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method +message QueryAccountAddressByIDResponse { + string account_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} diff --git a/tests/e2e/auth/suite.go b/tests/e2e/auth/suite.go index 31dca150f87e..867c74d671f5 100644 --- a/tests/e2e/auth/suite.go +++ b/tests/e2e/auth/suite.go @@ -34,7 +34,11 @@ import ( "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" authcli "github.com/cosmos/cosmos-sdk/x/auth/client/cli" - authclitestutil "github.com/cosmos/cosmos-sdk/x/auth/client/testutil" + "github.com/cosmos/cosmos-sdk/x/auth/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + bank "github.com/cosmos/cosmos-sdk/x/bank/client/cli" + bankcli "github.com/cosmos/cosmos-sdk/x/bank/client/testutil" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" ) @@ -267,9 +271,110 @@ func (s *E2ETestSuite) TestCLISignBatch() { _, err = authclitestutil.TxSignBatchExec(clientCtx, val.GetAddress(), malformedFile.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, clientCtx.ChainID), "--signature-only") s.Require().Error(err) - // make a txn to increase the sequence of sender - _, seq, err := clientCtx.AccountRetriever.GetAccountNumberSequence(clientCtx, val.GetAddress()) - s.Require().NoError(err) +func (s *IntegrationTestSuite) TestCliGetAccountAddressByID() { + require := s.Require() + val1 := s.network.Validators[0] + testCases := []struct { + name string + args []string + expectErr bool + }{ + { + "not enough args", + []string{fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + true, + }, + { + "invalid account id", + []string{fmt.Sprint(-1), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + true, + }, + { + "valid account id", + []string{fmt.Sprint(0), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + false, + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + cmd := authcli.GetAccountAddressByIDCmd() + clientCtx := val1.ClientCtx + + queryResJSON, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) + if tc.expectErr { + s.Require().Error(err) + } else { + s.Require().NoError(err) + var res types.QueryAccountAddressByIDResponse + require.NoError(val1.ClientCtx.Codec.UnmarshalJSON(queryResJSON.Bytes(), &res)) + require.NotNil(res.GetAccountAddress()) + } + }) + } +} + +func (s *IntegrationTestSuite) TestCLISignAminoJSON() { + require := s.Require() + val1 := s.network.Validators[0] + txCfg := val1.ClientCtx.TxConfig + sendTokens := sdk.NewCoins( + sdk.NewCoin(fmt.Sprintf("%stoken", val1.Moniker), sdk.NewInt(10)), + sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)), + ) + txBz, err := s.createBankMsg(val1, val1.Address, + sendTokens, fmt.Sprintf("--%s=true", flags.FlagGenerateOnly)) + require.NoError(err) + fileUnsigned := testutil.WriteToNewTempFile(s.T(), txBz.String()) + chainFlag := fmt.Sprintf("--%s=%s", flags.FlagChainID, val1.ClientCtx.ChainID) + sigOnlyFlag := "--signature-only" + signModeAminoFlag := "--sign-mode=amino-json" + + // SIC! validators have same key names and same addresses as those registered in the keyring, + // BUT the keys are different! + valRecord, err := val1.ClientCtx.Keyring.Key(val1.Moniker) + require.NoError(err) + + // query account info + queryResJSON, err := QueryAccountExec(val1.ClientCtx, val1.Address) + require.NoError(err) + var account authtypes.AccountI + require.NoError(val1.ClientCtx.Codec.UnmarshalInterfaceJSON(queryResJSON.Bytes(), &account)) + + /**** test signature-only ****/ + res, err := TxSignExec(val1.ClientCtx, val1.Address, fileUnsigned.Name(), chainFlag, + sigOnlyFlag, signModeAminoFlag) + require.NoError(err) + pub, err := valRecord.GetPubKey() + require.NoError(err) + checkSignatures(require, txCfg, res.Bytes(), pub) + sigs, err := txCfg.UnmarshalSignatureJSON(res.Bytes()) + require.NoError(err) + require.Equal(1, len(sigs)) + require.Equal(account.GetSequence(), sigs[0].Sequence) + + /**** test full output ****/ + res, err = TxSignExec(val1.ClientCtx, val1.Address, fileUnsigned.Name(), chainFlag, signModeAminoFlag) + require.NoError(err) + + // txCfg.UnmarshalSignatureJSON can't unmarshal a fragment of the signature, so we create this structure. + type txFragment struct { + Signatures []json.RawMessage + } + var txOut txFragment + err = json.Unmarshal(res.Bytes(), &txOut) + require.NoError(err) + require.Len(txOut.Signatures, 1) + + /**** test file output ****/ + filenameSigned := filepath.Join(s.T().TempDir(), "test_sign_out.json") + fileFlag := fmt.Sprintf("--%s=%s", flags.FlagOutputDocument, filenameSigned) + _, err = TxSignExec(val1.ClientCtx, val1.Address, fileUnsigned.Name(), chainFlag, fileFlag, signModeAminoFlag) + require.NoError(err) + fContent, err := os.ReadFile(filenameSigned) + require.NoError(err) + require.Equal(res.String(), string(fContent)) account1, err := clientCtx.Keyring.Key("newAccount1") s.Require().NoError(err) diff --git a/x/auth/ante/ante_test.go b/x/auth/ante/ante_test.go index 5412972ce15e..bc3648a359e5 100644 --- a/x/auth/ante/ante_test.go +++ b/x/auth/ante/ante_test.go @@ -705,8 +705,9 @@ func TestAnteHandlerMemoGas(t *testing.T) { }, { "tx with memo has enough gas", - func(suite *AnteTestSuite) TestCaseArgs { - accs := suite.CreateTestAccounts(1) + func() { + feeAmount = sdk.NewCoins(sdk.NewInt64Coin("atom", 0)) + gasLimit = 60000 suite.txBuilder.SetMemo(strings.Repeat("0123456789", 10)) return TestCaseArgs{ feeAmount: sdk.NewCoins(sdk.NewInt64Coin("atom", 0)), diff --git a/x/auth/client/cli/query.go b/x/auth/client/cli/query.go index c44ed6340ff8..e1feb619de8c 100644 --- a/x/auth/client/cli/query.go +++ b/x/auth/client/cli/query.go @@ -3,6 +3,7 @@ package cli import ( "context" "fmt" + "strconv" "strings" "github.com/spf13/cobra" @@ -40,6 +41,7 @@ func GetQueryCmd() *cobra.Command { cmd.AddCommand( GetAccountCmd(), + GetAccountAddressByIDCmd(), GetAccountsCmd(), QueryParamsCmd(), QueryModuleAccountByNameCmd(), @@ -133,7 +135,49 @@ $ %s query tx --%s=%s , return fmt.Errorf("no transaction found with hash %s", args[0]) } - return clientCtx.PrintProto(output) +// GetAccountAddressByIDCmd returns a query account that will display the account address of a given account id. +func GetAccountAddressByIDCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "address-by-id [id]", + Short: "Query for account address by account id", + Args: cobra.ExactArgs(1), + Example: fmt.Sprintf("%s q auth address-by-id 1", version.AppName), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + id, err := strconv.ParseInt(args[0], 10, 64) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + res, err := queryClient.AccountAddressByID(cmd.Context(), &types.QueryAccountAddressByIDRequest{Id: id}) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +// GetAccountsCmd returns a query command that will display a list of accounts +func GetAccountsCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "accounts", + Short: "Query all the accounts", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } case TypeSig: sigParts, err := ParseSigArgs(args) diff --git a/x/auth/keeper/account.go b/x/auth/keeper/account.go index 8ff4a6b78154..0bd23c3595be 100644 --- a/x/auth/keeper/account.go +++ b/x/auth/keeper/account.go @@ -35,6 +35,12 @@ func (ak AccountKeeper) HasAccount(ctx sdk.Context, addr sdk.AccAddress) bool { return store.Has(types.AddressStoreKey(addr)) } +// HasAccountAddressByID checks account address exists by id. +func (ak AccountKeeper) HasAccountAddressByID(ctx sdk.Context, id uint64) bool { + store := ctx.KVStore(ak.key) + return store.Has(types.AccountNumberStoreKey(id)) +} + // GetAccount implements AccountKeeperI. func (ak accountKeeper) GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI { store := ctx.KVStore(ak.key) @@ -46,6 +52,16 @@ func (ak accountKeeper) GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.A return acc } +// GetAccountAddressById returns account address by id. +func (ak AccountKeeper) GetAccountAddressByID(ctx sdk.Context, id uint64) string { + store := ctx.KVStore(ak.key) + bz := store.Get(types.AccountNumberStoreKey(id)) + if bz == nil { + return "" + } + return sdk.AccAddress(bz).String() +} + // GetAllAccounts returns all accounts in the accountKeeper. func (ak accountKeeper) GetAllAccounts(ctx sdk.Context) (accounts []types.AccountI) { ak.IterateAccounts(ctx, func(acc types.AccountI) (stop bool) { @@ -71,6 +87,9 @@ func (ak accountKeeper) SetAccount(ctx sdk.Context, acc types.AccountI) { if err != nil { panic(err) } + + store.Set(types.AddressStoreKey(addr), bz) + store.Set(types.AccountNumberStoreKey(acc.GetAccountNumber()), addr.Bytes()) } // RemoveAccount removes an account for the account mapper store. @@ -79,6 +98,7 @@ func (ak accountKeeper) RemoveAccount(ctx sdk.Context, acc types.AccountI) { addr := acc.GetAddress() store := ctx.KVStore(ak.key) store.Delete(types.AddressStoreKey(addr)) + store.Delete(types.AccountNumberStoreKey(acc.GetAccountNumber())) } // IterateAccounts iterates over all the stored accounts and performs a callback function. diff --git a/x/auth/keeper/grpc_query.go b/x/auth/keeper/grpc_query.go index a1c4c8e7d523..5fa68f3b7288 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -17,7 +17,25 @@ import ( var _ types.QueryServer = accountKeeper{} -func (ak accountKeeper) Accounts(c context.Context, req *types.QueryAccountsRequest) (*types.QueryAccountsResponse, error) { +func (ak AccountKeeper) AccountAddressByID(c context.Context, req *types.QueryAccountAddressByIDRequest) (*types.QueryAccountAddressByIDResponse, error) { + if req == nil { + return nil, status.Errorf(codes.InvalidArgument, "empty request") + } + + if req.Id < 0 { + return nil, status.Error(codes.InvalidArgument, "Invalid account id") + } + + ctx := sdk.UnwrapSDKContext(c) + address := ak.GetAccountAddressByID(ctx, uint64(req.GetId())) + if len(address) == 0 { + return nil, status.Errorf(codes.NotFound, "account address not found with id %d", req.Id) + } + + return &types.QueryAccountAddressByIDResponse{AccountAddress: address}, nil +} + +func (ak AccountKeeper) Accounts(c context.Context, req *types.QueryAccountsRequest) (*types.QueryAccountsResponse, error) { if req == nil { return nil, status.Errorf(codes.InvalidArgument, "empty request") } diff --git a/x/auth/keeper/grpc_query_test.go b/x/auth/keeper/grpc_query_test.go index 3066e1388a81..b718c47078f7 100644 --- a/x/auth/keeper/grpc_query_test.go +++ b/x/auth/keeper/grpc_query_test.go @@ -158,6 +158,109 @@ func (suite *KeeperTestSuite) TestGRPCQueryAccountAddressByID() { var req *types.QueryAccountAddressByIDRequest _, _, addr := testdata.KeyTestPubAddr() + testCases := []struct { + msg string + malleate func() + expPass bool + posttests func(res *types.QueryAccountAddressByIDResponse) + }{ + { + "invalid request", + func() { + req = &types.QueryAccountAddressByIDRequest{Id: -1} + }, + false, + func(res *types.QueryAccountAddressByIDResponse) {}, + }, + { + "account address not found", + func() { + req = &types.QueryAccountAddressByIDRequest{Id: math.MaxInt64} + }, + false, + func(res *types.QueryAccountAddressByIDResponse) {}, + }, + { + "valid request", + func() { + account := suite.app.AccountKeeper.NewAccountWithAddress(suite.ctx, addr) + suite.app.AccountKeeper.SetAccount(suite.ctx, account) + req = &types.QueryAccountAddressByIDRequest{Id: int64(account.GetAccountNumber())} + }, + true, + func(res *types.QueryAccountAddressByIDResponse) { + suite.Require().NotNil(res.AccountAddress) + }, + }, + } + + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + suite.SetupTest() // reset + + tc.malleate() + ctx := sdk.WrapSDKContext(suite.ctx) + + res, err := suite.queryClient.AccountAddressByID(ctx, req) + + if tc.expPass { + suite.Require().NoError(err) + suite.Require().NotNil(res) + } else { + suite.Require().Error(err) + suite.Require().Nil(res) + } + + tc.posttests(res) + }) + } +} + +func (suite *KeeperTestSuite) TestGRPCQueryParameters() { + var ( + req *types.QueryParamsRequest + expParams types.Params + ) + + testCases := []struct { + msg string + malleate func() + expPass bool + }{ + { + "success", + func() { + req = &types.QueryParamsRequest{} + expParams = suite.app.AccountKeeper.GetParams(suite.ctx) + }, + true, + }, + } + + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + suite.SetupTest() // reset + + tc.malleate() + ctx := sdk.WrapSDKContext(suite.ctx) + + res, err := suite.queryClient.Params(ctx, req) + + if tc.expPass { + suite.Require().NoError(err) + suite.Require().NotNil(res) + suite.Require().Equal(expParams, res.Params) + } else { + suite.Require().Error(err) + suite.Require().Nil(res) + } + }) + } +} + +func (suite *KeeperTestSuite) TestGRPCQueryModuleAccounts() { + var req *types.QueryModuleAccountsRequest + testCases := []struct { msg string malleate func() diff --git a/x/auth/keeper/migrations.go b/x/auth/keeper/migrations.go index e621f5cf1cb0..9c0a1d0e99cb 100644 --- a/x/auth/keeper/migrations.go +++ b/x/auth/keeper/migrations.go @@ -1,7 +1,12 @@ package keeper import ( - "context" + "github.com/gogo/protobuf/grpc" + + v043 "github.com/cosmos/cosmos-sdk/x/auth/migrations/v043" + v046 "github.com/cosmos/cosmos-sdk/x/auth/migrations/v046" + + "github.com/cosmos/cosmos-sdk/x/auth/types" sdk "github.com/cosmos/cosmos-sdk/types" v5 "github.com/cosmos/cosmos-sdk/x/auth/migrations/v5" @@ -65,3 +70,26 @@ func (m Migrator) V45SetAccount(ctx context.Context, acc sdk.AccountI) error { func addressStoreKey(addr sdk.AccAddress) []byte { return append(types.AddressStoreKeyPrefix, addr.Bytes()...) } + +// Migrate2to3 migrates from consensus version 2 to version 3. Specifically, for each account +// we index the account's ID to their address. +func (m Migrator) Migrate2to3(ctx sdk.Context) error { + return v046.MigrateStore(ctx, m.keeper.key, m.keeper.cdc) +} + +// V45_SetAccount implements V45_SetAccount +// set the account without map to accAddr to accNumber. +// +// NOTE: This is used for testing purposes only. +func (m Migrator) V45_SetAccount(ctx sdk.Context, acc types.AccountI) error { + addr := acc.GetAddress() + store := ctx.KVStore(m.keeper.key) + + bz, err := m.keeper.MarshalAccount(acc) + if err != nil { + return err + } + + store.Set(types.AddressStoreKey(addr), bz) + return nil +} diff --git a/x/auth/migrations/v046/store.go b/x/auth/migrations/v046/store.go new file mode 100644 index 000000000000..8cb7c15bd6a9 --- /dev/null +++ b/x/auth/migrations/v046/store.go @@ -0,0 +1,31 @@ +package v046 + +import ( + "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/types" +) + +func mapAccountAddressToAccountID(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) error { + store := ctx.KVStore(storeKey) + iterator := sdk.KVStorePrefixIterator(store, types.AddressStoreKeyPrefix) + + defer iterator.Close() + for ; iterator.Valid(); iterator.Next() { + var acc types.AccountI + if err := cdc.UnmarshalInterface(iterator.Value(), &acc); err != nil { + return err + } + store.Set(types.AccountNumberStoreKey(acc.GetAccountNumber()), acc.GetAddress().Bytes()) + } + + return nil +} + +// MigrateStore performs in-place store migrations from v0.45 to v0.46. The +// migration includes: +// - Add an Account number as an index to get the account address +func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) error { + return mapAccountAddressToAccountID(ctx, storeKey, cdc) +} diff --git a/x/auth/migrations/v046/store_test.go b/x/auth/migrations/v046/store_test.go new file mode 100644 index 000000000000..48bd52d4b82a --- /dev/null +++ b/x/auth/migrations/v046/store_test.go @@ -0,0 +1,68 @@ +package v046_test + +import ( + "math/rand" + "testing" + "time" + + "github.com/stretchr/testify/require" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + "github.com/cosmos/cosmos-sdk/simapp" + "github.com/cosmos/cosmos-sdk/x/auth/keeper" + "github.com/cosmos/cosmos-sdk/x/auth/types" +) + +// TestMigrateMapAccAddressToAccNumberKey test cases for state migration of map to accAddr to accNum +func TestMigrateMapAccAddressToAccNumberKey(t *testing.T) { + app := simapp.Setup(t, false) + + // new base account + senderPrivKey := secp256k1.GenPrivKey() + randAccNumber := uint64(rand.Intn(100000-10000) + 10000) + acc := types.NewBaseAccount(senderPrivKey.PubKey().Address().Bytes(), senderPrivKey.PubKey(), randAccNumber, 0) + + ctx := app.BaseApp.NewContext(false, tmproto.Header{ + Time: time.Now(), + }) + + m := keeper.NewMigrator(app.AccountKeeper, app.GRPCQueryRouter()) + + // set the account to store with map acc addr to acc number + require.NoError(t, m.V45_SetAccount(ctx, acc)) + + testCases := []struct { + name string + doMigration bool + accNum uint64 + }{ + { + name: "without state migration", + doMigration: false, + accNum: acc.AccountNumber, + }, + { + name: "with state migration", + doMigration: true, + accNum: acc.AccountNumber, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + if tc.doMigration { + require.NoError(t, m.Migrate2to3(ctx)) + } + + // get the account address by acc id + accAddr := app.AccountKeeper.GetAccountAddressByID(ctx, tc.accNum) + + if tc.doMigration { + require.Equal(t, accAddr, acc.Address) + } else { + require.Equal(t, len(accAddr), 0) + } + }) + } +} diff --git a/x/auth/module.go b/x/auth/module.go index 777070db663c..c4541c235623 100644 --- a/x/auth/module.go +++ b/x/auth/module.go @@ -131,7 +131,10 @@ func (am AppModule) ValidateGenesis(bz json.RawMessage) error { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) } - return types.ValidateGenesis(data) + err = cfg.RegisterMigration(types.ModuleName, 2, m.Migrate2to3) + if err != nil { + panic(err) + } } // InitGenesis performs genesis initialization for the auth module. @@ -145,25 +148,16 @@ func (am AppModule) InitGenesis(ctx context.Context, data json.RawMessage) error // ExportGenesis returns the exported genesis state as raw bytes for the auth // module. -func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) { - gs, err := am.accountKeeper.ExportGenesis(ctx) - if err != nil { - return nil, err - } - return am.cdc.MarshalJSON(gs) +func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { + gs := am.accountKeeper.ExportGenesis(ctx) + return cdc.MustMarshalJSON(gs) } -// TxValidator implements appmodulev2.HasTxValidator. -// It replaces auth ante handlers for server/v2 -func (am AppModule) TxValidator(ctx context.Context, tx transaction.Tx) error { - validators := []appmodulev2.TxValidator[sdk.Tx]{ - ante.NewValidateBasicDecorator(am.accountKeeper.GetEnvironment()), - ante.NewTxTimeoutHeightDecorator(am.accountKeeper.GetEnvironment()), - ante.NewValidateMemoDecorator(am.accountKeeper), - ante.NewConsumeGasForTxSizeDecorator(am.accountKeeper), - ante.NewValidateSigCountDecorator(am.accountKeeper), - ante.NewExtensionOptionsDecorator(am.extOptChecker), - } +// ConsensusVersion implements AppModule/ConsensusVersion. +func (AppModule) ConsensusVersion() uint64 { return 3 } + +// BeginBlock returns the begin blocker for the auth module. +func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} sdkTx, ok := tx.(sdk.Tx) if !ok { diff --git a/x/auth/types/keys.go b/x/auth/types/keys.go index fb3295511f23..1249a03675fc 100644 --- a/x/auth/types/keys.go +++ b/x/auth/types/keys.go @@ -22,10 +22,19 @@ var ( // AddressStoreKeyPrefix prefix for account-by-address store AddressStoreKeyPrefix = collections.NewPrefix(1) - // GlobalAccountNumberKey identifies the prefix where the monotonically increasing - // account number is stored. - GlobalAccountNumberKey = collections.NewPrefix(2) + // param key for global account number + GlobalAccountNumberKey = []byte("globalAccountNumber") // AccountNumberStoreKeyPrefix prefix for account-by-id store - AccountNumberStoreKeyPrefix = collections.NewPrefix("accountNumber") + AccountNumberStoreKeyPrefix = []byte("accountNumber") ) + +// AddressStoreKey turn an address to key used to get it from the account store +func AddressStoreKey(addr sdk.AccAddress) []byte { + return append(AddressStoreKeyPrefix, addr.Bytes()...) +} + +// AccountNumberStoreKey turn an account number to key used to get the account address from account store +func AccountNumberStoreKey(accountNumber uint64) []byte { + return append(AccountNumberStoreKeyPrefix, sdk.Uint64ToBigEndian(accountNumber)...) +} diff --git a/x/auth/types/query.pb.go b/x/auth/types/query.pb.go index b64b4a7cc0b5..9d2d464b51ca 100644 --- a/x/auth/types/query.pb.go +++ b/x/auth/types/query.pb.go @@ -1184,6 +1184,96 @@ func (m *QueryAccountInfoResponse) GetInfo() *BaseAccount { return nil } +// QueryAccountAddressByIDRequest is the request type for AccountAddressById rpc method +type QueryAccountAddressByIDRequest struct { + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *QueryAccountAddressByIDRequest) Reset() { *m = QueryAccountAddressByIDRequest{} } +func (m *QueryAccountAddressByIDRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAccountAddressByIDRequest) ProtoMessage() {} +func (*QueryAccountAddressByIDRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{14} +} +func (m *QueryAccountAddressByIDRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAccountAddressByIDRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountAddressByIDRequest.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 *QueryAccountAddressByIDRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountAddressByIDRequest.Merge(m, src) +} +func (m *QueryAccountAddressByIDRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAccountAddressByIDRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountAddressByIDRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAccountAddressByIDRequest proto.InternalMessageInfo + +func (m *QueryAccountAddressByIDRequest) GetId() int64 { + if m != nil { + return m.Id + } + return 0 +} + +// QueryAccountAddressByIDResponse is the response type for AccountAddressById rpc method +type QueryAccountAddressByIDResponse struct { + AccountAddress string `protobuf:"bytes,1,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` +} + +func (m *QueryAccountAddressByIDResponse) Reset() { *m = QueryAccountAddressByIDResponse{} } +func (m *QueryAccountAddressByIDResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAccountAddressByIDResponse) ProtoMessage() {} +func (*QueryAccountAddressByIDResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{15} +} +func (m *QueryAccountAddressByIDResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAccountAddressByIDResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountAddressByIDResponse.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 *QueryAccountAddressByIDResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountAddressByIDResponse.Merge(m, src) +} +func (m *QueryAccountAddressByIDResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAccountAddressByIDResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountAddressByIDResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAccountAddressByIDResponse proto.InternalMessageInfo + +func (m *QueryAccountAddressByIDResponse) GetAccountAddress() string { + if m != nil { + return m.AccountAddress + } + return "" +} + func init() { proto.RegisterType((*QueryAccountsRequest)(nil), "cosmos.auth.v1beta1.QueryAccountsRequest") proto.RegisterType((*QueryAccountsResponse)(nil), "cosmos.auth.v1beta1.QueryAccountsResponse") @@ -1203,86 +1293,68 @@ func init() { proto.RegisterType((*AddressStringToBytesResponse)(nil), "cosmos.auth.v1beta1.AddressStringToBytesResponse") proto.RegisterType((*QueryAccountAddressByIDRequest)(nil), "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest") proto.RegisterType((*QueryAccountAddressByIDResponse)(nil), "cosmos.auth.v1beta1.QueryAccountAddressByIDResponse") - proto.RegisterType((*QueryAccountInfoRequest)(nil), "cosmos.auth.v1beta1.QueryAccountInfoRequest") - proto.RegisterType((*QueryAccountInfoResponse)(nil), "cosmos.auth.v1beta1.QueryAccountInfoResponse") } func init() { proto.RegisterFile("cosmos/auth/v1beta1/query.proto", fileDescriptor_c451370b3929a27c) } var fileDescriptor_c451370b3929a27c = []byte{ - // 1148 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xf6, 0xa6, 0xa1, 0x49, 0x5f, 0xd2, 0x54, 0x8c, 0x5d, 0x11, 0xd6, 0xa9, 0x6d, 0x6d, 0x21, - 0x71, 0x42, 0xbd, 0x5b, 0x3b, 0x6e, 0x0a, 0x91, 0x38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, 0xff, 0x0f, - 0x00, 0x00, 0xff, 0xff, 0xa8, 0x40, 0x30, 0xd4, 0xe7, 0x0f, 0x00, 0x00, + // 886 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x95, 0xcf, 0x4e, 0xeb, 0x46, + 0x14, 0xc6, 0xe3, 0xdc, 0x16, 0xb8, 0x73, 0x73, 0x53, 0x69, 0xc8, 0x95, 0xa8, 0xc3, 0x75, 0xae, + 0x4c, 0x81, 0x84, 0x12, 0x1b, 0x12, 0x36, 0xfd, 0xa3, 0x4a, 0x09, 0xb4, 0x15, 0x8b, 0x4a, 0xa9, + 0x61, 0xd5, 0x45, 0x23, 0x3b, 0x36, 0xc6, 0x2a, 0xf1, 0x84, 0x8c, 0x53, 0x11, 0xa1, 0x48, 0x55, + 0x57, 0xec, 0x5a, 0xa9, 0x2f, 0x40, 0xdf, 0xa0, 0x95, 0x78, 0x08, 0xc4, 0x0a, 0xb5, 0x9b, 0xae, + 0xaa, 0x0a, 0xba, 0xe8, 0xb2, 0x8f, 0x70, 0x95, 0x99, 0x63, 0x27, 0x86, 0x49, 0x62, 0x56, 0xb1, + 0x67, 0xce, 0xf9, 0xce, 0x6f, 0xce, 0x19, 0x7f, 0x41, 0x85, 0x16, 0xa1, 0x6d, 0x42, 0x75, 0xb3, + 0x17, 0x1c, 0xeb, 0xdf, 0x6f, 0x5b, 0x4e, 0x60, 0x6e, 0xeb, 0xa7, 0x3d, 0xa7, 0xdb, 0xd7, 0x3a, + 0x5d, 0x12, 0x10, 0xbc, 0xc8, 0x03, 0xb4, 0x61, 0x80, 0x06, 0x01, 0xf2, 0x06, 0x64, 0x59, 0x26, + 0x75, 0x78, 0x74, 0x94, 0xdb, 0x31, 0x5d, 0xcf, 0x37, 0x03, 0x8f, 0xf8, 0x5c, 0x40, 0xce, 0xb9, + 0xc4, 0x25, 0xec, 0x51, 0x1f, 0x3e, 0xc1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x8a, 0x7b, 0x0f, 0xc5, 0xfa, 0xe4, + 0x0a, 0x42, 0x17, 0x97, 0xb7, 0x92, 0x27, 0x00, 0xda, 0x26, 0x43, 0x5b, 0xc3, 0x1f, 0x08, 0xd1, + 0xda, 0x2c, 0xa9, 0x19, 0xdd, 0xb5, 0x0b, 0x09, 0x65, 0xc6, 0xcd, 0x6e, 0xc2, 0x85, 0x13, 0xd8, + 0xe4, 0x84, 0x0b, 0x27, 0x72, 0xce, 0x19, 0xed, 0xe2, 0xfe, 0x39, 0xbc, 0x64, 0x39, 0x91, 0xed, + 0x61, 0x71, 0x0f, 0xa6, 0xb8, 0xac, 0xbc, 0xfd, 0x84, 0x0c, 0x40, 0xac, 0x32, 0xc4, 0x32, 0xfe, + 0x70, 0x0a, 0x62, 0xf4, 0x45, 0x70, 0xa7, 0x1b, 0xe0, 0xdf, 0x47, 0xc8, 0x31, 0x73, 0x9c, 0x8e, + 0x2c, 0x72, 0xe3, 0xe9, 0xc8, 0x42, 0xe7, 0x55, 0x77, 0x18, 0xb2, 0x86, 0x37, 0x13, 0x21, 0x73, + 0x8f, 0x1f, 0xd4, 0x77, 0xaf, 0xef, 0x14, 0xe9, 0xf6, 0x4e, 0x91, 0xfe, 0xb9, 0x53, 0xa4, 0x9f, + 0xef, 0x95, 0xd4, 0xed, 0xbd, 0x92, 0xfa, 0xeb, 0x5e, 0x49, 0x7d, 0x53, 0x72, 0xbd, 0xe0, 0xb8, + 0x67, 0x69, 0x2d, 0xd2, 0x0e, 0x15, 0xf9, 0x4f, 0x99, 0xda, 0xdf, 0xe9, 0x67, 0x5c, 0x3e, 0xe8, + 0x77, 0x1c, 0x6a, 0xcd, 0xb1, 0x7f, 0xd9, 0xea, 0xdb, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7a, 0x78, + 0xb2, 0xf3, 0xc7, 0x0a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1303,7 +1375,7 @@ type QueryClient interface { Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) // Account returns account details based on address. Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*QueryAccountResponse, error) - // AccountAddressByID returns account address based on account number. + // AccountAddressByID returns account address based on account id AccountAddressByID(ctx context.Context, in *QueryAccountAddressByIDRequest, opts ...grpc.CallOption) (*QueryAccountAddressByIDResponse, error) // Params queries all parameters. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) @@ -1427,7 +1499,7 @@ type QueryServer interface { Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error) // Account returns account details based on address. Account(context.Context, *QueryAccountRequest) (*QueryAccountResponse, error) - // AccountAddressByID returns account address based on account number. + // AccountAddressByID returns account address based on account id AccountAddressByID(context.Context, *QueryAccountAddressByIDRequest) (*QueryAccountAddressByIDResponse, error) // Params queries all parameters. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) @@ -2237,11 +2309,6 @@ func (m *QueryAccountAddressByIDRequest) MarshalToSizedBuffer(dAtA []byte) (int, _ = i var l int _ = l - if m.AccountId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.AccountId)) - i-- - dAtA[i] = 0x10 - } if m.Id != 0 { i = encodeVarintQuery(dAtA, i, uint64(m.Id)) i-- @@ -2280,71 +2347,6 @@ func (m *QueryAccountAddressByIDResponse) MarshalToSizedBuffer(dAtA []byte) (int return len(dAtA) - i, nil } -func (m *QueryAccountInfoRequest) 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 *QueryAccountInfoRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAccountInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryAccountInfoResponse) 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 *QueryAccountInfoResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAccountInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Info != nil { - { - size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -2567,9 +2569,6 @@ func (m *QueryAccountAddressByIDRequest) Size() (n int) { if m.Id != 0 { n += 1 + sovQuery(uint64(m.Id)) } - if m.AccountId != 0 { - n += 1 + sovQuery(uint64(m.AccountId)) - } return n } @@ -2586,32 +2585,6 @@ func (m *QueryAccountAddressByIDResponse) Size() (n int) { return n } -func (m *QueryAccountInfoRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAccountInfoResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Info != nil { - l = m.Info.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -4424,6 +4397,157 @@ func (m *QueryModuleAccountByNameResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryAccountAddressByIDRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAccountAddressByIDRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAccountAddressByIDRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAccountAddressByIDResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAccountAddressByIDResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAccountAddressByIDResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccountAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/auth/types/query.pb.gw.go b/x/auth/types/query.pb.gw.go index 5690bd2f4392..e960f19faebb 100644 --- a/x/auth/types/query.pb.gw.go +++ b/x/auth/types/query.pb.gw.go @@ -123,9 +123,113 @@ func local_request_Query_Account_0(ctx context.Context, marshaler runtime.Marsha } -var ( - filter_Query_AccountAddressByID_0 = &utilities.DoubleArray{Encoding: map[string]int{"account_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +func request_Query_AccountAddressByID_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAccountAddressByIDRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Int64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.AccountAddressByID(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AccountAddressByID_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAccountAddressByIDRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Int64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.AccountAddressByID(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_ModuleAccounts_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryModuleAccountsRequest + var metadata runtime.ServerMetadata + + msg, err := client.ModuleAccounts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ModuleAccounts_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryModuleAccountsRequest + var metadata runtime.ServerMetadata + + msg, err := server.ModuleAccounts(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Bech32Prefix_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq Bech32PrefixRequest + var metadata runtime.ServerMetadata + + msg, err := client.Bech32Prefix(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Bech32Prefix_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq Bech32PrefixRequest + var metadata runtime.ServerMetadata + + msg, err := server.Bech32Prefix(ctx, &protoReq) + return msg, metadata, err + +} func request_Query_AccountAddressByID_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryAccountAddressByIDRequest @@ -365,6 +469,52 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_ModuleAccounts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AccountAddressByID_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AccountAddressByID_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_ModuleAccountByName_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -486,6 +636,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_AccountAddressByID_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AccountAddressByID_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -534,7 +704,13 @@ var ( pattern_Query_Account_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "auth", "v1beta1", "accounts", "address"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_AccountAddressByID_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "auth", "v1beta1", "address_by_id", "account_id"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_AccountAddressByID_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "auth", "v1beta1", "address_by_id", "id"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "auth", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_ModuleAccounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "auth", "v1beta1", "module_accounts"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Bech32Prefix_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "auth", "v1beta1", "bech32"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "auth", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(false))) @@ -550,5 +726,9 @@ var ( forward_Query_Params_0 = runtime.ForwardResponseMessage + forward_Query_ModuleAccounts_0 = runtime.ForwardResponseMessage + + forward_Query_Params_0 = runtime.ForwardResponseMessage + forward_Query_ModuleAccountByName_0 = runtime.ForwardResponseMessage )