diff --git a/api/cosmos/auth/v1beta1/query.pulsar.go b/api/cosmos/auth/v1beta1/query.pulsar.go index aeb2a9f8164e..a8c80520a731 100644 --- a/api/cosmos/auth/v1beta1/query.pulsar.go +++ b/api/cosmos/auth/v1beta1/query.pulsar.go @@ -5981,6 +5981,830 @@ func (x *fastReflection_AddressStringToBytesResponse) ProtoMethods() *protoiface } } +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 @@ -6505,6 +7329,78 @@ func (x *AddressStringToBytesResponse) GetAddressBytes() []byte { return nil } +// QueryAccountAddressByIDRequest is the request type for AccountAddressById rpc method +type QueryAccountAddressByIDRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *QueryAccountAddressByIDRequest) Reset() { + *x = QueryAccountAddressByIDRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAccountAddressByIDRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAccountAddressByIDRequest) ProtoMessage() {} + +// Deprecated: Use QueryAccountAddressByIDRequest.ProtoReflect.Descriptor instead. +func (*QueryAccountAddressByIDRequest) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{14} +} + +func (x *QueryAccountAddressByIDRequest) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +// QueryAccountAddressByIDResponse is the response type for AccountAddressById rpc method +type QueryAccountAddressByIDResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccountAddress string `protobuf:"bytes,1,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` +} + +func (x *QueryAccountAddressByIDResponse) Reset() { + *x = QueryAccountAddressByIDResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAccountAddressByIDResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAccountAddressByIDResponse) ProtoMessage() {} + +// Deprecated: Use QueryAccountAddressByIDResponse.ProtoReflect.Descriptor instead. +func (*QueryAccountAddressByIDResponse) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{15} +} + +func (x *QueryAccountAddressByIDResponse) GetAccountAddress() string { + if x != nil { + return x.AccountAddress + } + return "" +} + var File_cosmos_auth_v1beta1_query_proto protoreflect.FileDescriptor var file_cosmos_auth_v1beta1_query_proto_rawDesc = []byte{ @@ -6586,88 +7482,109 @@ var file_cosmos_auth_v1beta1_query_proto_rawDesc = []byte{ 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, 0x32, - 0xbd, 0x08, 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, 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, + 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, 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, 0x2f, 0x7b, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 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, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, + 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, 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, 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, + 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, 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, + 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, 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, + 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 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, 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, 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, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 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, 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 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, 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, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, - 0x61, 0x75, 0x74, 0x68, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, - 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x2e, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x41, 0x75, 0x74, 0x68, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x5c, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x68, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 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, 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, 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, + 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, + 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x13, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, + 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x43, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -6682,50 +7599,54 @@ 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, 14) +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 - (*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 - (*v1beta1.PageRequest)(nil), // 14: cosmos.base.query.v1beta1.PageRequest - (*anypb.Any)(nil), // 15: google.protobuf.Any - (*v1beta1.PageResponse)(nil), // 16: cosmos.base.query.v1beta1.PageResponse - (*Params)(nil), // 17: cosmos.auth.v1beta1.Params + (*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{ - 14, // 0: cosmos.auth.v1beta1.QueryAccountsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 15, // 1: cosmos.auth.v1beta1.QueryAccountsResponse.accounts:type_name -> google.protobuf.Any - 16, // 2: cosmos.auth.v1beta1.QueryAccountsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 17, // 3: cosmos.auth.v1beta1.QueryParamsResponse.params:type_name -> cosmos.auth.v1beta1.Params - 15, // 4: cosmos.auth.v1beta1.QueryAccountResponse.account:type_name -> google.protobuf.Any - 15, // 5: cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts:type_name -> google.protobuf.Any + 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 - 6, // 8: cosmos.auth.v1beta1.Query.Params:input_type -> cosmos.auth.v1beta1.QueryParamsRequest - 3, // 9: cosmos.auth.v1beta1.Query.ModuleAccounts:input_type -> cosmos.auth.v1beta1.QueryModuleAccountsRequest - 8, // 10: cosmos.auth.v1beta1.Query.Bech32Prefix:input_type -> cosmos.auth.v1beta1.Bech32PrefixRequest - 10, // 11: cosmos.auth.v1beta1.Query.AddressBytesToString:input_type -> cosmos.auth.v1beta1.AddressBytesToStringRequest - 12, // 12: cosmos.auth.v1beta1.Query.AddressStringToBytes:input_type -> cosmos.auth.v1beta1.AddressStringToBytesRequest - 1, // 13: cosmos.auth.v1beta1.Query.Accounts:output_type -> cosmos.auth.v1beta1.QueryAccountsResponse - 5, // 14: cosmos.auth.v1beta1.Query.Account:output_type -> cosmos.auth.v1beta1.QueryAccountResponse - 4, // 15: cosmos.auth.v1beta1.Query.Params:output_type -> cosmos.auth.v1beta1.QueryParamsResponse - 7, // 16: cosmos.auth.v1beta1.Query.ModuleAccounts:output_type -> cosmos.auth.v1beta1.QueryModuleAccountsResponse - 9, // 17: cosmos.auth.v1beta1.Query.Bech32Prefix:output_type -> cosmos.auth.v1beta1.Bech32PrefixResponse - 11, // 18: cosmos.auth.v1beta1.Query.AddressBytesToString:output_type -> cosmos.auth.v1beta1.AddressBytesToStringResponse - 13, // 19: cosmos.auth.v1beta1.Query.AddressStringToBytes:output_type -> cosmos.auth.v1beta1.AddressStringToBytesResponse - 13, // [13:20] is the sub-list for method output_type - 6, // [6:13] is the sub-list for method input_type + 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 @@ -6906,6 +7827,30 @@ func file_cosmos_auth_v1beta1_query_proto_init() { return nil } } + 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 + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + 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 + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -6913,7 +7858,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: 14, + 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 f016a932e9f4..47d5a4c3292f 100644 --- a/api/cosmos/auth/v1beta1/query_grpc.pb.go +++ b/api/cosmos/auth/v1beta1/query_grpc.pb.go @@ -28,6 +28,8 @@ 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 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) // ModuleAccounts returns all the existing module accounts. @@ -74,6 +76,15 @@ func (c *queryClient) Account(ctx context.Context, in *QueryAccountRequest, opts 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) { out := new(QueryParamsResponse) err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/Params", in, out, opts...) @@ -129,6 +140,8 @@ 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 id + AccountAddressByID(context.Context, *QueryAccountAddressByIDRequest) (*QueryAccountAddressByIDResponse, error) // Params queries all parameters. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // ModuleAccounts returns all the existing module accounts. @@ -160,6 +173,9 @@ func (UnimplementedQueryServer) Accounts(context.Context, *QueryAccountsRequest) func (UnimplementedQueryServer) Account(context.Context, *QueryAccountRequest) (*QueryAccountResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Account not implemented") } +func (UnimplementedQueryServer) AccountAddressByID(context.Context, *QueryAccountAddressByIDRequest) (*QueryAccountAddressByIDResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AccountAddressByID not implemented") +} func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } @@ -224,6 +240,24 @@ func _Query_Account_Handler(srv interface{}, ctx context.Context, dec func(inter return interceptor(ctx, in, info, handler) } +func _Query_AccountAddressByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAccountAddressByIDRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AccountAddressByID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1beta1.Query/AccountAddressByID", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AccountAddressByID(ctx, req.(*QueryAccountAddressByIDRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryParamsRequest) if err := dec(in); err != nil { @@ -329,6 +363,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "Account", Handler: _Query_Account_Handler, }, + { + MethodName: "AccountAddressByID", + Handler: _Query_AccountAddressByID_Handler, + }, { MethodName: "Params", Handler: _Query_Params_Handler, diff --git a/baseapp/block_gas_test.go b/baseapp/block_gas_test.go index db933cd7aa72..f671e84336e2 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(63724) // 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 894429bdaaf0..d09c63c113cc 100644 --- a/proto/cosmos/auth/v1beta1/query.proto +++ b/proto/cosmos/auth/v1beta1/query.proto @@ -24,6 +24,11 @@ service Query { option (google.api.http).get = "/cosmos/auth/v1beta1/accounts/{address}"; } + // 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 (google.api.http).get = "/cosmos/auth/v1beta1/params"; @@ -152,3 +157,13 @@ message AddressStringToBytesRequest { 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/x/auth/ante/ante_test.go b/x/auth/ante/ante_test.go index 6ff5532a4386..017b05461cee 100644 --- a/x/auth/ante/ante_test.go +++ b/x/auth/ante/ante_test.go @@ -572,7 +572,7 @@ func (suite *AnteTestSuite) TestAnteHandlerMemoGas() { "tx with memo has enough gas", func() { feeAmount = sdk.NewCoins(sdk.NewInt64Coin("atom", 0)) - gasLimit = 50000 + gasLimit = 60000 suite.txBuilder.SetMemo(strings.Repeat("0123456789", 10)) }, false, diff --git a/x/auth/client/cli/query.go b/x/auth/client/cli/query.go index 41fd652dc86b..c3eda5b2d03e 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" @@ -41,6 +42,7 @@ func GetQueryCmd() *cobra.Command { cmd.AddCommand( GetAccountCmd(), + GetAccountAddressByIDCmd(), GetAccountsCmd(), QueryParamsCmd(), QueryModuleAccountsCmd(), @@ -124,6 +126,39 @@ func GetAccountCmd() *cobra.Command { return cmd } +// 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{ diff --git a/x/auth/client/testutil/suite.go b/x/auth/client/testutil/suite.go index 86da20fb8be5..e6cb30d02ac7 100644 --- a/x/auth/client/testutil/suite.go +++ b/x/auth/client/testutil/suite.go @@ -29,6 +29,7 @@ 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" + "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" @@ -280,6 +281,50 @@ func (s *IntegrationTestSuite) TestCLISignBatch() { s.Require().Error(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] diff --git a/x/auth/keeper/account.go b/x/auth/keeper/account.go index 7474e93a5469..a18a5240dce8 100644 --- a/x/auth/keeper/account.go +++ b/x/auth/keeper/account.go @@ -31,6 +31,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) @@ -42,6 +48,16 @@ func (ak AccountKeeper) GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.A return ak.decodeAccount(bz) } +// 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) { @@ -63,6 +79,7 @@ func (ak AccountKeeper) SetAccount(ctx sdk.Context, acc types.AccountI) { } store.Set(types.AddressStoreKey(addr), bz) + store.Set(types.AccountNumberStoreKey(acc.GetAccountNumber()), addr.Bytes()) } // RemoveAccount removes an account for the account mapper store. @@ -71,6 +88,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 8bd3a40e0aec..9d37a4ecc9f6 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -19,6 +19,24 @@ import ( var _ types.QueryServer = AccountKeeper{} +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.Error(codes.InvalidArgument, "empty request") diff --git a/x/auth/keeper/grpc_query_test.go b/x/auth/keeper/grpc_query_test.go index 307fda03356f..2b99a257aa1e 100644 --- a/x/auth/keeper/grpc_query_test.go +++ b/x/auth/keeper/grpc_query_test.go @@ -4,6 +4,7 @@ import ( "bytes" "context" "fmt" + "math" "sort" "github.com/cosmos/cosmos-sdk/testutil/testdata" @@ -153,6 +154,68 @@ func (suite *KeeperTestSuite) TestGRPCQueryAccount() { } } +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 diff --git a/x/auth/keeper/migrations.go b/x/auth/keeper/migrations.go index 4cbc3694d181..768bc7c10caa 100644 --- a/x/auth/keeper/migrations.go +++ b/x/auth/keeper/migrations.go @@ -4,6 +4,8 @@ import ( "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" @@ -41,3 +43,26 @@ func (m Migrator) Migrate1to2(ctx sdk.Context) error { return iterErr } + +// 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..698cdbb8c24d --- /dev/null +++ b/x/auth/migrations/v046/store_test.go @@ -0,0 +1,67 @@ +package v046_test + +import ( + "math/rand" + "testing" + "time" + + "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" + "github.com/stretchr/testify/require" + tmproto "github.com/tendermint/tendermint/proto/tendermint/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.App.BaseApp.NewContext(false, tmproto.Header{ + Time: time.Now(), + }) + + // migrator + 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 e1b7ceec2a7c..3bb68ca7e71a 100644 --- a/x/auth/module.go +++ b/x/auth/module.go @@ -129,6 +129,11 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { if err != nil { panic(err) } + + err = cfg.RegisterMigration(types.ModuleName, 2, m.Migrate2to3) + if err != nil { + panic(err) + } } // InitGenesis performs genesis initialization for the auth module. It returns @@ -148,7 +153,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw } // ConsensusVersion implements AppModule/ConsensusVersion. -func (AppModule) ConsensusVersion() uint64 { return 2 } +func (AppModule) ConsensusVersion() uint64 { return 3 } // BeginBlock returns the begin blocker for the auth module. func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} diff --git a/x/auth/types/keys.go b/x/auth/types/keys.go index 4cb2538f252c..e3488bbc07a2 100644 --- a/x/auth/types/keys.go +++ b/x/auth/types/keys.go @@ -24,9 +24,17 @@ var ( // param key for global account number GlobalAccountNumberKey = []byte("globalAccountNumber") + + // AccountNumberStoreKeyPrefix prefix for account-by-id store + 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 6903dfc8ecac..a943f9bf7ff1 100644 --- a/x/auth/types/query.pb.go +++ b/x/auth/types/query.pb.go @@ -665,6 +665,96 @@ func (m *AddressStringToBytesResponse) GetAddressBytes() []byte { 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") @@ -680,63 +770,70 @@ func init() { proto.RegisterType((*AddressBytesToStringResponse)(nil), "cosmos.auth.v1beta1.AddressBytesToStringResponse") proto.RegisterType((*AddressStringToBytesRequest)(nil), "cosmos.auth.v1beta1.AddressStringToBytesRequest") proto.RegisterType((*AddressStringToBytesResponse)(nil), "cosmos.auth.v1beta1.AddressStringToBytesResponse") + proto.RegisterType((*QueryAccountAddressByIDRequest)(nil), "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest") + proto.RegisterType((*QueryAccountAddressByIDResponse)(nil), "cosmos.auth.v1beta1.QueryAccountAddressByIDResponse") } func init() { proto.RegisterFile("cosmos/auth/v1beta1/query.proto", fileDescriptor_c451370b3929a27c) } var fileDescriptor_c451370b3929a27c = []byte{ - // 814 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x95, 0xcf, 0x4f, 0x13, 0x4d, - 0x18, 0xc7, 0xbb, 0xbc, 0xef, 0x0b, 0x7d, 0x87, 0xc2, 0x61, 0x28, 0x09, 0xef, 0x16, 0x5a, 0xb2, - 0xbc, 0x40, 0x8b, 0x74, 0x57, 0x8a, 0x17, 0x7f, 0xc4, 0x84, 0x82, 0x1a, 0x0f, 0x26, 0xb5, 0x70, - 0xf2, 0x60, 0x33, 0xdb, 0x0e, 0x4b, 0x23, 0xdd, 0x29, 0x9d, 0xad, 0xa1, 0x31, 0x24, 0xc6, 0x13, - 0x37, 0x4d, 0xfc, 0x07, 0xf0, 0x3f, 0xd0, 0x84, 0xab, 0x77, 0xc2, 0x89, 0xe8, 0xc5, 0x93, 0x31, - 0xe0, 0xc1, 0x3f, 0xc3, 0x74, 0xe6, 0xd9, 0xb6, 0x4b, 0xa6, 0xed, 0x7a, 0xa2, 0x3b, 0xf3, 0x7c, - 0xbf, 0xcf, 0x67, 0x9e, 0x67, 0x9e, 0x01, 0xa5, 0xca, 0x8c, 0xd7, 0x18, 0xb7, 0x48, 0xd3, 0xdb, - 0xb3, 0x5e, 0xae, 0xd9, 0xd4, 0x23, 0x6b, 0xd6, 0x41, 0x93, 0x36, 0x5a, 0x66, 0xbd, 0xc1, 0x3c, - 0x86, 0xa7, 0x64, 0x80, 0xd9, 0x0e, 0x30, 0x21, 0x40, 0x5f, 0x01, 0x95, 0x4d, 0x38, 0x95, 0xd1, - 0x1d, 0x6d, 0x9d, 0x38, 0x55, 0x97, 0x78, 0x55, 0xe6, 0x4a, 0x03, 0x3d, 0xee, 0x30, 0x87, 0x89, - 0x9f, 0x56, 0xfb, 0x17, 0xac, 0xfe, 0xe7, 0x30, 0xe6, 0xec, 0x53, 0x4b, 0x7c, 0xd9, 0xcd, 0x5d, - 0x8b, 0xb8, 0x90, 0x51, 0x9f, 0x85, 0x2d, 0x52, 0xaf, 0x5a, 0xc4, 0x75, 0x99, 0x27, 0xdc, 0x38, - 0xec, 0x26, 0x55, 0xc0, 0x02, 0x0e, 0x8c, 0xe5, 0x7e, 0x49, 0x66, 0x04, 0x78, 0xf1, 0x61, 0x3c, - 0x47, 0xf1, 0xa7, 0x6d, 0xd6, 0x8d, 0x72, 0x99, 0x35, 0x5d, 0x8f, 0x17, 0xe9, 0x41, 0x93, 0x72, - 0x0f, 0x3f, 0x44, 0xa8, 0x4b, 0x3d, 0xa3, 0xcd, 0x6b, 0xe9, 0xf1, 0xdc, 0x92, 0x09, 0xd2, 0xf6, - 0x11, 0x4d, 0x59, 0x10, 0xc8, 0x66, 0x16, 0x88, 0x43, 0x41, 0x5b, 0xec, 0x51, 0x1a, 0x27, 0x1a, - 0x9a, 0xbe, 0x96, 0x80, 0xd7, 0x99, 0xcb, 0x29, 0xbe, 0x8f, 0xa2, 0x04, 0xd6, 0x66, 0xb4, 0xf9, - 0xbf, 0xd2, 0xe3, 0xb9, 0xb8, 0x29, 0x4f, 0x69, 0xfa, 0x05, 0x30, 0x37, 0xdc, 0x56, 0x3e, 0x76, - 0x7e, 0x9a, 0x8d, 0x82, 0xfa, 0x71, 0xb1, 0xa3, 0xc1, 0x8f, 0x02, 0x84, 0x23, 0x82, 0x70, 0x79, - 0x28, 0xa1, 0x4c, 0x1e, 0x40, 0xdc, 0x46, 0x53, 0xbd, 0x84, 0x7e, 0x05, 0x72, 0x68, 0x8c, 0x54, - 0x2a, 0x0d, 0xca, 0xb9, 0x38, 0xfe, 0xbf, 0xf9, 0x99, 0x2f, 0xa7, 0xd9, 0x38, 0xf8, 0x6f, 0xc8, - 0x9d, 0x6d, 0xaf, 0x51, 0x75, 0x9d, 0xa2, 0x1f, 0x78, 0x27, 0x7a, 0x7c, 0x92, 0x8a, 0xfc, 0x3a, - 0x49, 0x45, 0x8c, 0x59, 0xa4, 0x0b, 0xd3, 0x27, 0xac, 0xd2, 0xdc, 0xa7, 0xd7, 0xaa, 0x6b, 0x14, - 0x20, 0x65, 0x81, 0x34, 0x48, 0xad, 0x5b, 0x92, 0xdb, 0x68, 0xb4, 0x2e, 0x56, 0xa0, 0xe0, 0x09, - 0x53, 0x71, 0xd1, 0x4c, 0x29, 0xca, 0xff, 0x7d, 0xf6, 0x3d, 0x15, 0x29, 0x82, 0xc0, 0xd8, 0x09, - 0xf6, 0xb1, 0x63, 0x79, 0x0f, 0x8d, 0x41, 0xc5, 0xc0, 0x33, 0x4c, 0x91, 0x7d, 0x89, 0x11, 0x47, - 0x38, 0xc0, 0x29, 0xe9, 0xcb, 0x28, 0xa1, 0x3c, 0x1b, 0xa4, 0xdc, 0x0a, 0xd9, 0x58, 0x7c, 0x7e, - 0x9a, 0x9d, 0x0c, 0x78, 0xf4, 0xb4, 0xd7, 0x98, 0x46, 0x53, 0x79, 0x5a, 0xde, 0x5b, 0xcf, 0x15, - 0x1a, 0x74, 0xb7, 0x7a, 0xe8, 0xe7, 0xbe, 0x8b, 0xe2, 0xc1, 0x65, 0x48, 0xba, 0x80, 0x26, 0x6c, - 0xb1, 0x5e, 0xaa, 0x8b, 0x0d, 0xd9, 0xb3, 0x62, 0xcc, 0xee, 0x09, 0x36, 0xf2, 0x28, 0x01, 0x8d, - 0xcb, 0xb7, 0x3c, 0xca, 0x77, 0x18, 0xf4, 0x0f, 0x3a, 0xbe, 0x80, 0x26, 0xa0, 0x91, 0x25, 0xbb, - 0xbd, 0x2f, 0x3c, 0x62, 0xc5, 0x18, 0xe9, 0xd1, 0x18, 0x0f, 0xd0, 0xac, 0xda, 0x03, 0x40, 0x16, - 0xd1, 0xa4, 0x6f, 0xc2, 0xc5, 0x0e, 0x90, 0xf8, 0xd6, 0x32, 0xdc, 0xd8, 0xea, 0xa0, 0xc8, 0x85, - 0x1d, 0x26, 0xec, 0x7c, 0x94, 0x90, 0x2e, 0x9b, 0x1d, 0x98, 0x6b, 0x2e, 0xdd, 0xaa, 0x0c, 0x3d, - 0x51, 0xee, 0x73, 0x14, 0xfd, 0x23, 0xfa, 0x89, 0x8f, 0x35, 0xe4, 0x5f, 0x02, 0x8e, 0x33, 0xca, - 0xcb, 0xa7, 0x7a, 0x2c, 0xf4, 0x95, 0x30, 0xa1, 0x12, 0xc9, 0x58, 0x7c, 0xf3, 0xf5, 0xe7, 0xfb, - 0x91, 0x14, 0x9e, 0xb3, 0x94, 0x8f, 0x96, 0x9f, 0xfd, 0xad, 0x86, 0xc6, 0x40, 0x8b, 0xd3, 0x43, - 0xed, 0x7d, 0x90, 0x4c, 0x88, 0x48, 0xe0, 0xb0, 0x04, 0x47, 0x06, 0x2f, 0x0f, 0xe4, 0xb0, 0x5e, - 0x41, 0xa9, 0x8e, 0xf0, 0x6b, 0x0d, 0x8d, 0xca, 0x39, 0xc0, 0xcb, 0xfd, 0xd3, 0x04, 0x26, 0x45, - 0x4f, 0x0f, 0x0f, 0x04, 0x9c, 0x05, 0x81, 0x33, 0x87, 0x13, 0x4a, 0x1c, 0x39, 0xe4, 0xf8, 0x83, - 0x86, 0x82, 0x03, 0xc3, 0xb1, 0xd5, 0x3f, 0x83, 0xf2, 0xe9, 0xd1, 0x6f, 0x86, 0x17, 0x00, 0xda, - 0xaa, 0x40, 0x5b, 0xc2, 0xff, 0x2b, 0xd1, 0x6a, 0x42, 0x54, 0xea, 0x34, 0xee, 0x58, 0x43, 0xb1, - 0xde, 0x09, 0xed, 0xd3, 0x3d, 0xc5, 0x6c, 0xf7, 0xe9, 0x9e, 0x6a, 0xdc, 0x87, 0x94, 0x4b, 0x0e, - 0x3d, 0xfe, 0xa8, 0xa1, 0xb8, 0x6a, 0x56, 0xb1, 0xba, 0x06, 0x03, 0x9e, 0x06, 0x7d, 0xed, 0x0f, - 0x14, 0x80, 0xb8, 0x2e, 0x10, 0xb3, 0xf8, 0xc6, 0x00, 0xc4, 0xce, 0xf5, 0x92, 0xe3, 0x79, 0x84, - 0x3f, 0x75, 0x91, 0x03, 0x13, 0x3d, 0x18, 0x59, 0xf5, 0x84, 0x0c, 0x46, 0x56, 0x3e, 0x17, 0xc6, - 0x2d, 0x81, 0x6c, 0xe2, 0xd5, 0x50, 0xc8, 0xf2, 0x61, 0x3a, 0xca, 0x6f, 0x9e, 0x5d, 0x26, 0xb5, - 0x8b, 0xcb, 0xa4, 0xf6, 0xe3, 0x32, 0xa9, 0xbd, 0xbb, 0x4a, 0x46, 0x2e, 0xae, 0x92, 0x91, 0x6f, - 0x57, 0xc9, 0xc8, 0xb3, 0x8c, 0x53, 0xf5, 0xf6, 0x9a, 0xb6, 0x59, 0x66, 0x35, 0xdf, 0x51, 0xfe, - 0xc9, 0xf2, 0xca, 0x0b, 0xeb, 0x50, 0xda, 0x7b, 0xad, 0x3a, 0xe5, 0xf6, 0xa8, 0xf8, 0xd7, 0xb0, - 0xfe, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x15, 0x47, 0x58, 0x91, 0x7c, 0x09, 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, 0xea, 0xfb, 0x2e, 0x21, 0xee, 0x89, 0xa3, 0xb3, 0x37, + 0xab, 0x77, 0xa4, 0x9b, 0x3e, 0x54, 0x94, 0x97, 0x61, 0xcb, 0xec, 0x78, 0xba, 0xe9, 0xfb, 0x24, + 0x60, 0x6a, 0x14, 0x76, 0x15, 0x11, 0x30, 0x83, 0x03, 0x61, 0xbe, 0xdf, 0xe4, 0x15, 0x01, 0x9e, + 0xbd, 0xa8, 0xdf, 0xa2, 0xdc, 0xd7, 0x43, 0xd6, 0x5a, 0xab, 0x45, 0x7a, 0x7e, 0x40, 0x0d, 0xe7, + 0xb4, 0xe7, 0xd0, 0x00, 0x7f, 0x81, 0xd0, 0x88, 0x7a, 0x49, 0x7a, 0x23, 0x15, 0x5f, 0x54, 0xd6, + 0x34, 0x48, 0x1d, 0x1e, 0x51, 0xe3, 0x0d, 0x81, 0x6a, 0x5a, 0xc3, 0x74, 0x1d, 0xc8, 0x35, 0xc6, + 0x32, 0xd5, 0x4b, 0x09, 0xbd, 0x7a, 0x50, 0x80, 0x76, 0x88, 0x4f, 0x1d, 0xfc, 0x19, 0x5a, 0x30, + 0x61, 0x6d, 0x49, 0x7a, 0xf3, 0xac, 0xf8, 0xa2, 0x92, 0xd3, 0xf8, 0x29, 0xb5, 0xb0, 0x01, 0x5a, + 0xcd, 0xef, 0xd7, 0x33, 0x37, 0x57, 0xe5, 0x05, 0xc8, 0xde, 0x37, 0xa2, 0x1c, 0xfc, 0x65, 0x8c, + 0x30, 0xcd, 0x08, 0xd7, 0x67, 0x12, 0xf2, 0xe2, 0x31, 0xc4, 0x03, 0xb4, 0x38, 0x4e, 0x18, 0x76, + 0xa0, 0x82, 0xe6, 0x4d, 0xdb, 0xee, 0x3a, 0x94, 0xb2, 0xe3, 0x3f, 0xaf, 0x2f, 0xfd, 0x71, 0x55, + 0xce, 0x81, 0x7e, 0x8d, 0xef, 0x1c, 0x04, 0x5d, 0xcf, 0x77, 0x8d, 0x30, 0xf0, 0xe3, 0x85, 0x8b, + 0xcb, 0x42, 0xea, 0xbf, 0xcb, 0x42, 0x4a, 0x5d, 0x46, 0x32, 0x13, 0xfd, 0x8a, 0xd8, 0xbd, 0x13, + 0xe7, 0x41, 0x77, 0xd5, 0x06, 0x94, 0x6c, 0x98, 0x5d, 0xb3, 0x3d, 0x6a, 0xc9, 0x47, 0x68, 0xae, + 0xc3, 0x56, 0xa0, 0xe1, 0x79, 0x4d, 0x70, 0xd1, 0x34, 0x9e, 0x54, 0x7f, 0xe7, 0xfa, 0xef, 0x42, + 0xca, 0x80, 0x04, 0xf5, 0x30, 0x3e, 0xc7, 0x48, 0xf2, 0x53, 0x34, 0x0f, 0x1d, 0x03, 0xcd, 0x24, + 0x4d, 0x0e, 0x53, 0xd4, 0x1c, 0xc2, 0x31, 0x4e, 0x4e, 0xdf, 0x42, 0x79, 0xe1, 0xd9, 0xa0, 0xe4, + 0x5e, 0xc2, 0xc1, 0xe2, 0x9b, 0xab, 0x72, 0x36, 0xa6, 0x31, 0x36, 0x5e, 0xf5, 0x15, 0x5a, 0xac, + 0x3b, 0xad, 0xe3, 0x6a, 0xa5, 0xd1, 0x75, 0x8e, 0xbc, 0xb3, 0xb0, 0xf6, 0x27, 0x28, 0x17, 0x5f, + 0x86, 0xa2, 0x2b, 0xe8, 0xa5, 0xc5, 0xd6, 0x9b, 0x1d, 0xb6, 0xc1, 0x67, 0x66, 0x64, 0xac, 0xb1, + 0x60, 0xb5, 0x8e, 0xf2, 0x30, 0xb8, 0x7a, 0x3f, 0x70, 0xe8, 0x21, 0x81, 0xf9, 0xc1, 0xc4, 0x57, + 0xd0, 0x4b, 0x18, 0x64, 0xd3, 0x1a, 0xee, 0x33, 0x8d, 0x8c, 0x91, 0x31, 0xc7, 0x72, 0xd4, 0xcf, + 0xd1, 0xb2, 0x58, 0x03, 0x40, 0x56, 0x51, 0x36, 0x14, 0xa1, 0x6c, 0x07, 0x48, 0x42, 0x69, 0x1e, + 0xae, 0xee, 0x45, 0x28, 0x7c, 0xe1, 0x90, 0x30, 0xb9, 0x10, 0x25, 0xa1, 0xca, 0x6e, 0x04, 0xf3, + 0x40, 0x65, 0xd4, 0x95, 0xd9, 0x27, 0xda, 0x42, 0xca, 0xf8, 0xd5, 0x89, 0x4e, 0xb7, 0xbf, 0x17, + 0xd2, 0x64, 0x51, 0xda, 0xb3, 0x59, 0xee, 0x33, 0x23, 0xed, 0xd9, 0xaa, 0x8d, 0x0a, 0x13, 0x33, + 0xa0, 0x72, 0x0d, 0xbd, 0x07, 0xa3, 0x6c, 0x26, 0xfd, 0x8a, 0xb2, 0x66, 0x4c, 0xae, 0xf2, 0xff, + 0x73, 0xf4, 0x2e, 0x2b, 0x83, 0x2f, 0x24, 0x14, 0x5e, 0x4e, 0x8a, 0x4b, 0xc2, 0x8f, 0x42, 0x64, + 0x62, 0xf2, 0x46, 0x92, 0x50, 0x0e, 0xac, 0xae, 0xfe, 0xf8, 0xe7, 0xbf, 0xbf, 0xa4, 0x0b, 0xf8, + 0xb5, 0x2e, 0x34, 0xd3, 0xb0, 0xfa, 0x4f, 0x12, 0x9a, 0x87, 0x5c, 0x5c, 0x9c, 0x29, 0x1f, 0x82, + 0x94, 0x12, 0x44, 0x02, 0x87, 0xce, 0x38, 0x4a, 0x78, 0x7d, 0x2a, 0x87, 0x7e, 0x0e, 0x5d, 0x1d, + 0xe0, 0xdf, 0x24, 0x84, 0x1f, 0x0f, 0x02, 0x57, 0x67, 0x96, 0x7c, 0x3c, 0x68, 0x79, 0xe7, 0x69, + 0x49, 0xc9, 0x90, 0xa3, 0x0b, 0xd8, 0xf4, 0x6c, 0xfd, 0xdc, 0xb3, 0x07, 0xf8, 0x07, 0x09, 0xcd, + 0x71, 0x4b, 0xc1, 0xeb, 0x93, 0x2b, 0xc6, 0x4c, 0x47, 0x2e, 0xce, 0x0e, 0x04, 0x9c, 0x15, 0x86, + 0xf3, 0x1a, 0xe7, 0x85, 0x38, 0xdc, 0x2f, 0xf1, 0xaf, 0x12, 0x8a, 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. @@ -757,6 +854,8 @@ 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 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) // ModuleAccounts returns all the existing module accounts. @@ -803,6 +902,15 @@ func (c *queryClient) Account(ctx context.Context, in *QueryAccountRequest, opts 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) { out := new(QueryParamsResponse) err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/Params", in, out, opts...) @@ -856,6 +964,8 @@ 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 id + AccountAddressByID(context.Context, *QueryAccountAddressByIDRequest) (*QueryAccountAddressByIDResponse, error) // Params queries all parameters. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // ModuleAccounts returns all the existing module accounts. @@ -886,6 +996,9 @@ func (*UnimplementedQueryServer) Accounts(ctx context.Context, req *QueryAccount func (*UnimplementedQueryServer) Account(ctx context.Context, req *QueryAccountRequest) (*QueryAccountResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Account not implemented") } +func (*UnimplementedQueryServer) AccountAddressByID(ctx context.Context, req *QueryAccountAddressByIDRequest) (*QueryAccountAddressByIDResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AccountAddressByID not implemented") +} func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } @@ -942,6 +1055,24 @@ func _Query_Account_Handler(srv interface{}, ctx context.Context, dec func(inter return interceptor(ctx, in, info, handler) } +func _Query_AccountAddressByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAccountAddressByIDRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AccountAddressByID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1beta1.Query/AccountAddressByID", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AccountAddressByID(ctx, req.(*QueryAccountAddressByIDRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryParamsRequest) if err := dec(in); err != nil { @@ -1044,6 +1175,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Account", Handler: _Query_Account_Handler, }, + { + MethodName: "AccountAddressByID", + Handler: _Query_AccountAddressByID_Handler, + }, { MethodName: "Params", Handler: _Query_Params_Handler, @@ -1507,6 +1642,64 @@ func (m *AddressStringToBytesResponse) MarshalToSizedBuffer(dAtA []byte) (int, e return len(dAtA) - i, nil } +func (m *QueryAccountAddressByIDRequest) 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 *QueryAccountAddressByIDRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountAddressByIDRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Id != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryAccountAddressByIDResponse) 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 *QueryAccountAddressByIDResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountAddressByIDResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AccountAddress) > 0 { + i -= len(m.AccountAddress) + copy(dAtA[i:], m.AccountAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.AccountAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -1694,6 +1887,31 @@ func (m *AddressStringToBytesResponse) Size() (n int) { return n } +func (m *QueryAccountAddressByIDRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovQuery(uint64(m.Id)) + } + return n +} + +func (m *QueryAccountAddressByIDResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AccountAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2805,6 +3023,157 @@ func (m *AddressStringToBytesResponse) 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 0911d0d5115a..e1353ae21b49 100644 --- a/x/auth/types/query.pb.gw.go +++ b/x/auth/types/query.pb.gw.go @@ -123,6 +123,60 @@ func local_request_Query_Account_0(ctx context.Context, marshaler runtime.Marsha } +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 @@ -337,6 +391,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_AccountAddressByID_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() @@ -533,6 +610,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_AccountAddressByID_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() @@ -641,6 +738,8 @@ 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", "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))) @@ -657,6 +756,8 @@ var ( forward_Query_Account_0 = runtime.ForwardResponseMessage + forward_Query_AccountAddressByID_0 = runtime.ForwardResponseMessage + forward_Query_Params_0 = runtime.ForwardResponseMessage forward_Query_ModuleAccounts_0 = runtime.ForwardResponseMessage