From 7ae0b475bd0ffad6cc00c360b6fc36a3750ef8a5 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Thu, 8 Sep 2022 19:05:33 -0400 Subject: [PATCH 01/16] feat(x/auth): define simplified account query service --- proto/cosmos/auth/v1/query.proto | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 proto/cosmos/auth/v1/query.proto diff --git a/proto/cosmos/auth/v1/query.proto b/proto/cosmos/auth/v1/query.proto new file mode 100644 index 000000000000..fd343c754640 --- /dev/null +++ b/proto/cosmos/auth/v1/query.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; +package cosmos.auth.v1; + +import "cosmos_proto/cosmos.proto"; +import "google/protobuf/any.proto"; + +service Query { + rpc AccountInfo(QueryAccountInfoRequest) returns (QueryAccountInfoResponse); +} + +message QueryAccountInfoRequest { + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +message QueryAccountInfoResponse { + AccountInfo info = 1; +} + +// AccountInfo +message AccountInfo { + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + google.protobuf.Any pub_key = 2; + uint64 account_number = 3; + uint64 sequence = 4; +} From b3d2dac2e4ca34746b0eb3cccfe8aaad5abe646b Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Thu, 8 Sep 2022 19:45:17 -0400 Subject: [PATCH 02/16] updates --- proto/cosmos/auth/v1/query.proto | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/proto/cosmos/auth/v1/query.proto b/proto/cosmos/auth/v1/query.proto index fd343c754640..7b4036999f72 100644 --- a/proto/cosmos/auth/v1/query.proto +++ b/proto/cosmos/auth/v1/query.proto @@ -18,8 +18,15 @@ message QueryAccountInfoResponse { // AccountInfo message AccountInfo { - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - google.protobuf.Any pub_key = 2; + // address is the account address string. + string address_string = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // credential is a pubkey or other identifying credential such as an ADR 028 module account. + google.protobuf.Any credential = 2; + + // account_number is the unique account number. uint64 account_number = 3; - uint64 sequence = 4; + + // sequence is the account sequence which increments with every transaction. + uint64 sequence = 4; } From 03df3ff08af351b4041a37d73ee4130985addc41 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Mon, 12 Sep 2022 09:50:30 -0400 Subject: [PATCH 03/16] docs --- proto/cosmos/auth/v1/query.proto | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/proto/cosmos/auth/v1/query.proto b/proto/cosmos/auth/v1/query.proto index 7b4036999f72..1d4b3c4a4ded 100644 --- a/proto/cosmos/auth/v1/query.proto +++ b/proto/cosmos/auth/v1/query.proto @@ -4,19 +4,28 @@ package cosmos.auth.v1; import "cosmos_proto/cosmos.proto"; import "google/protobuf/any.proto"; +// Query is the comos.auth.v1 query service. service Query { + + // AccountInfo queries account info by account address. rpc AccountInfo(QueryAccountInfoRequest) returns (QueryAccountInfoResponse); } +// QueryAccountInfoRequest is the Query/AccountInfo request type. message QueryAccountInfoRequest { + + // address is the account address string. string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } +// QueryAccountInfoResponse is the Query/AccountInfo response type. message QueryAccountInfoResponse { + + // info is the account info. AccountInfo info = 1; } -// AccountInfo +// AccountInfo describes basic account info for all account types. message AccountInfo { // address is the account address string. string address_string = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; From bdc1efaf611c49ed37932ae96c63a6b42586c8a6 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Mon, 12 Sep 2022 09:54:14 -0400 Subject: [PATCH 04/16] protogen --- api/cosmos/auth/v1/query.pulsar.go | 1761 +++++++++++++++++++++++++++ api/cosmos/auth/v1/query_grpc.pb.go | 107 ++ proto/cosmos/auth/v1/query.proto | 2 + x/auth/types/v1/query.pb.go | 905 ++++++++++++++ 4 files changed, 2775 insertions(+) create mode 100644 api/cosmos/auth/v1/query.pulsar.go create mode 100644 api/cosmos/auth/v1/query_grpc.pb.go create mode 100644 x/auth/types/v1/query.pb.go diff --git a/api/cosmos/auth/v1/query.pulsar.go b/api/cosmos/auth/v1/query.pulsar.go new file mode 100644 index 000000000000..40b8a279b547 --- /dev/null +++ b/api/cosmos/auth/v1/query.pulsar.go @@ -0,0 +1,1761 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package authv1 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_QueryAccountInfoRequest protoreflect.MessageDescriptor + fd_QueryAccountInfoRequest_address protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_auth_v1_query_proto_init() + md_QueryAccountInfoRequest = File_cosmos_auth_v1_query_proto.Messages().ByName("QueryAccountInfoRequest") + fd_QueryAccountInfoRequest_address = md_QueryAccountInfoRequest.Fields().ByName("address") +} + +var _ protoreflect.Message = (*fastReflection_QueryAccountInfoRequest)(nil) + +type fastReflection_QueryAccountInfoRequest QueryAccountInfoRequest + +func (x *QueryAccountInfoRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAccountInfoRequest)(x) +} + +func (x *QueryAccountInfoRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1_query_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAccountInfoRequest_messageType fastReflection_QueryAccountInfoRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryAccountInfoRequest_messageType{} + +type fastReflection_QueryAccountInfoRequest_messageType struct{} + +func (x fastReflection_QueryAccountInfoRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAccountInfoRequest)(nil) +} +func (x fastReflection_QueryAccountInfoRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAccountInfoRequest) +} +func (x fastReflection_QueryAccountInfoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountInfoRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAccountInfoRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountInfoRequest +} + +// 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_QueryAccountInfoRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryAccountInfoRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAccountInfoRequest) New() protoreflect.Message { + return new(fastReflection_QueryAccountInfoRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAccountInfoRequest) Interface() protoreflect.ProtoMessage { + return (*QueryAccountInfoRequest)(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_QueryAccountInfoRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Address != "" { + value := protoreflect.ValueOfString(x.Address) + if !f(fd_QueryAccountInfoRequest_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_QueryAccountInfoRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.auth.v1.QueryAccountInfoRequest.address": + return x.Address != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.QueryAccountInfoRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1.QueryAccountInfoRequest 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_QueryAccountInfoRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.auth.v1.QueryAccountInfoRequest.address": + x.Address = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.QueryAccountInfoRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1.QueryAccountInfoRequest 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_QueryAccountInfoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.auth.v1.QueryAccountInfoRequest.address": + value := x.Address + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.QueryAccountInfoRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1.QueryAccountInfoRequest 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_QueryAccountInfoRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.auth.v1.QueryAccountInfoRequest.address": + x.Address = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.QueryAccountInfoRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1.QueryAccountInfoRequest 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_QueryAccountInfoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1.QueryAccountInfoRequest.address": + panic(fmt.Errorf("field address of message cosmos.auth.v1.QueryAccountInfoRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.QueryAccountInfoRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1.QueryAccountInfoRequest 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_QueryAccountInfoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1.QueryAccountInfoRequest.address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.QueryAccountInfoRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1.QueryAccountInfoRequest 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_QueryAccountInfoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1.QueryAccountInfoRequest", 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_QueryAccountInfoRequest) 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_QueryAccountInfoRequest) 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_QueryAccountInfoRequest) 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_QueryAccountInfoRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAccountInfoRequest) + 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.Address) + 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().(*QueryAccountInfoRequest) + 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.Address) > 0 { + i -= len(x.Address) + copy(dAtA[i:], x.Address) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) + 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().(*QueryAccountInfoRequest) + 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: QueryAccountInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountInfoRequest: 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 Address", 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.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryAccountInfoResponse protoreflect.MessageDescriptor + fd_QueryAccountInfoResponse_info protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_auth_v1_query_proto_init() + md_QueryAccountInfoResponse = File_cosmos_auth_v1_query_proto.Messages().ByName("QueryAccountInfoResponse") + fd_QueryAccountInfoResponse_info = md_QueryAccountInfoResponse.Fields().ByName("info") +} + +var _ protoreflect.Message = (*fastReflection_QueryAccountInfoResponse)(nil) + +type fastReflection_QueryAccountInfoResponse QueryAccountInfoResponse + +func (x *QueryAccountInfoResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAccountInfoResponse)(x) +} + +func (x *QueryAccountInfoResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1_query_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAccountInfoResponse_messageType fastReflection_QueryAccountInfoResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAccountInfoResponse_messageType{} + +type fastReflection_QueryAccountInfoResponse_messageType struct{} + +func (x fastReflection_QueryAccountInfoResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAccountInfoResponse)(nil) +} +func (x fastReflection_QueryAccountInfoResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAccountInfoResponse) +} +func (x fastReflection_QueryAccountInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountInfoResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAccountInfoResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountInfoResponse +} + +// 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_QueryAccountInfoResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAccountInfoResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAccountInfoResponse) New() protoreflect.Message { + return new(fastReflection_QueryAccountInfoResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAccountInfoResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAccountInfoResponse)(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_QueryAccountInfoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Info != nil { + value := protoreflect.ValueOfMessage(x.Info.ProtoReflect()) + if !f(fd_QueryAccountInfoResponse_info, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAccountInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.auth.v1.QueryAccountInfoResponse.info": + return x.Info != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.QueryAccountInfoResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1.QueryAccountInfoResponse 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_QueryAccountInfoResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.auth.v1.QueryAccountInfoResponse.info": + x.Info = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.QueryAccountInfoResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1.QueryAccountInfoResponse 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_QueryAccountInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.auth.v1.QueryAccountInfoResponse.info": + value := x.Info + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.QueryAccountInfoResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1.QueryAccountInfoResponse 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_QueryAccountInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.auth.v1.QueryAccountInfoResponse.info": + x.Info = value.Message().Interface().(*AccountInfo) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.QueryAccountInfoResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1.QueryAccountInfoResponse 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_QueryAccountInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1.QueryAccountInfoResponse.info": + if x.Info == nil { + x.Info = new(AccountInfo) + } + return protoreflect.ValueOfMessage(x.Info.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.QueryAccountInfoResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1.QueryAccountInfoResponse 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_QueryAccountInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1.QueryAccountInfoResponse.info": + m := new(AccountInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.QueryAccountInfoResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1.QueryAccountInfoResponse 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_QueryAccountInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1.QueryAccountInfoResponse", 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_QueryAccountInfoResponse) 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_QueryAccountInfoResponse) 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_QueryAccountInfoResponse) 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_QueryAccountInfoResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAccountInfoResponse) + 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.Info != nil { + l = options.Size(x.Info) + 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().(*QueryAccountInfoResponse) + 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.Info != nil { + encoded, err := options.Marshal(x.Info) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAccountInfoResponse) + 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: QueryAccountInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountInfoResponse: 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 Info", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Info == nil { + x.Info = &AccountInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Info); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_AccountInfo protoreflect.MessageDescriptor + fd_AccountInfo_address_string protoreflect.FieldDescriptor + fd_AccountInfo_credential protoreflect.FieldDescriptor + fd_AccountInfo_account_number protoreflect.FieldDescriptor + fd_AccountInfo_sequence protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_auth_v1_query_proto_init() + md_AccountInfo = File_cosmos_auth_v1_query_proto.Messages().ByName("AccountInfo") + fd_AccountInfo_address_string = md_AccountInfo.Fields().ByName("address_string") + fd_AccountInfo_credential = md_AccountInfo.Fields().ByName("credential") + fd_AccountInfo_account_number = md_AccountInfo.Fields().ByName("account_number") + fd_AccountInfo_sequence = md_AccountInfo.Fields().ByName("sequence") +} + +var _ protoreflect.Message = (*fastReflection_AccountInfo)(nil) + +type fastReflection_AccountInfo AccountInfo + +func (x *AccountInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_AccountInfo)(x) +} + +func (x *AccountInfo) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1_query_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_AccountInfo_messageType fastReflection_AccountInfo_messageType +var _ protoreflect.MessageType = fastReflection_AccountInfo_messageType{} + +type fastReflection_AccountInfo_messageType struct{} + +func (x fastReflection_AccountInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_AccountInfo)(nil) +} +func (x fastReflection_AccountInfo_messageType) New() protoreflect.Message { + return new(fastReflection_AccountInfo) +} +func (x fastReflection_AccountInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AccountInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_AccountInfo) Descriptor() protoreflect.MessageDescriptor { + return md_AccountInfo +} + +// 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_AccountInfo) Type() protoreflect.MessageType { + return _fastReflection_AccountInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_AccountInfo) New() protoreflect.Message { + return new(fastReflection_AccountInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_AccountInfo) Interface() protoreflect.ProtoMessage { + return (*AccountInfo)(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_AccountInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.AddressString != "" { + value := protoreflect.ValueOfString(x.AddressString) + if !f(fd_AccountInfo_address_string, value) { + return + } + } + if x.Credential != nil { + value := protoreflect.ValueOfMessage(x.Credential.ProtoReflect()) + if !f(fd_AccountInfo_credential, value) { + return + } + } + if x.AccountNumber != uint64(0) { + value := protoreflect.ValueOfUint64(x.AccountNumber) + if !f(fd_AccountInfo_account_number, value) { + return + } + } + if x.Sequence != uint64(0) { + value := protoreflect.ValueOfUint64(x.Sequence) + if !f(fd_AccountInfo_sequence, 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_AccountInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.auth.v1.AccountInfo.address_string": + return x.AddressString != "" + case "cosmos.auth.v1.AccountInfo.credential": + return x.Credential != nil + case "cosmos.auth.v1.AccountInfo.account_number": + return x.AccountNumber != uint64(0) + case "cosmos.auth.v1.AccountInfo.sequence": + return x.Sequence != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.AccountInfo")) + } + panic(fmt.Errorf("message cosmos.auth.v1.AccountInfo 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_AccountInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.auth.v1.AccountInfo.address_string": + x.AddressString = "" + case "cosmos.auth.v1.AccountInfo.credential": + x.Credential = nil + case "cosmos.auth.v1.AccountInfo.account_number": + x.AccountNumber = uint64(0) + case "cosmos.auth.v1.AccountInfo.sequence": + x.Sequence = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.AccountInfo")) + } + panic(fmt.Errorf("message cosmos.auth.v1.AccountInfo 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_AccountInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.auth.v1.AccountInfo.address_string": + value := x.AddressString + return protoreflect.ValueOfString(value) + case "cosmos.auth.v1.AccountInfo.credential": + value := x.Credential + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.auth.v1.AccountInfo.account_number": + value := x.AccountNumber + return protoreflect.ValueOfUint64(value) + case "cosmos.auth.v1.AccountInfo.sequence": + value := x.Sequence + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.AccountInfo")) + } + panic(fmt.Errorf("message cosmos.auth.v1.AccountInfo 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_AccountInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.auth.v1.AccountInfo.address_string": + x.AddressString = value.Interface().(string) + case "cosmos.auth.v1.AccountInfo.credential": + x.Credential = value.Message().Interface().(*anypb.Any) + case "cosmos.auth.v1.AccountInfo.account_number": + x.AccountNumber = value.Uint() + case "cosmos.auth.v1.AccountInfo.sequence": + x.Sequence = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.AccountInfo")) + } + panic(fmt.Errorf("message cosmos.auth.v1.AccountInfo 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_AccountInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1.AccountInfo.credential": + if x.Credential == nil { + x.Credential = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.Credential.ProtoReflect()) + case "cosmos.auth.v1.AccountInfo.address_string": + panic(fmt.Errorf("field address_string of message cosmos.auth.v1.AccountInfo is not mutable")) + case "cosmos.auth.v1.AccountInfo.account_number": + panic(fmt.Errorf("field account_number of message cosmos.auth.v1.AccountInfo is not mutable")) + case "cosmos.auth.v1.AccountInfo.sequence": + panic(fmt.Errorf("field sequence of message cosmos.auth.v1.AccountInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.AccountInfo")) + } + panic(fmt.Errorf("message cosmos.auth.v1.AccountInfo 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_AccountInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1.AccountInfo.address_string": + return protoreflect.ValueOfString("") + case "cosmos.auth.v1.AccountInfo.credential": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.auth.v1.AccountInfo.account_number": + return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.auth.v1.AccountInfo.sequence": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.AccountInfo")) + } + panic(fmt.Errorf("message cosmos.auth.v1.AccountInfo 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_AccountInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1.AccountInfo", 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_AccountInfo) 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_AccountInfo) 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_AccountInfo) 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_AccountInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*AccountInfo) + 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.AddressString) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Credential != nil { + l = options.Size(x.Credential) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.AccountNumber != 0 { + n += 1 + runtime.Sov(uint64(x.AccountNumber)) + } + if x.Sequence != 0 { + n += 1 + runtime.Sov(uint64(x.Sequence)) + } + 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().(*AccountInfo) + 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.Sequence != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) + i-- + dAtA[i] = 0x20 + } + if x.AccountNumber != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.AccountNumber)) + i-- + dAtA[i] = 0x18 + } + if x.Credential != nil { + encoded, err := options.Marshal(x.Credential) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.AddressString) > 0 { + i -= len(x.AddressString) + copy(dAtA[i:], x.AddressString) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AddressString))) + 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().(*AccountInfo) + 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: AccountInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AccountInfo: 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 AddressString", 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.AddressString = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Credential", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Credential == nil { + x.Credential = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Credential); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AccountNumber", wireType) + } + x.AccountNumber = 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.AccountNumber |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + x.Sequence = 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.Sequence |= uint64(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, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: cosmos/auth/v1/query.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// QueryAccountInfoRequest is the Query/AccountInfo request type. +type QueryAccountInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // address is the account address string. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (x *QueryAccountInfoRequest) Reset() { + *x = QueryAccountInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAccountInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAccountInfoRequest) ProtoMessage() {} + +// Deprecated: Use QueryAccountInfoRequest.ProtoReflect.Descriptor instead. +func (*QueryAccountInfoRequest) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1_query_proto_rawDescGZIP(), []int{0} +} + +func (x *QueryAccountInfoRequest) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +// QueryAccountInfoResponse is the Query/AccountInfo response type. +type QueryAccountInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // info is the account info. + Info *AccountInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` +} + +func (x *QueryAccountInfoResponse) Reset() { + *x = QueryAccountInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAccountInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAccountInfoResponse) ProtoMessage() {} + +// Deprecated: Use QueryAccountInfoResponse.ProtoReflect.Descriptor instead. +func (*QueryAccountInfoResponse) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1_query_proto_rawDescGZIP(), []int{1} +} + +func (x *QueryAccountInfoResponse) GetInfo() *AccountInfo { + if x != nil { + return x.Info + } + return nil +} + +// AccountInfo describes basic account info for all account types. +type AccountInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // address is the account address string. + AddressString string `protobuf:"bytes,1,opt,name=address_string,json=addressString,proto3" json:"address_string,omitempty"` + // credential is a pubkey or other identifying credential such as an ADR 028 module account. + Credential *anypb.Any `protobuf:"bytes,2,opt,name=credential,proto3" json:"credential,omitempty"` + // account_number is the unique account number. + AccountNumber uint64 `protobuf:"varint,3,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` + // sequence is the account sequence which increments with every transaction. + Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` +} + +func (x *AccountInfo) Reset() { + *x = AccountInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccountInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountInfo) ProtoMessage() {} + +// Deprecated: Use AccountInfo.ProtoReflect.Descriptor instead. +func (*AccountInfo) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1_query_proto_rawDescGZIP(), []int{2} +} + +func (x *AccountInfo) GetAddressString() string { + if x != nil { + return x.AddressString + } + return "" +} + +func (x *AccountInfo) GetCredential() *anypb.Any { + if x != nil { + return x.Credential + } + return nil +} + +func (x *AccountInfo) GetAccountNumber() uint64 { + if x != nil { + return x.AccountNumber + } + return 0 +} + +func (x *AccountInfo) GetSequence() uint64 { + if x != nil { + return x.Sequence + } + return 0 +} + +var File_cosmos_auth_v1_query_proto protoreflect.FileDescriptor + +var file_cosmos_auth_v1_query_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, + 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x1a, 0x19, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x4d, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, + 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x22, 0x4b, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, + 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0xc7, + 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3f, + 0x0a, 0x0e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, + 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, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, + 0x34, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, + 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, + 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x32, 0x69, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x12, 0x60, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x42, 0xa2, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x26, 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, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x0e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x41, 0x75, 0x74, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x5c, 0x41, 0x75, 0x74, 0x68, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1a, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, + 0x41, 0x75, 0x74, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cosmos_auth_v1_query_proto_rawDescOnce sync.Once + file_cosmos_auth_v1_query_proto_rawDescData = file_cosmos_auth_v1_query_proto_rawDesc +) + +func file_cosmos_auth_v1_query_proto_rawDescGZIP() []byte { + file_cosmos_auth_v1_query_proto_rawDescOnce.Do(func() { + file_cosmos_auth_v1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_auth_v1_query_proto_rawDescData) + }) + return file_cosmos_auth_v1_query_proto_rawDescData +} + +var file_cosmos_auth_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_cosmos_auth_v1_query_proto_goTypes = []interface{}{ + (*QueryAccountInfoRequest)(nil), // 0: cosmos.auth.v1.QueryAccountInfoRequest + (*QueryAccountInfoResponse)(nil), // 1: cosmos.auth.v1.QueryAccountInfoResponse + (*AccountInfo)(nil), // 2: cosmos.auth.v1.AccountInfo + (*anypb.Any)(nil), // 3: google.protobuf.Any +} +var file_cosmos_auth_v1_query_proto_depIdxs = []int32{ + 2, // 0: cosmos.auth.v1.QueryAccountInfoResponse.info:type_name -> cosmos.auth.v1.AccountInfo + 3, // 1: cosmos.auth.v1.AccountInfo.credential:type_name -> google.protobuf.Any + 0, // 2: cosmos.auth.v1.Query.AccountInfo:input_type -> cosmos.auth.v1.QueryAccountInfoRequest + 1, // 3: cosmos.auth.v1.Query.AccountInfo:output_type -> cosmos.auth.v1.QueryAccountInfoResponse + 3, // [3:4] is the sub-list for method output_type + 2, // [2:3] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_cosmos_auth_v1_query_proto_init() } +func file_cosmos_auth_v1_query_proto_init() { + if File_cosmos_auth_v1_query_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_cosmos_auth_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAccountInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_auth_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAccountInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_auth_v1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccountInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_cosmos_auth_v1_query_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_cosmos_auth_v1_query_proto_goTypes, + DependencyIndexes: file_cosmos_auth_v1_query_proto_depIdxs, + MessageInfos: file_cosmos_auth_v1_query_proto_msgTypes, + }.Build() + File_cosmos_auth_v1_query_proto = out.File + file_cosmos_auth_v1_query_proto_rawDesc = nil + file_cosmos_auth_v1_query_proto_goTypes = nil + file_cosmos_auth_v1_query_proto_depIdxs = nil +} diff --git a/api/cosmos/auth/v1/query_grpc.pb.go b/api/cosmos/auth/v1/query_grpc.pb.go new file mode 100644 index 000000000000..e225872132d0 --- /dev/null +++ b/api/cosmos/auth/v1/query_grpc.pb.go @@ -0,0 +1,107 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc (unknown) +// source: cosmos/auth/v1/query.proto + +package authv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type QueryClient interface { + // AccountInfo queries account info by account address. + AccountInfo(ctx context.Context, in *QueryAccountInfoRequest, opts ...grpc.CallOption) (*QueryAccountInfoResponse, error) +} + +type queryClient struct { + cc grpc.ClientConnInterface +} + +func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) AccountInfo(ctx context.Context, in *QueryAccountInfoRequest, opts ...grpc.CallOption) (*QueryAccountInfoResponse, error) { + out := new(QueryAccountInfoResponse) + err := c.cc.Invoke(ctx, "/cosmos.auth.v1.Query/AccountInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +// All implementations must embed UnimplementedQueryServer +// for forward compatibility +type QueryServer interface { + // AccountInfo queries account info by account address. + AccountInfo(context.Context, *QueryAccountInfoRequest) (*QueryAccountInfoResponse, error) + mustEmbedUnimplementedQueryServer() +} + +// UnimplementedQueryServer must be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (UnimplementedQueryServer) AccountInfo(context.Context, *QueryAccountInfoRequest) (*QueryAccountInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AccountInfo not implemented") +} +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} + +// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServer will +// result in compilation errors. +type UnsafeQueryServer interface { + mustEmbedUnimplementedQueryServer() +} + +func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { + s.RegisterService(&Query_ServiceDesc, srv) +} + +func _Query_AccountInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAccountInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AccountInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1.Query/AccountInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AccountInfo(ctx, req.(*QueryAccountInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Query_ServiceDesc is the grpc.ServiceDesc for Query service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Query_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.auth.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "AccountInfo", + Handler: _Query_AccountInfo_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/auth/v1/query.proto", +} diff --git a/proto/cosmos/auth/v1/query.proto b/proto/cosmos/auth/v1/query.proto index 1d4b3c4a4ded..7eedf7ec2cff 100644 --- a/proto/cosmos/auth/v1/query.proto +++ b/proto/cosmos/auth/v1/query.proto @@ -4,6 +4,8 @@ package cosmos.auth.v1; import "cosmos_proto/cosmos.proto"; import "google/protobuf/any.proto"; +option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types/v1;authv1"; + // Query is the comos.auth.v1 query service. service Query { diff --git a/x/auth/types/v1/query.pb.go b/x/auth/types/v1/query.pb.go new file mode 100644 index 000000000000..fef22fc80324 --- /dev/null +++ b/x/auth/types/v1/query.pb.go @@ -0,0 +1,905 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/auth/v1/query.proto + +package authv1 + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/codec/types" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryAccountInfoRequest is the Query/AccountInfo request type. +type QueryAccountInfoRequest struct { + // address is the account address string. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryAccountInfoRequest) Reset() { *m = QueryAccountInfoRequest{} } +func (m *QueryAccountInfoRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAccountInfoRequest) ProtoMessage() {} +func (*QueryAccountInfoRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9bc7c5ab1eea8999, []int{0} +} +func (m *QueryAccountInfoRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAccountInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountInfoRequest.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 *QueryAccountInfoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountInfoRequest.Merge(m, src) +} +func (m *QueryAccountInfoRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAccountInfoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountInfoRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAccountInfoRequest proto.InternalMessageInfo + +func (m *QueryAccountInfoRequest) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +// QueryAccountInfoResponse is the Query/AccountInfo response type. +type QueryAccountInfoResponse struct { + // info is the account info. + Info *AccountInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` +} + +func (m *QueryAccountInfoResponse) Reset() { *m = QueryAccountInfoResponse{} } +func (m *QueryAccountInfoResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAccountInfoResponse) ProtoMessage() {} +func (*QueryAccountInfoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9bc7c5ab1eea8999, []int{1} +} +func (m *QueryAccountInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAccountInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountInfoResponse.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 *QueryAccountInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountInfoResponse.Merge(m, src) +} +func (m *QueryAccountInfoResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAccountInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountInfoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAccountInfoResponse proto.InternalMessageInfo + +func (m *QueryAccountInfoResponse) GetInfo() *AccountInfo { + if m != nil { + return m.Info + } + return nil +} + +// AccountInfo describes basic account info for all account types. +type AccountInfo struct { + // address is the account address string. + AddressString string `protobuf:"bytes,1,opt,name=address_string,json=addressString,proto3" json:"address_string,omitempty"` + // credential is a pubkey or other identifying credential such as an ADR 028 module account. + Credential *types.Any `protobuf:"bytes,2,opt,name=credential,proto3" json:"credential,omitempty"` + // account_number is the unique account number. + AccountNumber uint64 `protobuf:"varint,3,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` + // sequence is the account sequence which increments with every transaction. + Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` +} + +func (m *AccountInfo) Reset() { *m = AccountInfo{} } +func (m *AccountInfo) String() string { return proto.CompactTextString(m) } +func (*AccountInfo) ProtoMessage() {} +func (*AccountInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_9bc7c5ab1eea8999, []int{2} +} +func (m *AccountInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AccountInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AccountInfo.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 *AccountInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_AccountInfo.Merge(m, src) +} +func (m *AccountInfo) XXX_Size() int { + return m.Size() +} +func (m *AccountInfo) XXX_DiscardUnknown() { + xxx_messageInfo_AccountInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_AccountInfo proto.InternalMessageInfo + +func (m *AccountInfo) GetAddressString() string { + if m != nil { + return m.AddressString + } + return "" +} + +func (m *AccountInfo) GetCredential() *types.Any { + if m != nil { + return m.Credential + } + return nil +} + +func (m *AccountInfo) GetAccountNumber() uint64 { + if m != nil { + return m.AccountNumber + } + return 0 +} + +func (m *AccountInfo) GetSequence() uint64 { + if m != nil { + return m.Sequence + } + return 0 +} + +func init() { + proto.RegisterType((*QueryAccountInfoRequest)(nil), "cosmos.auth.v1.QueryAccountInfoRequest") + proto.RegisterType((*QueryAccountInfoResponse)(nil), "cosmos.auth.v1.QueryAccountInfoResponse") + proto.RegisterType((*AccountInfo)(nil), "cosmos.auth.v1.AccountInfo") +} + +func init() { proto.RegisterFile("cosmos/auth/v1/query.proto", fileDescriptor_9bc7c5ab1eea8999) } + +var fileDescriptor_9bc7c5ab1eea8999 = []byte{ + // 374 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0xcd, 0x4e, 0xea, 0x40, + 0x18, 0xa5, 0xf7, 0x72, 0x7f, 0x1c, 0x02, 0x8b, 0x09, 0x89, 0xa5, 0x26, 0x0d, 0x21, 0x31, 0xb2, + 0x61, 0x26, 0x05, 0x77, 0x2e, 0x0c, 0xec, 0x8c, 0xc1, 0xc4, 0xba, 0x73, 0x83, 0xfd, 0x19, 0x4a, + 0x23, 0xcc, 0x40, 0x67, 0xda, 0xc8, 0x5b, 0xf8, 0x30, 0xbe, 0x83, 0x2e, 0x89, 0x2b, 0x97, 0x06, + 0x5e, 0xc4, 0x74, 0x66, 0x30, 0x45, 0x63, 0x58, 0x35, 0xe7, 0x3b, 0xa7, 0xe7, 0x3b, 0x3d, 0xfd, + 0x80, 0x15, 0x30, 0x3e, 0x63, 0x1c, 0x7b, 0xa9, 0x98, 0xe0, 0xcc, 0xc1, 0x8b, 0x94, 0x24, 0x4b, + 0x34, 0x4f, 0x98, 0x60, 0xb0, 0xa6, 0x38, 0x94, 0x73, 0x28, 0x73, 0xac, 0x86, 0xc2, 0x23, 0xc9, + 0x62, 0x4d, 0x4a, 0x60, 0x35, 0x22, 0xc6, 0xa2, 0x29, 0xc1, 0x12, 0xf9, 0xe9, 0x18, 0x7b, 0x54, + 0xbb, 0xb4, 0x86, 0xe0, 0xf0, 0x3a, 0x37, 0xed, 0x07, 0x01, 0x4b, 0xa9, 0xb8, 0xa0, 0x63, 0xe6, + 0x92, 0x45, 0x4a, 0xb8, 0x80, 0x5d, 0xf0, 0xcf, 0x0b, 0xc3, 0x84, 0x70, 0x6e, 0x1a, 0x4d, 0xa3, + 0x7d, 0x30, 0x30, 0x5f, 0x9f, 0x3a, 0x75, 0x6d, 0xdc, 0x57, 0xcc, 0x8d, 0x48, 0x62, 0x1a, 0xb9, + 0x5b, 0x61, 0xeb, 0x12, 0x98, 0xdf, 0xed, 0xf8, 0x9c, 0x51, 0x4e, 0x20, 0x06, 0xe5, 0x98, 0x8e, + 0x99, 0x34, 0xab, 0x74, 0x8f, 0xd0, 0x6e, 0x7e, 0x54, 0x7c, 0x45, 0x0a, 0x5b, 0xcf, 0x06, 0xa8, + 0x14, 0xa6, 0xf0, 0x1c, 0xd4, 0xf4, 0x9e, 0x11, 0x97, 0x7b, 0xf7, 0xe6, 0xaa, 0x7a, 0x45, 0x08, + 0x4f, 0x01, 0x08, 0x12, 0x12, 0x12, 0x2a, 0x62, 0x6f, 0x6a, 0xfe, 0x92, 0x39, 0xea, 0x48, 0x95, + 0x83, 0xb6, 0xe5, 0xa0, 0x3e, 0x5d, 0xba, 0x05, 0x1d, 0x3c, 0x06, 0x35, 0x4f, 0xa5, 0x18, 0xd1, + 0x74, 0xe6, 0x93, 0xc4, 0xfc, 0xdd, 0x34, 0xda, 0x65, 0xb7, 0xaa, 0xa7, 0x57, 0x72, 0x08, 0x2d, + 0xf0, 0x9f, 0xe7, 0xcd, 0xd1, 0x80, 0x98, 0x65, 0x29, 0xf8, 0xc4, 0xdd, 0x18, 0xfc, 0x91, 0xb5, + 0xc0, 0xbb, 0xdd, 0x2f, 0x3a, 0xf9, 0x5a, 0xc2, 0x0f, 0xff, 0xc2, 0x6a, 0xef, 0x17, 0xaa, 0x96, + 0x07, 0xc3, 0x97, 0xb5, 0x6d, 0xac, 0xd6, 0xb6, 0xf1, 0xbe, 0xb6, 0x8d, 0xc7, 0x8d, 0x5d, 0x5a, + 0x6d, 0xec, 0xd2, 0xdb, 0xc6, 0x2e, 0xdd, 0xf6, 0xa2, 0x58, 0x4c, 0x52, 0x1f, 0x05, 0x6c, 0xa6, + 0xcf, 0x43, 0x3f, 0x3a, 0x3c, 0xbc, 0xc7, 0x0f, 0xea, 0xc8, 0xc4, 0x72, 0x4e, 0x38, 0xce, 0x9c, + 0xb3, 0x1c, 0x65, 0x8e, 0xff, 0x57, 0xd6, 0xd2, 0xfb, 0x08, 0x00, 0x00, 0xff, 0xff, 0xe5, 0x71, + 0x11, 0x42, 0x8a, 0x02, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // AccountInfo queries account info by account address. + AccountInfo(ctx context.Context, in *QueryAccountInfoRequest, opts ...grpc.CallOption) (*QueryAccountInfoResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) AccountInfo(ctx context.Context, in *QueryAccountInfoRequest, opts ...grpc.CallOption) (*QueryAccountInfoResponse, error) { + out := new(QueryAccountInfoResponse) + err := c.cc.Invoke(ctx, "/cosmos.auth.v1.Query/AccountInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // AccountInfo queries account info by account address. + AccountInfo(context.Context, *QueryAccountInfoRequest) (*QueryAccountInfoResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) AccountInfo(ctx context.Context, req *QueryAccountInfoRequest) (*QueryAccountInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AccountInfo not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_AccountInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAccountInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AccountInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1.Query/AccountInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AccountInfo(ctx, req.(*QueryAccountInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.auth.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "AccountInfo", + Handler: _Query_AccountInfo_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/auth/v1/query.proto", +} + +func (m *QueryAccountInfoRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAccountInfoRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAccountInfoResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAccountInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Info != nil { + { + size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AccountInfo) 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 *AccountInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AccountInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Sequence != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Sequence)) + i-- + dAtA[i] = 0x20 + } + if m.AccountNumber != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.AccountNumber)) + i-- + dAtA[i] = 0x18 + } + if m.Credential != nil { + { + size, err := m.Credential.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.AddressString) > 0 { + i -= len(m.AddressString) + copy(dAtA[i:], m.AddressString) + i = encodeVarintQuery(dAtA, i, uint64(len(m.AddressString))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryAccountInfoRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAccountInfoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Info != nil { + l = m.Info.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *AccountInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AddressString) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Credential != nil { + l = m.Credential.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.AccountNumber != 0 { + n += 1 + sovQuery(uint64(m.AccountNumber)) + } + if m.Sequence != 0 { + n += 1 + sovQuery(uint64(m.Sequence)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryAccountInfoRequest) 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: QueryAccountInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAccountInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", 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.Address = 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 (m *QueryAccountInfoResponse) 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: QueryAccountInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAccountInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Info == nil { + m.Info = &AccountInfo{} + } + if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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 (m *AccountInfo) 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: AccountInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccountInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AddressString", 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.AddressString = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Credential", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Credential == nil { + m.Credential = &types.Any{} + } + if err := m.Credential.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountNumber", wireType) + } + m.AccountNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AccountNumber |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + m.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Sequence |= uint64(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 skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) From 951287209b7e7c9d34b6a6c65c5814831e52ccda Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Mon, 12 Sep 2022 11:38:51 -0400 Subject: [PATCH 05/16] Update proto/cosmos/auth/v1/query.proto Co-authored-by: Aleksandr Bezobchuk --- proto/cosmos/auth/v1/query.proto | 1 - 1 file changed, 1 deletion(-) diff --git a/proto/cosmos/auth/v1/query.proto b/proto/cosmos/auth/v1/query.proto index 7eedf7ec2cff..137cd7aa195a 100644 --- a/proto/cosmos/auth/v1/query.proto +++ b/proto/cosmos/auth/v1/query.proto @@ -22,7 +22,6 @@ message QueryAccountInfoRequest { // QueryAccountInfoResponse is the Query/AccountInfo response type. message QueryAccountInfoResponse { - // info is the account info. AccountInfo info = 1; } From 3e456fe5b56460e0685217f58421db4713aee040 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Tue, 13 Sep 2022 09:26:56 +0200 Subject: [PATCH 06/16] updates --- x/auth/keeper/grpc_query.go | 102 +++++++++++++++++++++++++++--------- 1 file changed, 77 insertions(+), 25 deletions(-) diff --git a/x/auth/keeper/grpc_query.go b/x/auth/keeper/grpc_query.go index 58ed7ef32f8b..75fd28930512 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -6,20 +6,33 @@ import ( "sort" "strings" - "github.com/cosmos/cosmos-sdk/store/prefix" - "github.com/cosmos/cosmos-sdk/types/query" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/query" "github.com/cosmos/cosmos-sdk/x/auth/types" + authv1types "github.com/cosmos/cosmos-sdk/x/auth/types/v1" ) -var _ types.QueryServer = AccountKeeper{} +var ( + _ types.QueryServer = Querier{} + _ authv1types.QueryServer = Querier{} +) + +// Querier defines a wrapper around the x/auth keeper that implements the gRPC +// query service handler interface. +type Querier struct { + AccountKeeper +} + +func NewQuerier(k AccountKeeper) Querier { + return Querier{k} +} -func (ak AccountKeeper) AccountAddressByID(c context.Context, req *types.QueryAccountAddressByIDRequest) (*types.QueryAccountAddressByIDResponse, error) { +func (q Querier) AccountAddressByID(c context.Context, req *types.QueryAccountAddressByIDRequest) (*types.QueryAccountAddressByIDResponse, error) { if req == nil { return nil, status.Errorf(codes.InvalidArgument, "empty request") } @@ -29,7 +42,7 @@ func (ak AccountKeeper) AccountAddressByID(c context.Context, req *types.QueryAc } ctx := sdk.UnwrapSDKContext(c) - address := ak.GetAccountAddressByID(ctx, uint64(req.GetId())) + address := q.GetAccountAddressByID(ctx, uint64(req.GetId())) if len(address) == 0 { return nil, status.Errorf(codes.NotFound, "account address not found with id %d", req.Id) } @@ -37,18 +50,18 @@ func (ak AccountKeeper) AccountAddressByID(c context.Context, req *types.QueryAc return &types.QueryAccountAddressByIDResponse{AccountAddress: address}, nil } -func (ak AccountKeeper) Accounts(c context.Context, req *types.QueryAccountsRequest) (*types.QueryAccountsResponse, error) { +func (q Querier) Accounts(c context.Context, req *types.QueryAccountsRequest) (*types.QueryAccountsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } ctx := sdk.UnwrapSDKContext(c) - store := ctx.KVStore(ak.storeKey) + store := ctx.KVStore(q.storeKey) accountsStore := prefix.NewStore(store, types.AddressStoreKeyPrefix) var accounts []*codectypes.Any pageRes, err := query.Paginate(accountsStore, req.Pagination, func(key, value []byte) error { - account := ak.decodeAccount(value) + account := q.decodeAccount(value) any, err := codectypes.NewAnyWithValue(account) if err != nil { return err @@ -65,7 +78,7 @@ func (ak AccountKeeper) Accounts(c context.Context, req *types.QueryAccountsRequ } // Account returns account details based on address -func (ak AccountKeeper) Account(c context.Context, req *types.QueryAccountRequest) (*types.QueryAccountResponse, error) { +func (q Querier) Account(c context.Context, req *types.QueryAccountRequest) (*types.QueryAccountResponse, error) { if req == nil { return nil, status.Errorf(codes.InvalidArgument, "empty request") } @@ -79,7 +92,8 @@ func (ak AccountKeeper) Account(c context.Context, req *types.QueryAccountReques if err != nil { return nil, err } - account := ak.GetAccount(ctx, addr) + + account := q.GetAccount(ctx, addr) if account == nil { return nil, status.Errorf(codes.NotFound, "account %s not found", req.Address) } @@ -93,18 +107,19 @@ func (ak AccountKeeper) Account(c context.Context, req *types.QueryAccountReques } // Params returns parameters of auth module -func (ak AccountKeeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { +func (q Querier) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } + ctx := sdk.UnwrapSDKContext(c) - params := ak.GetParams(ctx) + params := q.GetParams(ctx) return &types.QueryParamsResponse{Params: params}, nil } // ModuleAccounts returns all the existing Module Accounts -func (ak AccountKeeper) ModuleAccounts(c context.Context, req *types.QueryModuleAccountsRequest) (*types.QueryModuleAccountsResponse, error) { +func (q Querier) ModuleAccounts(c context.Context, req *types.QueryModuleAccountsRequest) (*types.QueryModuleAccountsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -112,23 +127,25 @@ func (ak AccountKeeper) ModuleAccounts(c context.Context, req *types.QueryModule ctx := sdk.UnwrapSDKContext(c) // For deterministic output, sort the permAddrs by module name. - sortedPermAddrs := make([]string, 0, len(ak.permAddrs)) - for moduleName := range ak.permAddrs { + sortedPermAddrs := make([]string, 0, len(q.permAddrs)) + for moduleName := range q.permAddrs { sortedPermAddrs = append(sortedPermAddrs, moduleName) } - sort.Strings(sortedPermAddrs) - modAccounts := make([]*codectypes.Any, 0, len(ak.permAddrs)) + sort.Strings(sortedPermAddrs) + modAccounts := make([]*codectypes.Any, 0, len(q.permAddrs)) for _, moduleName := range sortedPermAddrs { - account := ak.GetModuleAccount(ctx, moduleName) + account := q.GetModuleAccount(ctx, moduleName) if account == nil { return nil, status.Errorf(codes.NotFound, "account %s not found", moduleName) } + any, err := codectypes.NewAnyWithValue(account) if err != nil { return nil, status.Errorf(codes.Internal, err.Error()) } + modAccounts = append(modAccounts, any) } @@ -136,8 +153,8 @@ func (ak AccountKeeper) ModuleAccounts(c context.Context, req *types.QueryModule } // Bech32Prefix returns the keeper internally stored bech32 prefix. -func (ak AccountKeeper) Bech32Prefix(ctx context.Context, req *types.Bech32PrefixRequest) (*types.Bech32PrefixResponse, error) { - bech32Prefix, err := ak.getBech32Prefix() +func (q Querier) Bech32Prefix(ctx context.Context, req *types.Bech32PrefixRequest) (*types.Bech32PrefixResponse, error) { + bech32Prefix, err := q.getBech32Prefix() if err != nil { return nil, err } @@ -147,7 +164,7 @@ func (ak AccountKeeper) Bech32Prefix(ctx context.Context, req *types.Bech32Prefi // AddressBytesToString converts an address from bytes to string, using the // keeper's bech32 prefix. -func (ak AccountKeeper) AddressBytesToString(ctx context.Context, req *types.AddressBytesToStringRequest) (*types.AddressBytesToStringResponse, error) { +func (q Querier) AddressBytesToString(ctx context.Context, req *types.AddressBytesToStringRequest) (*types.AddressBytesToStringResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -156,7 +173,7 @@ func (ak AccountKeeper) AddressBytesToString(ctx context.Context, req *types.Add return nil, errors.New("empty address bytes is not allowed") } - text, err := ak.addressCdc.BytesToString(req.AddressBytes) + text, err := q.addressCdc.BytesToString(req.AddressBytes) if err != nil { return nil, err } @@ -166,7 +183,7 @@ func (ak AccountKeeper) AddressBytesToString(ctx context.Context, req *types.Add // AddressStringToBytes converts an address from string to bytes, using the // keeper's bech32 prefix. -func (ak AccountKeeper) AddressStringToBytes(ctx context.Context, req *types.AddressStringToBytesRequest) (*types.AddressStringToBytesResponse, error) { +func (q Querier) AddressStringToBytes(ctx context.Context, req *types.AddressStringToBytesRequest) (*types.AddressStringToBytesResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -175,10 +192,45 @@ func (ak AccountKeeper) AddressStringToBytes(ctx context.Context, req *types.Add return nil, errors.New("empty address string is not allowed") } - bz, err := ak.addressCdc.StringToBytes(req.AddressString) + bz, err := q.addressCdc.StringToBytes(req.AddressString) if err != nil { return nil, err } return &types.AddressStringToBytesResponse{AddressBytes: bz}, nil } + +func (q Querier) AccountInfo(goCtx context.Context, req *authv1types.QueryAccountInfoRequest) (*authv1types.QueryAccountInfoResponse, error) { + if req == nil { + return nil, status.Errorf(codes.InvalidArgument, "empty request") + } + + if req.Address == "" { + return nil, status.Error(codes.InvalidArgument, "Address cannot be empty") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + addr, err := sdk.AccAddressFromBech32(req.Address) + if err != nil { + return nil, err + } + + account := q.GetAccount(ctx, addr) + if account == nil { + return nil, status.Errorf(codes.NotFound, "account %s not found", req.Address) + } + + pkAny, err := codectypes.NewAnyWithValue(account.GetPubKey()) + if err != nil { + return nil, status.Errorf(codes.Internal, err.Error()) + } + + return &authv1types.QueryAccountInfoResponse{ + Info: &authv1types.AccountInfo{ + AddressString: addr.String(), + Credential: pkAny, + AccountNumber: account.GetAccountNumber(), + Sequence: account.GetSequence(), + }, + }, nil +} From 76724c7661c72e74cf17da231e89fd0275318211 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Tue, 13 Sep 2022 09:28:06 +0200 Subject: [PATCH 07/16] updates --- x/auth/keeper/keeper_test.go | 4 ++-- x/auth/module.go | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/x/auth/keeper/keeper_test.go b/x/auth/keeper/keeper_test.go index bc77a2648495..e92818b7b5d0 100644 --- a/x/auth/keeper/keeper_test.go +++ b/x/auth/keeper/keeper_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/stretchr/testify/suite" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/testutil" @@ -12,7 +13,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/keeper" "github.com/cosmos/cosmos-sdk/x/auth/types" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" ) const ( @@ -64,7 +64,7 @@ func (suite *KeeperTestSuite) SetupTest() { suite.msgServer = keeper.NewMsgServerImpl(suite.accountKeeper) queryHelper := baseapp.NewQueryServerTestHelper(suite.ctx, suite.encCfg.InterfaceRegistry) - types.RegisterQueryServer(queryHelper, suite.accountKeeper) + types.RegisterQueryServer(queryHelper, keeper.NewQuerier(suite.accountKeeper)) suite.queryClient = types.NewQueryClient(queryHelper) } diff --git a/x/auth/module.go b/x/auth/module.go index 68f695b75f9b..08cdad60a69c 100644 --- a/x/auth/module.go +++ b/x/auth/module.go @@ -5,13 +5,12 @@ import ( "encoding/json" "fmt" - gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/spf13/cobra" - abci "github.com/tendermint/tendermint/abci/types" - modulev1 "cosmossdk.io/api/cosmos/auth/module/v1" "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" + gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/spf13/cobra" + abci "github.com/tendermint/tendermint/abci/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -122,7 +121,8 @@ func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} // module-specific GRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.accountKeeper)) - types.RegisterQueryServer(cfg.QueryServer(), am.accountKeeper) + types.RegisterQueryServer(cfg.QueryServer(), keeper.NewQuerier(am.accountKeeper)) + m := keeper.NewMigrator(am.accountKeeper, cfg.QueryServer(), am.legacySubspace) if err := cfg.RegisterMigration(types.ModuleName, 1, m.Migrate1to2); err != nil { panic(err) From 326e4f93fe6b233f732e559ee4c4f2eab0e80004 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Tue, 13 Sep 2022 16:59:11 -0400 Subject: [PATCH 08/16] move to v1beta1 --- proto/cosmos/auth/v1/query.proto | 43 --------------------------- proto/cosmos/auth/v1beta1/query.proto | 33 ++++++++++++++++++++ 2 files changed, 33 insertions(+), 43 deletions(-) delete mode 100644 proto/cosmos/auth/v1/query.proto diff --git a/proto/cosmos/auth/v1/query.proto b/proto/cosmos/auth/v1/query.proto deleted file mode 100644 index 7eedf7ec2cff..000000000000 --- a/proto/cosmos/auth/v1/query.proto +++ /dev/null @@ -1,43 +0,0 @@ -syntax = "proto3"; -package cosmos.auth.v1; - -import "cosmos_proto/cosmos.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types/v1;authv1"; - -// Query is the comos.auth.v1 query service. -service Query { - - // AccountInfo queries account info by account address. - rpc AccountInfo(QueryAccountInfoRequest) returns (QueryAccountInfoResponse); -} - -// QueryAccountInfoRequest is the Query/AccountInfo request type. -message QueryAccountInfoRequest { - - // address is the account address string. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryAccountInfoResponse is the Query/AccountInfo response type. -message QueryAccountInfoResponse { - - // info is the account info. - AccountInfo info = 1; -} - -// AccountInfo describes basic account info for all account types. -message AccountInfo { - // address is the account address string. - string address_string = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // credential is a pubkey or other identifying credential such as an ADR 028 module account. - google.protobuf.Any credential = 2; - - // account_number is the unique account number. - uint64 account_number = 3; - - // sequence is the account sequence which increments with every transaction. - uint64 sequence = 4; -} diff --git a/proto/cosmos/auth/v1beta1/query.proto b/proto/cosmos/auth/v1beta1/query.proto index fd42cc27b414..7c771d1d6d52 100644 --- a/proto/cosmos/auth/v1beta1/query.proto +++ b/proto/cosmos/auth/v1beta1/query.proto @@ -70,6 +70,10 @@ service Query { option (cosmos.query.v1.deterministic) = true; option (google.api.http).get = "/cosmos/auth/v1beta1/bech32/{address_string}"; } + + + // AccountInfo queries account info which is common to all account types. + rpc AccountInfo(QueryAccountInfoRequest) returns (QueryAccountInfoResponse); } // QueryAccountsRequest is the request type for the Query/Accounts RPC method. @@ -176,3 +180,32 @@ message QueryAccountAddressByIDRequest { message QueryAccountAddressByIDResponse { string account_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } + +// QueryAccountInfoRequest is the Query/AccountInfo request type. +message QueryAccountInfoRequest { + + // address is the account address string. + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// QueryAccountInfoResponse is the Query/AccountInfo response type. +message QueryAccountInfoResponse { + + // info is the account info. + AccountInfo info = 1; +} + +// AccountInfo describes account info common to all account types. +message AccountInfo { + // address is the account address string. + string address_string = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // pubkey is the pubkey of the account. + google.protobuf.Any pubkey = 2; + + // account_number is the unique account number. + uint64 account_number = 3; + + // sequence is the account sequence which increments with every transaction. + uint64 sequence = 4; +} From 9058c0f830f4b67af8d49033c4d58211a344ac32 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Tue, 13 Sep 2022 17:04:04 -0400 Subject: [PATCH 09/16] proto-gen --- api/cosmos/auth/v1/query.pulsar.go | 1761 -------------------- api/cosmos/auth/v1/query_grpc.pb.go | 107 -- api/cosmos/auth/v1beta1/query.pulsar.go | 1913 ++++++++++++++++++++-- api/cosmos/auth/v1beta1/query_grpc.pb.go | 42 + proto/cosmos/auth/v1beta1/query.proto | 9 +- x/auth/types/v1/query.pb.go | 905 ---------- 6 files changed, 1837 insertions(+), 2900 deletions(-) delete mode 100644 api/cosmos/auth/v1/query.pulsar.go delete mode 100644 api/cosmos/auth/v1/query_grpc.pb.go delete mode 100644 x/auth/types/v1/query.pb.go diff --git a/api/cosmos/auth/v1/query.pulsar.go b/api/cosmos/auth/v1/query.pulsar.go deleted file mode 100644 index 40b8a279b547..000000000000 --- a/api/cosmos/auth/v1/query.pulsar.go +++ /dev/null @@ -1,1761 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package authv1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_QueryAccountInfoRequest protoreflect.MessageDescriptor - fd_QueryAccountInfoRequest_address protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1_query_proto_init() - md_QueryAccountInfoRequest = File_cosmos_auth_v1_query_proto.Messages().ByName("QueryAccountInfoRequest") - fd_QueryAccountInfoRequest_address = md_QueryAccountInfoRequest.Fields().ByName("address") -} - -var _ protoreflect.Message = (*fastReflection_QueryAccountInfoRequest)(nil) - -type fastReflection_QueryAccountInfoRequest QueryAccountInfoRequest - -func (x *QueryAccountInfoRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAccountInfoRequest)(x) -} - -func (x *QueryAccountInfoRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAccountInfoRequest_messageType fastReflection_QueryAccountInfoRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryAccountInfoRequest_messageType{} - -type fastReflection_QueryAccountInfoRequest_messageType struct{} - -func (x fastReflection_QueryAccountInfoRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAccountInfoRequest)(nil) -} -func (x fastReflection_QueryAccountInfoRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAccountInfoRequest) -} -func (x fastReflection_QueryAccountInfoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAccountInfoRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAccountInfoRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAccountInfoRequest -} - -// 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_QueryAccountInfoRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryAccountInfoRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAccountInfoRequest) New() protoreflect.Message { - return new(fastReflection_QueryAccountInfoRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAccountInfoRequest) Interface() protoreflect.ProtoMessage { - return (*QueryAccountInfoRequest)(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_QueryAccountInfoRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_QueryAccountInfoRequest_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_QueryAccountInfoRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1.QueryAccountInfoRequest.address": - return x.Address != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.QueryAccountInfoRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1.QueryAccountInfoRequest 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_QueryAccountInfoRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1.QueryAccountInfoRequest.address": - x.Address = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.QueryAccountInfoRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1.QueryAccountInfoRequest 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_QueryAccountInfoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1.QueryAccountInfoRequest.address": - value := x.Address - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.QueryAccountInfoRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1.QueryAccountInfoRequest 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_QueryAccountInfoRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1.QueryAccountInfoRequest.address": - x.Address = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.QueryAccountInfoRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1.QueryAccountInfoRequest 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_QueryAccountInfoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1.QueryAccountInfoRequest.address": - panic(fmt.Errorf("field address of message cosmos.auth.v1.QueryAccountInfoRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.QueryAccountInfoRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1.QueryAccountInfoRequest 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_QueryAccountInfoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1.QueryAccountInfoRequest.address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.QueryAccountInfoRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1.QueryAccountInfoRequest 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_QueryAccountInfoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1.QueryAccountInfoRequest", 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_QueryAccountInfoRequest) 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_QueryAccountInfoRequest) 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_QueryAccountInfoRequest) 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_QueryAccountInfoRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAccountInfoRequest) - 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.Address) - 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().(*QueryAccountInfoRequest) - 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.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - 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().(*QueryAccountInfoRequest) - 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: QueryAccountInfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountInfoRequest: 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 Address", 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.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryAccountInfoResponse protoreflect.MessageDescriptor - fd_QueryAccountInfoResponse_info protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1_query_proto_init() - md_QueryAccountInfoResponse = File_cosmos_auth_v1_query_proto.Messages().ByName("QueryAccountInfoResponse") - fd_QueryAccountInfoResponse_info = md_QueryAccountInfoResponse.Fields().ByName("info") -} - -var _ protoreflect.Message = (*fastReflection_QueryAccountInfoResponse)(nil) - -type fastReflection_QueryAccountInfoResponse QueryAccountInfoResponse - -func (x *QueryAccountInfoResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAccountInfoResponse)(x) -} - -func (x *QueryAccountInfoResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAccountInfoResponse_messageType fastReflection_QueryAccountInfoResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryAccountInfoResponse_messageType{} - -type fastReflection_QueryAccountInfoResponse_messageType struct{} - -func (x fastReflection_QueryAccountInfoResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAccountInfoResponse)(nil) -} -func (x fastReflection_QueryAccountInfoResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAccountInfoResponse) -} -func (x fastReflection_QueryAccountInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAccountInfoResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAccountInfoResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAccountInfoResponse -} - -// 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_QueryAccountInfoResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryAccountInfoResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAccountInfoResponse) New() protoreflect.Message { - return new(fastReflection_QueryAccountInfoResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAccountInfoResponse) Interface() protoreflect.ProtoMessage { - return (*QueryAccountInfoResponse)(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_QueryAccountInfoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Info != nil { - value := protoreflect.ValueOfMessage(x.Info.ProtoReflect()) - if !f(fd_QueryAccountInfoResponse_info, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAccountInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1.QueryAccountInfoResponse.info": - return x.Info != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.QueryAccountInfoResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1.QueryAccountInfoResponse 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_QueryAccountInfoResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1.QueryAccountInfoResponse.info": - x.Info = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.QueryAccountInfoResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1.QueryAccountInfoResponse 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_QueryAccountInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1.QueryAccountInfoResponse.info": - value := x.Info - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.QueryAccountInfoResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1.QueryAccountInfoResponse 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_QueryAccountInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1.QueryAccountInfoResponse.info": - x.Info = value.Message().Interface().(*AccountInfo) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.QueryAccountInfoResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1.QueryAccountInfoResponse 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_QueryAccountInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1.QueryAccountInfoResponse.info": - if x.Info == nil { - x.Info = new(AccountInfo) - } - return protoreflect.ValueOfMessage(x.Info.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.QueryAccountInfoResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1.QueryAccountInfoResponse 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_QueryAccountInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1.QueryAccountInfoResponse.info": - m := new(AccountInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.QueryAccountInfoResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1.QueryAccountInfoResponse 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_QueryAccountInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1.QueryAccountInfoResponse", 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_QueryAccountInfoResponse) 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_QueryAccountInfoResponse) 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_QueryAccountInfoResponse) 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_QueryAccountInfoResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAccountInfoResponse) - 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.Info != nil { - l = options.Size(x.Info) - 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().(*QueryAccountInfoResponse) - 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.Info != nil { - encoded, err := options.Marshal(x.Info) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAccountInfoResponse) - 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: QueryAccountInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountInfoResponse: 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 Info", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Info == nil { - x.Info = &AccountInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Info); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_AccountInfo protoreflect.MessageDescriptor - fd_AccountInfo_address_string protoreflect.FieldDescriptor - fd_AccountInfo_credential protoreflect.FieldDescriptor - fd_AccountInfo_account_number protoreflect.FieldDescriptor - fd_AccountInfo_sequence protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1_query_proto_init() - md_AccountInfo = File_cosmos_auth_v1_query_proto.Messages().ByName("AccountInfo") - fd_AccountInfo_address_string = md_AccountInfo.Fields().ByName("address_string") - fd_AccountInfo_credential = md_AccountInfo.Fields().ByName("credential") - fd_AccountInfo_account_number = md_AccountInfo.Fields().ByName("account_number") - fd_AccountInfo_sequence = md_AccountInfo.Fields().ByName("sequence") -} - -var _ protoreflect.Message = (*fastReflection_AccountInfo)(nil) - -type fastReflection_AccountInfo AccountInfo - -func (x *AccountInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_AccountInfo)(x) -} - -func (x *AccountInfo) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_AccountInfo_messageType fastReflection_AccountInfo_messageType -var _ protoreflect.MessageType = fastReflection_AccountInfo_messageType{} - -type fastReflection_AccountInfo_messageType struct{} - -func (x fastReflection_AccountInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_AccountInfo)(nil) -} -func (x fastReflection_AccountInfo_messageType) New() protoreflect.Message { - return new(fastReflection_AccountInfo) -} -func (x fastReflection_AccountInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_AccountInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_AccountInfo) Descriptor() protoreflect.MessageDescriptor { - return md_AccountInfo -} - -// 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_AccountInfo) Type() protoreflect.MessageType { - return _fastReflection_AccountInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_AccountInfo) New() protoreflect.Message { - return new(fastReflection_AccountInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_AccountInfo) Interface() protoreflect.ProtoMessage { - return (*AccountInfo)(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_AccountInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.AddressString != "" { - value := protoreflect.ValueOfString(x.AddressString) - if !f(fd_AccountInfo_address_string, value) { - return - } - } - if x.Credential != nil { - value := protoreflect.ValueOfMessage(x.Credential.ProtoReflect()) - if !f(fd_AccountInfo_credential, value) { - return - } - } - if x.AccountNumber != uint64(0) { - value := protoreflect.ValueOfUint64(x.AccountNumber) - if !f(fd_AccountInfo_account_number, value) { - return - } - } - if x.Sequence != uint64(0) { - value := protoreflect.ValueOfUint64(x.Sequence) - if !f(fd_AccountInfo_sequence, 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_AccountInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1.AccountInfo.address_string": - return x.AddressString != "" - case "cosmos.auth.v1.AccountInfo.credential": - return x.Credential != nil - case "cosmos.auth.v1.AccountInfo.account_number": - return x.AccountNumber != uint64(0) - case "cosmos.auth.v1.AccountInfo.sequence": - return x.Sequence != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.AccountInfo")) - } - panic(fmt.Errorf("message cosmos.auth.v1.AccountInfo 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_AccountInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1.AccountInfo.address_string": - x.AddressString = "" - case "cosmos.auth.v1.AccountInfo.credential": - x.Credential = nil - case "cosmos.auth.v1.AccountInfo.account_number": - x.AccountNumber = uint64(0) - case "cosmos.auth.v1.AccountInfo.sequence": - x.Sequence = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.AccountInfo")) - } - panic(fmt.Errorf("message cosmos.auth.v1.AccountInfo 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_AccountInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1.AccountInfo.address_string": - value := x.AddressString - return protoreflect.ValueOfString(value) - case "cosmos.auth.v1.AccountInfo.credential": - value := x.Credential - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.auth.v1.AccountInfo.account_number": - value := x.AccountNumber - return protoreflect.ValueOfUint64(value) - case "cosmos.auth.v1.AccountInfo.sequence": - value := x.Sequence - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.AccountInfo")) - } - panic(fmt.Errorf("message cosmos.auth.v1.AccountInfo 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_AccountInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1.AccountInfo.address_string": - x.AddressString = value.Interface().(string) - case "cosmos.auth.v1.AccountInfo.credential": - x.Credential = value.Message().Interface().(*anypb.Any) - case "cosmos.auth.v1.AccountInfo.account_number": - x.AccountNumber = value.Uint() - case "cosmos.auth.v1.AccountInfo.sequence": - x.Sequence = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.AccountInfo")) - } - panic(fmt.Errorf("message cosmos.auth.v1.AccountInfo 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_AccountInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1.AccountInfo.credential": - if x.Credential == nil { - x.Credential = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Credential.ProtoReflect()) - case "cosmos.auth.v1.AccountInfo.address_string": - panic(fmt.Errorf("field address_string of message cosmos.auth.v1.AccountInfo is not mutable")) - case "cosmos.auth.v1.AccountInfo.account_number": - panic(fmt.Errorf("field account_number of message cosmos.auth.v1.AccountInfo is not mutable")) - case "cosmos.auth.v1.AccountInfo.sequence": - panic(fmt.Errorf("field sequence of message cosmos.auth.v1.AccountInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.AccountInfo")) - } - panic(fmt.Errorf("message cosmos.auth.v1.AccountInfo 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_AccountInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1.AccountInfo.address_string": - return protoreflect.ValueOfString("") - case "cosmos.auth.v1.AccountInfo.credential": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.auth.v1.AccountInfo.account_number": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.auth.v1.AccountInfo.sequence": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1.AccountInfo")) - } - panic(fmt.Errorf("message cosmos.auth.v1.AccountInfo 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_AccountInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1.AccountInfo", 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_AccountInfo) 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_AccountInfo) 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_AccountInfo) 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_AccountInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*AccountInfo) - 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.AddressString) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Credential != nil { - l = options.Size(x.Credential) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.AccountNumber != 0 { - n += 1 + runtime.Sov(uint64(x.AccountNumber)) - } - if x.Sequence != 0 { - n += 1 + runtime.Sov(uint64(x.Sequence)) - } - 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().(*AccountInfo) - 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.Sequence != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) - i-- - dAtA[i] = 0x20 - } - if x.AccountNumber != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.AccountNumber)) - i-- - dAtA[i] = 0x18 - } - if x.Credential != nil { - encoded, err := options.Marshal(x.Credential) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.AddressString) > 0 { - i -= len(x.AddressString) - copy(dAtA[i:], x.AddressString) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AddressString))) - 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().(*AccountInfo) - 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: AccountInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AccountInfo: 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 AddressString", 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.AddressString = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Credential", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Credential == nil { - x.Credential = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Credential); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AccountNumber", wireType) - } - x.AccountNumber = 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.AccountNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - x.Sequence = 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.Sequence |= uint64(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, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/auth/v1/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// QueryAccountInfoRequest is the Query/AccountInfo request type. -type QueryAccountInfoRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address is the account address string. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (x *QueryAccountInfoRequest) Reset() { - *x = QueryAccountInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAccountInfoRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAccountInfoRequest) ProtoMessage() {} - -// Deprecated: Use QueryAccountInfoRequest.ProtoReflect.Descriptor instead. -func (*QueryAccountInfoRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1_query_proto_rawDescGZIP(), []int{0} -} - -func (x *QueryAccountInfoRequest) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -// QueryAccountInfoResponse is the Query/AccountInfo response type. -type QueryAccountInfoResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // info is the account info. - Info *AccountInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` -} - -func (x *QueryAccountInfoResponse) Reset() { - *x = QueryAccountInfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAccountInfoResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAccountInfoResponse) ProtoMessage() {} - -// Deprecated: Use QueryAccountInfoResponse.ProtoReflect.Descriptor instead. -func (*QueryAccountInfoResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryAccountInfoResponse) GetInfo() *AccountInfo { - if x != nil { - return x.Info - } - return nil -} - -// AccountInfo describes basic account info for all account types. -type AccountInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address is the account address string. - AddressString string `protobuf:"bytes,1,opt,name=address_string,json=addressString,proto3" json:"address_string,omitempty"` - // credential is a pubkey or other identifying credential such as an ADR 028 module account. - Credential *anypb.Any `protobuf:"bytes,2,opt,name=credential,proto3" json:"credential,omitempty"` - // account_number is the unique account number. - AccountNumber uint64 `protobuf:"varint,3,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` - // sequence is the account sequence which increments with every transaction. - Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` -} - -func (x *AccountInfo) Reset() { - *x = AccountInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AccountInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AccountInfo) ProtoMessage() {} - -// Deprecated: Use AccountInfo.ProtoReflect.Descriptor instead. -func (*AccountInfo) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1_query_proto_rawDescGZIP(), []int{2} -} - -func (x *AccountInfo) GetAddressString() string { - if x != nil { - return x.AddressString - } - return "" -} - -func (x *AccountInfo) GetCredential() *anypb.Any { - if x != nil { - return x.Credential - } - return nil -} - -func (x *AccountInfo) GetAccountNumber() uint64 { - if x != nil { - return x.AccountNumber - } - return 0 -} - -func (x *AccountInfo) GetSequence() uint64 { - if x != nil { - return x.Sequence - } - return 0 -} - -var File_cosmos_auth_v1_query_proto protoreflect.FileDescriptor - -var file_cosmos_auth_v1_query_proto_rawDesc = []byte{ - 0x0a, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, - 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x1a, 0x19, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x4d, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, - 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x22, 0x4b, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, - 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0xc7, - 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3f, - 0x0a, 0x0e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, - 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, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, - 0x34, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, - 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, - 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x32, 0x69, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x12, 0x60, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, - 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x42, 0xa2, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x26, 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, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x0e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x41, 0x75, 0x74, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x41, 0x75, 0x74, 0x68, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1a, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, - 0x41, 0x75, 0x74, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_auth_v1_query_proto_rawDescOnce sync.Once - file_cosmos_auth_v1_query_proto_rawDescData = file_cosmos_auth_v1_query_proto_rawDesc -) - -func file_cosmos_auth_v1_query_proto_rawDescGZIP() []byte { - file_cosmos_auth_v1_query_proto_rawDescOnce.Do(func() { - file_cosmos_auth_v1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_auth_v1_query_proto_rawDescData) - }) - return file_cosmos_auth_v1_query_proto_rawDescData -} - -var file_cosmos_auth_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_cosmos_auth_v1_query_proto_goTypes = []interface{}{ - (*QueryAccountInfoRequest)(nil), // 0: cosmos.auth.v1.QueryAccountInfoRequest - (*QueryAccountInfoResponse)(nil), // 1: cosmos.auth.v1.QueryAccountInfoResponse - (*AccountInfo)(nil), // 2: cosmos.auth.v1.AccountInfo - (*anypb.Any)(nil), // 3: google.protobuf.Any -} -var file_cosmos_auth_v1_query_proto_depIdxs = []int32{ - 2, // 0: cosmos.auth.v1.QueryAccountInfoResponse.info:type_name -> cosmos.auth.v1.AccountInfo - 3, // 1: cosmos.auth.v1.AccountInfo.credential:type_name -> google.protobuf.Any - 0, // 2: cosmos.auth.v1.Query.AccountInfo:input_type -> cosmos.auth.v1.QueryAccountInfoRequest - 1, // 3: cosmos.auth.v1.Query.AccountInfo:output_type -> cosmos.auth.v1.QueryAccountInfoResponse - 3, // [3:4] is the sub-list for method output_type - 2, // [2:3] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_cosmos_auth_v1_query_proto_init() } -func file_cosmos_auth_v1_query_proto_init() { - if File_cosmos_auth_v1_query_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_auth_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAccountInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_auth_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAccountInfoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_auth_v1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccountInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_auth_v1_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_auth_v1_query_proto_goTypes, - DependencyIndexes: file_cosmos_auth_v1_query_proto_depIdxs, - MessageInfos: file_cosmos_auth_v1_query_proto_msgTypes, - }.Build() - File_cosmos_auth_v1_query_proto = out.File - file_cosmos_auth_v1_query_proto_rawDesc = nil - file_cosmos_auth_v1_query_proto_goTypes = nil - file_cosmos_auth_v1_query_proto_depIdxs = nil -} diff --git a/api/cosmos/auth/v1/query_grpc.pb.go b/api/cosmos/auth/v1/query_grpc.pb.go deleted file mode 100644 index e225872132d0..000000000000 --- a/api/cosmos/auth/v1/query_grpc.pb.go +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/auth/v1/query.proto - -package authv1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type QueryClient interface { - // AccountInfo queries account info by account address. - AccountInfo(ctx context.Context, in *QueryAccountInfoRequest, opts ...grpc.CallOption) (*QueryAccountInfoResponse, error) -} - -type queryClient struct { - cc grpc.ClientConnInterface -} - -func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) AccountInfo(ctx context.Context, in *QueryAccountInfoRequest, opts ...grpc.CallOption) (*QueryAccountInfoResponse, error) { - out := new(QueryAccountInfoResponse) - err := c.cc.Invoke(ctx, "/cosmos.auth.v1.Query/AccountInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -// All implementations must embed UnimplementedQueryServer -// for forward compatibility -type QueryServer interface { - // AccountInfo queries account info by account address. - AccountInfo(context.Context, *QueryAccountInfoRequest) (*QueryAccountInfoResponse, error) - mustEmbedUnimplementedQueryServer() -} - -// UnimplementedQueryServer must be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (UnimplementedQueryServer) AccountInfo(context.Context, *QueryAccountInfoRequest) (*QueryAccountInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AccountInfo not implemented") -} -func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} - -// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to QueryServer will -// result in compilation errors. -type UnsafeQueryServer interface { - mustEmbedUnimplementedQueryServer() -} - -func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - s.RegisterService(&Query_ServiceDesc, srv) -} - -func _Query_AccountInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAccountInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).AccountInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.auth.v1.Query/AccountInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AccountInfo(ctx, req.(*QueryAccountInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Query_ServiceDesc is the grpc.ServiceDesc for Query service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.auth.v1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "AccountInfo", - Handler: _Query_AccountInfo_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/auth/v1/query.proto", -} diff --git a/api/cosmos/auth/v1beta1/query.pulsar.go b/api/cosmos/auth/v1beta1/query.pulsar.go index f182aa503401..024c1c471d52 100644 --- a/api/cosmos/auth/v1beta1/query.pulsar.go +++ b/api/cosmos/auth/v1beta1/query.pulsar.go @@ -6806,6 +6806,1456 @@ func (x *fastReflection_QueryAccountAddressByIDResponse) ProtoMethods() *protoif } } +var ( + md_QueryAccountInfoRequest protoreflect.MessageDescriptor + fd_QueryAccountInfoRequest_address protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_auth_v1beta1_query_proto_init() + md_QueryAccountInfoRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryAccountInfoRequest") + fd_QueryAccountInfoRequest_address = md_QueryAccountInfoRequest.Fields().ByName("address") +} + +var _ protoreflect.Message = (*fastReflection_QueryAccountInfoRequest)(nil) + +type fastReflection_QueryAccountInfoRequest QueryAccountInfoRequest + +func (x *QueryAccountInfoRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAccountInfoRequest)(x) +} + +func (x *QueryAccountInfoRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[16] + 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_QueryAccountInfoRequest_messageType fastReflection_QueryAccountInfoRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryAccountInfoRequest_messageType{} + +type fastReflection_QueryAccountInfoRequest_messageType struct{} + +func (x fastReflection_QueryAccountInfoRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAccountInfoRequest)(nil) +} +func (x fastReflection_QueryAccountInfoRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAccountInfoRequest) +} +func (x fastReflection_QueryAccountInfoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountInfoRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAccountInfoRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountInfoRequest +} + +// 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_QueryAccountInfoRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryAccountInfoRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAccountInfoRequest) New() protoreflect.Message { + return new(fastReflection_QueryAccountInfoRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAccountInfoRequest) Interface() protoreflect.ProtoMessage { + return (*QueryAccountInfoRequest)(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_QueryAccountInfoRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Address != "" { + value := protoreflect.ValueOfString(x.Address) + if !f(fd_QueryAccountInfoRequest_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_QueryAccountInfoRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountInfoRequest.address": + return x.Address != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountInfoRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountInfoRequest 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_QueryAccountInfoRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountInfoRequest.address": + x.Address = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountInfoRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountInfoRequest 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_QueryAccountInfoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.auth.v1beta1.QueryAccountInfoRequest.address": + value := x.Address + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountInfoRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountInfoRequest 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_QueryAccountInfoRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountInfoRequest.address": + x.Address = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountInfoRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountInfoRequest 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_QueryAccountInfoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountInfoRequest.address": + panic(fmt.Errorf("field address of message cosmos.auth.v1beta1.QueryAccountInfoRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountInfoRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountInfoRequest 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_QueryAccountInfoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountInfoRequest.address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountInfoRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountInfoRequest 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_QueryAccountInfoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryAccountInfoRequest", 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_QueryAccountInfoRequest) 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_QueryAccountInfoRequest) 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_QueryAccountInfoRequest) 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_QueryAccountInfoRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAccountInfoRequest) + 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.Address) + 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().(*QueryAccountInfoRequest) + 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.Address) > 0 { + i -= len(x.Address) + copy(dAtA[i:], x.Address) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) + 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().(*QueryAccountInfoRequest) + 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: QueryAccountInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountInfoRequest: 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 Address", 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.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryAccountInfoResponse protoreflect.MessageDescriptor + fd_QueryAccountInfoResponse_info protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_auth_v1beta1_query_proto_init() + md_QueryAccountInfoResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryAccountInfoResponse") + fd_QueryAccountInfoResponse_info = md_QueryAccountInfoResponse.Fields().ByName("info") +} + +var _ protoreflect.Message = (*fastReflection_QueryAccountInfoResponse)(nil) + +type fastReflection_QueryAccountInfoResponse QueryAccountInfoResponse + +func (x *QueryAccountInfoResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAccountInfoResponse)(x) +} + +func (x *QueryAccountInfoResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[17] + 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_QueryAccountInfoResponse_messageType fastReflection_QueryAccountInfoResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAccountInfoResponse_messageType{} + +type fastReflection_QueryAccountInfoResponse_messageType struct{} + +func (x fastReflection_QueryAccountInfoResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAccountInfoResponse)(nil) +} +func (x fastReflection_QueryAccountInfoResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAccountInfoResponse) +} +func (x fastReflection_QueryAccountInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountInfoResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAccountInfoResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountInfoResponse +} + +// 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_QueryAccountInfoResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAccountInfoResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAccountInfoResponse) New() protoreflect.Message { + return new(fastReflection_QueryAccountInfoResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAccountInfoResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAccountInfoResponse)(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_QueryAccountInfoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Info != nil { + value := protoreflect.ValueOfMessage(x.Info.ProtoReflect()) + if !f(fd_QueryAccountInfoResponse_info, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAccountInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountInfoResponse.info": + return x.Info != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountInfoResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountInfoResponse 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_QueryAccountInfoResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountInfoResponse.info": + x.Info = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountInfoResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountInfoResponse 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_QueryAccountInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.auth.v1beta1.QueryAccountInfoResponse.info": + value := x.Info + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountInfoResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountInfoResponse 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_QueryAccountInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountInfoResponse.info": + x.Info = value.Message().Interface().(*AccountInfo) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountInfoResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountInfoResponse 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_QueryAccountInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountInfoResponse.info": + if x.Info == nil { + x.Info = new(AccountInfo) + } + return protoreflect.ValueOfMessage(x.Info.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountInfoResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountInfoResponse 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_QueryAccountInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountInfoResponse.info": + m := new(AccountInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountInfoResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountInfoResponse 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_QueryAccountInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryAccountInfoResponse", 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_QueryAccountInfoResponse) 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_QueryAccountInfoResponse) 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_QueryAccountInfoResponse) 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_QueryAccountInfoResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAccountInfoResponse) + 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.Info != nil { + l = options.Size(x.Info) + 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().(*QueryAccountInfoResponse) + 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.Info != nil { + encoded, err := options.Marshal(x.Info) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAccountInfoResponse) + 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: QueryAccountInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountInfoResponse: 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 Info", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Info == nil { + x.Info = &AccountInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Info); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_AccountInfo protoreflect.MessageDescriptor + fd_AccountInfo_address protoreflect.FieldDescriptor + fd_AccountInfo_pubkey protoreflect.FieldDescriptor + fd_AccountInfo_account_number protoreflect.FieldDescriptor + fd_AccountInfo_sequence protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_auth_v1beta1_query_proto_init() + md_AccountInfo = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("AccountInfo") + fd_AccountInfo_address = md_AccountInfo.Fields().ByName("address") + fd_AccountInfo_pubkey = md_AccountInfo.Fields().ByName("pubkey") + fd_AccountInfo_account_number = md_AccountInfo.Fields().ByName("account_number") + fd_AccountInfo_sequence = md_AccountInfo.Fields().ByName("sequence") +} + +var _ protoreflect.Message = (*fastReflection_AccountInfo)(nil) + +type fastReflection_AccountInfo AccountInfo + +func (x *AccountInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_AccountInfo)(x) +} + +func (x *AccountInfo) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[18] + 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_AccountInfo_messageType fastReflection_AccountInfo_messageType +var _ protoreflect.MessageType = fastReflection_AccountInfo_messageType{} + +type fastReflection_AccountInfo_messageType struct{} + +func (x fastReflection_AccountInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_AccountInfo)(nil) +} +func (x fastReflection_AccountInfo_messageType) New() protoreflect.Message { + return new(fastReflection_AccountInfo) +} +func (x fastReflection_AccountInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AccountInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_AccountInfo) Descriptor() protoreflect.MessageDescriptor { + return md_AccountInfo +} + +// 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_AccountInfo) Type() protoreflect.MessageType { + return _fastReflection_AccountInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_AccountInfo) New() protoreflect.Message { + return new(fastReflection_AccountInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_AccountInfo) Interface() protoreflect.ProtoMessage { + return (*AccountInfo)(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_AccountInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Address != "" { + value := protoreflect.ValueOfString(x.Address) + if !f(fd_AccountInfo_address, value) { + return + } + } + if x.Pubkey != nil { + value := protoreflect.ValueOfMessage(x.Pubkey.ProtoReflect()) + if !f(fd_AccountInfo_pubkey, value) { + return + } + } + if x.AccountNumber != uint64(0) { + value := protoreflect.ValueOfUint64(x.AccountNumber) + if !f(fd_AccountInfo_account_number, value) { + return + } + } + if x.Sequence != uint64(0) { + value := protoreflect.ValueOfUint64(x.Sequence) + if !f(fd_AccountInfo_sequence, 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_AccountInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.auth.v1beta1.AccountInfo.address": + return x.Address != "" + case "cosmos.auth.v1beta1.AccountInfo.pubkey": + return x.Pubkey != nil + case "cosmos.auth.v1beta1.AccountInfo.account_number": + return x.AccountNumber != uint64(0) + case "cosmos.auth.v1beta1.AccountInfo.sequence": + return x.Sequence != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AccountInfo")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AccountInfo 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_AccountInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.AccountInfo.address": + x.Address = "" + case "cosmos.auth.v1beta1.AccountInfo.pubkey": + x.Pubkey = nil + case "cosmos.auth.v1beta1.AccountInfo.account_number": + x.AccountNumber = uint64(0) + case "cosmos.auth.v1beta1.AccountInfo.sequence": + x.Sequence = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AccountInfo")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AccountInfo 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_AccountInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.auth.v1beta1.AccountInfo.address": + value := x.Address + return protoreflect.ValueOfString(value) + case "cosmos.auth.v1beta1.AccountInfo.pubkey": + value := x.Pubkey + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.auth.v1beta1.AccountInfo.account_number": + value := x.AccountNumber + return protoreflect.ValueOfUint64(value) + case "cosmos.auth.v1beta1.AccountInfo.sequence": + value := x.Sequence + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AccountInfo")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AccountInfo 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_AccountInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.AccountInfo.address": + x.Address = value.Interface().(string) + case "cosmos.auth.v1beta1.AccountInfo.pubkey": + x.Pubkey = value.Message().Interface().(*anypb.Any) + case "cosmos.auth.v1beta1.AccountInfo.account_number": + x.AccountNumber = value.Uint() + case "cosmos.auth.v1beta1.AccountInfo.sequence": + x.Sequence = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AccountInfo")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AccountInfo 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_AccountInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.AccountInfo.pubkey": + if x.Pubkey == nil { + x.Pubkey = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.Pubkey.ProtoReflect()) + case "cosmos.auth.v1beta1.AccountInfo.address": + panic(fmt.Errorf("field address of message cosmos.auth.v1beta1.AccountInfo is not mutable")) + case "cosmos.auth.v1beta1.AccountInfo.account_number": + panic(fmt.Errorf("field account_number of message cosmos.auth.v1beta1.AccountInfo is not mutable")) + case "cosmos.auth.v1beta1.AccountInfo.sequence": + panic(fmt.Errorf("field sequence of message cosmos.auth.v1beta1.AccountInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AccountInfo")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AccountInfo 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_AccountInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.AccountInfo.address": + return protoreflect.ValueOfString("") + case "cosmos.auth.v1beta1.AccountInfo.pubkey": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.auth.v1beta1.AccountInfo.account_number": + return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.auth.v1beta1.AccountInfo.sequence": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AccountInfo")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AccountInfo 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_AccountInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.AccountInfo", 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_AccountInfo) 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_AccountInfo) 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_AccountInfo) 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_AccountInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*AccountInfo) + 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.Address) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Pubkey != nil { + l = options.Size(x.Pubkey) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.AccountNumber != 0 { + n += 1 + runtime.Sov(uint64(x.AccountNumber)) + } + if x.Sequence != 0 { + n += 1 + runtime.Sov(uint64(x.Sequence)) + } + 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().(*AccountInfo) + 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.Sequence != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) + i-- + dAtA[i] = 0x20 + } + if x.AccountNumber != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.AccountNumber)) + i-- + dAtA[i] = 0x18 + } + if x.Pubkey != nil { + encoded, err := options.Marshal(x.Pubkey) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Address) > 0 { + i -= len(x.Address) + copy(dAtA[i:], x.Address) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) + i-- + dAtA[i] = 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().(*AccountInfo) + 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: AccountInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AccountInfo: 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 Address", 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.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pubkey == nil { + x.Pubkey = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pubkey); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AccountNumber", wireType) + } + x.AccountNumber = 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.AccountNumber |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + x.Sequence = 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.Sequence |= uint64(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, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -7402,6 +8852,144 @@ func (x *QueryAccountAddressByIDResponse) GetAccountAddress() string { return "" } +// QueryAccountInfoRequest is the Query/AccountInfo request type. +type QueryAccountInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // address is the account address string. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (x *QueryAccountInfoRequest) Reset() { + *x = QueryAccountInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAccountInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAccountInfoRequest) ProtoMessage() {} + +// Deprecated: Use QueryAccountInfoRequest.ProtoReflect.Descriptor instead. +func (*QueryAccountInfoRequest) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{16} +} + +func (x *QueryAccountInfoRequest) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +// QueryAccountInfoResponse is the Query/AccountInfo response type. +type QueryAccountInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // info is the account info. + Info *AccountInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` +} + +func (x *QueryAccountInfoResponse) Reset() { + *x = QueryAccountInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAccountInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAccountInfoResponse) ProtoMessage() {} + +// Deprecated: Use QueryAccountInfoResponse.ProtoReflect.Descriptor instead. +func (*QueryAccountInfoResponse) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{17} +} + +func (x *QueryAccountInfoResponse) GetInfo() *AccountInfo { + if x != nil { + return x.Info + } + return nil +} + +// AccountInfo describes account info common to all account types. +type AccountInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // address is the account address string. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // pubkey is the pubkey of the account. + Pubkey *anypb.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,omitempty"` + // account_number is the unique account number. + AccountNumber uint64 `protobuf:"varint,3,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` + // sequence is the account sequence which increments with every transaction. + Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` +} + +func (x *AccountInfo) Reset() { + *x = AccountInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccountInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountInfo) ProtoMessage() {} + +// Deprecated: Use AccountInfo.ProtoReflect.Descriptor instead. +func (*AccountInfo) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{18} +} + +func (x *AccountInfo) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *AccountInfo) GetPubkey() *anypb.Any { + if x != nil { + return x.Pubkey + } + return nil +} + +func (x *AccountInfo) GetAccountNumber() uint64 { + if x != nil { + return x.AccountNumber + } + return 0 +} + +func (x *AccountInfo) GetSequence() uint64 { + if x != nil { + return x.Sequence + } + return 0 +} + var File_cosmos_auth_v1beta1_query_proto protoreflect.FileDescriptor var file_cosmos_auth_v1beta1_query_proto_rawDesc = []byte{ @@ -7495,101 +9083,133 @@ var file_cosmos_auth_v1beta1_query_proto_rawDesc = []byte{ 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, 0x98, 0x0a, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x8d, - 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, 0x2a, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 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, 0x94, - 0x01, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x34, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0xb5, 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, + 0x72, 0x65, 0x73, 0x73, 0x22, 0x4d, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x22, 0x50, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x34, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0xb2, 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2c, 0x0a, 0x06, 0x70, 0x75, 0x62, + 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, + 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1a, + 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x32, 0xbf, 0x0b, 0x0a, 0x05, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x12, 0x8d, 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, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, - 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x69, 0x64, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x85, 0x01, - 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x88, 0xe7, 0xb0, - 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0xa6, 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, 0x31, 0x88, 0xe7, 0xb0, - 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x8d, - 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, + 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, 0x2a, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 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, 0x94, 0x01, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x29, 0x12, 0x27, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0xb5, 0x01, 0x0a, 0x12, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, + 0x49, 0x44, 0x12, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x88, + 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x69, 0x64, 0x2f, 0x7b, + 0x69, 0x64, 0x7d, 0x12, 0x85, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x27, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x28, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0xa6, 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, 0x31, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x12, 0x8d, 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, 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, 0x28, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x12, 0xb5, - 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, + 0x69, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x88, 0xe7, 0xb0, 0x2a, + 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x65, + 0x63, 0x68, 0x33, 0x32, 0x12, 0xb5, 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, 0x38, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, + 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x2f, 0x7b, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x7d, 0x12, 0xb6, 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, 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, 0x38, 0x88, 0xe7, - 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, - 0x62, 0x79, 0x74, 0x65, 0x73, 0x7d, 0x12, 0xb6, 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, 0x39, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 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, + 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, 0x39, 0x88, 0xe7, 0xb0, 0x2a, + 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x65, + 0x63, 0x68, 0x33, 0x32, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x7d, 0x12, 0xa4, 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, + 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x38, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, + 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, + 0x66, 0x6f, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x42, 0xc5, 0x01, 0x0a, + 0x17, 0x63, 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 ( @@ -7604,7 +9224,7 @@ 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, 16) +var file_cosmos_auth_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_cosmos_auth_v1beta1_query_proto_goTypes = []interface{}{ (*QueryAccountsRequest)(nil), // 0: cosmos.auth.v1beta1.QueryAccountsRequest (*QueryAccountsResponse)(nil), // 1: cosmos.auth.v1beta1.QueryAccountsResponse @@ -7622,39 +9242,46 @@ var file_cosmos_auth_v1beta1_query_proto_goTypes = []interface{}{ (*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 + (*QueryAccountInfoRequest)(nil), // 16: cosmos.auth.v1beta1.QueryAccountInfoRequest + (*QueryAccountInfoResponse)(nil), // 17: cosmos.auth.v1beta1.QueryAccountInfoResponse + (*AccountInfo)(nil), // 18: cosmos.auth.v1beta1.AccountInfo + (*v1beta1.PageRequest)(nil), // 19: cosmos.base.query.v1beta1.PageRequest + (*anypb.Any)(nil), // 20: google.protobuf.Any + (*v1beta1.PageResponse)(nil), // 21: cosmos.base.query.v1beta1.PageResponse + (*Params)(nil), // 22: cosmos.auth.v1beta1.Params } var file_cosmos_auth_v1beta1_query_proto_depIdxs = []int32{ - 16, // 0: cosmos.auth.v1beta1.QueryAccountsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 17, // 1: cosmos.auth.v1beta1.QueryAccountsResponse.accounts:type_name -> google.protobuf.Any - 18, // 2: cosmos.auth.v1beta1.QueryAccountsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 19, // 3: cosmos.auth.v1beta1.QueryParamsResponse.params:type_name -> cosmos.auth.v1beta1.Params - 17, // 4: cosmos.auth.v1beta1.QueryAccountResponse.account:type_name -> google.protobuf.Any - 17, // 5: cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts:type_name -> google.protobuf.Any - 0, // 6: cosmos.auth.v1beta1.Query.Accounts:input_type -> cosmos.auth.v1beta1.QueryAccountsRequest - 2, // 7: cosmos.auth.v1beta1.Query.Account:input_type -> cosmos.auth.v1beta1.QueryAccountRequest - 14, // 8: cosmos.auth.v1beta1.Query.AccountAddressByID:input_type -> cosmos.auth.v1beta1.QueryAccountAddressByIDRequest - 6, // 9: cosmos.auth.v1beta1.Query.Params:input_type -> cosmos.auth.v1beta1.QueryParamsRequest - 3, // 10: cosmos.auth.v1beta1.Query.ModuleAccounts:input_type -> cosmos.auth.v1beta1.QueryModuleAccountsRequest - 8, // 11: cosmos.auth.v1beta1.Query.Bech32Prefix:input_type -> cosmos.auth.v1beta1.Bech32PrefixRequest - 10, // 12: cosmos.auth.v1beta1.Query.AddressBytesToString:input_type -> cosmos.auth.v1beta1.AddressBytesToStringRequest - 12, // 13: cosmos.auth.v1beta1.Query.AddressStringToBytes:input_type -> cosmos.auth.v1beta1.AddressStringToBytesRequest - 1, // 14: cosmos.auth.v1beta1.Query.Accounts:output_type -> cosmos.auth.v1beta1.QueryAccountsResponse - 5, // 15: cosmos.auth.v1beta1.Query.Account:output_type -> cosmos.auth.v1beta1.QueryAccountResponse - 15, // 16: cosmos.auth.v1beta1.Query.AccountAddressByID:output_type -> cosmos.auth.v1beta1.QueryAccountAddressByIDResponse - 4, // 17: cosmos.auth.v1beta1.Query.Params:output_type -> cosmos.auth.v1beta1.QueryParamsResponse - 7, // 18: cosmos.auth.v1beta1.Query.ModuleAccounts:output_type -> cosmos.auth.v1beta1.QueryModuleAccountsResponse - 9, // 19: cosmos.auth.v1beta1.Query.Bech32Prefix:output_type -> cosmos.auth.v1beta1.Bech32PrefixResponse - 11, // 20: cosmos.auth.v1beta1.Query.AddressBytesToString:output_type -> cosmos.auth.v1beta1.AddressBytesToStringResponse - 13, // 21: cosmos.auth.v1beta1.Query.AddressStringToBytes:output_type -> cosmos.auth.v1beta1.AddressStringToBytesResponse - 14, // [14:22] is the sub-list for method output_type - 6, // [6:14] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 19, // 0: cosmos.auth.v1beta1.QueryAccountsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 20, // 1: cosmos.auth.v1beta1.QueryAccountsResponse.accounts:type_name -> google.protobuf.Any + 21, // 2: cosmos.auth.v1beta1.QueryAccountsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 22, // 3: cosmos.auth.v1beta1.QueryParamsResponse.params:type_name -> cosmos.auth.v1beta1.Params + 20, // 4: cosmos.auth.v1beta1.QueryAccountResponse.account:type_name -> google.protobuf.Any + 20, // 5: cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts:type_name -> google.protobuf.Any + 18, // 6: cosmos.auth.v1beta1.QueryAccountInfoResponse.info:type_name -> cosmos.auth.v1beta1.AccountInfo + 20, // 7: cosmos.auth.v1beta1.AccountInfo.pubkey:type_name -> google.protobuf.Any + 0, // 8: cosmos.auth.v1beta1.Query.Accounts:input_type -> cosmos.auth.v1beta1.QueryAccountsRequest + 2, // 9: cosmos.auth.v1beta1.Query.Account:input_type -> cosmos.auth.v1beta1.QueryAccountRequest + 14, // 10: cosmos.auth.v1beta1.Query.AccountAddressByID:input_type -> cosmos.auth.v1beta1.QueryAccountAddressByIDRequest + 6, // 11: cosmos.auth.v1beta1.Query.Params:input_type -> cosmos.auth.v1beta1.QueryParamsRequest + 3, // 12: cosmos.auth.v1beta1.Query.ModuleAccounts:input_type -> cosmos.auth.v1beta1.QueryModuleAccountsRequest + 8, // 13: cosmos.auth.v1beta1.Query.Bech32Prefix:input_type -> cosmos.auth.v1beta1.Bech32PrefixRequest + 10, // 14: cosmos.auth.v1beta1.Query.AddressBytesToString:input_type -> cosmos.auth.v1beta1.AddressBytesToStringRequest + 12, // 15: cosmos.auth.v1beta1.Query.AddressStringToBytes:input_type -> cosmos.auth.v1beta1.AddressStringToBytesRequest + 16, // 16: cosmos.auth.v1beta1.Query.AccountInfo:input_type -> cosmos.auth.v1beta1.QueryAccountInfoRequest + 1, // 17: cosmos.auth.v1beta1.Query.Accounts:output_type -> cosmos.auth.v1beta1.QueryAccountsResponse + 5, // 18: cosmos.auth.v1beta1.Query.Account:output_type -> cosmos.auth.v1beta1.QueryAccountResponse + 15, // 19: cosmos.auth.v1beta1.Query.AccountAddressByID:output_type -> cosmos.auth.v1beta1.QueryAccountAddressByIDResponse + 4, // 20: cosmos.auth.v1beta1.Query.Params:output_type -> cosmos.auth.v1beta1.QueryParamsResponse + 7, // 21: cosmos.auth.v1beta1.Query.ModuleAccounts:output_type -> cosmos.auth.v1beta1.QueryModuleAccountsResponse + 9, // 22: cosmos.auth.v1beta1.Query.Bech32Prefix:output_type -> cosmos.auth.v1beta1.Bech32PrefixResponse + 11, // 23: cosmos.auth.v1beta1.Query.AddressBytesToString:output_type -> cosmos.auth.v1beta1.AddressBytesToStringResponse + 13, // 24: cosmos.auth.v1beta1.Query.AddressStringToBytes:output_type -> cosmos.auth.v1beta1.AddressStringToBytesResponse + 17, // 25: cosmos.auth.v1beta1.Query.AccountInfo:output_type -> cosmos.auth.v1beta1.QueryAccountInfoResponse + 17, // [17:26] is the sub-list for method output_type + 8, // [8:17] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_cosmos_auth_v1beta1_query_proto_init() } @@ -7856,6 +9483,42 @@ func file_cosmos_auth_v1beta1_query_proto_init() { return nil } } + file_cosmos_auth_v1beta1_query_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAccountInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_auth_v1beta1_query_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAccountInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_auth_v1beta1_query_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccountInfo); 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{ @@ -7863,7 +9526,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: 16, + NumMessages: 19, 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 47d5a4c3292f..1fec64848484 100644 --- a/api/cosmos/auth/v1beta1/query_grpc.pb.go +++ b/api/cosmos/auth/v1beta1/query_grpc.pb.go @@ -48,6 +48,10 @@ type QueryClient interface { // // Since: cosmos-sdk 0.46 AddressStringToBytes(ctx context.Context, in *AddressStringToBytesRequest, opts ...grpc.CallOption) (*AddressStringToBytesResponse, error) + // AccountInfo queries account info which is common to all account types. + // + // Since: cosmos-sdk 0.47 + AccountInfo(ctx context.Context, in *QueryAccountInfoRequest, opts ...grpc.CallOption) (*QueryAccountInfoResponse, error) } type queryClient struct { @@ -130,6 +134,15 @@ func (c *queryClient) AddressStringToBytes(ctx context.Context, in *AddressStrin return out, nil } +func (c *queryClient) AccountInfo(ctx context.Context, in *QueryAccountInfoRequest, opts ...grpc.CallOption) (*QueryAccountInfoResponse, error) { + out := new(QueryAccountInfoResponse) + err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/AccountInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer // for forward compatibility @@ -160,6 +173,10 @@ type QueryServer interface { // // Since: cosmos-sdk 0.46 AddressStringToBytes(context.Context, *AddressStringToBytesRequest) (*AddressStringToBytesResponse, error) + // AccountInfo queries account info which is common to all account types. + // + // Since: cosmos-sdk 0.47 + AccountInfo(context.Context, *QueryAccountInfoRequest) (*QueryAccountInfoResponse, error) mustEmbedUnimplementedQueryServer() } @@ -191,6 +208,9 @@ func (UnimplementedQueryServer) AddressBytesToString(context.Context, *AddressBy func (UnimplementedQueryServer) AddressStringToBytes(context.Context, *AddressStringToBytesRequest) (*AddressStringToBytesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddressStringToBytes not implemented") } +func (UnimplementedQueryServer) AccountInfo(context.Context, *QueryAccountInfoRequest) (*QueryAccountInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AccountInfo not implemented") +} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. @@ -348,6 +368,24 @@ func _Query_AddressStringToBytes_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } +func _Query_AccountInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAccountInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AccountInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1beta1.Query/AccountInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AccountInfo(ctx, req.(*QueryAccountInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Query_ServiceDesc is the grpc.ServiceDesc for Query service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -387,6 +425,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "AddressStringToBytes", Handler: _Query_AddressStringToBytes_Handler, }, + { + MethodName: "AccountInfo", + Handler: _Query_AccountInfo_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/auth/v1beta1/query.proto", diff --git a/proto/cosmos/auth/v1beta1/query.proto b/proto/cosmos/auth/v1beta1/query.proto index 7c771d1d6d52..7014a17cfee1 100644 --- a/proto/cosmos/auth/v1beta1/query.proto +++ b/proto/cosmos/auth/v1beta1/query.proto @@ -73,7 +73,12 @@ service Query { // AccountInfo queries account info which is common to all account types. - rpc AccountInfo(QueryAccountInfoRequest) returns (QueryAccountInfoResponse); + // + // Since: cosmos-sdk 0.47 + rpc AccountInfo(QueryAccountInfoRequest) returns (QueryAccountInfoResponse) { + option (cosmos.query.v1.deterministic) = true; + option (google.api.http).get = "/cosmos/auth/v1beta1/account_info/{address}"; + } } // QueryAccountsRequest is the request type for the Query/Accounts RPC method. @@ -198,7 +203,7 @@ message QueryAccountInfoResponse { // AccountInfo describes account info common to all account types. message AccountInfo { // address is the account address string. - string address_string = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // pubkey is the pubkey of the account. google.protobuf.Any pubkey = 2; diff --git a/x/auth/types/v1/query.pb.go b/x/auth/types/v1/query.pb.go deleted file mode 100644 index fef22fc80324..000000000000 --- a/x/auth/types/v1/query.pb.go +++ /dev/null @@ -1,905 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/auth/v1/query.proto - -package authv1 - -import ( - context "context" - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - types "github.com/cosmos/cosmos-sdk/codec/types" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// QueryAccountInfoRequest is the Query/AccountInfo request type. -type QueryAccountInfoRequest struct { - // address is the account address string. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *QueryAccountInfoRequest) Reset() { *m = QueryAccountInfoRequest{} } -func (m *QueryAccountInfoRequest) String() string { return proto.CompactTextString(m) } -func (*QueryAccountInfoRequest) ProtoMessage() {} -func (*QueryAccountInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9bc7c5ab1eea8999, []int{0} -} -func (m *QueryAccountInfoRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAccountInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAccountInfoRequest.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 *QueryAccountInfoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAccountInfoRequest.Merge(m, src) -} -func (m *QueryAccountInfoRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryAccountInfoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAccountInfoRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAccountInfoRequest proto.InternalMessageInfo - -func (m *QueryAccountInfoRequest) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -// QueryAccountInfoResponse is the Query/AccountInfo response type. -type QueryAccountInfoResponse struct { - // info is the account info. - Info *AccountInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` -} - -func (m *QueryAccountInfoResponse) Reset() { *m = QueryAccountInfoResponse{} } -func (m *QueryAccountInfoResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAccountInfoResponse) ProtoMessage() {} -func (*QueryAccountInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9bc7c5ab1eea8999, []int{1} -} -func (m *QueryAccountInfoResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAccountInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAccountInfoResponse.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 *QueryAccountInfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAccountInfoResponse.Merge(m, src) -} -func (m *QueryAccountInfoResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryAccountInfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAccountInfoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAccountInfoResponse proto.InternalMessageInfo - -func (m *QueryAccountInfoResponse) GetInfo() *AccountInfo { - if m != nil { - return m.Info - } - return nil -} - -// AccountInfo describes basic account info for all account types. -type AccountInfo struct { - // address is the account address string. - AddressString string `protobuf:"bytes,1,opt,name=address_string,json=addressString,proto3" json:"address_string,omitempty"` - // credential is a pubkey or other identifying credential such as an ADR 028 module account. - Credential *types.Any `protobuf:"bytes,2,opt,name=credential,proto3" json:"credential,omitempty"` - // account_number is the unique account number. - AccountNumber uint64 `protobuf:"varint,3,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` - // sequence is the account sequence which increments with every transaction. - Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` -} - -func (m *AccountInfo) Reset() { *m = AccountInfo{} } -func (m *AccountInfo) String() string { return proto.CompactTextString(m) } -func (*AccountInfo) ProtoMessage() {} -func (*AccountInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_9bc7c5ab1eea8999, []int{2} -} -func (m *AccountInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccountInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccountInfo.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 *AccountInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountInfo.Merge(m, src) -} -func (m *AccountInfo) XXX_Size() int { - return m.Size() -} -func (m *AccountInfo) XXX_DiscardUnknown() { - xxx_messageInfo_AccountInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_AccountInfo proto.InternalMessageInfo - -func (m *AccountInfo) GetAddressString() string { - if m != nil { - return m.AddressString - } - return "" -} - -func (m *AccountInfo) GetCredential() *types.Any { - if m != nil { - return m.Credential - } - return nil -} - -func (m *AccountInfo) GetAccountNumber() uint64 { - if m != nil { - return m.AccountNumber - } - return 0 -} - -func (m *AccountInfo) GetSequence() uint64 { - if m != nil { - return m.Sequence - } - return 0 -} - -func init() { - proto.RegisterType((*QueryAccountInfoRequest)(nil), "cosmos.auth.v1.QueryAccountInfoRequest") - proto.RegisterType((*QueryAccountInfoResponse)(nil), "cosmos.auth.v1.QueryAccountInfoResponse") - proto.RegisterType((*AccountInfo)(nil), "cosmos.auth.v1.AccountInfo") -} - -func init() { proto.RegisterFile("cosmos/auth/v1/query.proto", fileDescriptor_9bc7c5ab1eea8999) } - -var fileDescriptor_9bc7c5ab1eea8999 = []byte{ - // 374 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0xcd, 0x4e, 0xea, 0x40, - 0x18, 0xa5, 0xf7, 0x72, 0x7f, 0x1c, 0x02, 0x8b, 0x09, 0x89, 0xa5, 0x26, 0x0d, 0x21, 0x31, 0xb2, - 0x61, 0x26, 0x05, 0x77, 0x2e, 0x0c, 0xec, 0x8c, 0xc1, 0xc4, 0xba, 0x73, 0x83, 0xfd, 0x19, 0x4a, - 0x23, 0xcc, 0x40, 0x67, 0xda, 0xc8, 0x5b, 0xf8, 0x30, 0xbe, 0x83, 0x2e, 0x89, 0x2b, 0x97, 0x06, - 0x5e, 0xc4, 0x74, 0x66, 0x30, 0x45, 0x63, 0x58, 0x35, 0xe7, 0x3b, 0xa7, 0xe7, 0x3b, 0x3d, 0xfd, - 0x80, 0x15, 0x30, 0x3e, 0x63, 0x1c, 0x7b, 0xa9, 0x98, 0xe0, 0xcc, 0xc1, 0x8b, 0x94, 0x24, 0x4b, - 0x34, 0x4f, 0x98, 0x60, 0xb0, 0xa6, 0x38, 0x94, 0x73, 0x28, 0x73, 0xac, 0x86, 0xc2, 0x23, 0xc9, - 0x62, 0x4d, 0x4a, 0x60, 0x35, 0x22, 0xc6, 0xa2, 0x29, 0xc1, 0x12, 0xf9, 0xe9, 0x18, 0x7b, 0x54, - 0xbb, 0xb4, 0x86, 0xe0, 0xf0, 0x3a, 0x37, 0xed, 0x07, 0x01, 0x4b, 0xa9, 0xb8, 0xa0, 0x63, 0xe6, - 0x92, 0x45, 0x4a, 0xb8, 0x80, 0x5d, 0xf0, 0xcf, 0x0b, 0xc3, 0x84, 0x70, 0x6e, 0x1a, 0x4d, 0xa3, - 0x7d, 0x30, 0x30, 0x5f, 0x9f, 0x3a, 0x75, 0x6d, 0xdc, 0x57, 0xcc, 0x8d, 0x48, 0x62, 0x1a, 0xb9, - 0x5b, 0x61, 0xeb, 0x12, 0x98, 0xdf, 0xed, 0xf8, 0x9c, 0x51, 0x4e, 0x20, 0x06, 0xe5, 0x98, 0x8e, - 0x99, 0x34, 0xab, 0x74, 0x8f, 0xd0, 0x6e, 0x7e, 0x54, 0x7c, 0x45, 0x0a, 0x5b, 0xcf, 0x06, 0xa8, - 0x14, 0xa6, 0xf0, 0x1c, 0xd4, 0xf4, 0x9e, 0x11, 0x97, 0x7b, 0xf7, 0xe6, 0xaa, 0x7a, 0x45, 0x08, - 0x4f, 0x01, 0x08, 0x12, 0x12, 0x12, 0x2a, 0x62, 0x6f, 0x6a, 0xfe, 0x92, 0x39, 0xea, 0x48, 0x95, - 0x83, 0xb6, 0xe5, 0xa0, 0x3e, 0x5d, 0xba, 0x05, 0x1d, 0x3c, 0x06, 0x35, 0x4f, 0xa5, 0x18, 0xd1, - 0x74, 0xe6, 0x93, 0xc4, 0xfc, 0xdd, 0x34, 0xda, 0x65, 0xb7, 0xaa, 0xa7, 0x57, 0x72, 0x08, 0x2d, - 0xf0, 0x9f, 0xe7, 0xcd, 0xd1, 0x80, 0x98, 0x65, 0x29, 0xf8, 0xc4, 0xdd, 0x18, 0xfc, 0x91, 0xb5, - 0xc0, 0xbb, 0xdd, 0x2f, 0x3a, 0xf9, 0x5a, 0xc2, 0x0f, 0xff, 0xc2, 0x6a, 0xef, 0x17, 0xaa, 0x96, - 0x07, 0xc3, 0x97, 0xb5, 0x6d, 0xac, 0xd6, 0xb6, 0xf1, 0xbe, 0xb6, 0x8d, 0xc7, 0x8d, 0x5d, 0x5a, - 0x6d, 0xec, 0xd2, 0xdb, 0xc6, 0x2e, 0xdd, 0xf6, 0xa2, 0x58, 0x4c, 0x52, 0x1f, 0x05, 0x6c, 0xa6, - 0xcf, 0x43, 0x3f, 0x3a, 0x3c, 0xbc, 0xc7, 0x0f, 0xea, 0xc8, 0xc4, 0x72, 0x4e, 0x38, 0xce, 0x9c, - 0xb3, 0x1c, 0x65, 0x8e, 0xff, 0x57, 0xd6, 0xd2, 0xfb, 0x08, 0x00, 0x00, 0xff, 0xff, 0xe5, 0x71, - 0x11, 0x42, 0x8a, 0x02, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryClient interface { - // AccountInfo queries account info by account address. - AccountInfo(ctx context.Context, in *QueryAccountInfoRequest, opts ...grpc.CallOption) (*QueryAccountInfoResponse, error) -} - -type queryClient struct { - cc grpc1.ClientConn -} - -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) AccountInfo(ctx context.Context, in *QueryAccountInfoRequest, opts ...grpc.CallOption) (*QueryAccountInfoResponse, error) { - out := new(QueryAccountInfoResponse) - err := c.cc.Invoke(ctx, "/cosmos.auth.v1.Query/AccountInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -type QueryServer interface { - // AccountInfo queries account info by account address. - AccountInfo(context.Context, *QueryAccountInfoRequest) (*QueryAccountInfoResponse, error) -} - -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (*UnimplementedQueryServer) AccountInfo(ctx context.Context, req *QueryAccountInfoRequest) (*QueryAccountInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AccountInfo not implemented") -} - -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) -} - -func _Query_AccountInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAccountInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).AccountInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.auth.v1.Query/AccountInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AccountInfo(ctx, req.(*QueryAccountInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.auth.v1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "AccountInfo", - Handler: _Query_AccountInfo_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/auth/v1/query.proto", -} - -func (m *QueryAccountInfoRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAccountInfoRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAccountInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryAccountInfoResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAccountInfoResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAccountInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Info != nil { - { - size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AccountInfo) 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 *AccountInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccountInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Sequence != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Sequence)) - i-- - dAtA[i] = 0x20 - } - if m.AccountNumber != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.AccountNumber)) - i-- - dAtA[i] = 0x18 - } - if m.Credential != nil { - { - size, err := m.Credential.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.AddressString) > 0 { - i -= len(m.AddressString) - copy(dAtA[i:], m.AddressString) - i = encodeVarintQuery(dAtA, i, uint64(len(m.AddressString))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryAccountInfoRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAccountInfoResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Info != nil { - l = m.Info.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *AccountInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.AddressString) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Credential != nil { - l = m.Credential.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if m.AccountNumber != 0 { - n += 1 + sovQuery(uint64(m.AccountNumber)) - } - if m.Sequence != 0 { - n += 1 + sovQuery(uint64(m.Sequence)) - } - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *QueryAccountInfoRequest) 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: QueryAccountInfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAccountInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", 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.Address = 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 (m *QueryAccountInfoResponse) 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: QueryAccountInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAccountInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Info == nil { - m.Info = &AccountInfo{} - } - if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - 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 (m *AccountInfo) 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: AccountInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccountInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AddressString", 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.AddressString = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Credential", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Credential == nil { - m.Credential = &types.Any{} - } - if err := m.Credential.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountNumber", wireType) - } - m.AccountNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AccountNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - m.Sequence = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Sequence |= uint64(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 skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) From 6e81e26ab4c77b0cbbb015247eaf3c900fc11792 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Tue, 13 Sep 2022 17:08:21 -0400 Subject: [PATCH 10/16] WIP on API changes --- x/auth/keeper/grpc_query.go | 135 +++++++++++++++-------------------- x/auth/keeper/keeper_test.go | 3 +- 2 files changed, 61 insertions(+), 77 deletions(-) diff --git a/x/auth/keeper/grpc_query.go b/x/auth/keeper/grpc_query.go index 75fd28930512..aa24e8a0d678 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -6,33 +6,20 @@ import ( "sort" "strings" + "github.com/cosmos/cosmos-sdk/store/prefix" + "github.com/cosmos/cosmos-sdk/types/query" + "google.golang.org/grpc/codes" "google.golang.org/grpc/status" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/query" "github.com/cosmos/cosmos-sdk/x/auth/types" - authv1types "github.com/cosmos/cosmos-sdk/x/auth/types/v1" ) -var ( - _ types.QueryServer = Querier{} - _ authv1types.QueryServer = Querier{} -) - -// Querier defines a wrapper around the x/auth keeper that implements the gRPC -// query service handler interface. -type Querier struct { - AccountKeeper -} - -func NewQuerier(k AccountKeeper) Querier { - return Querier{k} -} +var _ types.QueryServer = AccountKeeper{} -func (q Querier) AccountAddressByID(c context.Context, req *types.QueryAccountAddressByIDRequest) (*types.QueryAccountAddressByIDResponse, error) { +func (ak AccountKeeper) AccountAddressByID(c context.Context, req *types.QueryAccountAddressByIDRequest) (*types.QueryAccountAddressByIDResponse, error) { if req == nil { return nil, status.Errorf(codes.InvalidArgument, "empty request") } @@ -42,7 +29,7 @@ func (q Querier) AccountAddressByID(c context.Context, req *types.QueryAccountAd } ctx := sdk.UnwrapSDKContext(c) - address := q.GetAccountAddressByID(ctx, uint64(req.GetId())) + 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) } @@ -50,18 +37,18 @@ func (q Querier) AccountAddressByID(c context.Context, req *types.QueryAccountAd return &types.QueryAccountAddressByIDResponse{AccountAddress: address}, nil } -func (q Querier) Accounts(c context.Context, req *types.QueryAccountsRequest) (*types.QueryAccountsResponse, error) { +func (ak AccountKeeper) Accounts(c context.Context, req *types.QueryAccountsRequest) (*types.QueryAccountsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } ctx := sdk.UnwrapSDKContext(c) - store := ctx.KVStore(q.storeKey) + store := ctx.KVStore(ak.storeKey) accountsStore := prefix.NewStore(store, types.AddressStoreKeyPrefix) var accounts []*codectypes.Any pageRes, err := query.Paginate(accountsStore, req.Pagination, func(key, value []byte) error { - account := q.decodeAccount(value) + account := ak.decodeAccount(value) any, err := codectypes.NewAnyWithValue(account) if err != nil { return err @@ -78,7 +65,7 @@ func (q Querier) Accounts(c context.Context, req *types.QueryAccountsRequest) (* } // Account returns account details based on address -func (q Querier) Account(c context.Context, req *types.QueryAccountRequest) (*types.QueryAccountResponse, error) { +func (ak AccountKeeper) Account(c context.Context, req *types.QueryAccountRequest) (*types.QueryAccountResponse, error) { if req == nil { return nil, status.Errorf(codes.InvalidArgument, "empty request") } @@ -92,8 +79,7 @@ func (q Querier) Account(c context.Context, req *types.QueryAccountRequest) (*ty if err != nil { return nil, err } - - account := q.GetAccount(ctx, addr) + account := ak.GetAccount(ctx, addr) if account == nil { return nil, status.Errorf(codes.NotFound, "account %s not found", req.Address) } @@ -107,19 +93,18 @@ func (q Querier) Account(c context.Context, req *types.QueryAccountRequest) (*ty } // Params returns parameters of auth module -func (q Querier) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { +func (ak AccountKeeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } - ctx := sdk.UnwrapSDKContext(c) - params := q.GetParams(ctx) + params := ak.GetParams(ctx) return &types.QueryParamsResponse{Params: params}, nil } // ModuleAccounts returns all the existing Module Accounts -func (q Querier) ModuleAccounts(c context.Context, req *types.QueryModuleAccountsRequest) (*types.QueryModuleAccountsResponse, error) { +func (ak AccountKeeper) ModuleAccounts(c context.Context, req *types.QueryModuleAccountsRequest) (*types.QueryModuleAccountsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -127,25 +112,23 @@ func (q Querier) ModuleAccounts(c context.Context, req *types.QueryModuleAccount ctx := sdk.UnwrapSDKContext(c) // For deterministic output, sort the permAddrs by module name. - sortedPermAddrs := make([]string, 0, len(q.permAddrs)) - for moduleName := range q.permAddrs { + sortedPermAddrs := make([]string, 0, len(ak.permAddrs)) + for moduleName := range ak.permAddrs { sortedPermAddrs = append(sortedPermAddrs, moduleName) } - sort.Strings(sortedPermAddrs) - modAccounts := make([]*codectypes.Any, 0, len(q.permAddrs)) + modAccounts := make([]*codectypes.Any, 0, len(ak.permAddrs)) + for _, moduleName := range sortedPermAddrs { - account := q.GetModuleAccount(ctx, moduleName) + account := ak.GetModuleAccount(ctx, moduleName) if account == nil { return nil, status.Errorf(codes.NotFound, "account %s not found", moduleName) } - any, err := codectypes.NewAnyWithValue(account) if err != nil { return nil, status.Errorf(codes.Internal, err.Error()) } - modAccounts = append(modAccounts, any) } @@ -153,8 +136,8 @@ func (q Querier) ModuleAccounts(c context.Context, req *types.QueryModuleAccount } // Bech32Prefix returns the keeper internally stored bech32 prefix. -func (q Querier) Bech32Prefix(ctx context.Context, req *types.Bech32PrefixRequest) (*types.Bech32PrefixResponse, error) { - bech32Prefix, err := q.getBech32Prefix() +func (ak AccountKeeper) Bech32Prefix(ctx context.Context, req *types.Bech32PrefixRequest) (*types.Bech32PrefixResponse, error) { + bech32Prefix, err := ak.getBech32Prefix() if err != nil { return nil, err } @@ -164,7 +147,7 @@ func (q Querier) Bech32Prefix(ctx context.Context, req *types.Bech32PrefixReques // AddressBytesToString converts an address from bytes to string, using the // keeper's bech32 prefix. -func (q Querier) AddressBytesToString(ctx context.Context, req *types.AddressBytesToStringRequest) (*types.AddressBytesToStringResponse, error) { +func (ak AccountKeeper) AddressBytesToString(ctx context.Context, req *types.AddressBytesToStringRequest) (*types.AddressBytesToStringResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -173,7 +156,7 @@ func (q Querier) AddressBytesToString(ctx context.Context, req *types.AddressByt return nil, errors.New("empty address bytes is not allowed") } - text, err := q.addressCdc.BytesToString(req.AddressBytes) + text, err := ak.addressCdc.BytesToString(req.AddressBytes) if err != nil { return nil, err } @@ -183,7 +166,7 @@ func (q Querier) AddressBytesToString(ctx context.Context, req *types.AddressByt // AddressStringToBytes converts an address from string to bytes, using the // keeper's bech32 prefix. -func (q Querier) AddressStringToBytes(ctx context.Context, req *types.AddressStringToBytesRequest) (*types.AddressStringToBytesResponse, error) { +func (ak AccountKeeper) AddressStringToBytes(ctx context.Context, req *types.AddressStringToBytesRequest) (*types.AddressStringToBytesResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -192,7 +175,7 @@ func (q Querier) AddressStringToBytes(ctx context.Context, req *types.AddressStr return nil, errors.New("empty address string is not allowed") } - bz, err := q.addressCdc.StringToBytes(req.AddressString) + bz, err := ak.addressCdc.StringToBytes(req.AddressString) if err != nil { return nil, err } @@ -200,37 +183,37 @@ func (q Querier) AddressStringToBytes(ctx context.Context, req *types.AddressStr return &types.AddressStringToBytesResponse{AddressBytes: bz}, nil } -func (q Querier) AccountInfo(goCtx context.Context, req *authv1types.QueryAccountInfoRequest) (*authv1types.QueryAccountInfoResponse, error) { - if req == nil { - return nil, status.Errorf(codes.InvalidArgument, "empty request") - } - - if req.Address == "" { - return nil, status.Error(codes.InvalidArgument, "Address cannot be empty") - } - - ctx := sdk.UnwrapSDKContext(goCtx) - addr, err := sdk.AccAddressFromBech32(req.Address) - if err != nil { - return nil, err - } - - account := q.GetAccount(ctx, addr) - if account == nil { - return nil, status.Errorf(codes.NotFound, "account %s not found", req.Address) - } - - pkAny, err := codectypes.NewAnyWithValue(account.GetPubKey()) - if err != nil { - return nil, status.Errorf(codes.Internal, err.Error()) - } - - return &authv1types.QueryAccountInfoResponse{ - Info: &authv1types.AccountInfo{ - AddressString: addr.String(), - Credential: pkAny, - AccountNumber: account.GetAccountNumber(), - Sequence: account.GetSequence(), - }, - }, nil -} +//func (ak AccountKeeper) AccountInfo(goCtx context.Context, req *types.QueryAccountInfoRequest) (*types.QueryAccountInfoResponse, error) { +// if req == nil { +// return nil, status.Errorf(codes.InvalidArgument, "empty request") +// } +// +// if req.Address == "" { +// return nil, status.Error(codes.InvalidArgument, "Address cannot be empty") +// } +// +// ctx := sdk.UnwrapSDKContext(goCtx) +// addr, err := sdk.AccAddressFromBech32(req.Address) +// if err != nil { +// return nil, err +// } +// +// account := q.GetAccount(ctx, addr) +// if account == nil { +// return nil, status.Errorf(codes.NotFound, "account %s not found", req.Address) +// } +// +// pkAny, err := codectypes.NewAnyWithValue(account.GetPubKey()) +// if err != nil { +// return nil, status.Errorf(codes.Internal, err.Error()) +// } +// +// return &authv1types.QueryAccountInfoResponse{ +// Info: &authv1types.AccountInfo{ +// AddressString: addr.String(), +// Credential: pkAny, +// AccountNumber: account.GetAccountNumber(), +// Sequence: account.GetSequence(), +// }, +// }, nil +//} diff --git a/x/auth/keeper/keeper_test.go b/x/auth/keeper/keeper_test.go index e92818b7b5d0..ff5afcb4d4fb 100644 --- a/x/auth/keeper/keeper_test.go +++ b/x/auth/keeper/keeper_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/stretchr/testify/suite" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/baseapp" @@ -64,7 +65,7 @@ func (suite *KeeperTestSuite) SetupTest() { suite.msgServer = keeper.NewMsgServerImpl(suite.accountKeeper) queryHelper := baseapp.NewQueryServerTestHelper(suite.ctx, suite.encCfg.InterfaceRegistry) - types.RegisterQueryServer(queryHelper, keeper.NewQuerier(suite.accountKeeper)) + types.RegisterQueryServer(queryHelper, suite.accountKeeper) suite.queryClient = types.NewQueryClient(queryHelper) } From d4a5f9f90634d740c2023487956e45ed13e5fe1d Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Wed, 14 Sep 2022 16:18:55 -0400 Subject: [PATCH 11/16] fix proto-gen + tests --- proto/cosmos/autocli/v1/options.proto | 2 +- scripts/protocgen.sh | 7 +- x/auth/keeper/grpc_query.go | 68 +-- x/auth/keeper/grpc_query_test.go | 24 + x/auth/module.go | 2 +- x/auth/types/query.pb.go | 823 ++++++++++++++++++++++++-- x/auth/types/query.pb.gw.go | 101 ++++ 7 files changed, 930 insertions(+), 97 deletions(-) diff --git a/proto/cosmos/autocli/v1/options.proto b/proto/cosmos/autocli/v1/options.proto index 9061d154c17a..9fb73c1aff75 100644 --- a/proto/cosmos/autocli/v1/options.proto +++ b/proto/cosmos/autocli/v1/options.proto @@ -4,7 +4,7 @@ package cosmos.autocli.v1; import "google/protobuf/descriptor.proto"; -option go_package = "github.com/cosmos/cosmos-sdk/api/cosmos/base/cli/v1;cliv1"; +option go_package = "cosmossdk.io/api/cosmos/base/cli/v1;cliv1"; // ModuleOptions describes the CLI options for a Cosmos SDK module. message ModuleOptions { diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index 067721b73aff..88453b6ffe5a 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -4,14 +4,15 @@ # docker build --pull --rm -f "contrib/devtools/Dockerfile" -t cosmossdk-proto:latest "contrib/devtools" # docker run --rm -v $(pwd):/workspace --workdir /workspace cosmossdk-proto sh ./scripts/protocgen.sh -set -eo pipefail - echo "Generating gogo proto code" cd proto proto_dirs=$(find ./cosmos -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) for dir in $proto_dirs; do for file in $(find "${dir}" -maxdepth 1 -name '*.proto'); do - if grep "option go_package.*(?!cosmos-sdk/api)" $file &> /dev/null ; then + # this regex checks if a proto file has its go_package set to cosmossdk.io/api/... + # gogo proto files SHOULD ONLY be generated if this is false + # we don't want gogo proto to run for proto files which are natively built for google.golang.org/protobuf + if grep -q "option go_package" "$file" && grep -H -o -c 'option go_package.*cosmossdk.io/api' "$file" | grep -q ':0$'; then buf generate --template buf.gen.gogo.yaml $file fi done diff --git a/x/auth/keeper/grpc_query.go b/x/auth/keeper/grpc_query.go index aa24e8a0d678..13fa7f9a219e 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -183,37 +183,37 @@ func (ak AccountKeeper) AddressStringToBytes(ctx context.Context, req *types.Add return &types.AddressStringToBytesResponse{AddressBytes: bz}, nil } -//func (ak AccountKeeper) AccountInfo(goCtx context.Context, req *types.QueryAccountInfoRequest) (*types.QueryAccountInfoResponse, error) { -// if req == nil { -// return nil, status.Errorf(codes.InvalidArgument, "empty request") -// } -// -// if req.Address == "" { -// return nil, status.Error(codes.InvalidArgument, "Address cannot be empty") -// } -// -// ctx := sdk.UnwrapSDKContext(goCtx) -// addr, err := sdk.AccAddressFromBech32(req.Address) -// if err != nil { -// return nil, err -// } -// -// account := q.GetAccount(ctx, addr) -// if account == nil { -// return nil, status.Errorf(codes.NotFound, "account %s not found", req.Address) -// } -// -// pkAny, err := codectypes.NewAnyWithValue(account.GetPubKey()) -// if err != nil { -// return nil, status.Errorf(codes.Internal, err.Error()) -// } -// -// return &authv1types.QueryAccountInfoResponse{ -// Info: &authv1types.AccountInfo{ -// AddressString: addr.String(), -// Credential: pkAny, -// AccountNumber: account.GetAccountNumber(), -// Sequence: account.GetSequence(), -// }, -// }, nil -//} +func (ak AccountKeeper) AccountInfo(goCtx context.Context, req *types.QueryAccountInfoRequest) (*types.QueryAccountInfoResponse, error) { + if req == nil { + return nil, status.Errorf(codes.InvalidArgument, "empty request") + } + + if req.Address == "" { + return nil, status.Error(codes.InvalidArgument, "Address cannot be empty") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + addr, err := sdk.AccAddressFromBech32(req.Address) + if err != nil { + return nil, err + } + + account := ak.GetAccount(ctx, addr) + if account == nil { + return nil, status.Errorf(codes.NotFound, "account %s not found", req.Address) + } + + pkAny, err := codectypes.NewAnyWithValue(account.GetPubKey()) + if err != nil { + return nil, status.Errorf(codes.Internal, err.Error()) + } + + return &types.QueryAccountInfoResponse{ + Info: &types.AccountInfo{ + Address: addr.String(), + Pubkey: pkAny, + AccountNumber: account.GetAccountNumber(), + Sequence: account.GetSequence(), + }, + }, nil +} diff --git a/x/auth/keeper/grpc_query_test.go b/x/auth/keeper/grpc_query_test.go index 8b7f69e113e5..17db3c734fbb 100644 --- a/x/auth/keeper/grpc_query_test.go +++ b/x/auth/keeper/grpc_query_test.go @@ -7,6 +7,8 @@ import ( "math" "sort" + "github.com/cosmos/gogoproto/proto" + "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -443,3 +445,25 @@ func (suite *KeeperTestSuite) TestAddressStringToBytes() { }) } } + +func (suite *KeeperTestSuite) TestQueryAccountInfo() { + _, pk, addr := testdata.KeyTestPubAddr() + acc := suite.accountKeeper.NewAccountWithAddress(suite.ctx, addr) + suite.Require().NoError(acc.SetPubKey(pk)) + suite.Require().NoError(acc.SetSequence(10)) + suite.accountKeeper.SetAccount(suite.ctx, acc) + + res, err := suite.queryClient.AccountInfo(context.Background(), &types.QueryAccountInfoRequest{ + Address: addr.String(), + }) + + suite.Require().NoError(err) + suite.Require().NotNil(res.Info) + suite.Require().Equal(addr.String(), res.Info.Address) + suite.Require().Equal(acc.GetAccountNumber(), res.Info.AccountNumber) + suite.Require().Equal(acc.GetSequence(), res.Info.Sequence) + suite.Require().Equal("/"+proto.MessageName(pk), res.Info.Pubkey.TypeUrl) + pkBz, err := proto.Marshal(pk) + suite.Require().NoError(err) + suite.Require().Equal(pkBz, res.Info.Pubkey.Value) +} diff --git a/x/auth/module.go b/x/auth/module.go index 08cdad60a69c..35edb7b20971 100644 --- a/x/auth/module.go +++ b/x/auth/module.go @@ -121,7 +121,7 @@ func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} // module-specific GRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.accountKeeper)) - types.RegisterQueryServer(cfg.QueryServer(), keeper.NewQuerier(am.accountKeeper)) + types.RegisterQueryServer(cfg.QueryServer(), am.accountKeeper) m := keeper.NewMigrator(am.accountKeeper, cfg.QueryServer(), am.legacySubspace) if err := cfg.RegisterMigration(types.ModuleName, 1, m.Migrate1to2); err != nil { diff --git a/x/auth/types/query.pb.go b/x/auth/types/query.pb.go index 6e735b791f40..757902a33516 100644 --- a/x/auth/types/query.pb.go +++ b/x/auth/types/query.pb.go @@ -755,6 +755,171 @@ func (m *QueryAccountAddressByIDResponse) GetAccountAddress() string { return "" } +// QueryAccountInfoRequest is the Query/AccountInfo request type. +type QueryAccountInfoRequest struct { + // address is the account address string. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryAccountInfoRequest) Reset() { *m = QueryAccountInfoRequest{} } +func (m *QueryAccountInfoRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAccountInfoRequest) ProtoMessage() {} +func (*QueryAccountInfoRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{16} +} +func (m *QueryAccountInfoRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAccountInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountInfoRequest.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 *QueryAccountInfoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountInfoRequest.Merge(m, src) +} +func (m *QueryAccountInfoRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAccountInfoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountInfoRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAccountInfoRequest proto.InternalMessageInfo + +func (m *QueryAccountInfoRequest) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +// QueryAccountInfoResponse is the Query/AccountInfo response type. +type QueryAccountInfoResponse struct { + // info is the account info. + Info *AccountInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` +} + +func (m *QueryAccountInfoResponse) Reset() { *m = QueryAccountInfoResponse{} } +func (m *QueryAccountInfoResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAccountInfoResponse) ProtoMessage() {} +func (*QueryAccountInfoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{17} +} +func (m *QueryAccountInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAccountInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountInfoResponse.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 *QueryAccountInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountInfoResponse.Merge(m, src) +} +func (m *QueryAccountInfoResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAccountInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountInfoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAccountInfoResponse proto.InternalMessageInfo + +func (m *QueryAccountInfoResponse) GetInfo() *AccountInfo { + if m != nil { + return m.Info + } + return nil +} + +// AccountInfo describes account info common to all account types. +type AccountInfo struct { + // address is the account address string. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // pubkey is the pubkey of the account. + Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,omitempty"` + // account_number is the unique account number. + AccountNumber uint64 `protobuf:"varint,3,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` + // sequence is the account sequence which increments with every transaction. + Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` +} + +func (m *AccountInfo) Reset() { *m = AccountInfo{} } +func (m *AccountInfo) String() string { return proto.CompactTextString(m) } +func (*AccountInfo) ProtoMessage() {} +func (*AccountInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{18} +} +func (m *AccountInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AccountInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AccountInfo.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 *AccountInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_AccountInfo.Merge(m, src) +} +func (m *AccountInfo) XXX_Size() int { + return m.Size() +} +func (m *AccountInfo) XXX_DiscardUnknown() { + xxx_messageInfo_AccountInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_AccountInfo proto.InternalMessageInfo + +func (m *AccountInfo) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *AccountInfo) GetPubkey() *types.Any { + if m != nil { + return m.Pubkey + } + return nil +} + +func (m *AccountInfo) GetAccountNumber() uint64 { + if m != nil { + return m.AccountNumber + } + return 0 +} + +func (m *AccountInfo) GetSequence() uint64 { + if m != nil { + return m.Sequence + } + return 0 +} + func init() { proto.RegisterType((*QueryAccountsRequest)(nil), "cosmos.auth.v1beta1.QueryAccountsRequest") proto.RegisterType((*QueryAccountsResponse)(nil), "cosmos.auth.v1beta1.QueryAccountsResponse") @@ -772,69 +937,79 @@ func init() { proto.RegisterType((*AddressStringToBytesResponse)(nil), "cosmos.auth.v1beta1.AddressStringToBytesResponse") proto.RegisterType((*QueryAccountAddressByIDRequest)(nil), "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest") proto.RegisterType((*QueryAccountAddressByIDResponse)(nil), "cosmos.auth.v1beta1.QueryAccountAddressByIDResponse") + proto.RegisterType((*QueryAccountInfoRequest)(nil), "cosmos.auth.v1beta1.QueryAccountInfoRequest") + proto.RegisterType((*QueryAccountInfoResponse)(nil), "cosmos.auth.v1beta1.QueryAccountInfoResponse") + proto.RegisterType((*AccountInfo)(nil), "cosmos.auth.v1beta1.AccountInfo") } func init() { proto.RegisterFile("cosmos/auth/v1beta1/query.proto", fileDescriptor_c451370b3929a27c) } var fileDescriptor_c451370b3929a27c = []byte{ - // 902 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x95, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xc7, 0xbd, 0x29, 0x24, 0xe1, 0xd5, 0x0d, 0xd2, 0xc4, 0x95, 0xc2, 0x3a, 0x5d, 0x57, 0x5b, - 0x68, 0x9c, 0x80, 0x77, 0x6b, 0xa7, 0x07, 0x0a, 0x08, 0xc9, 0x6e, 0x00, 0xf5, 0x80, 0x64, 0xb6, - 0x39, 0x71, 0xc0, 0xda, 0xf5, 0x6e, 0x37, 0x2b, 0xea, 0x1d, 0xd7, 0xb3, 0x46, 0xb5, 0x2a, 0x5f, - 0x90, 0x90, 0x7a, 0xa9, 0x84, 0x04, 0x07, 0x8e, 0x39, 0x71, 0xe6, 0x10, 0xf8, 0x1b, 0xaa, 0x9e, - 0x2a, 0xb8, 0x70, 0x42, 0x28, 0x41, 0x82, 0x3f, 0x03, 0x79, 0xe6, 0xed, 0xaf, 0x74, 0x6c, 0x6f, - 0x4e, 0xf6, 0xce, 0xbc, 0xf7, 0x7d, 0x9f, 0x79, 0x6f, 0xf6, 0xbb, 0x50, 0xeb, 0x53, 0x36, 0xa0, - 0xcc, 0xb4, 0xc7, 0xd1, 0x91, 0xf9, 0x4d, 0xd3, 0xf1, 0x22, 0xbb, 0x69, 0x3e, 0x1a, 0x7b, 0xa3, - 0x89, 0x31, 0x1c, 0xd1, 0x88, 0x92, 0x4d, 0x11, 0x60, 0xcc, 0x02, 0x0c, 0x0c, 0x50, 0xf7, 0x30, - 0xcb, 0xb1, 0x99, 0x27, 0xa2, 0x93, 0xdc, 0xa1, 0xed, 0x07, 0xa1, 0x1d, 0x05, 0x34, 0x14, 0x02, - 0x6a, 0xc5, 0xa7, 0x3e, 0xe5, 0x7f, 0xcd, 0xd9, 0x3f, 0x5c, 0x7d, 0xcb, 0xa7, 0xd4, 0x7f, 0xe8, - 0x99, 0xfc, 0xc9, 0x19, 0x3f, 0x30, 0xed, 0x10, 0x2b, 0xaa, 0xdb, 0xb8, 0x65, 0x0f, 0x03, 0xd3, - 0x0e, 0x43, 0x1a, 0x71, 0x35, 0x86, 0xbb, 0x9a, 0x0c, 0x98, 0xc3, 0xa1, 0xb0, 0xd8, 0xef, 0x89, - 0x8a, 0x08, 0x2f, 0xb6, 0xaa, 0x98, 0x1a, 0x03, 0x67, 0xcf, 0xa9, 0x7f, 0x05, 0x95, 0x2f, 0x66, - 0x8f, 0xed, 0x7e, 0x9f, 0x8e, 0xc3, 0x88, 0x59, 0xde, 0xa3, 0xb1, 0xc7, 0x22, 0xf2, 0x29, 0x40, - 0x7a, 0xa4, 0x2d, 0xe5, 0xba, 0x52, 0xbf, 0xdc, 0xba, 0x69, 0xa0, 0xee, 0xec, 0xfc, 0x86, 0x50, - 0x41, 0x14, 0xa3, 0x6b, 0xfb, 0x1e, 0xe6, 0x5a, 0x99, 0x4c, 0xfd, 0x58, 0x81, 0xab, 0xe7, 0x0a, - 0xb0, 0x21, 0x0d, 0x99, 0x47, 0x3e, 0x86, 0x75, 0x1b, 0xd7, 0xb6, 0x94, 0xeb, 0x97, 0xea, 0x97, - 0x5b, 0x15, 0x43, 0xb4, 0xc0, 0x88, 0xbb, 0x63, 0xb4, 0xc3, 0x49, 0xa7, 0xfc, 0xe2, 0xa4, 0xb1, - 0x8e, 0xd9, 0xf7, 0xac, 0x24, 0x87, 0x7c, 0x96, 0x23, 0x5c, 0xe1, 0x84, 0x3b, 0x4b, 0x09, 0x45, - 0xf1, 0x1c, 0xe2, 0x7d, 0xd8, 0xcc, 0x12, 0xc6, 0x1d, 0x68, 0xc1, 0x9a, 0xed, 0xba, 0x23, 0x8f, - 0x31, 0x7e, 0xfc, 0x37, 0x3a, 0x5b, 0xbf, 0x9f, 0x34, 0x2a, 0xa8, 0xdf, 0x16, 0x3b, 0xf7, 0xa3, - 0x51, 0x10, 0xfa, 0x56, 0x1c, 0xf8, 0xc1, 0xfa, 0xd3, 0xe3, 0x5a, 0xe9, 0xbf, 0xe3, 0x5a, 0x49, - 0xdf, 0x06, 0x95, 0x8b, 0x7e, 0x4e, 0xdd, 0xf1, 0x43, 0xef, 0x5c, 0x77, 0xf5, 0x2e, 0x96, 0xec, - 0xda, 0x23, 0x7b, 0x90, 0xb6, 0xe4, 0x0e, 0xac, 0x0e, 0xf9, 0x0a, 0x36, 0xbc, 0x6a, 0x48, 0x6e, - 0xa1, 0x21, 0x92, 0x3a, 0xaf, 0x3d, 0xff, 0xab, 0x56, 0xb2, 0x30, 0x41, 0x3f, 0xcc, 0xcf, 0x31, - 0x91, 0xfc, 0x08, 0xd6, 0xb0, 0x63, 0xa8, 0x59, 0xa4, 0xc9, 0x71, 0x8a, 0x5e, 0x01, 0x92, 0xe3, - 0x14, 0xf4, 0x7d, 0xa8, 0x4a, 0xcf, 0x86, 0x25, 0x0f, 0x0a, 0x0e, 0x96, 0xbc, 0x38, 0x69, 0x6c, - 0xe4, 0x34, 0x32, 0xe3, 0xd5, 0xaf, 0xc2, 0x66, 0xc7, 0xeb, 0x1f, 0xed, 0xb7, 0xba, 0x23, 0xef, - 0x41, 0xf0, 0x38, 0xae, 0xfd, 0x21, 0x54, 0xf2, 0xcb, 0x58, 0xf4, 0x06, 0x5c, 0x71, 0xf8, 0x7a, - 0x6f, 0xc8, 0x37, 0xc4, 0xcc, 0xac, 0xb2, 0x93, 0x09, 0xd6, 0x3b, 0x50, 0xc5, 0xc1, 0x75, 0x26, - 0x91, 0xc7, 0x0e, 0x29, 0xce, 0x0f, 0x27, 0x7e, 0x03, 0xae, 0xe0, 0x20, 0x7b, 0xce, 0x6c, 0x9f, - 0x6b, 0x94, 0xad, 0xb2, 0x9d, 0xc9, 0xd1, 0x3f, 0x81, 0x6d, 0xb9, 0x06, 0x82, 0xbc, 0x03, 0x1b, - 0xb1, 0x08, 0xe3, 0x3b, 0x48, 0x12, 0x4b, 0x8b, 0x70, 0xfd, 0x20, 0x41, 0x11, 0x0b, 0x87, 0x94, - 0xcb, 0xc5, 0x28, 0x05, 0x55, 0xee, 0x26, 0x30, 0xe7, 0x54, 0xd2, 0xae, 0x2c, 0x3f, 0xd1, 0x2d, - 0xd0, 0xb2, 0x57, 0x27, 0x39, 0xdd, 0xbd, 0x83, 0x98, 0x66, 0x03, 0x56, 0x02, 0x97, 0xe7, 0x5e, - 0xb2, 0x56, 0x02, 0x57, 0x77, 0xa1, 0x36, 0x37, 0x03, 0x2b, 0xb7, 0xe1, 0x4d, 0x1c, 0x65, 0xaf, - 0xe8, 0x5b, 0xb4, 0x61, 0xe7, 0xe4, 0x5a, 0x3f, 0x01, 0xbc, 0xce, 0xcb, 0x90, 0x67, 0x0a, 0xc4, - 0x97, 0x93, 0x91, 0x5d, 0xe9, 0x4b, 0x21, 0x33, 0x31, 0x75, 0xaf, 0x48, 0xa8, 0x00, 0xd6, 0xf7, - 0x9e, 0xfe, 0xfb, 0xcb, 0x9e, 0xf2, 0xed, 0x1f, 0xff, 0xfc, 0xb0, 0x52, 0x23, 0xd7, 0x4c, 0xa9, - 0xdd, 0xc6, 0x08, 0x3f, 0x2a, 0xb0, 0x86, 0x02, 0xa4, 0xbe, 0xb4, 0x46, 0x4c, 0xb3, 0x5b, 0x20, - 0x12, 0x61, 0x6e, 0xa7, 0x30, 0xbb, 0x64, 0x67, 0x21, 0x8c, 0xf9, 0x04, 0xfb, 0x3b, 0x25, 0xbf, - 0x2a, 0x40, 0x5e, 0x1d, 0x09, 0xd9, 0x5f, 0x5a, 0xf7, 0xd5, 0x91, 0xab, 0xb7, 0x2f, 0x96, 0x74, - 0x01, 0xee, 0xe4, 0x3e, 0xf6, 0x02, 0xd7, 0x7c, 0x12, 0xb8, 0x53, 0xf2, 0x9d, 0x02, 0xab, 0xc2, - 0x61, 0xc8, 0xce, 0xfc, 0xb2, 0x39, 0x0f, 0x52, 0xeb, 0xcb, 0x03, 0x91, 0xa9, 0x9e, 0x32, 0x5d, - 0x23, 0x55, 0x29, 0x93, 0xf0, 0x50, 0xf2, 0xb3, 0x02, 0x79, 0x3f, 0x62, 0xc4, 0x9c, 0x5f, 0x46, - 0xea, 0xec, 0xea, 0xad, 0xe2, 0x09, 0xc8, 0xd7, 0x4c, 0xf9, 0x6e, 0x92, 0xb7, 0xa5, 0x7c, 0x03, - 0x9e, 0xd9, 0x4b, 0xee, 0xdf, 0x33, 0x05, 0xca, 0x59, 0x17, 0x9c, 0x73, 0x09, 0x25, 0xfe, 0x39, - 0xe7, 0x12, 0xca, 0x2c, 0xb5, 0x48, 0xe3, 0x84, 0xbb, 0xce, 0x2e, 0x5e, 0x45, 0x66, 0x8a, 0x44, - 0xde, 0x8d, 0x05, 0x1e, 0xac, 0x36, 0x2f, 0x90, 0x81, 0x9c, 0xef, 0xa7, 0x9c, 0x0d, 0xf2, 0xee, - 0x02, 0xce, 0xe4, 0x55, 0x11, 0x66, 0x38, 0x25, 0xbf, 0xa5, 0xdc, 0x39, 0xff, 0x5c, 0xcc, 0x2d, - 0x33, 0xec, 0xc5, 0xdc, 0x52, 0x73, 0xd6, 0xef, 0xa4, 0xdc, 0x06, 0x79, 0xaf, 0x10, 0xb7, 0xf8, - 0x16, 0x4c, 0x3b, 0x77, 0x9f, 0x9f, 0x6a, 0xca, 0xcb, 0x53, 0x4d, 0xf9, 0xfb, 0x54, 0x53, 0xbe, - 0x3f, 0xd3, 0x4a, 0x2f, 0xcf, 0xb4, 0xd2, 0x9f, 0x67, 0x5a, 0xe9, 0xcb, 0x5d, 0x3f, 0x88, 0x8e, - 0xc6, 0x8e, 0xd1, 0xa7, 0x83, 0x58, 0x51, 0xfc, 0x34, 0x98, 0xfb, 0xb5, 0xf9, 0x58, 0xc8, 0x47, - 0x93, 0xa1, 0xc7, 0x9c, 0x55, 0xfe, 0x35, 0xde, 0xff, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x5f, 0xf3, - 0xd7, 0xc3, 0x0c, 0x0b, 0x00, 0x00, + // 1023 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xc7, 0xbd, 0x49, 0x48, 0xc2, 0x8b, 0x13, 0xa4, 0x89, 0x2b, 0xcc, 0x3a, 0xb5, 0xa3, 0x2d, + 0x34, 0x4e, 0x88, 0x77, 0x1b, 0x27, 0x07, 0x0a, 0x08, 0x29, 0x6e, 0x00, 0xe5, 0x50, 0x64, 0xb6, + 0x39, 0x71, 0xc0, 0xda, 0xf5, 0x6e, 0x9c, 0x55, 0xeb, 0x1d, 0xd7, 0xbb, 0x8b, 0x6a, 0x55, 0xb9, + 0x20, 0x21, 0xf5, 0x52, 0x09, 0x09, 0xfe, 0x80, 0x1c, 0x10, 0x67, 0x84, 0x02, 0x57, 0xae, 0x55, + 0x4f, 0x11, 0x5c, 0x38, 0x21, 0x94, 0x20, 0xc1, 0x9f, 0x81, 0x3c, 0xf3, 0xf6, 0x57, 0x32, 0xb6, + 0x37, 0x70, 0xb2, 0x77, 0xe6, 0xbd, 0xef, 0xfb, 0xcc, 0x7b, 0xf3, 0xe6, 0x41, 0xa5, 0x4d, 0xbd, + 0x2e, 0xf5, 0x34, 0x23, 0xf0, 0x8f, 0xb4, 0x2f, 0xb6, 0x4c, 0xdb, 0x37, 0xb6, 0xb4, 0xc7, 0x81, + 0xdd, 0x1f, 0xa8, 0xbd, 0x3e, 0xf5, 0x29, 0x59, 0xe6, 0x06, 0xea, 0xd0, 0x40, 0x45, 0x03, 0x79, + 0x03, 0xbd, 0x4c, 0xc3, 0xb3, 0xb9, 0x75, 0xe4, 0xdb, 0x33, 0x3a, 0x8e, 0x6b, 0xf8, 0x0e, 0x75, + 0xb9, 0x80, 0x5c, 0xe8, 0xd0, 0x0e, 0x65, 0x7f, 0xb5, 0xe1, 0x3f, 0x5c, 0x7d, 0xa3, 0x43, 0x69, + 0xe7, 0x91, 0xad, 0xb1, 0x2f, 0x33, 0x38, 0xd4, 0x0c, 0x17, 0x23, 0xca, 0x2b, 0xb8, 0x65, 0xf4, + 0x1c, 0xcd, 0x70, 0x5d, 0xea, 0x33, 0x35, 0x0f, 0x77, 0xcb, 0x22, 0x60, 0x06, 0x87, 0xc2, 0x7c, + 0xbf, 0xc5, 0x23, 0x22, 0x3c, 0xdf, 0x2a, 0xa1, 0x6b, 0x08, 0x9c, 0x3c, 0xa7, 0xf2, 0x39, 0x14, + 0x3e, 0x1d, 0x7e, 0xee, 0xb6, 0xdb, 0x34, 0x70, 0x7d, 0x4f, 0xb7, 0x1f, 0x07, 0xb6, 0xe7, 0x93, + 0x8f, 0x00, 0xe2, 0x23, 0x15, 0xa5, 0x55, 0xa9, 0xba, 0x50, 0xbf, 0xad, 0xa2, 0xee, 0xf0, 0xfc, + 0x2a, 0x57, 0x41, 0x14, 0xb5, 0x69, 0x74, 0x6c, 0xf4, 0xd5, 0x13, 0x9e, 0xca, 0x89, 0x04, 0x37, + 0x2e, 0x05, 0xf0, 0x7a, 0xd4, 0xf5, 0x6c, 0xf2, 0x01, 0xcc, 0x1b, 0xb8, 0x56, 0x94, 0x56, 0xa7, + 0xab, 0x0b, 0xf5, 0x82, 0xca, 0x53, 0xa0, 0x86, 0xd9, 0x51, 0x77, 0xdd, 0x41, 0x23, 0xff, 0xf2, + 0xb4, 0x36, 0x8f, 0xde, 0xfb, 0x7a, 0xe4, 0x43, 0x3e, 0x4e, 0x11, 0x4e, 0x31, 0xc2, 0xb5, 0x89, + 0x84, 0x3c, 0x78, 0x0a, 0xf1, 0x01, 0x2c, 0x27, 0x09, 0xc3, 0x0c, 0xd4, 0x61, 0xce, 0xb0, 0xac, + 0xbe, 0xed, 0x79, 0xec, 0xf8, 0xaf, 0x36, 0x8a, 0xbf, 0x9e, 0xd6, 0x0a, 0xa8, 0xbf, 0xcb, 0x77, + 0x1e, 0xf8, 0x7d, 0xc7, 0xed, 0xe8, 0xa1, 0xe1, 0xbb, 0xf3, 0xcf, 0x4e, 0x2a, 0xb9, 0x7f, 0x4e, + 0x2a, 0x39, 0x65, 0x05, 0x64, 0x26, 0x7a, 0x9f, 0x5a, 0xc1, 0x23, 0xfb, 0x52, 0x76, 0x95, 0x26, + 0x86, 0x6c, 0x1a, 0x7d, 0xa3, 0x1b, 0xa7, 0xe4, 0x2e, 0xcc, 0xf6, 0xd8, 0x0a, 0x26, 0xbc, 0xa4, + 0x0a, 0x6e, 0xa1, 0xca, 0x9d, 0x1a, 0x33, 0x2f, 0xfe, 0xa8, 0xe4, 0x74, 0x74, 0x50, 0x0e, 0xd2, + 0x75, 0x8c, 0x24, 0xdf, 0x87, 0x39, 0xcc, 0x18, 0x6a, 0x66, 0x49, 0x72, 0xe8, 0xa2, 0x14, 0x80, + 0xa4, 0x38, 0x39, 0x7d, 0x1b, 0x4a, 0xc2, 0xb3, 0x61, 0xc8, 0xbd, 0x8c, 0x85, 0x25, 0x2f, 0x4f, + 0x6b, 0x4b, 0x29, 0x8d, 0x44, 0x79, 0x95, 0x1b, 0xb0, 0xdc, 0xb0, 0xdb, 0x47, 0xdb, 0xf5, 0x66, + 0xdf, 0x3e, 0x74, 0x9e, 0x84, 0xb1, 0xdf, 0x83, 0x42, 0x7a, 0x19, 0x83, 0xde, 0x82, 0x45, 0x93, + 0xad, 0xb7, 0x7a, 0x6c, 0x83, 0xd7, 0x4c, 0xcf, 0x9b, 0x09, 0x63, 0xa5, 0x01, 0x25, 0x2c, 0x5c, + 0x63, 0xe0, 0xdb, 0xde, 0x01, 0xc5, 0xfa, 0x61, 0xc5, 0x6f, 0xc1, 0x22, 0x16, 0xb2, 0x65, 0x0e, + 0xf7, 0x99, 0x46, 0x5e, 0xcf, 0x1b, 0x09, 0x1f, 0xe5, 0x43, 0x58, 0x11, 0x6b, 0x20, 0xc8, 0x5b, + 0xb0, 0x14, 0x8a, 0x78, 0x6c, 0x07, 0x49, 0x42, 0x69, 0x6e, 0xae, 0xec, 0x45, 0x28, 0x7c, 0xe1, + 0x80, 0x32, 0xb9, 0x10, 0x25, 0xa3, 0xca, 0xbd, 0x08, 0xe6, 0x92, 0x4a, 0x9c, 0x95, 0xc9, 0x27, + 0xba, 0x03, 0xe5, 0xe4, 0xd5, 0x89, 0x4e, 0xb7, 0xbf, 0x17, 0xd2, 0x2c, 0xc1, 0x94, 0x63, 0x31, + 0xdf, 0x69, 0x7d, 0xca, 0xb1, 0x14, 0x0b, 0x2a, 0x23, 0x3d, 0x30, 0xf2, 0x2e, 0xbc, 0x86, 0xa5, + 0x6c, 0x65, 0xed, 0xa2, 0x25, 0x23, 0x25, 0xa7, 0xdc, 0x87, 0xd7, 0x93, 0x51, 0xf6, 0xdd, 0x43, + 0xfa, 0x3f, 0x7a, 0x53, 0x69, 0x42, 0xf1, 0xaa, 0x1c, 0xd2, 0xee, 0xc0, 0x8c, 0xe3, 0x1e, 0x52, + 0x6c, 0x91, 0x55, 0x61, 0xdb, 0x25, 0xfd, 0x98, 0xb5, 0xf2, 0xa3, 0x04, 0x0b, 0x89, 0xd5, 0xff, + 0x42, 0x45, 0x36, 0x61, 0xb6, 0x17, 0x98, 0x0f, 0xed, 0x01, 0xbe, 0x60, 0xc2, 0x56, 0xd1, 0xd1, + 0x86, 0x5d, 0x0b, 0xcc, 0xaa, 0x1b, 0x74, 0x4d, 0xbb, 0x5f, 0x9c, 0x5e, 0x95, 0xaa, 0x33, 0xfa, + 0x22, 0xae, 0x7e, 0xc2, 0x16, 0x89, 0x0c, 0xf3, 0xde, 0x30, 0x53, 0x6e, 0xdb, 0x2e, 0xce, 0x30, + 0x83, 0xe8, 0xbb, 0xfe, 0xcb, 0x02, 0xbc, 0xc2, 0xf2, 0x40, 0x9e, 0x4b, 0x10, 0xb6, 0xbc, 0x47, + 0xd6, 0x85, 0x67, 0x16, 0x8d, 0x06, 0x79, 0x23, 0x8b, 0x29, 0x4f, 0xac, 0xb2, 0xf1, 0xec, 0xef, + 0x1f, 0x36, 0xa4, 0x2f, 0x7f, 0xfb, 0xeb, 0x9b, 0xa9, 0x0a, 0xb9, 0xa9, 0x09, 0x87, 0x58, 0x88, + 0xf0, 0xad, 0x04, 0x73, 0x28, 0x40, 0xaa, 0x13, 0x63, 0x84, 0x34, 0xeb, 0x19, 0x2c, 0x11, 0x66, + 0x27, 0x86, 0x59, 0x27, 0x6b, 0x63, 0x61, 0xb4, 0xa7, 0x58, 0xa0, 0x63, 0xf2, 0x93, 0x04, 0xe4, + 0xea, 0x45, 0x27, 0xdb, 0x13, 0xe3, 0x5e, 0x6d, 0x24, 0x79, 0xe7, 0x7a, 0x4e, 0xd7, 0xe0, 0x8e, + 0xba, 0xbc, 0xe5, 0x58, 0xda, 0x53, 0xc7, 0x3a, 0x26, 0x5f, 0x49, 0x30, 0xcb, 0xdf, 0x6d, 0xb2, + 0x36, 0x3a, 0x6c, 0xea, 0x65, 0x97, 0xab, 0x93, 0x0d, 0x91, 0xa9, 0x1a, 0x33, 0xdd, 0x24, 0x25, + 0x21, 0x13, 0x9f, 0x4c, 0xe4, 0x7b, 0x09, 0xd2, 0xaf, 0xbc, 0x47, 0xb4, 0xd1, 0x61, 0x84, 0xf3, + 0x52, 0xbe, 0x93, 0xdd, 0x01, 0xf9, 0xb6, 0x62, 0xbe, 0xdb, 0xe4, 0x4d, 0x21, 0x5f, 0x97, 0x79, + 0xb6, 0xa2, 0xfb, 0xf7, 0x5c, 0x82, 0x7c, 0x72, 0xb6, 0x8c, 0xb8, 0x84, 0x82, 0xa9, 0x34, 0xe2, + 0x12, 0x8a, 0x06, 0x55, 0x96, 0xc4, 0xf1, 0x99, 0x35, 0xbc, 0x78, 0x05, 0xd1, 0xa8, 0x21, 0xe2, + 0x6c, 0x8c, 0x99, 0x6c, 0xf2, 0xd6, 0x35, 0x3c, 0x90, 0xf3, 0x9d, 0x98, 0xb3, 0x46, 0xde, 0x1e, + 0xc3, 0x19, 0xb5, 0x0a, 0x1f, 0x31, 0xc7, 0xe4, 0xe7, 0x98, 0x3b, 0x35, 0x95, 0xc6, 0x73, 0x8b, + 0xc6, 0xe0, 0x78, 0x6e, 0xe1, 0xc8, 0x53, 0xee, 0xc6, 0xdc, 0x2a, 0xd9, 0xcc, 0xc4, 0xcd, 0x27, + 0xec, 0x31, 0xf9, 0xee, 0xd2, 0x7b, 0xbe, 0x39, 0xb1, 0x5b, 0x13, 0x33, 0x49, 0xae, 0x65, 0xb4, + 0xce, 0x9e, 0xdf, 0xf0, 0xa9, 0x1f, 0x0e, 0x9b, 0xf8, 0x41, 0x6a, 0xdc, 0x7b, 0x71, 0x5e, 0x96, + 0xce, 0xce, 0xcb, 0xd2, 0x9f, 0xe7, 0x65, 0xe9, 0xeb, 0x8b, 0x72, 0xee, 0xec, 0xa2, 0x9c, 0xfb, + 0xfd, 0xa2, 0x9c, 0xfb, 0x6c, 0xbd, 0xe3, 0xf8, 0x47, 0x81, 0xa9, 0xb6, 0x69, 0x37, 0x14, 0xe4, + 0x3f, 0x35, 0xcf, 0x7a, 0xa8, 0x3d, 0xe1, 0xea, 0xfe, 0xa0, 0x67, 0x7b, 0xe6, 0x2c, 0x9b, 0x2f, + 0xdb, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xd0, 0xdc, 0xca, 0xb8, 0x09, 0x0d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -875,6 +1050,10 @@ type QueryClient interface { // // Since: cosmos-sdk 0.46 AddressStringToBytes(ctx context.Context, in *AddressStringToBytesRequest, opts ...grpc.CallOption) (*AddressStringToBytesResponse, error) + // AccountInfo queries account info which is common to all account types. + // + // Since: cosmos-sdk 0.47 + AccountInfo(ctx context.Context, in *QueryAccountInfoRequest, opts ...grpc.CallOption) (*QueryAccountInfoResponse, error) } type queryClient struct { @@ -957,6 +1136,15 @@ func (c *queryClient) AddressStringToBytes(ctx context.Context, in *AddressStrin return out, nil } +func (c *queryClient) AccountInfo(ctx context.Context, in *QueryAccountInfoRequest, opts ...grpc.CallOption) (*QueryAccountInfoResponse, error) { + out := new(QueryAccountInfoResponse) + err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/AccountInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Accounts returns all the existing accounts @@ -985,6 +1173,10 @@ type QueryServer interface { // // Since: cosmos-sdk 0.46 AddressStringToBytes(context.Context, *AddressStringToBytesRequest) (*AddressStringToBytesResponse, error) + // AccountInfo queries account info which is common to all account types. + // + // Since: cosmos-sdk 0.47 + AccountInfo(context.Context, *QueryAccountInfoRequest) (*QueryAccountInfoResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1015,6 +1207,9 @@ func (*UnimplementedQueryServer) AddressBytesToString(ctx context.Context, req * func (*UnimplementedQueryServer) AddressStringToBytes(ctx context.Context, req *AddressStringToBytesRequest) (*AddressStringToBytesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddressStringToBytes not implemented") } +func (*UnimplementedQueryServer) AccountInfo(ctx context.Context, req *QueryAccountInfoRequest) (*QueryAccountInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AccountInfo not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1164,6 +1359,24 @@ func _Query_AddressStringToBytes_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } +func _Query_AccountInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAccountInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AccountInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1beta1.Query/AccountInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AccountInfo(ctx, req.(*QueryAccountInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.auth.v1beta1.Query", HandlerType: (*QueryServer)(nil), @@ -1200,6 +1413,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "AddressStringToBytes", Handler: _Query_AddressStringToBytes_Handler, }, + { + MethodName: "AccountInfo", + Handler: _Query_AccountInfo_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/auth/v1beta1/query.proto", @@ -1701,6 +1918,123 @@ func (m *QueryAccountAddressByIDResponse) MarshalToSizedBuffer(dAtA []byte) (int return len(dAtA) - i, nil } +func (m *QueryAccountInfoRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAccountInfoRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAccountInfoResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAccountInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Info != nil { + { + size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AccountInfo) 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 *AccountInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AccountInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Sequence != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Sequence)) + i-- + dAtA[i] = 0x20 + } + if m.AccountNumber != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.AccountNumber)) + i-- + dAtA[i] = 0x18 + } + if m.Pubkey != nil { + { + size, err := m.Pubkey.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -1913,6 +2247,55 @@ func (m *QueryAccountAddressByIDResponse) Size() (n int) { return n } +func (m *QueryAccountInfoRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAccountInfoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Info != nil { + l = m.Info.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *AccountInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pubkey != nil { + l = m.Pubkey.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.AccountNumber != 0 { + n += 1 + sovQuery(uint64(m.AccountNumber)) + } + if m.Sequence != 0 { + n += 1 + sovQuery(uint64(m.Sequence)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -3175,6 +3558,330 @@ func (m *QueryAccountAddressByIDResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryAccountInfoRequest) 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: QueryAccountInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAccountInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", 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.Address = 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 (m *QueryAccountInfoResponse) 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: QueryAccountInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAccountInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Info == nil { + m.Info = &AccountInfo{} + } + if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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 (m *AccountInfo) 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: AccountInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccountInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", 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.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pubkey == nil { + m.Pubkey = &types.Any{} + } + if err := m.Pubkey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountNumber", wireType) + } + m.AccountNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AccountNumber |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + m.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Sequence |= uint64(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 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 e1353ae21b49..5c1ff90d4753 100644 --- a/x/auth/types/query.pb.gw.go +++ b/x/auth/types/query.pb.gw.go @@ -339,6 +339,60 @@ func local_request_Query_AddressStringToBytes_0(ctx context.Context, marshaler r } +func request_Query_AccountInfo_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAccountInfoRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := client.AccountInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AccountInfo_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAccountInfoRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := server.AccountInfo(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -529,6 +583,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_AccountInfo_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_AccountInfo_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_AccountInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -730,6 +807,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_AccountInfo_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_AccountInfo_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_AccountInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -749,6 +846,8 @@ var ( pattern_Query_AddressBytesToString_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", "bech32", "address_bytes"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_AddressStringToBytes_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", "bech32", "address_string"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AccountInfo_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", "account_info", "address"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -767,4 +866,6 @@ var ( forward_Query_AddressBytesToString_0 = runtime.ForwardResponseMessage forward_Query_AddressStringToBytes_0 = runtime.ForwardResponseMessage + + forward_Query_AccountInfo_0 = runtime.ForwardResponseMessage ) From bc2b88e2bbb15bd213db14b19f82b95d589e8367 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Wed, 14 Sep 2022 19:28:17 -0400 Subject: [PATCH 12/16] address review comments --- api/cosmos/auth/v1beta1/query.pulsar.go | 971 ++++-------------------- proto/cosmos/auth/v1beta1/query.proto | 19 +- scripts/protocgen.sh | 2 + x/auth/keeper/grpc_query.go | 4 +- x/auth/keeper/grpc_query_test.go | 4 +- x/auth/types/query.pb.go | 440 ++--------- 6 files changed, 218 insertions(+), 1222 deletions(-) diff --git a/api/cosmos/auth/v1beta1/query.pulsar.go b/api/cosmos/auth/v1beta1/query.pulsar.go index 024c1c471d52..799865e0bdfe 100644 --- a/api/cosmos/auth/v1beta1/query.pulsar.go +++ b/api/cosmos/auth/v1beta1/query.pulsar.go @@ -7383,7 +7383,7 @@ func (x *fastReflection_QueryAccountInfoResponse) Get(descriptor protoreflect.Fi func (x *fastReflection_QueryAccountInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "cosmos.auth.v1beta1.QueryAccountInfoResponse.info": - x.Info = value.Message().Interface().(*AccountInfo) + x.Info = value.Message().Interface().(*BaseAccount) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountInfoResponse")) @@ -7406,7 +7406,7 @@ func (x *fastReflection_QueryAccountInfoResponse) Mutable(fd protoreflect.FieldD switch fd.FullName() { case "cosmos.auth.v1beta1.QueryAccountInfoResponse.info": if x.Info == nil { - x.Info = new(AccountInfo) + x.Info = new(BaseAccount) } return protoreflect.ValueOfMessage(x.Info.ProtoReflect()) default: @@ -7423,7 +7423,7 @@ func (x *fastReflection_QueryAccountInfoResponse) Mutable(fd protoreflect.FieldD func (x *fastReflection_QueryAccountInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "cosmos.auth.v1beta1.QueryAccountInfoResponse.info": - m := new(AccountInfo) + m := new(BaseAccount) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { @@ -7620,7 +7620,7 @@ func (x *fastReflection_QueryAccountInfoResponse) ProtoMethods() *protoiface.Met return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.Info == nil { - x.Info = &AccountInfo{} + x.Info = &BaseAccount{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Info); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err @@ -7661,601 +7661,6 @@ func (x *fastReflection_QueryAccountInfoResponse) ProtoMethods() *protoiface.Met } } -var ( - md_AccountInfo protoreflect.MessageDescriptor - fd_AccountInfo_address protoreflect.FieldDescriptor - fd_AccountInfo_pubkey protoreflect.FieldDescriptor - fd_AccountInfo_account_number protoreflect.FieldDescriptor - fd_AccountInfo_sequence protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_AccountInfo = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("AccountInfo") - fd_AccountInfo_address = md_AccountInfo.Fields().ByName("address") - fd_AccountInfo_pubkey = md_AccountInfo.Fields().ByName("pubkey") - fd_AccountInfo_account_number = md_AccountInfo.Fields().ByName("account_number") - fd_AccountInfo_sequence = md_AccountInfo.Fields().ByName("sequence") -} - -var _ protoreflect.Message = (*fastReflection_AccountInfo)(nil) - -type fastReflection_AccountInfo AccountInfo - -func (x *AccountInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_AccountInfo)(x) -} - -func (x *AccountInfo) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[18] - 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_AccountInfo_messageType fastReflection_AccountInfo_messageType -var _ protoreflect.MessageType = fastReflection_AccountInfo_messageType{} - -type fastReflection_AccountInfo_messageType struct{} - -func (x fastReflection_AccountInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_AccountInfo)(nil) -} -func (x fastReflection_AccountInfo_messageType) New() protoreflect.Message { - return new(fastReflection_AccountInfo) -} -func (x fastReflection_AccountInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_AccountInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_AccountInfo) Descriptor() protoreflect.MessageDescriptor { - return md_AccountInfo -} - -// 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_AccountInfo) Type() protoreflect.MessageType { - return _fastReflection_AccountInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_AccountInfo) New() protoreflect.Message { - return new(fastReflection_AccountInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_AccountInfo) Interface() protoreflect.ProtoMessage { - return (*AccountInfo)(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_AccountInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_AccountInfo_address, value) { - return - } - } - if x.Pubkey != nil { - value := protoreflect.ValueOfMessage(x.Pubkey.ProtoReflect()) - if !f(fd_AccountInfo_pubkey, value) { - return - } - } - if x.AccountNumber != uint64(0) { - value := protoreflect.ValueOfUint64(x.AccountNumber) - if !f(fd_AccountInfo_account_number, value) { - return - } - } - if x.Sequence != uint64(0) { - value := protoreflect.ValueOfUint64(x.Sequence) - if !f(fd_AccountInfo_sequence, 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_AccountInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AccountInfo.address": - return x.Address != "" - case "cosmos.auth.v1beta1.AccountInfo.pubkey": - return x.Pubkey != nil - case "cosmos.auth.v1beta1.AccountInfo.account_number": - return x.AccountNumber != uint64(0) - case "cosmos.auth.v1beta1.AccountInfo.sequence": - return x.Sequence != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AccountInfo")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AccountInfo 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_AccountInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AccountInfo.address": - x.Address = "" - case "cosmos.auth.v1beta1.AccountInfo.pubkey": - x.Pubkey = nil - case "cosmos.auth.v1beta1.AccountInfo.account_number": - x.AccountNumber = uint64(0) - case "cosmos.auth.v1beta1.AccountInfo.sequence": - x.Sequence = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AccountInfo")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AccountInfo 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_AccountInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1beta1.AccountInfo.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "cosmos.auth.v1beta1.AccountInfo.pubkey": - value := x.Pubkey - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.auth.v1beta1.AccountInfo.account_number": - value := x.AccountNumber - return protoreflect.ValueOfUint64(value) - case "cosmos.auth.v1beta1.AccountInfo.sequence": - value := x.Sequence - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AccountInfo")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AccountInfo 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_AccountInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AccountInfo.address": - x.Address = value.Interface().(string) - case "cosmos.auth.v1beta1.AccountInfo.pubkey": - x.Pubkey = value.Message().Interface().(*anypb.Any) - case "cosmos.auth.v1beta1.AccountInfo.account_number": - x.AccountNumber = value.Uint() - case "cosmos.auth.v1beta1.AccountInfo.sequence": - x.Sequence = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AccountInfo")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AccountInfo 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_AccountInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AccountInfo.pubkey": - if x.Pubkey == nil { - x.Pubkey = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Pubkey.ProtoReflect()) - case "cosmos.auth.v1beta1.AccountInfo.address": - panic(fmt.Errorf("field address of message cosmos.auth.v1beta1.AccountInfo is not mutable")) - case "cosmos.auth.v1beta1.AccountInfo.account_number": - panic(fmt.Errorf("field account_number of message cosmos.auth.v1beta1.AccountInfo is not mutable")) - case "cosmos.auth.v1beta1.AccountInfo.sequence": - panic(fmt.Errorf("field sequence of message cosmos.auth.v1beta1.AccountInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AccountInfo")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AccountInfo 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_AccountInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AccountInfo.address": - return protoreflect.ValueOfString("") - case "cosmos.auth.v1beta1.AccountInfo.pubkey": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.auth.v1beta1.AccountInfo.account_number": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.auth.v1beta1.AccountInfo.sequence": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AccountInfo")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AccountInfo 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_AccountInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.AccountInfo", 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_AccountInfo) 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_AccountInfo) 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_AccountInfo) 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_AccountInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*AccountInfo) - 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.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Pubkey != nil { - l = options.Size(x.Pubkey) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.AccountNumber != 0 { - n += 1 + runtime.Sov(uint64(x.AccountNumber)) - } - if x.Sequence != 0 { - n += 1 + runtime.Sov(uint64(x.Sequence)) - } - 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().(*AccountInfo) - 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.Sequence != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) - i-- - dAtA[i] = 0x20 - } - if x.AccountNumber != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.AccountNumber)) - i-- - dAtA[i] = 0x18 - } - if x.Pubkey != nil { - encoded, err := options.Marshal(x.Pubkey) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 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().(*AccountInfo) - 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: AccountInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AccountInfo: 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 Address", 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.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Pubkey == nil { - x.Pubkey = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pubkey); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AccountNumber", wireType) - } - x.AccountNumber = 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.AccountNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - x.Sequence = 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.Sequence |= uint64(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, - } -} - // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -8895,8 +8300,8 @@ type QueryAccountInfoResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // info is the account info. - Info *AccountInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` + // info is the account info which is represented by BaseAccount. + Info *BaseAccount `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` } func (x *QueryAccountInfoResponse) Reset() { @@ -8919,77 +8324,13 @@ func (*QueryAccountInfoResponse) Descriptor() ([]byte, []int) { return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{17} } -func (x *QueryAccountInfoResponse) GetInfo() *AccountInfo { +func (x *QueryAccountInfoResponse) GetInfo() *BaseAccount { if x != nil { return x.Info } return nil } -// AccountInfo describes account info common to all account types. -type AccountInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address is the account address string. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // pubkey is the pubkey of the account. - Pubkey *anypb.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,omitempty"` - // account_number is the unique account number. - AccountNumber uint64 `protobuf:"varint,3,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` - // sequence is the account sequence which increments with every transaction. - Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` -} - -func (x *AccountInfo) Reset() { - *x = AccountInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AccountInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AccountInfo) ProtoMessage() {} - -// Deprecated: Use AccountInfo.ProtoReflect.Descriptor instead. -func (*AccountInfo) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{18} -} - -func (x *AccountInfo) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *AccountInfo) GetPubkey() *anypb.Any { - if x != nil { - return x.Pubkey - } - return nil -} - -func (x *AccountInfo) GetAccountNumber() uint64 { - if x != nil { - return x.AccountNumber - } - return 0 -} - -func (x *AccountInfo) GetSequence() uint64 { - if x != nil { - return x.Sequence - } - return 0 -} - var File_cosmos_auth_v1beta1_query_proto protoreflect.FileDescriptor var file_cosmos_auth_v1beta1_query_proto_rawDesc = []byte{ @@ -9092,124 +8433,113 @@ var file_cosmos_auth_v1beta1_query_proto_rawDesc = []byte{ 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0xb2, 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2c, 0x0a, 0x06, 0x70, 0x75, 0x62, - 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, - 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1a, - 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x32, 0xbf, 0x0b, 0x0a, 0x05, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x12, 0x8d, 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, + 0x74, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x32, 0xbf, 0x0b, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, + 0x8d, 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, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 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, 0x94, 0x01, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x29, 0x12, 0x27, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0xb5, 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, + 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, 0x2a, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 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, + 0x94, 0x01, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x34, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0xb5, 0x01, 0x0a, 0x12, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x12, 0x33, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x88, - 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x63, 0x6f, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, + 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x69, 0x64, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x85, + 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x88, 0xe7, + 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0xa6, 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, 0x31, 0x88, 0xe7, + 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, + 0x8d, 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, 0x28, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x12, + 0xb5, 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, 0x38, 0x88, + 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x69, 0x64, 0x2f, 0x7b, - 0x69, 0x64, 0x7d, 0x12, 0x85, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x27, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x28, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0xa6, 0x01, 0x0a, 0x0e, - 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x2f, + 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x7d, 0x12, 0xb6, 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, 0x39, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x2f, + 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x7d, + 0x12, 0xa4, 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 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, 0x31, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x73, 0x12, 0x8d, 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, 0x28, 0x88, 0xe7, 0xb0, 0x2a, - 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x65, - 0x63, 0x68, 0x33, 0x32, 0x12, 0xb5, 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, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x88, + 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x7b, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x42, 0xc5, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 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, 0x38, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, - 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x2f, 0x7b, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x7d, 0x12, 0xb6, 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, 0x39, 0x88, 0xe7, 0xb0, 0x2a, - 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x65, - 0x63, 0x68, 0x33, 0x32, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x7d, 0x12, 0xa4, 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x38, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, - 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, - 0x66, 0x6f, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x42, 0xc5, 0x01, 0x0a, - 0x17, 0x63, 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, + 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 ( @@ -9224,7 +8554,7 @@ 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, 19) +var file_cosmos_auth_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 18) var file_cosmos_auth_v1beta1_query_proto_goTypes = []interface{}{ (*QueryAccountsRequest)(nil), // 0: cosmos.auth.v1beta1.QueryAccountsRequest (*QueryAccountsResponse)(nil), // 1: cosmos.auth.v1beta1.QueryAccountsResponse @@ -9244,44 +8574,43 @@ var file_cosmos_auth_v1beta1_query_proto_goTypes = []interface{}{ (*QueryAccountAddressByIDResponse)(nil), // 15: cosmos.auth.v1beta1.QueryAccountAddressByIDResponse (*QueryAccountInfoRequest)(nil), // 16: cosmos.auth.v1beta1.QueryAccountInfoRequest (*QueryAccountInfoResponse)(nil), // 17: cosmos.auth.v1beta1.QueryAccountInfoResponse - (*AccountInfo)(nil), // 18: cosmos.auth.v1beta1.AccountInfo - (*v1beta1.PageRequest)(nil), // 19: cosmos.base.query.v1beta1.PageRequest - (*anypb.Any)(nil), // 20: google.protobuf.Any - (*v1beta1.PageResponse)(nil), // 21: cosmos.base.query.v1beta1.PageResponse - (*Params)(nil), // 22: cosmos.auth.v1beta1.Params + (*v1beta1.PageRequest)(nil), // 18: cosmos.base.query.v1beta1.PageRequest + (*anypb.Any)(nil), // 19: google.protobuf.Any + (*v1beta1.PageResponse)(nil), // 20: cosmos.base.query.v1beta1.PageResponse + (*Params)(nil), // 21: cosmos.auth.v1beta1.Params + (*BaseAccount)(nil), // 22: cosmos.auth.v1beta1.BaseAccount } var file_cosmos_auth_v1beta1_query_proto_depIdxs = []int32{ - 19, // 0: cosmos.auth.v1beta1.QueryAccountsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 20, // 1: cosmos.auth.v1beta1.QueryAccountsResponse.accounts:type_name -> google.protobuf.Any - 21, // 2: cosmos.auth.v1beta1.QueryAccountsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 22, // 3: cosmos.auth.v1beta1.QueryParamsResponse.params:type_name -> cosmos.auth.v1beta1.Params - 20, // 4: cosmos.auth.v1beta1.QueryAccountResponse.account:type_name -> google.protobuf.Any - 20, // 5: cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts:type_name -> google.protobuf.Any - 18, // 6: cosmos.auth.v1beta1.QueryAccountInfoResponse.info:type_name -> cosmos.auth.v1beta1.AccountInfo - 20, // 7: cosmos.auth.v1beta1.AccountInfo.pubkey:type_name -> google.protobuf.Any - 0, // 8: cosmos.auth.v1beta1.Query.Accounts:input_type -> cosmos.auth.v1beta1.QueryAccountsRequest - 2, // 9: cosmos.auth.v1beta1.Query.Account:input_type -> cosmos.auth.v1beta1.QueryAccountRequest - 14, // 10: cosmos.auth.v1beta1.Query.AccountAddressByID:input_type -> cosmos.auth.v1beta1.QueryAccountAddressByIDRequest - 6, // 11: cosmos.auth.v1beta1.Query.Params:input_type -> cosmos.auth.v1beta1.QueryParamsRequest - 3, // 12: cosmos.auth.v1beta1.Query.ModuleAccounts:input_type -> cosmos.auth.v1beta1.QueryModuleAccountsRequest - 8, // 13: cosmos.auth.v1beta1.Query.Bech32Prefix:input_type -> cosmos.auth.v1beta1.Bech32PrefixRequest - 10, // 14: cosmos.auth.v1beta1.Query.AddressBytesToString:input_type -> cosmos.auth.v1beta1.AddressBytesToStringRequest - 12, // 15: cosmos.auth.v1beta1.Query.AddressStringToBytes:input_type -> cosmos.auth.v1beta1.AddressStringToBytesRequest - 16, // 16: cosmos.auth.v1beta1.Query.AccountInfo:input_type -> cosmos.auth.v1beta1.QueryAccountInfoRequest - 1, // 17: cosmos.auth.v1beta1.Query.Accounts:output_type -> cosmos.auth.v1beta1.QueryAccountsResponse - 5, // 18: cosmos.auth.v1beta1.Query.Account:output_type -> cosmos.auth.v1beta1.QueryAccountResponse - 15, // 19: cosmos.auth.v1beta1.Query.AccountAddressByID:output_type -> cosmos.auth.v1beta1.QueryAccountAddressByIDResponse - 4, // 20: cosmos.auth.v1beta1.Query.Params:output_type -> cosmos.auth.v1beta1.QueryParamsResponse - 7, // 21: cosmos.auth.v1beta1.Query.ModuleAccounts:output_type -> cosmos.auth.v1beta1.QueryModuleAccountsResponse - 9, // 22: cosmos.auth.v1beta1.Query.Bech32Prefix:output_type -> cosmos.auth.v1beta1.Bech32PrefixResponse - 11, // 23: cosmos.auth.v1beta1.Query.AddressBytesToString:output_type -> cosmos.auth.v1beta1.AddressBytesToStringResponse - 13, // 24: cosmos.auth.v1beta1.Query.AddressStringToBytes:output_type -> cosmos.auth.v1beta1.AddressStringToBytesResponse - 17, // 25: cosmos.auth.v1beta1.Query.AccountInfo:output_type -> cosmos.auth.v1beta1.QueryAccountInfoResponse - 17, // [17:26] is the sub-list for method output_type - 8, // [8:17] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 18, // 0: cosmos.auth.v1beta1.QueryAccountsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 19, // 1: cosmos.auth.v1beta1.QueryAccountsResponse.accounts:type_name -> google.protobuf.Any + 20, // 2: cosmos.auth.v1beta1.QueryAccountsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 21, // 3: cosmos.auth.v1beta1.QueryParamsResponse.params:type_name -> cosmos.auth.v1beta1.Params + 19, // 4: cosmos.auth.v1beta1.QueryAccountResponse.account:type_name -> google.protobuf.Any + 19, // 5: cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts:type_name -> google.protobuf.Any + 22, // 6: cosmos.auth.v1beta1.QueryAccountInfoResponse.info:type_name -> cosmos.auth.v1beta1.BaseAccount + 0, // 7: cosmos.auth.v1beta1.Query.Accounts:input_type -> cosmos.auth.v1beta1.QueryAccountsRequest + 2, // 8: cosmos.auth.v1beta1.Query.Account:input_type -> cosmos.auth.v1beta1.QueryAccountRequest + 14, // 9: cosmos.auth.v1beta1.Query.AccountAddressByID:input_type -> cosmos.auth.v1beta1.QueryAccountAddressByIDRequest + 6, // 10: cosmos.auth.v1beta1.Query.Params:input_type -> cosmos.auth.v1beta1.QueryParamsRequest + 3, // 11: cosmos.auth.v1beta1.Query.ModuleAccounts:input_type -> cosmos.auth.v1beta1.QueryModuleAccountsRequest + 8, // 12: cosmos.auth.v1beta1.Query.Bech32Prefix:input_type -> cosmos.auth.v1beta1.Bech32PrefixRequest + 10, // 13: cosmos.auth.v1beta1.Query.AddressBytesToString:input_type -> cosmos.auth.v1beta1.AddressBytesToStringRequest + 12, // 14: cosmos.auth.v1beta1.Query.AddressStringToBytes:input_type -> cosmos.auth.v1beta1.AddressStringToBytesRequest + 16, // 15: cosmos.auth.v1beta1.Query.AccountInfo:input_type -> cosmos.auth.v1beta1.QueryAccountInfoRequest + 1, // 16: cosmos.auth.v1beta1.Query.Accounts:output_type -> cosmos.auth.v1beta1.QueryAccountsResponse + 5, // 17: cosmos.auth.v1beta1.Query.Account:output_type -> cosmos.auth.v1beta1.QueryAccountResponse + 15, // 18: cosmos.auth.v1beta1.Query.AccountAddressByID:output_type -> cosmos.auth.v1beta1.QueryAccountAddressByIDResponse + 4, // 19: cosmos.auth.v1beta1.Query.Params:output_type -> cosmos.auth.v1beta1.QueryParamsResponse + 7, // 20: cosmos.auth.v1beta1.Query.ModuleAccounts:output_type -> cosmos.auth.v1beta1.QueryModuleAccountsResponse + 9, // 21: cosmos.auth.v1beta1.Query.Bech32Prefix:output_type -> cosmos.auth.v1beta1.Bech32PrefixResponse + 11, // 22: cosmos.auth.v1beta1.Query.AddressBytesToString:output_type -> cosmos.auth.v1beta1.AddressBytesToStringResponse + 13, // 23: cosmos.auth.v1beta1.Query.AddressStringToBytes:output_type -> cosmos.auth.v1beta1.AddressStringToBytesResponse + 17, // 24: cosmos.auth.v1beta1.Query.AccountInfo:output_type -> cosmos.auth.v1beta1.QueryAccountInfoResponse + 16, // [16:25] is the sub-list for method output_type + 7, // [7:16] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_cosmos_auth_v1beta1_query_proto_init() } @@ -9507,18 +8836,6 @@ func file_cosmos_auth_v1beta1_query_proto_init() { return nil } } - file_cosmos_auth_v1beta1_query_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccountInfo); 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{ @@ -9526,7 +8843,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: 19, + NumMessages: 18, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/cosmos/auth/v1beta1/query.proto b/proto/cosmos/auth/v1beta1/query.proto index 7014a17cfee1..f789212af46b 100644 --- a/proto/cosmos/auth/v1beta1/query.proto +++ b/proto/cosmos/auth/v1beta1/query.proto @@ -196,21 +196,6 @@ message QueryAccountInfoRequest { // QueryAccountInfoResponse is the Query/AccountInfo response type. message QueryAccountInfoResponse { - // info is the account info. - AccountInfo info = 1; -} - -// AccountInfo describes account info common to all account types. -message AccountInfo { - // address is the account address string. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pubkey is the pubkey of the account. - google.protobuf.Any pubkey = 2; - - // account_number is the unique account number. - uint64 account_number = 3; - - // sequence is the account sequence which increments with every transaction. - uint64 sequence = 4; + // info is the account info which is represented by BaseAccount. + BaseAccount info = 1; } diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index 88453b6ffe5a..6d3f8950857c 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -4,6 +4,8 @@ # docker build --pull --rm -f "contrib/devtools/Dockerfile" -t cosmossdk-proto:latest "contrib/devtools" # docker run --rm -v $(pwd):/workspace --workdir /workspace cosmossdk-proto sh ./scripts/protocgen.sh +set -e + echo "Generating gogo proto code" cd proto proto_dirs=$(find ./cosmos -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) diff --git a/x/auth/keeper/grpc_query.go b/x/auth/keeper/grpc_query.go index 13fa7f9a219e..874f798ff88c 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -209,9 +209,9 @@ func (ak AccountKeeper) AccountInfo(goCtx context.Context, req *types.QueryAccou } return &types.QueryAccountInfoResponse{ - Info: &types.AccountInfo{ + Info: &types.BaseAccount{ Address: addr.String(), - Pubkey: pkAny, + PubKey: pkAny, AccountNumber: account.GetAccountNumber(), Sequence: account.GetSequence(), }, diff --git a/x/auth/keeper/grpc_query_test.go b/x/auth/keeper/grpc_query_test.go index 17db3c734fbb..86bec2e27ef6 100644 --- a/x/auth/keeper/grpc_query_test.go +++ b/x/auth/keeper/grpc_query_test.go @@ -462,8 +462,8 @@ func (suite *KeeperTestSuite) TestQueryAccountInfo() { suite.Require().Equal(addr.String(), res.Info.Address) suite.Require().Equal(acc.GetAccountNumber(), res.Info.AccountNumber) suite.Require().Equal(acc.GetSequence(), res.Info.Sequence) - suite.Require().Equal("/"+proto.MessageName(pk), res.Info.Pubkey.TypeUrl) + suite.Require().Equal("/"+proto.MessageName(pk), res.Info.PubKey.TypeUrl) pkBz, err := proto.Marshal(pk) suite.Require().NoError(err) - suite.Require().Equal(pkBz, res.Info.Pubkey.Value) + suite.Require().Equal(pkBz, res.Info.PubKey.Value) } diff --git a/x/auth/types/query.pb.go b/x/auth/types/query.pb.go index 757902a33516..f796b8e6670b 100644 --- a/x/auth/types/query.pb.go +++ b/x/auth/types/query.pb.go @@ -803,8 +803,8 @@ func (m *QueryAccountInfoRequest) GetAddress() string { // QueryAccountInfoResponse is the Query/AccountInfo response type. type QueryAccountInfoResponse struct { - // info is the account info. - Info *AccountInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` + // info is the account info which is represented by BaseAccount. + Info *BaseAccount `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` } func (m *QueryAccountInfoResponse) Reset() { *m = QueryAccountInfoResponse{} } @@ -840,86 +840,13 @@ func (m *QueryAccountInfoResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryAccountInfoResponse proto.InternalMessageInfo -func (m *QueryAccountInfoResponse) GetInfo() *AccountInfo { +func (m *QueryAccountInfoResponse) GetInfo() *BaseAccount { if m != nil { return m.Info } return nil } -// AccountInfo describes account info common to all account types. -type AccountInfo struct { - // address is the account address string. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // pubkey is the pubkey of the account. - Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,omitempty"` - // account_number is the unique account number. - AccountNumber uint64 `protobuf:"varint,3,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` - // sequence is the account sequence which increments with every transaction. - Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` -} - -func (m *AccountInfo) Reset() { *m = AccountInfo{} } -func (m *AccountInfo) String() string { return proto.CompactTextString(m) } -func (*AccountInfo) ProtoMessage() {} -func (*AccountInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{18} -} -func (m *AccountInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AccountInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccountInfo.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 *AccountInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountInfo.Merge(m, src) -} -func (m *AccountInfo) XXX_Size() int { - return m.Size() -} -func (m *AccountInfo) XXX_DiscardUnknown() { - xxx_messageInfo_AccountInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_AccountInfo proto.InternalMessageInfo - -func (m *AccountInfo) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *AccountInfo) GetPubkey() *types.Any { - if m != nil { - return m.Pubkey - } - return nil -} - -func (m *AccountInfo) GetAccountNumber() uint64 { - if m != nil { - return m.AccountNumber - } - return 0 -} - -func (m *AccountInfo) GetSequence() uint64 { - if m != nil { - return m.Sequence - } - return 0 -} - func init() { proto.RegisterType((*QueryAccountsRequest)(nil), "cosmos.auth.v1beta1.QueryAccountsRequest") proto.RegisterType((*QueryAccountsResponse)(nil), "cosmos.auth.v1beta1.QueryAccountsResponse") @@ -939,77 +866,73 @@ func init() { proto.RegisterType((*QueryAccountAddressByIDResponse)(nil), "cosmos.auth.v1beta1.QueryAccountAddressByIDResponse") proto.RegisterType((*QueryAccountInfoRequest)(nil), "cosmos.auth.v1beta1.QueryAccountInfoRequest") proto.RegisterType((*QueryAccountInfoResponse)(nil), "cosmos.auth.v1beta1.QueryAccountInfoResponse") - proto.RegisterType((*AccountInfo)(nil), "cosmos.auth.v1beta1.AccountInfo") } func init() { proto.RegisterFile("cosmos/auth/v1beta1/query.proto", fileDescriptor_c451370b3929a27c) } var fileDescriptor_c451370b3929a27c = []byte{ - // 1023 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xc7, 0xbd, 0x49, 0x48, 0xc2, 0x8b, 0x13, 0xa4, 0x89, 0x2b, 0xcc, 0x3a, 0xb5, 0xa3, 0x2d, - 0x34, 0x4e, 0x88, 0x77, 0x1b, 0x27, 0x07, 0x0a, 0x08, 0x29, 0x6e, 0x00, 0xe5, 0x50, 0x64, 0xb6, - 0x39, 0x71, 0xc0, 0xda, 0xf5, 0x6e, 0x9c, 0x55, 0xeb, 0x1d, 0xd7, 0xbb, 0x8b, 0x6a, 0x55, 0xb9, - 0x20, 0x21, 0xf5, 0x52, 0x09, 0x09, 0xfe, 0x80, 0x1c, 0x10, 0x67, 0x84, 0x02, 0x57, 0xae, 0x55, - 0x4f, 0x11, 0x5c, 0x38, 0x21, 0x94, 0x20, 0xc1, 0x9f, 0x81, 0x3c, 0xf3, 0xf6, 0x57, 0x32, 0xb6, - 0x37, 0x70, 0xb2, 0x77, 0xe6, 0xbd, 0xef, 0xfb, 0xcc, 0x7b, 0xf3, 0xe6, 0x41, 0xa5, 0x4d, 0xbd, - 0x2e, 0xf5, 0x34, 0x23, 0xf0, 0x8f, 0xb4, 0x2f, 0xb6, 0x4c, 0xdb, 0x37, 0xb6, 0xb4, 0xc7, 0x81, - 0xdd, 0x1f, 0xa8, 0xbd, 0x3e, 0xf5, 0x29, 0x59, 0xe6, 0x06, 0xea, 0xd0, 0x40, 0x45, 0x03, 0x79, - 0x03, 0xbd, 0x4c, 0xc3, 0xb3, 0xb9, 0x75, 0xe4, 0xdb, 0x33, 0x3a, 0x8e, 0x6b, 0xf8, 0x0e, 0x75, - 0xb9, 0x80, 0x5c, 0xe8, 0xd0, 0x0e, 0x65, 0x7f, 0xb5, 0xe1, 0x3f, 0x5c, 0x7d, 0xa3, 0x43, 0x69, - 0xe7, 0x91, 0xad, 0xb1, 0x2f, 0x33, 0x38, 0xd4, 0x0c, 0x17, 0x23, 0xca, 0x2b, 0xb8, 0x65, 0xf4, - 0x1c, 0xcd, 0x70, 0x5d, 0xea, 0x33, 0x35, 0x0f, 0x77, 0xcb, 0x22, 0x60, 0x06, 0x87, 0xc2, 0x7c, - 0xbf, 0xc5, 0x23, 0x22, 0x3c, 0xdf, 0x2a, 0xa1, 0x6b, 0x08, 0x9c, 0x3c, 0xa7, 0xf2, 0x39, 0x14, - 0x3e, 0x1d, 0x7e, 0xee, 0xb6, 0xdb, 0x34, 0x70, 0x7d, 0x4f, 0xb7, 0x1f, 0x07, 0xb6, 0xe7, 0x93, - 0x8f, 0x00, 0xe2, 0x23, 0x15, 0xa5, 0x55, 0xa9, 0xba, 0x50, 0xbf, 0xad, 0xa2, 0xee, 0xf0, 0xfc, - 0x2a, 0x57, 0x41, 0x14, 0xb5, 0x69, 0x74, 0x6c, 0xf4, 0xd5, 0x13, 0x9e, 0xca, 0x89, 0x04, 0x37, - 0x2e, 0x05, 0xf0, 0x7a, 0xd4, 0xf5, 0x6c, 0xf2, 0x01, 0xcc, 0x1b, 0xb8, 0x56, 0x94, 0x56, 0xa7, - 0xab, 0x0b, 0xf5, 0x82, 0xca, 0x53, 0xa0, 0x86, 0xd9, 0x51, 0x77, 0xdd, 0x41, 0x23, 0xff, 0xf2, - 0xb4, 0x36, 0x8f, 0xde, 0xfb, 0x7a, 0xe4, 0x43, 0x3e, 0x4e, 0x11, 0x4e, 0x31, 0xc2, 0xb5, 0x89, - 0x84, 0x3c, 0x78, 0x0a, 0xf1, 0x01, 0x2c, 0x27, 0x09, 0xc3, 0x0c, 0xd4, 0x61, 0xce, 0xb0, 0xac, - 0xbe, 0xed, 0x79, 0xec, 0xf8, 0xaf, 0x36, 0x8a, 0xbf, 0x9e, 0xd6, 0x0a, 0xa8, 0xbf, 0xcb, 0x77, - 0x1e, 0xf8, 0x7d, 0xc7, 0xed, 0xe8, 0xa1, 0xe1, 0xbb, 0xf3, 0xcf, 0x4e, 0x2a, 0xb9, 0x7f, 0x4e, - 0x2a, 0x39, 0x65, 0x05, 0x64, 0x26, 0x7a, 0x9f, 0x5a, 0xc1, 0x23, 0xfb, 0x52, 0x76, 0x95, 0x26, - 0x86, 0x6c, 0x1a, 0x7d, 0xa3, 0x1b, 0xa7, 0xe4, 0x2e, 0xcc, 0xf6, 0xd8, 0x0a, 0x26, 0xbc, 0xa4, - 0x0a, 0x6e, 0xa1, 0xca, 0x9d, 0x1a, 0x33, 0x2f, 0xfe, 0xa8, 0xe4, 0x74, 0x74, 0x50, 0x0e, 0xd2, - 0x75, 0x8c, 0x24, 0xdf, 0x87, 0x39, 0xcc, 0x18, 0x6a, 0x66, 0x49, 0x72, 0xe8, 0xa2, 0x14, 0x80, - 0xa4, 0x38, 0x39, 0x7d, 0x1b, 0x4a, 0xc2, 0xb3, 0x61, 0xc8, 0xbd, 0x8c, 0x85, 0x25, 0x2f, 0x4f, - 0x6b, 0x4b, 0x29, 0x8d, 0x44, 0x79, 0x95, 0x1b, 0xb0, 0xdc, 0xb0, 0xdb, 0x47, 0xdb, 0xf5, 0x66, - 0xdf, 0x3e, 0x74, 0x9e, 0x84, 0xb1, 0xdf, 0x83, 0x42, 0x7a, 0x19, 0x83, 0xde, 0x82, 0x45, 0x93, - 0xad, 0xb7, 0x7a, 0x6c, 0x83, 0xd7, 0x4c, 0xcf, 0x9b, 0x09, 0x63, 0xa5, 0x01, 0x25, 0x2c, 0x5c, - 0x63, 0xe0, 0xdb, 0xde, 0x01, 0xc5, 0xfa, 0x61, 0xc5, 0x6f, 0xc1, 0x22, 0x16, 0xb2, 0x65, 0x0e, - 0xf7, 0x99, 0x46, 0x5e, 0xcf, 0x1b, 0x09, 0x1f, 0xe5, 0x43, 0x58, 0x11, 0x6b, 0x20, 0xc8, 0x5b, - 0xb0, 0x14, 0x8a, 0x78, 0x6c, 0x07, 0x49, 0x42, 0x69, 0x6e, 0xae, 0xec, 0x45, 0x28, 0x7c, 0xe1, - 0x80, 0x32, 0xb9, 0x10, 0x25, 0xa3, 0xca, 0xbd, 0x08, 0xe6, 0x92, 0x4a, 0x9c, 0x95, 0xc9, 0x27, - 0xba, 0x03, 0xe5, 0xe4, 0xd5, 0x89, 0x4e, 0xb7, 0xbf, 0x17, 0xd2, 0x2c, 0xc1, 0x94, 0x63, 0x31, - 0xdf, 0x69, 0x7d, 0xca, 0xb1, 0x14, 0x0b, 0x2a, 0x23, 0x3d, 0x30, 0xf2, 0x2e, 0xbc, 0x86, 0xa5, - 0x6c, 0x65, 0xed, 0xa2, 0x25, 0x23, 0x25, 0xa7, 0xdc, 0x87, 0xd7, 0x93, 0x51, 0xf6, 0xdd, 0x43, - 0xfa, 0x3f, 0x7a, 0x53, 0x69, 0x42, 0xf1, 0xaa, 0x1c, 0xd2, 0xee, 0xc0, 0x8c, 0xe3, 0x1e, 0x52, - 0x6c, 0x91, 0x55, 0x61, 0xdb, 0x25, 0xfd, 0x98, 0xb5, 0xf2, 0xa3, 0x04, 0x0b, 0x89, 0xd5, 0xff, - 0x42, 0x45, 0x36, 0x61, 0xb6, 0x17, 0x98, 0x0f, 0xed, 0x01, 0xbe, 0x60, 0xc2, 0x56, 0xd1, 0xd1, - 0x86, 0x5d, 0x0b, 0xcc, 0xaa, 0x1b, 0x74, 0x4d, 0xbb, 0x5f, 0x9c, 0x5e, 0x95, 0xaa, 0x33, 0xfa, - 0x22, 0xae, 0x7e, 0xc2, 0x16, 0x89, 0x0c, 0xf3, 0xde, 0x30, 0x53, 0x6e, 0xdb, 0x2e, 0xce, 0x30, - 0x83, 0xe8, 0xbb, 0xfe, 0xcb, 0x02, 0xbc, 0xc2, 0xf2, 0x40, 0x9e, 0x4b, 0x10, 0xb6, 0xbc, 0x47, - 0xd6, 0x85, 0x67, 0x16, 0x8d, 0x06, 0x79, 0x23, 0x8b, 0x29, 0x4f, 0xac, 0xb2, 0xf1, 0xec, 0xef, - 0x1f, 0x36, 0xa4, 0x2f, 0x7f, 0xfb, 0xeb, 0x9b, 0xa9, 0x0a, 0xb9, 0xa9, 0x09, 0x87, 0x58, 0x88, - 0xf0, 0xad, 0x04, 0x73, 0x28, 0x40, 0xaa, 0x13, 0x63, 0x84, 0x34, 0xeb, 0x19, 0x2c, 0x11, 0x66, - 0x27, 0x86, 0x59, 0x27, 0x6b, 0x63, 0x61, 0xb4, 0xa7, 0x58, 0xa0, 0x63, 0xf2, 0x93, 0x04, 0xe4, - 0xea, 0x45, 0x27, 0xdb, 0x13, 0xe3, 0x5e, 0x6d, 0x24, 0x79, 0xe7, 0x7a, 0x4e, 0xd7, 0xe0, 0x8e, - 0xba, 0xbc, 0xe5, 0x58, 0xda, 0x53, 0xc7, 0x3a, 0x26, 0x5f, 0x49, 0x30, 0xcb, 0xdf, 0x6d, 0xb2, - 0x36, 0x3a, 0x6c, 0xea, 0x65, 0x97, 0xab, 0x93, 0x0d, 0x91, 0xa9, 0x1a, 0x33, 0xdd, 0x24, 0x25, - 0x21, 0x13, 0x9f, 0x4c, 0xe4, 0x7b, 0x09, 0xd2, 0xaf, 0xbc, 0x47, 0xb4, 0xd1, 0x61, 0x84, 0xf3, - 0x52, 0xbe, 0x93, 0xdd, 0x01, 0xf9, 0xb6, 0x62, 0xbe, 0xdb, 0xe4, 0x4d, 0x21, 0x5f, 0x97, 0x79, - 0xb6, 0xa2, 0xfb, 0xf7, 0x5c, 0x82, 0x7c, 0x72, 0xb6, 0x8c, 0xb8, 0x84, 0x82, 0xa9, 0x34, 0xe2, - 0x12, 0x8a, 0x06, 0x55, 0x96, 0xc4, 0xf1, 0x99, 0x35, 0xbc, 0x78, 0x05, 0xd1, 0xa8, 0x21, 0xe2, - 0x6c, 0x8c, 0x99, 0x6c, 0xf2, 0xd6, 0x35, 0x3c, 0x90, 0xf3, 0x9d, 0x98, 0xb3, 0x46, 0xde, 0x1e, - 0xc3, 0x19, 0xb5, 0x0a, 0x1f, 0x31, 0xc7, 0xe4, 0xe7, 0x98, 0x3b, 0x35, 0x95, 0xc6, 0x73, 0x8b, - 0xc6, 0xe0, 0x78, 0x6e, 0xe1, 0xc8, 0x53, 0xee, 0xc6, 0xdc, 0x2a, 0xd9, 0xcc, 0xc4, 0xcd, 0x27, - 0xec, 0x31, 0xf9, 0xee, 0xd2, 0x7b, 0xbe, 0x39, 0xb1, 0x5b, 0x13, 0x33, 0x49, 0xae, 0x65, 0xb4, - 0xce, 0x9e, 0xdf, 0xf0, 0xa9, 0x1f, 0x0e, 0x9b, 0xf8, 0x41, 0x6a, 0xdc, 0x7b, 0x71, 0x5e, 0x96, - 0xce, 0xce, 0xcb, 0xd2, 0x9f, 0xe7, 0x65, 0xe9, 0xeb, 0x8b, 0x72, 0xee, 0xec, 0xa2, 0x9c, 0xfb, - 0xfd, 0xa2, 0x9c, 0xfb, 0x6c, 0xbd, 0xe3, 0xf8, 0x47, 0x81, 0xa9, 0xb6, 0x69, 0x37, 0x14, 0xe4, - 0x3f, 0x35, 0xcf, 0x7a, 0xa8, 0x3d, 0xe1, 0xea, 0xfe, 0xa0, 0x67, 0x7b, 0xe6, 0x2c, 0x9b, 0x2f, - 0xdb, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xd0, 0xdc, 0xca, 0xb8, 0x09, 0x0d, 0x00, 0x00, + // 971 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xc7, 0xbd, 0x69, 0x49, 0xc2, 0x8b, 0x1b, 0xa4, 0x89, 0x2b, 0xc2, 0x3a, 0xb5, 0xa3, 0x2d, + 0x34, 0x4e, 0xa8, 0x77, 0x1b, 0x27, 0x07, 0x0a, 0x08, 0x29, 0x6e, 0x00, 0xe5, 0x50, 0xc9, 0x6c, + 0x73, 0xe2, 0x80, 0xb5, 0xf6, 0x6e, 0x36, 0x2b, 0x9a, 0x1d, 0xd7, 0xb3, 0x46, 0x8d, 0xaa, 0x5c, + 0x90, 0x90, 0x7a, 0xa9, 0x84, 0x04, 0x7f, 0x40, 0x0e, 0x88, 0x33, 0x87, 0xc0, 0x95, 0x6b, 0xd5, + 0x53, 0x04, 0x17, 0x4e, 0x08, 0x25, 0x48, 0xf0, 0x67, 0x20, 0xcf, 0xbc, 0xd9, 0x1f, 0xc9, 0xd8, + 0xde, 0x88, 0x53, 0xbc, 0x33, 0xef, 0x7d, 0xdf, 0x67, 0xde, 0x7b, 0xf3, 0x26, 0x50, 0xed, 0x52, + 0x76, 0x40, 0x99, 0xe5, 0x0c, 0xa2, 0x7d, 0xeb, 0xab, 0xf5, 0x8e, 0x17, 0x39, 0xeb, 0xd6, 0x93, + 0x81, 0xd7, 0x3f, 0x34, 0x7b, 0x7d, 0x1a, 0x51, 0xb2, 0x20, 0x0c, 0xcc, 0xa1, 0x81, 0x89, 0x06, + 0xfa, 0x1a, 0x7a, 0x75, 0x1c, 0xe6, 0x09, 0xeb, 0xd8, 0xb7, 0xe7, 0xf8, 0x41, 0xe8, 0x44, 0x01, + 0x0d, 0x85, 0x80, 0x5e, 0xf2, 0xa9, 0x4f, 0xf9, 0x4f, 0x6b, 0xf8, 0x0b, 0x57, 0xdf, 0xf2, 0x29, + 0xf5, 0x1f, 0x7b, 0x16, 0xff, 0xea, 0x0c, 0xf6, 0x2c, 0x27, 0xc4, 0x88, 0xfa, 0x12, 0x6e, 0x39, + 0xbd, 0xc0, 0x72, 0xc2, 0x90, 0x46, 0x5c, 0x8d, 0xe1, 0x6e, 0x45, 0x05, 0xcc, 0xe1, 0x50, 0x58, + 0xec, 0xb7, 0x45, 0x44, 0x84, 0x17, 0x5b, 0x65, 0x74, 0x95, 0xc0, 0xe9, 0x73, 0x1a, 0x5f, 0x40, + 0xe9, 0xb3, 0xe1, 0xe7, 0x56, 0xb7, 0x4b, 0x07, 0x61, 0xc4, 0x6c, 0xef, 0xc9, 0xc0, 0x63, 0x11, + 0xf9, 0x04, 0x20, 0x39, 0xd2, 0xa2, 0xb6, 0xac, 0xd5, 0xe6, 0x1a, 0x77, 0x4c, 0xd4, 0x1d, 0x9e, + 0xdf, 0x14, 0x2a, 0x88, 0x62, 0xb6, 0x1c, 0xdf, 0x43, 0x5f, 0x3b, 0xe5, 0x69, 0x1c, 0x6b, 0x70, + 0xf3, 0x42, 0x00, 0xd6, 0xa3, 0x21, 0xf3, 0xc8, 0x47, 0x30, 0xeb, 0xe0, 0xda, 0xa2, 0xb6, 0x7c, + 0xad, 0x36, 0xd7, 0x28, 0x99, 0x22, 0x05, 0xa6, 0xcc, 0x8e, 0xb9, 0x15, 0x1e, 0x36, 0x8b, 0xaf, + 0x4e, 0xea, 0xb3, 0xe8, 0xbd, 0x63, 0xc7, 0x3e, 0xe4, 0xd3, 0x0c, 0xe1, 0x14, 0x27, 0x5c, 0x99, + 0x48, 0x28, 0x82, 0x67, 0x10, 0x1f, 0xc1, 0x42, 0x9a, 0x50, 0x66, 0xa0, 0x01, 0x33, 0x8e, 0xeb, + 0xf6, 0x3d, 0xc6, 0xf8, 0xf1, 0x5f, 0x6f, 0x2e, 0xfe, 0x76, 0x52, 0x2f, 0xa1, 0xfe, 0x96, 0xd8, + 0x79, 0x14, 0xf5, 0x83, 0xd0, 0xb7, 0xa5, 0xe1, 0xfb, 0xb3, 0xcf, 0x8f, 0xab, 0x85, 0x7f, 0x8f, + 0xab, 0x05, 0x63, 0x09, 0x74, 0x2e, 0xfa, 0x90, 0xba, 0x83, 0xc7, 0xde, 0x85, 0xec, 0x1a, 0x2d, + 0x0c, 0xd9, 0x72, 0xfa, 0xce, 0x41, 0x92, 0x92, 0xfb, 0x30, 0xdd, 0xe3, 0x2b, 0x98, 0xf0, 0xb2, + 0xa9, 0xe8, 0x42, 0x53, 0x38, 0x35, 0xaf, 0xbf, 0xfc, 0xb3, 0x5a, 0xb0, 0xd1, 0xc1, 0xd8, 0xcd, + 0xd6, 0x31, 0x96, 0xfc, 0x10, 0x66, 0x30, 0x63, 0xa8, 0x99, 0x27, 0xc9, 0xd2, 0xc5, 0x28, 0x01, + 0xc9, 0x70, 0x0a, 0xfa, 0x2e, 0x94, 0x95, 0x67, 0xc3, 0x90, 0xdb, 0x39, 0x0b, 0x4b, 0x5e, 0x9d, + 0xd4, 0xe7, 0x33, 0x1a, 0xa9, 0xf2, 0x1a, 0x37, 0x61, 0xa1, 0xe9, 0x75, 0xf7, 0x37, 0x1a, 0xad, + 0xbe, 0xb7, 0x17, 0x3c, 0x95, 0xb1, 0x3f, 0x80, 0x52, 0x76, 0x19, 0x83, 0xde, 0x86, 0x1b, 0x1d, + 0xbe, 0xde, 0xee, 0xf1, 0x0d, 0x51, 0x33, 0xbb, 0xd8, 0x49, 0x19, 0x1b, 0x4d, 0x28, 0x63, 0xe1, + 0x9a, 0x87, 0x91, 0xc7, 0x76, 0x29, 0xd6, 0x0f, 0x2b, 0x7e, 0x1b, 0x6e, 0x60, 0x21, 0xdb, 0x9d, + 0xe1, 0x3e, 0xd7, 0x28, 0xda, 0x45, 0x27, 0xe5, 0x63, 0x7c, 0x0c, 0x4b, 0x6a, 0x0d, 0x04, 0x79, + 0x07, 0xe6, 0xa5, 0x08, 0xe3, 0x3b, 0x48, 0x22, 0xa5, 0x85, 0xb9, 0xb1, 0x1d, 0xa3, 0x88, 0x85, + 0x5d, 0xca, 0xe5, 0x24, 0x4a, 0x4e, 0x95, 0x07, 0x31, 0xcc, 0x05, 0x95, 0x24, 0x2b, 0x93, 0x4f, + 0x74, 0x0f, 0x2a, 0xe9, 0xd6, 0x89, 0x4f, 0xb7, 0xb3, 0x2d, 0x69, 0xe6, 0x61, 0x2a, 0x70, 0xb9, + 0xef, 0x35, 0x7b, 0x2a, 0x70, 0x0d, 0x17, 0xaa, 0x23, 0x3d, 0x30, 0xf2, 0x16, 0xbc, 0x81, 0xa5, + 0x6c, 0xe7, 0xbd, 0x45, 0xf3, 0x4e, 0x46, 0xce, 0x78, 0x08, 0x6f, 0xa6, 0xa3, 0xec, 0x84, 0x7b, + 0xf4, 0x7f, 0xdc, 0x4d, 0xa3, 0x05, 0x8b, 0x97, 0xe5, 0x90, 0x76, 0x13, 0xae, 0x07, 0xe1, 0x1e, + 0xc5, 0x2b, 0xb2, 0xac, 0xbc, 0x76, 0x4d, 0x87, 0xc9, 0x3e, 0xb5, 0xb9, 0x75, 0xe3, 0xd7, 0x39, + 0x78, 0x8d, 0x4b, 0x92, 0x17, 0x1a, 0xc8, 0xdb, 0xc3, 0xc8, 0xaa, 0xd2, 0x5d, 0x35, 0x65, 0xf5, + 0xb5, 0x3c, 0xa6, 0x82, 0xd1, 0x58, 0x7b, 0xfe, 0xcf, 0x4f, 0x6b, 0xda, 0xd7, 0xbf, 0xff, 0xfd, + 0xdd, 0x54, 0x95, 0xdc, 0xb2, 0x94, 0xef, 0x81, 0x44, 0xf8, 0x5e, 0x83, 0x19, 0x14, 0x20, 0xb5, + 0x89, 0x31, 0x24, 0xcd, 0x6a, 0x0e, 0x4b, 0x84, 0xd9, 0x4c, 0x60, 0x56, 0xc9, 0xca, 0x58, 0x18, + 0xeb, 0x19, 0x56, 0xe0, 0x88, 0xfc, 0xac, 0x01, 0xb9, 0xdc, 0x33, 0x64, 0x63, 0x62, 0xdc, 0xcb, + 0x3d, 0xa9, 0x6f, 0x5e, 0xcd, 0xe9, 0x0a, 0xdc, 0xf1, 0x85, 0x69, 0x07, 0xae, 0xf5, 0x2c, 0x70, + 0x8f, 0xc8, 0x37, 0x1a, 0x4c, 0x8b, 0x11, 0x48, 0x56, 0x46, 0x87, 0xcd, 0x0c, 0x49, 0xbd, 0x36, + 0xd9, 0x10, 0x99, 0x6a, 0x09, 0xd3, 0x2d, 0x52, 0x56, 0x32, 0x89, 0x21, 0x4f, 0x7e, 0xd4, 0x20, + 0x3b, 0x30, 0x19, 0xb1, 0x46, 0x87, 0x51, 0x3e, 0x3d, 0xfa, 0xbd, 0xfc, 0x0e, 0xc8, 0xb7, 0x9e, + 0xf0, 0xdd, 0x21, 0x6f, 0x2b, 0xf9, 0x0e, 0xb8, 0x67, 0x3b, 0xee, 0xbf, 0x17, 0x1a, 0x14, 0xd3, + 0x63, 0x7a, 0x44, 0x13, 0x2a, 0x06, 0xfc, 0x88, 0x26, 0x54, 0xcd, 0xfc, 0x3c, 0x89, 0x13, 0xe3, + 0x7f, 0xd8, 0x78, 0x25, 0xd5, 0xd4, 0x26, 0xea, 0x6c, 0x8c, 0x79, 0x24, 0xf4, 0xf5, 0x2b, 0x78, + 0x20, 0xe7, 0x7b, 0x09, 0x67, 0x9d, 0xbc, 0x3b, 0x86, 0x33, 0xbe, 0x2a, 0x62, 0x5a, 0x1f, 0x91, + 0x5f, 0x12, 0xee, 0xcc, 0x80, 0x1f, 0xcf, 0xad, 0x7a, 0x51, 0xc6, 0x73, 0x2b, 0x5f, 0x0f, 0xe3, + 0x7e, 0xc2, 0x6d, 0x92, 0xbb, 0xb9, 0xb8, 0xc5, 0x63, 0x75, 0x44, 0x7e, 0xd0, 0x60, 0x2e, 0x35, + 0x68, 0xc9, 0xdd, 0x89, 0xb7, 0x35, 0x35, 0xde, 0xf5, 0x7a, 0x4e, 0xeb, 0xfc, 0xf9, 0x95, 0x6f, + 0xd1, 0x70, 0x6e, 0x27, 0x03, 0xa9, 0xf9, 0xe0, 0xe5, 0x59, 0x45, 0x3b, 0x3d, 0xab, 0x68, 0x7f, + 0x9d, 0x55, 0xb4, 0x6f, 0xcf, 0x2b, 0x85, 0xd3, 0xf3, 0x4a, 0xe1, 0x8f, 0xf3, 0x4a, 0xe1, 0xf3, + 0x55, 0x3f, 0x88, 0xf6, 0x07, 0x1d, 0xb3, 0x4b, 0x0f, 0xa4, 0xa0, 0xf8, 0x53, 0x67, 0xee, 0x97, + 0xd6, 0x53, 0xa1, 0x1e, 0x1d, 0xf6, 0x3c, 0xd6, 0x99, 0xe6, 0xff, 0xd5, 0x6c, 0xfc, 0x17, 0x00, + 0x00, 0xff, 0xff, 0x83, 0xfa, 0x46, 0x09, 0x54, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1983,58 +1906,6 @@ func (m *QueryAccountInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } -func (m *AccountInfo) 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 *AccountInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccountInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Sequence != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Sequence)) - i-- - dAtA[i] = 0x20 - } - if m.AccountNumber != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.AccountNumber)) - i-- - dAtA[i] = 0x18 - } - if m.Pubkey != nil { - { - size, err := m.Pubkey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -2273,29 +2144,6 @@ func (m *QueryAccountInfoResponse) Size() (n int) { return n } -func (m *AccountInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Pubkey != nil { - l = m.Pubkey.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if m.AccountNumber != 0 { - n += 1 + sovQuery(uint64(m.AccountNumber)) - } - if m.Sequence != 0 { - n += 1 + sovQuery(uint64(m.Sequence)) - } - return n -} - func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -3699,7 +3547,7 @@ func (m *QueryAccountInfoResponse) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Info == nil { - m.Info = &AccountInfo{} + m.Info = &BaseAccount{} } if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -3726,162 +3574,6 @@ func (m *QueryAccountInfoResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *AccountInfo) 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: AccountInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccountInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", 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.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pubkey == nil { - m.Pubkey = &types.Any{} - } - if err := m.Pubkey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountNumber", wireType) - } - m.AccountNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AccountNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - m.Sequence = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Sequence |= uint64(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 skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 From 6e5bc01c8d65873234432c5c597c65678ead719e Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Thu, 15 Sep 2022 12:05:58 -0400 Subject: [PATCH 13/16] Update x/auth/keeper/grpc_query.go Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> --- x/auth/keeper/grpc_query.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/auth/keeper/grpc_query.go b/x/auth/keeper/grpc_query.go index 874f798ff88c..e82afa569d1c 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -189,7 +189,7 @@ func (ak AccountKeeper) AccountInfo(goCtx context.Context, req *types.QueryAccou } if req.Address == "" { - return nil, status.Error(codes.InvalidArgument, "Address cannot be empty") + return nil, status.Error(codes.InvalidArgument, "address cannot be empty") } ctx := sdk.UnwrapSDKContext(goCtx) From 733d63ee6ca7bab16125ce4e1528efa13b220daf Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Thu, 15 Sep 2022 12:09:20 -0400 Subject: [PATCH 14/16] update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94b7073e8820..539d35fa13d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (cli) [#12742](https://github.com/cosmos/cosmos-sdk/pull/12742) Add the `prune` CLI cmd to manually prune app store history versions based on the pruning options. * (ledger) [#12935](https://github.com/cosmos/cosmos-sdk/pull/12935) Generalize Ledger integration to allow for different apps or keytypes that use SECP256k1. * (x/bank) [#11981](https://github.com/cosmos/cosmos-sdk/pull/11981) Create the `SetSendEnabled` endpoint for managing the bank's SendEnabled settings. +* (x/auth) [#13210](https://github.com/cosmos/cosmos-sdk/pull/13210) Add `Query/AccountInfo` endpoint for simplified access to basic account info. ### Improvements From 76d000e74121a90d182d6536cfb7c027a5da4c9c Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Thu, 15 Sep 2022 12:10:55 -0400 Subject: [PATCH 15/16] docs --- x/auth/keeper/grpc_query.go | 1 + 1 file changed, 1 insertion(+) diff --git a/x/auth/keeper/grpc_query.go b/x/auth/keeper/grpc_query.go index e82afa569d1c..bb09dbdeac9a 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -183,6 +183,7 @@ func (ak AccountKeeper) AddressStringToBytes(ctx context.Context, req *types.Add return &types.AddressStringToBytesResponse{AddressBytes: bz}, nil } +// AccountInfo implements the AccountInfo query. func (ak AccountKeeper) AccountInfo(goCtx context.Context, req *types.QueryAccountInfoRequest) (*types.QueryAccountInfoResponse, error) { if req == nil { return nil, status.Errorf(codes.InvalidArgument, "empty request") From a936af734670c5dfe92e76d0b42365884110bd67 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Thu, 15 Sep 2022 12:40:38 -0400 Subject: [PATCH 16/16] proto lint --- proto/cosmos/auth/v1beta1/query.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/cosmos/auth/v1beta1/query.proto b/proto/cosmos/auth/v1beta1/query.proto index 50a713a4c43c..8cfa1fab0fcf 100644 --- a/proto/cosmos/auth/v1beta1/query.proto +++ b/proto/cosmos/auth/v1beta1/query.proto @@ -79,7 +79,7 @@ service Query { // // Since: cosmos-sdk 0.47 rpc AccountInfo(QueryAccountInfoRequest) returns (QueryAccountInfoResponse) { - option (cosmos.query.v1.deterministic) = true; + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/cosmos/auth/v1beta1/account_info/{address}"; } }