From 21ff7000e49f305c2a3835017062eb46aa72bb9e Mon Sep 17 00:00:00 2001 From: Sai Kumar <17549398+gsk967@users.noreply.github.com> Date: Sat, 22 Oct 2022 23:53:24 +0530 Subject: [PATCH 1/3] feat(cli): add module-account cli cmd and grpc get api (#13612) (cherry picked from commit ddf5cf0d8d26f8beb504cb2fcc2d4a8b0964261c) # Conflicts: # CHANGELOG.md # api/cosmos/auth/v1beta1/query.pulsar.go # api/cosmos/auth/v1beta1/query_grpc.pb.go # proto/cosmos/auth/v1beta1/query.proto # tests/e2e/auth/suite.go # x/auth/client/cli/query.go # x/auth/keeper/grpc_query.go # x/auth/keeper/grpc_query_test.go # x/auth/types/query.pb.go # x/auth/types/query.pb.gw.go --- CHANGELOG.md | 18 + api/cosmos/auth/v1beta1/query.pulsar.go | 9847 ++++++++++++++++++++++ api/cosmos/auth/v1beta1/query_grpc.pb.go | 483 ++ proto/cosmos/auth/v1beta1/query.proto | 154 + tests/e2e/auth/suite.go | 2040 +++++ x/auth/client/cli/query.go | 69 + x/auth/keeper/grpc_query.go | 144 + x/auth/keeper/grpc_query_test.go | 266 + x/auth/types/query.pb.go | 2806 +++++- x/auth/types/query.pb.gw.go | 549 ++ 10 files changed, 16363 insertions(+), 13 deletions(-) create mode 100644 api/cosmos/auth/v1beta1/query.pulsar.go create mode 100644 api/cosmos/auth/v1beta1/query_grpc.pb.go create mode 100644 tests/e2e/auth/suite.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fdc55fdbe67..5b335798b2e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,8 +39,26 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Features +<<<<<<< HEAD * (grpc) [#13485](https://github.com/cosmos/cosmos-sdk/pull/13485) Implement a new gRPC query, `/cosmos/base/node/v1beta1/config`, which provides operator configuration. Applications that wish to expose operator minimum gas prices via gRPC should have their application implement the `ApplicationQueryService` interface (see `SimApp#RegisterNodeService` as an example). * [#13557](https://github.com/cosmos/cosmos-sdk/pull/#13557) - Add `GenSignedMockTx`. This can be used as workaround for #12437 revertion. `v0.46+` contains as well a `GenSignedMockTx` that behaves the same way. +======= +* (core) [#13306](https://github.com/cosmos/cosmos-sdk/pull/13306) Add a `FormatCoins` function to in `core/coins` to format sdk Coins following the Value Renderers spec. +* (math) [#13306](https://github.com/cosmos/cosmos-sdk/pull/13306) Add `FormatInt` and `FormatDec` functiosn in `math` to format integers and decimals following the Value Renderers spec. +* (x/staking) [#13122](https://github.com/cosmos/cosmos-sdk/pull/13122) Add `UnbondingCanComplete` and `PutUnbondingOnHold` to `x/staking` module. +* [#13437](https://github.com/cosmos/cosmos-sdk/pull/13437) Add new flag `--modules-to-export` in `simd export` command to export only selected modules. +* [#13298](https://github.com/cosmos/cosmos-sdk/pull/13298) Add `AddGenesisAccount` helper func in x/auth module which helps adding accounts to genesis state. +* (x/authz) [#12648](https://github.com/cosmos/cosmos-sdk/pull/12648) Add an allow list, an optional list of addresses allowed to receive bank assets via authz MsgSend grant. +* (sdk.Coins) [#12627](https://github.com/cosmos/cosmos-sdk/pull/12627) Make a Denoms method on sdk.Coins. +* (testutil) [#12973](https://github.com/cosmos/cosmos-sdk/pull/12973) Add generic `testutil.RandSliceElem` function which selects a random element from the list. +* (client) [#12936](https://github.com/cosmos/cosmos-sdk/pull/12936) Add capability to preprocess transactions before broadcasting from a higher level chain. +* (cli) [#13064](https://github.com/cosmos/cosmos-sdk/pull/13064) Add `debug prefixes` to list supported HRP prefixes via . +* (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. +* (x/consensus) [#12905](https://github.com/cosmos/cosmos-sdk/pull/12905) Create a new `x/consensus` module that is now responsible for maintaining Tendermint consensus parameters instead of `x/param`. Legacy types remain in order to facilitate parameter migration from the deprecated `x/params`. App developers should ensure that they execute `baseapp.MigrateParams` during their chain upgrade. These legacy types will be removed in a future release. +* (x/auth) [#13612](https://github.com/cosmos/cosmos-sdk/pull/13612) Add `Query/ModuleAccountByName` endpoint for accessing the module account info by module name. +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) ### Improvements diff --git a/api/cosmos/auth/v1beta1/query.pulsar.go b/api/cosmos/auth/v1beta1/query.pulsar.go new file mode 100644 index 000000000000..5f7a90427a7a --- /dev/null +++ b/api/cosmos/auth/v1beta1/query.pulsar.go @@ -0,0 +1,9847 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package authv1beta1 + +import ( + v1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" + _ "cosmossdk.io/api/cosmos/query/v1" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + _ "google.golang.org/genproto/googleapis/api/annotations" + 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_QueryAccountsRequest protoreflect.MessageDescriptor + fd_QueryAccountsRequest_pagination protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_auth_v1beta1_query_proto_init() + md_QueryAccountsRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryAccountsRequest") + fd_QueryAccountsRequest_pagination = md_QueryAccountsRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryAccountsRequest)(nil) + +type fastReflection_QueryAccountsRequest QueryAccountsRequest + +func (x *QueryAccountsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAccountsRequest)(x) +} + +func (x *QueryAccountsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_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_QueryAccountsRequest_messageType fastReflection_QueryAccountsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryAccountsRequest_messageType{} + +type fastReflection_QueryAccountsRequest_messageType struct{} + +func (x fastReflection_QueryAccountsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAccountsRequest)(nil) +} +func (x fastReflection_QueryAccountsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAccountsRequest) +} +func (x fastReflection_QueryAccountsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAccountsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountsRequest +} + +// 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_QueryAccountsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryAccountsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAccountsRequest) New() protoreflect.Message { + return new(fastReflection_QueryAccountsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAccountsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryAccountsRequest)(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_QueryAccountsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryAccountsRequest_pagination, 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_QueryAccountsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountsRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsRequest 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_QueryAccountsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountsRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsRequest 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_QueryAccountsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.auth.v1beta1.QueryAccountsRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsRequest 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_QueryAccountsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountsRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsRequest 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_QueryAccountsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountsRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsRequest 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_QueryAccountsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountsRequest.pagination": + m := new(v1beta1.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsRequest 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_QueryAccountsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryAccountsRequest", 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_QueryAccountsRequest) 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_QueryAccountsRequest) 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_QueryAccountsRequest) 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_QueryAccountsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAccountsRequest) + 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.Pagination != nil { + l = options.Size(x.Pagination) + 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().(*QueryAccountsRequest) + 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.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + 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().(*QueryAccountsRequest) + 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: QueryAccountsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountsRequest: 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 Pagination", 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.Pagination == nil { + x.Pagination = &v1beta1.PageRequest{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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 _ protoreflect.List = (*_QueryAccountsResponse_1_list)(nil) + +type _QueryAccountsResponse_1_list struct { + list *[]*anypb.Any +} + +func (x *_QueryAccountsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryAccountsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryAccountsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*anypb.Any) + (*x.list)[i] = concreteValue +} + +func (x *_QueryAccountsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*anypb.Any) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryAccountsResponse_1_list) AppendMutable() protoreflect.Value { + v := new(anypb.Any) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAccountsResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryAccountsResponse_1_list) NewElement() protoreflect.Value { + v := new(anypb.Any) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAccountsResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryAccountsResponse protoreflect.MessageDescriptor + fd_QueryAccountsResponse_accounts protoreflect.FieldDescriptor + fd_QueryAccountsResponse_pagination protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_auth_v1beta1_query_proto_init() + md_QueryAccountsResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryAccountsResponse") + fd_QueryAccountsResponse_accounts = md_QueryAccountsResponse.Fields().ByName("accounts") + fd_QueryAccountsResponse_pagination = md_QueryAccountsResponse.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryAccountsResponse)(nil) + +type fastReflection_QueryAccountsResponse QueryAccountsResponse + +func (x *QueryAccountsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAccountsResponse)(x) +} + +func (x *QueryAccountsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_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_QueryAccountsResponse_messageType fastReflection_QueryAccountsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAccountsResponse_messageType{} + +type fastReflection_QueryAccountsResponse_messageType struct{} + +func (x fastReflection_QueryAccountsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAccountsResponse)(nil) +} +func (x fastReflection_QueryAccountsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAccountsResponse) +} +func (x fastReflection_QueryAccountsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAccountsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountsResponse +} + +// 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_QueryAccountsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAccountsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAccountsResponse) New() protoreflect.Message { + return new(fastReflection_QueryAccountsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAccountsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAccountsResponse)(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_QueryAccountsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Accounts) != 0 { + value := protoreflect.ValueOfList(&_QueryAccountsResponse_1_list{list: &x.Accounts}) + if !f(fd_QueryAccountsResponse_accounts, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryAccountsResponse_pagination, 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_QueryAccountsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountsResponse.accounts": + return len(x.Accounts) != 0 + case "cosmos.auth.v1beta1.QueryAccountsResponse.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsResponse 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_QueryAccountsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountsResponse.accounts": + x.Accounts = nil + case "cosmos.auth.v1beta1.QueryAccountsResponse.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsResponse 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_QueryAccountsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.auth.v1beta1.QueryAccountsResponse.accounts": + if len(x.Accounts) == 0 { + return protoreflect.ValueOfList(&_QueryAccountsResponse_1_list{}) + } + listValue := &_QueryAccountsResponse_1_list{list: &x.Accounts} + return protoreflect.ValueOfList(listValue) + case "cosmos.auth.v1beta1.QueryAccountsResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsResponse 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_QueryAccountsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountsResponse.accounts": + lv := value.List() + clv := lv.(*_QueryAccountsResponse_1_list) + x.Accounts = *clv.list + case "cosmos.auth.v1beta1.QueryAccountsResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsResponse 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_QueryAccountsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountsResponse.accounts": + if x.Accounts == nil { + x.Accounts = []*anypb.Any{} + } + value := &_QueryAccountsResponse_1_list{list: &x.Accounts} + return protoreflect.ValueOfList(value) + case "cosmos.auth.v1beta1.QueryAccountsResponse.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageResponse) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsResponse 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_QueryAccountsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountsResponse.accounts": + list := []*anypb.Any{} + return protoreflect.ValueOfList(&_QueryAccountsResponse_1_list{list: &list}) + case "cosmos.auth.v1beta1.QueryAccountsResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsResponse 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_QueryAccountsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryAccountsResponse", 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_QueryAccountsResponse) 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_QueryAccountsResponse) 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_QueryAccountsResponse) 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_QueryAccountsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAccountsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Accounts) > 0 { + for _, e := range x.Accounts { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + 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().(*QueryAccountsResponse) + 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.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + 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.Accounts) > 0 { + for iNdEx := len(x.Accounts) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Accounts[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 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().(*QueryAccountsResponse) + 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: QueryAccountsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountsResponse: 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 Accounts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Accounts = append(x.Accounts, &anypb.Any{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Accounts[len(x.Accounts)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { + x.Pagination = &v1beta1.PageResponse{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryAccountRequest protoreflect.MessageDescriptor + fd_QueryAccountRequest_address protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_auth_v1beta1_query_proto_init() + md_QueryAccountRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryAccountRequest") + fd_QueryAccountRequest_address = md_QueryAccountRequest.Fields().ByName("address") +} + +var _ protoreflect.Message = (*fastReflection_QueryAccountRequest)(nil) + +type fastReflection_QueryAccountRequest QueryAccountRequest + +func (x *QueryAccountRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAccountRequest)(x) +} + +func (x *QueryAccountRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_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_QueryAccountRequest_messageType fastReflection_QueryAccountRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryAccountRequest_messageType{} + +type fastReflection_QueryAccountRequest_messageType struct{} + +func (x fastReflection_QueryAccountRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAccountRequest)(nil) +} +func (x fastReflection_QueryAccountRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAccountRequest) +} +func (x fastReflection_QueryAccountRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAccountRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountRequest +} + +// 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_QueryAccountRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryAccountRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAccountRequest) New() protoreflect.Message { + return new(fastReflection_QueryAccountRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAccountRequest) Interface() protoreflect.ProtoMessage { + return (*QueryAccountRequest)(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_QueryAccountRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Address != "" { + value := protoreflect.ValueOfString(x.Address) + if !f(fd_QueryAccountRequest_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_QueryAccountRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountRequest.address": + return x.Address != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountRequest 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_QueryAccountRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountRequest.address": + x.Address = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountRequest 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_QueryAccountRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.auth.v1beta1.QueryAccountRequest.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.QueryAccountRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountRequest 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_QueryAccountRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountRequest.address": + x.Address = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountRequest 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_QueryAccountRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountRequest.address": + panic(fmt.Errorf("field address of message cosmos.auth.v1beta1.QueryAccountRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountRequest 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_QueryAccountRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountRequest.address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountRequest 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_QueryAccountRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryAccountRequest", 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_QueryAccountRequest) 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_QueryAccountRequest) 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_QueryAccountRequest) 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_QueryAccountRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAccountRequest) + 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().(*QueryAccountRequest) + 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().(*QueryAccountRequest) + 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: QueryAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountRequest: 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_QueryAccountResponse protoreflect.MessageDescriptor + fd_QueryAccountResponse_account protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_auth_v1beta1_query_proto_init() + md_QueryAccountResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryAccountResponse") + fd_QueryAccountResponse_account = md_QueryAccountResponse.Fields().ByName("account") +} + +var _ protoreflect.Message = (*fastReflection_QueryAccountResponse)(nil) + +type fastReflection_QueryAccountResponse QueryAccountResponse + +func (x *QueryAccountResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAccountResponse)(x) +} + +func (x *QueryAccountResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAccountResponse_messageType fastReflection_QueryAccountResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAccountResponse_messageType{} + +type fastReflection_QueryAccountResponse_messageType struct{} + +func (x fastReflection_QueryAccountResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAccountResponse)(nil) +} +func (x fastReflection_QueryAccountResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAccountResponse) +} +func (x fastReflection_QueryAccountResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAccountResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountResponse +} + +// 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_QueryAccountResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAccountResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAccountResponse) New() protoreflect.Message { + return new(fastReflection_QueryAccountResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAccountResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAccountResponse)(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_QueryAccountResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Account != nil { + value := protoreflect.ValueOfMessage(x.Account.ProtoReflect()) + if !f(fd_QueryAccountResponse_account, 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_QueryAccountResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountResponse.account": + return x.Account != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse 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_QueryAccountResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountResponse.account": + x.Account = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse 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_QueryAccountResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.auth.v1beta1.QueryAccountResponse.account": + value := x.Account + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse 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_QueryAccountResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountResponse.account": + x.Account = value.Message().Interface().(*anypb.Any) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse 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_QueryAccountResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountResponse.account": + if x.Account == nil { + x.Account = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.Account.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse 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_QueryAccountResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountResponse.account": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse 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_QueryAccountResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryAccountResponse", 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_QueryAccountResponse) 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_QueryAccountResponse) 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_QueryAccountResponse) 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_QueryAccountResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAccountResponse) + 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.Account != nil { + l = options.Size(x.Account) + 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().(*QueryAccountResponse) + 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.Account != nil { + encoded, err := options.Marshal(x.Account) + 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().(*QueryAccountResponse) + 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: QueryAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountResponse: 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 Account", 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.Account == nil { + x.Account = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Account); 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_QueryParamsRequest protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_auth_v1beta1_query_proto_init() + md_QueryParamsRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryParamsRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) + +type fastReflection_QueryParamsRequest QueryParamsRequest + +func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryParamsRequest)(x) +} + +func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} + +type fastReflection_QueryParamsRequest_messageType struct{} + +func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryParamsRequest)(nil) +} +func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryParamsRequest) +} +func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsRequest +} + +// 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_QueryParamsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryParamsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message { + return new(fastReflection_QueryParamsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryParamsRequest)(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_QueryParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest 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_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest 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_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest 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_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest 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_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest 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_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest 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_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryParamsRequest", 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_QueryParamsRequest) 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_QueryParamsRequest) 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_QueryParamsRequest) 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_QueryParamsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryParamsRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryParamsRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryParamsRequest) + 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: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryParamsResponse protoreflect.MessageDescriptor + fd_QueryParamsResponse_params protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_auth_v1beta1_query_proto_init() + md_QueryParamsResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryParamsResponse") + fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") +} + +var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) + +type fastReflection_QueryParamsResponse QueryParamsResponse + +func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryParamsResponse)(x) +} + +func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{} + +type fastReflection_QueryParamsResponse_messageType struct{} + +func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryParamsResponse)(nil) +} +func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryParamsResponse) +} +func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsResponse +} + +// 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_QueryParamsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryParamsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message { + return new(fastReflection_QueryParamsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryParamsResponse)(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_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_QueryParamsResponse_params, 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_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryParamsResponse.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse 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_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryParamsResponse.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse 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_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.auth.v1beta1.QueryParamsResponse.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse 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_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryParamsResponse.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse 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_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryParamsResponse.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse 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_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryParamsResponse.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse 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_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryParamsResponse", 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_QueryParamsResponse) 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_QueryParamsResponse) 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_QueryParamsResponse) 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_QueryParamsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryParamsResponse) + 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.Params != nil { + l = options.Size(x.Params) + 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().(*QueryParamsResponse) + 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.Params != nil { + encoded, err := options.Marshal(x.Params) + 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().(*QueryParamsResponse) + 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: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: 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 Params", 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.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); 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_QueryModuleAccountsRequest protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_auth_v1beta1_query_proto_init() + md_QueryModuleAccountsRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryModuleAccountsRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryModuleAccountsRequest)(nil) + +type fastReflection_QueryModuleAccountsRequest QueryModuleAccountsRequest + +func (x *QueryModuleAccountsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryModuleAccountsRequest)(x) +} + +func (x *QueryModuleAccountsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryModuleAccountsRequest_messageType fastReflection_QueryModuleAccountsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryModuleAccountsRequest_messageType{} + +type fastReflection_QueryModuleAccountsRequest_messageType struct{} + +func (x fastReflection_QueryModuleAccountsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryModuleAccountsRequest)(nil) +} +func (x fastReflection_QueryModuleAccountsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryModuleAccountsRequest) +} +func (x fastReflection_QueryModuleAccountsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryModuleAccountsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryModuleAccountsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryModuleAccountsRequest +} + +// 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_QueryModuleAccountsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryModuleAccountsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryModuleAccountsRequest) New() protoreflect.Message { + return new(fastReflection_QueryModuleAccountsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryModuleAccountsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryModuleAccountsRequest)(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_QueryModuleAccountsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryModuleAccountsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest 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_QueryModuleAccountsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest 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_QueryModuleAccountsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest 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_QueryModuleAccountsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest 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_QueryModuleAccountsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest 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_QueryModuleAccountsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest 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_QueryModuleAccountsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryModuleAccountsRequest", 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_QueryModuleAccountsRequest) 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_QueryModuleAccountsRequest) 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_QueryModuleAccountsRequest) 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_QueryModuleAccountsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryModuleAccountsRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryModuleAccountsRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryModuleAccountsRequest) + 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: QueryModuleAccountsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryModuleAccountsResponse_1_list)(nil) + +type _QueryModuleAccountsResponse_1_list struct { + list *[]*anypb.Any +} + +func (x *_QueryModuleAccountsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryModuleAccountsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryModuleAccountsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*anypb.Any) + (*x.list)[i] = concreteValue +} + +func (x *_QueryModuleAccountsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*anypb.Any) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryModuleAccountsResponse_1_list) AppendMutable() protoreflect.Value { + v := new(anypb.Any) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryModuleAccountsResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryModuleAccountsResponse_1_list) NewElement() protoreflect.Value { + v := new(anypb.Any) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryModuleAccountsResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryModuleAccountsResponse protoreflect.MessageDescriptor + fd_QueryModuleAccountsResponse_accounts protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_auth_v1beta1_query_proto_init() + md_QueryModuleAccountsResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryModuleAccountsResponse") + fd_QueryModuleAccountsResponse_accounts = md_QueryModuleAccountsResponse.Fields().ByName("accounts") +} + +var _ protoreflect.Message = (*fastReflection_QueryModuleAccountsResponse)(nil) + +type fastReflection_QueryModuleAccountsResponse QueryModuleAccountsResponse + +func (x *QueryModuleAccountsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryModuleAccountsResponse)(x) +} + +func (x *QueryModuleAccountsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryModuleAccountsResponse_messageType fastReflection_QueryModuleAccountsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryModuleAccountsResponse_messageType{} + +type fastReflection_QueryModuleAccountsResponse_messageType struct{} + +func (x fastReflection_QueryModuleAccountsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryModuleAccountsResponse)(nil) +} +func (x fastReflection_QueryModuleAccountsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryModuleAccountsResponse) +} +func (x fastReflection_QueryModuleAccountsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryModuleAccountsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryModuleAccountsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryModuleAccountsResponse +} + +// 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_QueryModuleAccountsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryModuleAccountsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryModuleAccountsResponse) New() protoreflect.Message { + return new(fastReflection_QueryModuleAccountsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryModuleAccountsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryModuleAccountsResponse)(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_QueryModuleAccountsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Accounts) != 0 { + value := protoreflect.ValueOfList(&_QueryModuleAccountsResponse_1_list{list: &x.Accounts}) + if !f(fd_QueryModuleAccountsResponse_accounts, 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_QueryModuleAccountsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": + return len(x.Accounts) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse 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_QueryModuleAccountsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": + x.Accounts = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse 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_QueryModuleAccountsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": + if len(x.Accounts) == 0 { + return protoreflect.ValueOfList(&_QueryModuleAccountsResponse_1_list{}) + } + listValue := &_QueryModuleAccountsResponse_1_list{list: &x.Accounts} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse 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_QueryModuleAccountsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": + lv := value.List() + clv := lv.(*_QueryModuleAccountsResponse_1_list) + x.Accounts = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse 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_QueryModuleAccountsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": + if x.Accounts == nil { + x.Accounts = []*anypb.Any{} + } + value := &_QueryModuleAccountsResponse_1_list{list: &x.Accounts} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse 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_QueryModuleAccountsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": + list := []*anypb.Any{} + return protoreflect.ValueOfList(&_QueryModuleAccountsResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse 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_QueryModuleAccountsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryModuleAccountsResponse", 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_QueryModuleAccountsResponse) 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_QueryModuleAccountsResponse) 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_QueryModuleAccountsResponse) 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_QueryModuleAccountsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryModuleAccountsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Accounts) > 0 { + for _, e := range x.Accounts { + l = options.Size(e) + 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().(*QueryModuleAccountsResponse) + 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.Accounts) > 0 { + for iNdEx := len(x.Accounts) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Accounts[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 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().(*QueryModuleAccountsResponse) + 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: QueryModuleAccountsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountsResponse: 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 Accounts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Accounts = append(x.Accounts, &anypb.Any{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Accounts[len(x.Accounts)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryModuleAccountByNameRequest protoreflect.MessageDescriptor + fd_QueryModuleAccountByNameRequest_name protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_auth_v1beta1_query_proto_init() + md_QueryModuleAccountByNameRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryModuleAccountByNameRequest") + fd_QueryModuleAccountByNameRequest_name = md_QueryModuleAccountByNameRequest.Fields().ByName("name") +} + +var _ protoreflect.Message = (*fastReflection_QueryModuleAccountByNameRequest)(nil) + +type fastReflection_QueryModuleAccountByNameRequest QueryModuleAccountByNameRequest + +func (x *QueryModuleAccountByNameRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryModuleAccountByNameRequest)(x) +} + +func (x *QueryModuleAccountByNameRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[8] + 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_QueryModuleAccountByNameRequest_messageType fastReflection_QueryModuleAccountByNameRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryModuleAccountByNameRequest_messageType{} + +type fastReflection_QueryModuleAccountByNameRequest_messageType struct{} + +func (x fastReflection_QueryModuleAccountByNameRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryModuleAccountByNameRequest)(nil) +} +func (x fastReflection_QueryModuleAccountByNameRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryModuleAccountByNameRequest) +} +func (x fastReflection_QueryModuleAccountByNameRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryModuleAccountByNameRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryModuleAccountByNameRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryModuleAccountByNameRequest +} + +// 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_QueryModuleAccountByNameRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryModuleAccountByNameRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryModuleAccountByNameRequest) New() protoreflect.Message { + return new(fastReflection_QueryModuleAccountByNameRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryModuleAccountByNameRequest) Interface() protoreflect.ProtoMessage { + return (*QueryModuleAccountByNameRequest)(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_QueryModuleAccountByNameRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Name != "" { + value := protoreflect.ValueOfString(x.Name) + if !f(fd_QueryModuleAccountByNameRequest_name, 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_QueryModuleAccountByNameRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest.name": + return x.Name != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameRequest 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_QueryModuleAccountByNameRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest.name": + x.Name = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameRequest 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_QueryModuleAccountByNameRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest.name": + value := x.Name + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameRequest 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_QueryModuleAccountByNameRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest.name": + x.Name = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameRequest 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_QueryModuleAccountByNameRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest.name": + panic(fmt.Errorf("field name of message cosmos.auth.v1beta1.QueryModuleAccountByNameRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameRequest 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_QueryModuleAccountByNameRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest.name": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameRequest 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_QueryModuleAccountByNameRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryModuleAccountByNameRequest", 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_QueryModuleAccountByNameRequest) 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_QueryModuleAccountByNameRequest) 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_QueryModuleAccountByNameRequest) 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_QueryModuleAccountByNameRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryModuleAccountByNameRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Name) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + 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().(*QueryModuleAccountByNameRequest) + 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.Name) > 0 { + i -= len(x.Name) + copy(dAtA[i:], x.Name) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryModuleAccountByNameRequest) + 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: QueryModuleAccountByNameRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountByNameRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + 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_QueryModuleAccountByNameResponse protoreflect.MessageDescriptor + fd_QueryModuleAccountByNameResponse_account protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_auth_v1beta1_query_proto_init() + md_QueryModuleAccountByNameResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryModuleAccountByNameResponse") + fd_QueryModuleAccountByNameResponse_account = md_QueryModuleAccountByNameResponse.Fields().ByName("account") +} + +var _ protoreflect.Message = (*fastReflection_QueryModuleAccountByNameResponse)(nil) + +type fastReflection_QueryModuleAccountByNameResponse QueryModuleAccountByNameResponse + +func (x *QueryModuleAccountByNameResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryModuleAccountByNameResponse)(x) +} + +func (x *QueryModuleAccountByNameResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[9] + 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_QueryModuleAccountByNameResponse_messageType fastReflection_QueryModuleAccountByNameResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryModuleAccountByNameResponse_messageType{} + +type fastReflection_QueryModuleAccountByNameResponse_messageType struct{} + +func (x fastReflection_QueryModuleAccountByNameResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryModuleAccountByNameResponse)(nil) +} +func (x fastReflection_QueryModuleAccountByNameResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryModuleAccountByNameResponse) +} +func (x fastReflection_QueryModuleAccountByNameResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryModuleAccountByNameResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryModuleAccountByNameResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryModuleAccountByNameResponse +} + +// 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_QueryModuleAccountByNameResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryModuleAccountByNameResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryModuleAccountByNameResponse) New() protoreflect.Message { + return new(fastReflection_QueryModuleAccountByNameResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryModuleAccountByNameResponse) Interface() protoreflect.ProtoMessage { + return (*QueryModuleAccountByNameResponse)(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_QueryModuleAccountByNameResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Account != nil { + value := protoreflect.ValueOfMessage(x.Account.ProtoReflect()) + if !f(fd_QueryModuleAccountByNameResponse_account, 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_QueryModuleAccountByNameResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account": + return x.Account != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameResponse 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_QueryModuleAccountByNameResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account": + x.Account = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameResponse 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_QueryModuleAccountByNameResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account": + value := x.Account + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameResponse 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_QueryModuleAccountByNameResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account": + x.Account = value.Message().Interface().(*anypb.Any) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameResponse 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_QueryModuleAccountByNameResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account": + if x.Account == nil { + x.Account = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.Account.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameResponse 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_QueryModuleAccountByNameResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameResponse 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_QueryModuleAccountByNameResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryModuleAccountByNameResponse", 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_QueryModuleAccountByNameResponse) 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_QueryModuleAccountByNameResponse) 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_QueryModuleAccountByNameResponse) 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_QueryModuleAccountByNameResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryModuleAccountByNameResponse) + 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.Account != nil { + l = options.Size(x.Account) + 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().(*QueryModuleAccountByNameResponse) + 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.Account != nil { + encoded, err := options.Marshal(x.Account) + 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().(*QueryModuleAccountByNameResponse) + 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: QueryModuleAccountByNameResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountByNameResponse: 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 Account", 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.Account == nil { + x.Account = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Account); 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_Bech32PrefixRequest protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_auth_v1beta1_query_proto_init() + md_Bech32PrefixRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("Bech32PrefixRequest") +} + +var _ protoreflect.Message = (*fastReflection_Bech32PrefixRequest)(nil) + +type fastReflection_Bech32PrefixRequest Bech32PrefixRequest + +func (x *Bech32PrefixRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_Bech32PrefixRequest)(x) +} + +func (x *Bech32PrefixRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[10] + 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_Bech32PrefixRequest_messageType fastReflection_Bech32PrefixRequest_messageType +var _ protoreflect.MessageType = fastReflection_Bech32PrefixRequest_messageType{} + +type fastReflection_Bech32PrefixRequest_messageType struct{} + +func (x fastReflection_Bech32PrefixRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_Bech32PrefixRequest)(nil) +} +func (x fastReflection_Bech32PrefixRequest_messageType) New() protoreflect.Message { + return new(fastReflection_Bech32PrefixRequest) +} +func (x fastReflection_Bech32PrefixRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Bech32PrefixRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Bech32PrefixRequest) Descriptor() protoreflect.MessageDescriptor { + return md_Bech32PrefixRequest +} + +// 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_Bech32PrefixRequest) Type() protoreflect.MessageType { + return _fastReflection_Bech32PrefixRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Bech32PrefixRequest) New() protoreflect.Message { + return new(fastReflection_Bech32PrefixRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Bech32PrefixRequest) Interface() protoreflect.ProtoMessage { + return (*Bech32PrefixRequest)(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_Bech32PrefixRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Bech32PrefixRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixRequest 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_Bech32PrefixRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixRequest 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_Bech32PrefixRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixRequest 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_Bech32PrefixRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixRequest 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_Bech32PrefixRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixRequest 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_Bech32PrefixRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixRequest 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_Bech32PrefixRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.Bech32PrefixRequest", 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_Bech32PrefixRequest) 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_Bech32PrefixRequest) 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_Bech32PrefixRequest) 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_Bech32PrefixRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Bech32PrefixRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Bech32PrefixRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Bech32PrefixRequest) + 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: Bech32PrefixRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Bech32PrefixRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_Bech32PrefixResponse protoreflect.MessageDescriptor + fd_Bech32PrefixResponse_bech32_prefix protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_auth_v1beta1_query_proto_init() + md_Bech32PrefixResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("Bech32PrefixResponse") + fd_Bech32PrefixResponse_bech32_prefix = md_Bech32PrefixResponse.Fields().ByName("bech32_prefix") +} + +var _ protoreflect.Message = (*fastReflection_Bech32PrefixResponse)(nil) + +type fastReflection_Bech32PrefixResponse Bech32PrefixResponse + +func (x *Bech32PrefixResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_Bech32PrefixResponse)(x) +} + +func (x *Bech32PrefixResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[11] + 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_Bech32PrefixResponse_messageType fastReflection_Bech32PrefixResponse_messageType +var _ protoreflect.MessageType = fastReflection_Bech32PrefixResponse_messageType{} + +type fastReflection_Bech32PrefixResponse_messageType struct{} + +func (x fastReflection_Bech32PrefixResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_Bech32PrefixResponse)(nil) +} +func (x fastReflection_Bech32PrefixResponse_messageType) New() protoreflect.Message { + return new(fastReflection_Bech32PrefixResponse) +} +func (x fastReflection_Bech32PrefixResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Bech32PrefixResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Bech32PrefixResponse) Descriptor() protoreflect.MessageDescriptor { + return md_Bech32PrefixResponse +} + +// 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_Bech32PrefixResponse) Type() protoreflect.MessageType { + return _fastReflection_Bech32PrefixResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Bech32PrefixResponse) New() protoreflect.Message { + return new(fastReflection_Bech32PrefixResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Bech32PrefixResponse) Interface() protoreflect.ProtoMessage { + return (*Bech32PrefixResponse)(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_Bech32PrefixResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Bech32Prefix != "" { + value := protoreflect.ValueOfString(x.Bech32Prefix) + if !f(fd_Bech32PrefixResponse_bech32_prefix, 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_Bech32PrefixResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.auth.v1beta1.Bech32PrefixResponse.bech32_prefix": + return x.Bech32Prefix != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixResponse 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_Bech32PrefixResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.Bech32PrefixResponse.bech32_prefix": + x.Bech32Prefix = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixResponse 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_Bech32PrefixResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.auth.v1beta1.Bech32PrefixResponse.bech32_prefix": + value := x.Bech32Prefix + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixResponse 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_Bech32PrefixResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.Bech32PrefixResponse.bech32_prefix": + x.Bech32Prefix = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixResponse 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_Bech32PrefixResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.Bech32PrefixResponse.bech32_prefix": + panic(fmt.Errorf("field bech32_prefix of message cosmos.auth.v1beta1.Bech32PrefixResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixResponse 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_Bech32PrefixResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.Bech32PrefixResponse.bech32_prefix": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixResponse 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_Bech32PrefixResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.Bech32PrefixResponse", 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_Bech32PrefixResponse) 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_Bech32PrefixResponse) 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_Bech32PrefixResponse) 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_Bech32PrefixResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Bech32PrefixResponse) + 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.Bech32Prefix) + 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().(*Bech32PrefixResponse) + 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.Bech32Prefix) > 0 { + i -= len(x.Bech32Prefix) + copy(dAtA[i:], x.Bech32Prefix) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bech32Prefix))) + 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().(*Bech32PrefixResponse) + 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: Bech32PrefixResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Bech32PrefixResponse: 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 Bech32Prefix", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Bech32Prefix = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + 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_AddressBytesToStringRequest protoreflect.MessageDescriptor + fd_AddressBytesToStringRequest_address_bytes protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_auth_v1beta1_query_proto_init() + md_AddressBytesToStringRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("AddressBytesToStringRequest") + fd_AddressBytesToStringRequest_address_bytes = md_AddressBytesToStringRequest.Fields().ByName("address_bytes") +} + +var _ protoreflect.Message = (*fastReflection_AddressBytesToStringRequest)(nil) + +type fastReflection_AddressBytesToStringRequest AddressBytesToStringRequest + +func (x *AddressBytesToStringRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_AddressBytesToStringRequest)(x) +} + +func (x *AddressBytesToStringRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[12] + 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_AddressBytesToStringRequest_messageType fastReflection_AddressBytesToStringRequest_messageType +var _ protoreflect.MessageType = fastReflection_AddressBytesToStringRequest_messageType{} + +type fastReflection_AddressBytesToStringRequest_messageType struct{} + +func (x fastReflection_AddressBytesToStringRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_AddressBytesToStringRequest)(nil) +} +func (x fastReflection_AddressBytesToStringRequest_messageType) New() protoreflect.Message { + return new(fastReflection_AddressBytesToStringRequest) +} +func (x fastReflection_AddressBytesToStringRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AddressBytesToStringRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_AddressBytesToStringRequest) Descriptor() protoreflect.MessageDescriptor { + return md_AddressBytesToStringRequest +} + +// 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_AddressBytesToStringRequest) Type() protoreflect.MessageType { + return _fastReflection_AddressBytesToStringRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_AddressBytesToStringRequest) New() protoreflect.Message { + return new(fastReflection_AddressBytesToStringRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_AddressBytesToStringRequest) Interface() protoreflect.ProtoMessage { + return (*AddressBytesToStringRequest)(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_AddressBytesToStringRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.AddressBytes) != 0 { + value := protoreflect.ValueOfBytes(x.AddressBytes) + if !f(fd_AddressBytesToStringRequest_address_bytes, 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_AddressBytesToStringRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.auth.v1beta1.AddressBytesToStringRequest.address_bytes": + return len(x.AddressBytes) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringRequest 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_AddressBytesToStringRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.AddressBytesToStringRequest.address_bytes": + x.AddressBytes = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringRequest 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_AddressBytesToStringRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.auth.v1beta1.AddressBytesToStringRequest.address_bytes": + value := x.AddressBytes + return protoreflect.ValueOfBytes(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringRequest 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_AddressBytesToStringRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.AddressBytesToStringRequest.address_bytes": + x.AddressBytes = value.Bytes() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringRequest 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_AddressBytesToStringRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.AddressBytesToStringRequest.address_bytes": + panic(fmt.Errorf("field address_bytes of message cosmos.auth.v1beta1.AddressBytesToStringRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringRequest 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_AddressBytesToStringRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.AddressBytesToStringRequest.address_bytes": + return protoreflect.ValueOfBytes(nil) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringRequest 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_AddressBytesToStringRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.AddressBytesToStringRequest", 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_AddressBytesToStringRequest) 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_AddressBytesToStringRequest) 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_AddressBytesToStringRequest) 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_AddressBytesToStringRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*AddressBytesToStringRequest) + 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.AddressBytes) + 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().(*AddressBytesToStringRequest) + 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.AddressBytes) > 0 { + i -= len(x.AddressBytes) + copy(dAtA[i:], x.AddressBytes) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AddressBytes))) + 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().(*AddressBytesToStringRequest) + 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: AddressBytesToStringRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AddressBytesToStringRequest: 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 AddressBytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.AddressBytes = append(x.AddressBytes[:0], dAtA[iNdEx:postIndex]...) + if x.AddressBytes == nil { + x.AddressBytes = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_AddressBytesToStringResponse protoreflect.MessageDescriptor + fd_AddressBytesToStringResponse_address_string protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_auth_v1beta1_query_proto_init() + md_AddressBytesToStringResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("AddressBytesToStringResponse") + fd_AddressBytesToStringResponse_address_string = md_AddressBytesToStringResponse.Fields().ByName("address_string") +} + +var _ protoreflect.Message = (*fastReflection_AddressBytesToStringResponse)(nil) + +type fastReflection_AddressBytesToStringResponse AddressBytesToStringResponse + +func (x *AddressBytesToStringResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_AddressBytesToStringResponse)(x) +} + +func (x *AddressBytesToStringResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[13] + 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_AddressBytesToStringResponse_messageType fastReflection_AddressBytesToStringResponse_messageType +var _ protoreflect.MessageType = fastReflection_AddressBytesToStringResponse_messageType{} + +type fastReflection_AddressBytesToStringResponse_messageType struct{} + +func (x fastReflection_AddressBytesToStringResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_AddressBytesToStringResponse)(nil) +} +func (x fastReflection_AddressBytesToStringResponse_messageType) New() protoreflect.Message { + return new(fastReflection_AddressBytesToStringResponse) +} +func (x fastReflection_AddressBytesToStringResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AddressBytesToStringResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_AddressBytesToStringResponse) Descriptor() protoreflect.MessageDescriptor { + return md_AddressBytesToStringResponse +} + +// 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_AddressBytesToStringResponse) Type() protoreflect.MessageType { + return _fastReflection_AddressBytesToStringResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_AddressBytesToStringResponse) New() protoreflect.Message { + return new(fastReflection_AddressBytesToStringResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_AddressBytesToStringResponse) Interface() protoreflect.ProtoMessage { + return (*AddressBytesToStringResponse)(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_AddressBytesToStringResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.AddressString != "" { + value := protoreflect.ValueOfString(x.AddressString) + if !f(fd_AddressBytesToStringResponse_address_string, 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_AddressBytesToStringResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.auth.v1beta1.AddressBytesToStringResponse.address_string": + return x.AddressString != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringResponse 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_AddressBytesToStringResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.AddressBytesToStringResponse.address_string": + x.AddressString = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringResponse 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_AddressBytesToStringResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.auth.v1beta1.AddressBytesToStringResponse.address_string": + value := x.AddressString + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringResponse 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_AddressBytesToStringResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.AddressBytesToStringResponse.address_string": + x.AddressString = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringResponse 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_AddressBytesToStringResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.AddressBytesToStringResponse.address_string": + panic(fmt.Errorf("field address_string of message cosmos.auth.v1beta1.AddressBytesToStringResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringResponse 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_AddressBytesToStringResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.AddressBytesToStringResponse.address_string": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringResponse 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_AddressBytesToStringResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.AddressBytesToStringResponse", 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_AddressBytesToStringResponse) 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_AddressBytesToStringResponse) 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_AddressBytesToStringResponse) 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_AddressBytesToStringResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*AddressBytesToStringResponse) + 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.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().(*AddressBytesToStringResponse) + 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.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().(*AddressBytesToStringResponse) + 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: AddressBytesToStringResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AddressBytesToStringResponse: 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 + 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_AddressStringToBytesRequest protoreflect.MessageDescriptor + fd_AddressStringToBytesRequest_address_string protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_auth_v1beta1_query_proto_init() + md_AddressStringToBytesRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("AddressStringToBytesRequest") + fd_AddressStringToBytesRequest_address_string = md_AddressStringToBytesRequest.Fields().ByName("address_string") +} + +var _ protoreflect.Message = (*fastReflection_AddressStringToBytesRequest)(nil) + +type fastReflection_AddressStringToBytesRequest AddressStringToBytesRequest + +func (x *AddressStringToBytesRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_AddressStringToBytesRequest)(x) +} + +func (x *AddressStringToBytesRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_AddressStringToBytesRequest_messageType fastReflection_AddressStringToBytesRequest_messageType +var _ protoreflect.MessageType = fastReflection_AddressStringToBytesRequest_messageType{} + +type fastReflection_AddressStringToBytesRequest_messageType struct{} + +func (x fastReflection_AddressStringToBytesRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_AddressStringToBytesRequest)(nil) +} +func (x fastReflection_AddressStringToBytesRequest_messageType) New() protoreflect.Message { + return new(fastReflection_AddressStringToBytesRequest) +} +func (x fastReflection_AddressStringToBytesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AddressStringToBytesRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_AddressStringToBytesRequest) Descriptor() protoreflect.MessageDescriptor { + return md_AddressStringToBytesRequest +} + +// 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_AddressStringToBytesRequest) Type() protoreflect.MessageType { + return _fastReflection_AddressStringToBytesRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_AddressStringToBytesRequest) New() protoreflect.Message { + return new(fastReflection_AddressStringToBytesRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_AddressStringToBytesRequest) Interface() protoreflect.ProtoMessage { + return (*AddressStringToBytesRequest)(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_AddressStringToBytesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.AddressString != "" { + value := protoreflect.ValueOfString(x.AddressString) + if !f(fd_AddressStringToBytesRequest_address_string, 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_AddressStringToBytesRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.auth.v1beta1.AddressStringToBytesRequest.address_string": + return x.AddressString != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesRequest 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_AddressStringToBytesRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.AddressStringToBytesRequest.address_string": + x.AddressString = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesRequest 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_AddressStringToBytesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.auth.v1beta1.AddressStringToBytesRequest.address_string": + value := x.AddressString + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesRequest 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_AddressStringToBytesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.AddressStringToBytesRequest.address_string": + x.AddressString = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesRequest 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_AddressStringToBytesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.AddressStringToBytesRequest.address_string": + panic(fmt.Errorf("field address_string of message cosmos.auth.v1beta1.AddressStringToBytesRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesRequest 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_AddressStringToBytesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.AddressStringToBytesRequest.address_string": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesRequest 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_AddressStringToBytesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.AddressStringToBytesRequest", 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_AddressStringToBytesRequest) 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_AddressStringToBytesRequest) 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_AddressStringToBytesRequest) 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_AddressStringToBytesRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*AddressStringToBytesRequest) + 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.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().(*AddressStringToBytesRequest) + 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.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().(*AddressStringToBytesRequest) + 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: AddressStringToBytesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AddressStringToBytesRequest: 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 + 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_AddressStringToBytesResponse protoreflect.MessageDescriptor + fd_AddressStringToBytesResponse_address_bytes protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_auth_v1beta1_query_proto_init() + md_AddressStringToBytesResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("AddressStringToBytesResponse") + fd_AddressStringToBytesResponse_address_bytes = md_AddressStringToBytesResponse.Fields().ByName("address_bytes") +} + +var _ protoreflect.Message = (*fastReflection_AddressStringToBytesResponse)(nil) + +type fastReflection_AddressStringToBytesResponse AddressStringToBytesResponse + +func (x *AddressStringToBytesResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_AddressStringToBytesResponse)(x) +} + +func (x *AddressStringToBytesResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_AddressStringToBytesResponse_messageType fastReflection_AddressStringToBytesResponse_messageType +var _ protoreflect.MessageType = fastReflection_AddressStringToBytesResponse_messageType{} + +type fastReflection_AddressStringToBytesResponse_messageType struct{} + +func (x fastReflection_AddressStringToBytesResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_AddressStringToBytesResponse)(nil) +} +func (x fastReflection_AddressStringToBytesResponse_messageType) New() protoreflect.Message { + return new(fastReflection_AddressStringToBytesResponse) +} +func (x fastReflection_AddressStringToBytesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AddressStringToBytesResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_AddressStringToBytesResponse) Descriptor() protoreflect.MessageDescriptor { + return md_AddressStringToBytesResponse +} + +// 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_AddressStringToBytesResponse) Type() protoreflect.MessageType { + return _fastReflection_AddressStringToBytesResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_AddressStringToBytesResponse) New() protoreflect.Message { + return new(fastReflection_AddressStringToBytesResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_AddressStringToBytesResponse) Interface() protoreflect.ProtoMessage { + return (*AddressStringToBytesResponse)(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_AddressStringToBytesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.AddressBytes) != 0 { + value := protoreflect.ValueOfBytes(x.AddressBytes) + if !f(fd_AddressStringToBytesResponse_address_bytes, 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_AddressStringToBytesResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.auth.v1beta1.AddressStringToBytesResponse.address_bytes": + return len(x.AddressBytes) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesResponse 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_AddressStringToBytesResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.AddressStringToBytesResponse.address_bytes": + x.AddressBytes = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesResponse 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_AddressStringToBytesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.auth.v1beta1.AddressStringToBytesResponse.address_bytes": + value := x.AddressBytes + return protoreflect.ValueOfBytes(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesResponse 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_AddressStringToBytesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.AddressStringToBytesResponse.address_bytes": + x.AddressBytes = value.Bytes() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesResponse 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_AddressStringToBytesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.AddressStringToBytesResponse.address_bytes": + panic(fmt.Errorf("field address_bytes of message cosmos.auth.v1beta1.AddressStringToBytesResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesResponse 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_AddressStringToBytesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.AddressStringToBytesResponse.address_bytes": + return protoreflect.ValueOfBytes(nil) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesResponse 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_AddressStringToBytesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.AddressStringToBytesResponse", 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_AddressStringToBytesResponse) 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_AddressStringToBytesResponse) 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_AddressStringToBytesResponse) 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_AddressStringToBytesResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*AddressStringToBytesResponse) + 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.AddressBytes) + 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().(*AddressStringToBytesResponse) + 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.AddressBytes) > 0 { + i -= len(x.AddressBytes) + copy(dAtA[i:], x.AddressBytes) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AddressBytes))) + 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().(*AddressStringToBytesResponse) + 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: AddressStringToBytesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AddressStringToBytesResponse: 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 AddressBytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.AddressBytes = append(x.AddressBytes[:0], dAtA[iNdEx:postIndex]...) + if x.AddressBytes == nil { + x.AddressBytes = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryAccountAddressByIDRequest protoreflect.MessageDescriptor + fd_QueryAccountAddressByIDRequest_id protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_auth_v1beta1_query_proto_init() + md_QueryAccountAddressByIDRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryAccountAddressByIDRequest") + fd_QueryAccountAddressByIDRequest_id = md_QueryAccountAddressByIDRequest.Fields().ByName("id") +} + +var _ protoreflect.Message = (*fastReflection_QueryAccountAddressByIDRequest)(nil) + +type fastReflection_QueryAccountAddressByIDRequest QueryAccountAddressByIDRequest + +func (x *QueryAccountAddressByIDRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAccountAddressByIDRequest)(x) +} + +func (x *QueryAccountAddressByIDRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[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_QueryAccountAddressByIDRequest_messageType fastReflection_QueryAccountAddressByIDRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryAccountAddressByIDRequest_messageType{} + +type fastReflection_QueryAccountAddressByIDRequest_messageType struct{} + +func (x fastReflection_QueryAccountAddressByIDRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAccountAddressByIDRequest)(nil) +} +func (x fastReflection_QueryAccountAddressByIDRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAccountAddressByIDRequest) +} +func (x fastReflection_QueryAccountAddressByIDRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountAddressByIDRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAccountAddressByIDRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountAddressByIDRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryAccountAddressByIDRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryAccountAddressByIDRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAccountAddressByIDRequest) New() protoreflect.Message { + return new(fastReflection_QueryAccountAddressByIDRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAccountAddressByIDRequest) Interface() protoreflect.ProtoMessage { + return (*QueryAccountAddressByIDRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryAccountAddressByIDRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != int64(0) { + value := protoreflect.ValueOfInt64(x.Id) + if !f(fd_QueryAccountAddressByIDRequest_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAccountAddressByIDRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.id": + return x.Id != int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAccountAddressByIDRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.id": + x.Id = int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryAccountAddressByIDRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.id": + value := x.Id + return protoreflect.ValueOfInt64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAccountAddressByIDRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.id": + x.Id = value.Int() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAccountAddressByIDRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.id": + panic(fmt.Errorf("field id of message cosmos.auth.v1beta1.QueryAccountAddressByIDRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryAccountAddressByIDRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.id": + return protoreflect.ValueOfInt64(int64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryAccountAddressByIDRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryAccountAddressByIDRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryAccountAddressByIDRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAccountAddressByIDRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryAccountAddressByIDRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryAccountAddressByIDRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAccountAddressByIDRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Id != 0 { + n += 1 + runtime.Sov(uint64(x.Id)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAccountAddressByIDRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Id != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAccountAddressByIDRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountAddressByIDRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountAddressByIDRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + x.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Id |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryAccountAddressByIDResponse protoreflect.MessageDescriptor + fd_QueryAccountAddressByIDResponse_account_address protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_auth_v1beta1_query_proto_init() + md_QueryAccountAddressByIDResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryAccountAddressByIDResponse") + fd_QueryAccountAddressByIDResponse_account_address = md_QueryAccountAddressByIDResponse.Fields().ByName("account_address") +} + +var _ protoreflect.Message = (*fastReflection_QueryAccountAddressByIDResponse)(nil) + +type fastReflection_QueryAccountAddressByIDResponse QueryAccountAddressByIDResponse + +func (x *QueryAccountAddressByIDResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAccountAddressByIDResponse)(x) +} + +func (x *QueryAccountAddressByIDResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[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_QueryAccountAddressByIDResponse_messageType fastReflection_QueryAccountAddressByIDResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAccountAddressByIDResponse_messageType{} + +type fastReflection_QueryAccountAddressByIDResponse_messageType struct{} + +func (x fastReflection_QueryAccountAddressByIDResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAccountAddressByIDResponse)(nil) +} +func (x fastReflection_QueryAccountAddressByIDResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAccountAddressByIDResponse) +} +func (x fastReflection_QueryAccountAddressByIDResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountAddressByIDResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAccountAddressByIDResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountAddressByIDResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryAccountAddressByIDResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAccountAddressByIDResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAccountAddressByIDResponse) New() protoreflect.Message { + return new(fastReflection_QueryAccountAddressByIDResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAccountAddressByIDResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAccountAddressByIDResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryAccountAddressByIDResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.AccountAddress != "" { + value := protoreflect.ValueOfString(x.AccountAddress) + if !f(fd_QueryAccountAddressByIDResponse_account_address, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAccountAddressByIDResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountAddressByIDResponse.account_address": + return x.AccountAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAccountAddressByIDResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountAddressByIDResponse.account_address": + x.AccountAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryAccountAddressByIDResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.auth.v1beta1.QueryAccountAddressByIDResponse.account_address": + value := x.AccountAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAccountAddressByIDResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountAddressByIDResponse.account_address": + x.AccountAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAccountAddressByIDResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountAddressByIDResponse.account_address": + panic(fmt.Errorf("field account_address of message cosmos.auth.v1beta1.QueryAccountAddressByIDResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryAccountAddressByIDResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountAddressByIDResponse.account_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryAccountAddressByIDResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryAccountAddressByIDResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryAccountAddressByIDResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAccountAddressByIDResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryAccountAddressByIDResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryAccountAddressByIDResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAccountAddressByIDResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.AccountAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAccountAddressByIDResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.AccountAddress) > 0 { + i -= len(x.AccountAddress) + copy(dAtA[i:], x.AccountAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AccountAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAccountAddressByIDResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountAddressByIDResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountAddressByIDResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AccountAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.AccountAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +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[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_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[19] + 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().(*BaseAccount) + 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(BaseAccount) + } + 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(BaseAccount) + 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 = &BaseAccount{} + } + 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, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: cosmos/auth/v1beta1/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) +) + +// QueryAccountsRequest is the request type for the Query/Accounts RPC method. +// +// Since: cosmos-sdk 0.43 +type QueryAccountsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // pagination defines an optional pagination for the request. + Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryAccountsRequest) Reset() { + *x = QueryAccountsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAccountsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAccountsRequest) ProtoMessage() {} + +// Deprecated: Use QueryAccountsRequest.ProtoReflect.Descriptor instead. +func (*QueryAccountsRequest) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{0} +} + +func (x *QueryAccountsRequest) GetPagination() *v1beta1.PageRequest { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryAccountsResponse is the response type for the Query/Accounts RPC method. +// +// Since: cosmos-sdk 0.43 +type QueryAccountsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // accounts are the existing accounts + Accounts []*anypb.Any `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` + // pagination defines the pagination in the response. + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryAccountsResponse) Reset() { + *x = QueryAccountsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAccountsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAccountsResponse) ProtoMessage() {} + +// Deprecated: Use QueryAccountsResponse.ProtoReflect.Descriptor instead. +func (*QueryAccountsResponse) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{1} +} + +func (x *QueryAccountsResponse) GetAccounts() []*anypb.Any { + if x != nil { + return x.Accounts + } + return nil +} + +func (x *QueryAccountsResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryAccountRequest is the request type for the Query/Account RPC method. +type QueryAccountRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // address defines the address to query for. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (x *QueryAccountRequest) Reset() { + *x = QueryAccountRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAccountRequest) ProtoMessage() {} + +// Deprecated: Use QueryAccountRequest.ProtoReflect.Descriptor instead. +func (*QueryAccountRequest) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{2} +} + +func (x *QueryAccountRequest) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +// QueryAccountResponse is the response type for the Query/Account RPC method. +type QueryAccountResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // account defines the account of the corresponding address. + Account *anypb.Any `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` +} + +func (x *QueryAccountResponse) Reset() { + *x = QueryAccountResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAccountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAccountResponse) ProtoMessage() {} + +// Deprecated: Use QueryAccountResponse.ProtoReflect.Descriptor instead. +func (*QueryAccountResponse) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{3} +} + +func (x *QueryAccountResponse) GetAccount() *anypb.Any { + if x != nil { + return x.Account + } + return nil +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +type QueryParamsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryParamsRequest) Reset() { + *x = QueryParamsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryParamsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryParamsRequest) ProtoMessage() {} + +// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{4} +} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +type QueryParamsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // params defines the parameters of the module. + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *QueryParamsResponse) Reset() { + *x = QueryParamsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryParamsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryParamsResponse) ProtoMessage() {} + +// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{5} +} + +func (x *QueryParamsResponse) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +// QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. +// +// Since: cosmos-sdk 0.46 +type QueryModuleAccountsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryModuleAccountsRequest) Reset() { + *x = QueryModuleAccountsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryModuleAccountsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryModuleAccountsRequest) ProtoMessage() {} + +// Deprecated: Use QueryModuleAccountsRequest.ProtoReflect.Descriptor instead. +func (*QueryModuleAccountsRequest) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{6} +} + +// QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. +// +// Since: cosmos-sdk 0.46 +type QueryModuleAccountsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Accounts []*anypb.Any `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` +} + +func (x *QueryModuleAccountsResponse) Reset() { + *x = QueryModuleAccountsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryModuleAccountsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryModuleAccountsResponse) ProtoMessage() {} + +// Deprecated: Use QueryModuleAccountsResponse.ProtoReflect.Descriptor instead. +func (*QueryModuleAccountsResponse) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{7} +} + +func (x *QueryModuleAccountsResponse) GetAccounts() []*anypb.Any { + if x != nil { + return x.Accounts + } + return nil +} + +// QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. +type QueryModuleAccountByNameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *QueryModuleAccountByNameRequest) Reset() { + *x = QueryModuleAccountByNameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryModuleAccountByNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryModuleAccountByNameRequest) ProtoMessage() {} + +// Deprecated: Use QueryModuleAccountByNameRequest.ProtoReflect.Descriptor instead. +func (*QueryModuleAccountByNameRequest) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{8} +} + +func (x *QueryModuleAccountByNameRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. +type QueryModuleAccountByNameResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Account *anypb.Any `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` +} + +func (x *QueryModuleAccountByNameResponse) Reset() { + *x = QueryModuleAccountByNameResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryModuleAccountByNameResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryModuleAccountByNameResponse) ProtoMessage() {} + +// Deprecated: Use QueryModuleAccountByNameResponse.ProtoReflect.Descriptor instead. +func (*QueryModuleAccountByNameResponse) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{9} +} + +func (x *QueryModuleAccountByNameResponse) GetAccount() *anypb.Any { + if x != nil { + return x.Account + } + return nil +} + +// Bech32PrefixRequest is the request type for Bech32Prefix rpc method. +// +// Since: cosmos-sdk 0.46 +type Bech32PrefixRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Bech32PrefixRequest) Reset() { + *x = Bech32PrefixRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Bech32PrefixRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bech32PrefixRequest) ProtoMessage() {} + +// Deprecated: Use Bech32PrefixRequest.ProtoReflect.Descriptor instead. +func (*Bech32PrefixRequest) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{10} +} + +// Bech32PrefixResponse is the response type for Bech32Prefix rpc method. +// +// Since: cosmos-sdk 0.46 +type Bech32PrefixResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bech32Prefix string `protobuf:"bytes,1,opt,name=bech32_prefix,json=bech32Prefix,proto3" json:"bech32_prefix,omitempty"` +} + +func (x *Bech32PrefixResponse) Reset() { + *x = Bech32PrefixResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Bech32PrefixResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bech32PrefixResponse) ProtoMessage() {} + +// Deprecated: Use Bech32PrefixResponse.ProtoReflect.Descriptor instead. +func (*Bech32PrefixResponse) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{11} +} + +func (x *Bech32PrefixResponse) GetBech32Prefix() string { + if x != nil { + return x.Bech32Prefix + } + return "" +} + +// AddressBytesToStringRequest is the request type for AddressString rpc method. +// +// Since: cosmos-sdk 0.46 +type AddressBytesToStringRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AddressBytes []byte `protobuf:"bytes,1,opt,name=address_bytes,json=addressBytes,proto3" json:"address_bytes,omitempty"` +} + +func (x *AddressBytesToStringRequest) Reset() { + *x = AddressBytesToStringRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddressBytesToStringRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddressBytesToStringRequest) ProtoMessage() {} + +// Deprecated: Use AddressBytesToStringRequest.ProtoReflect.Descriptor instead. +func (*AddressBytesToStringRequest) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{12} +} + +func (x *AddressBytesToStringRequest) GetAddressBytes() []byte { + if x != nil { + return x.AddressBytes + } + return nil +} + +// AddressBytesToStringResponse is the response type for AddressString rpc method. +// +// Since: cosmos-sdk 0.46 +type AddressBytesToStringResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AddressString string `protobuf:"bytes,1,opt,name=address_string,json=addressString,proto3" json:"address_string,omitempty"` +} + +func (x *AddressBytesToStringResponse) Reset() { + *x = AddressBytesToStringResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddressBytesToStringResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddressBytesToStringResponse) ProtoMessage() {} + +// Deprecated: Use AddressBytesToStringResponse.ProtoReflect.Descriptor instead. +func (*AddressBytesToStringResponse) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{13} +} + +func (x *AddressBytesToStringResponse) GetAddressString() string { + if x != nil { + return x.AddressString + } + return "" +} + +// AddressStringToBytesRequest is the request type for AccountBytes rpc method. +// +// Since: cosmos-sdk 0.46 +type AddressStringToBytesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AddressString string `protobuf:"bytes,1,opt,name=address_string,json=addressString,proto3" json:"address_string,omitempty"` +} + +func (x *AddressStringToBytesRequest) Reset() { + *x = AddressStringToBytesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddressStringToBytesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddressStringToBytesRequest) ProtoMessage() {} + +// Deprecated: Use AddressStringToBytesRequest.ProtoReflect.Descriptor instead. +func (*AddressStringToBytesRequest) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{14} +} + +func (x *AddressStringToBytesRequest) GetAddressString() string { + if x != nil { + return x.AddressString + } + return "" +} + +// AddressStringToBytesResponse is the response type for AddressBytes rpc method. +// +// Since: cosmos-sdk 0.46 +type AddressStringToBytesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AddressBytes []byte `protobuf:"bytes,1,opt,name=address_bytes,json=addressBytes,proto3" json:"address_bytes,omitempty"` +} + +func (x *AddressStringToBytesResponse) Reset() { + *x = AddressStringToBytesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddressStringToBytesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddressStringToBytesResponse) ProtoMessage() {} + +// Deprecated: Use AddressStringToBytesResponse.ProtoReflect.Descriptor instead. +func (*AddressStringToBytesResponse) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{15} +} + +func (x *AddressStringToBytesResponse) GetAddressBytes() []byte { + if x != nil { + return x.AddressBytes + } + return nil +} + +// QueryAccountAddressByIDRequest is the request type for AccountAddressByID rpc method +// +// Since: cosmos-sdk 0.46.2 +type QueryAccountAddressByIDRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // id is the account number of the address to be queried. This field + // should have been an uint64 (like all account numbers), and will be + // updated to uint64 in a future version of the auth query. + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *QueryAccountAddressByIDRequest) Reset() { + *x = QueryAccountAddressByIDRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAccountAddressByIDRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAccountAddressByIDRequest) ProtoMessage() {} + +// Deprecated: Use QueryAccountAddressByIDRequest.ProtoReflect.Descriptor instead. +func (*QueryAccountAddressByIDRequest) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{16} +} + +func (x *QueryAccountAddressByIDRequest) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +// QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method +// +// Since: cosmos-sdk 0.46.2 +type QueryAccountAddressByIDResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccountAddress string `protobuf:"bytes,1,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` +} + +func (x *QueryAccountAddressByIDResponse) Reset() { + *x = QueryAccountAddressByIDResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAccountAddressByIDResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAccountAddressByIDResponse) ProtoMessage() {} + +// Deprecated: Use QueryAccountAddressByIDResponse.ProtoReflect.Descriptor instead. +func (*QueryAccountAddressByIDResponse) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{17} +} + +func (x *QueryAccountAddressByIDResponse) GetAccountAddress() string { + if x != nil { + return x.AccountAddress + } + return "" +} + +// QueryAccountInfoRequest is the Query/AccountInfo request type. +// +// Since: cosmos-sdk 0.47 +type QueryAccountInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // address is the account address string. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (x *QueryAccountInfoRequest) Reset() { + *x = QueryAccountInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAccountInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAccountInfoRequest) ProtoMessage() {} + +// Deprecated: Use QueryAccountInfoRequest.ProtoReflect.Descriptor instead. +func (*QueryAccountInfoRequest) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{18} +} + +func (x *QueryAccountInfoRequest) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +// QueryAccountInfoResponse is the Query/AccountInfo response type. +// +// Since: cosmos-sdk 0.47 +type QueryAccountInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // info is the account info which is represented by BaseAccount. + Info *BaseAccount `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` +} + +func (x *QueryAccountInfoResponse) Reset() { + *x = QueryAccountInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAccountInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAccountInfoResponse) ProtoMessage() {} + +// Deprecated: Use QueryAccountInfoResponse.ProtoReflect.Descriptor instead. +func (*QueryAccountInfoResponse) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{19} +} + +func (x *QueryAccountInfoResponse) GetInfo() *BaseAccount { + if x != nil { + return x.Info + } + return nil +} + +var File_cosmos_auth_v1beta1_query_proto protoreflect.FileDescriptor + +var file_cosmos_auth_v1beta1_query_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, + 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, + 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 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, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x19, 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, 0x1b, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5e, 0x0a, 0x14, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, + 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa0, 0x01, 0x0a, 0x15, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x0c, 0xca, 0xb4, 0x2d, + 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x53, 0x0a, 0x13, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, + 0x00, 0x22, 0x54, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 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, + 0x42, 0x0c, 0xca, 0xb4, 0x2d, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x52, 0x07, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x50, 0x0a, + 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, + 0x1c, 0x0a, 0x1a, 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, 0x22, 0x63, 0x0a, + 0x1b, 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, 0x12, 0x44, 0x0a, 0x08, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x22, 0x35, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x66, 0x0a, 0x20, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, + 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 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, 0x42, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x22, 0x15, 0x0a, 0x13, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3b, 0x0a, 0x14, 0x42, 0x65, 0x63, 0x68, + 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0x42, 0x0a, 0x1b, 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, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x45, 0x0a, 0x1c, 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, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x22, 0x44, 0x0a, 0x1b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x25, 0x0a, 0x0e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x43, 0x0a, 0x1c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x30, 0x0a, 0x1e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x64, 0x0a, + 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x41, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 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, 0x42, 0x61, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x04, + 0x69, 0x6e, 0x66, 0x6f, 0x32, 0xfe, 0x0c, 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, + 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, 0xbc, + 0x01, 0x0a, 0x13, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x38, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, + 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 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, 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, +} + +var ( + file_cosmos_auth_v1beta1_query_proto_rawDescOnce sync.Once + file_cosmos_auth_v1beta1_query_proto_rawDescData = file_cosmos_auth_v1beta1_query_proto_rawDesc +) + +func file_cosmos_auth_v1beta1_query_proto_rawDescGZIP() []byte { + file_cosmos_auth_v1beta1_query_proto_rawDescOnce.Do(func() { + file_cosmos_auth_v1beta1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_auth_v1beta1_query_proto_rawDescData) + }) + return file_cosmos_auth_v1beta1_query_proto_rawDescData +} + +var file_cosmos_auth_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_cosmos_auth_v1beta1_query_proto_goTypes = []interface{}{ + (*QueryAccountsRequest)(nil), // 0: cosmos.auth.v1beta1.QueryAccountsRequest + (*QueryAccountsResponse)(nil), // 1: cosmos.auth.v1beta1.QueryAccountsResponse + (*QueryAccountRequest)(nil), // 2: cosmos.auth.v1beta1.QueryAccountRequest + (*QueryAccountResponse)(nil), // 3: cosmos.auth.v1beta1.QueryAccountResponse + (*QueryParamsRequest)(nil), // 4: cosmos.auth.v1beta1.QueryParamsRequest + (*QueryParamsResponse)(nil), // 5: cosmos.auth.v1beta1.QueryParamsResponse + (*QueryModuleAccountsRequest)(nil), // 6: cosmos.auth.v1beta1.QueryModuleAccountsRequest + (*QueryModuleAccountsResponse)(nil), // 7: cosmos.auth.v1beta1.QueryModuleAccountsResponse + (*QueryModuleAccountByNameRequest)(nil), // 8: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest + (*QueryModuleAccountByNameResponse)(nil), // 9: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse + (*Bech32PrefixRequest)(nil), // 10: cosmos.auth.v1beta1.Bech32PrefixRequest + (*Bech32PrefixResponse)(nil), // 11: cosmos.auth.v1beta1.Bech32PrefixResponse + (*AddressBytesToStringRequest)(nil), // 12: cosmos.auth.v1beta1.AddressBytesToStringRequest + (*AddressBytesToStringResponse)(nil), // 13: cosmos.auth.v1beta1.AddressBytesToStringResponse + (*AddressStringToBytesRequest)(nil), // 14: cosmos.auth.v1beta1.AddressStringToBytesRequest + (*AddressStringToBytesResponse)(nil), // 15: cosmos.auth.v1beta1.AddressStringToBytesResponse + (*QueryAccountAddressByIDRequest)(nil), // 16: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest + (*QueryAccountAddressByIDResponse)(nil), // 17: cosmos.auth.v1beta1.QueryAccountAddressByIDResponse + (*QueryAccountInfoRequest)(nil), // 18: cosmos.auth.v1beta1.QueryAccountInfoRequest + (*QueryAccountInfoResponse)(nil), // 19: cosmos.auth.v1beta1.QueryAccountInfoResponse + (*v1beta1.PageRequest)(nil), // 20: cosmos.base.query.v1beta1.PageRequest + (*anypb.Any)(nil), // 21: google.protobuf.Any + (*v1beta1.PageResponse)(nil), // 22: cosmos.base.query.v1beta1.PageResponse + (*Params)(nil), // 23: cosmos.auth.v1beta1.Params + (*BaseAccount)(nil), // 24: cosmos.auth.v1beta1.BaseAccount +} +var file_cosmos_auth_v1beta1_query_proto_depIdxs = []int32{ + 20, // 0: cosmos.auth.v1beta1.QueryAccountsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 21, // 1: cosmos.auth.v1beta1.QueryAccountsResponse.accounts:type_name -> google.protobuf.Any + 22, // 2: cosmos.auth.v1beta1.QueryAccountsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 21, // 3: cosmos.auth.v1beta1.QueryAccountResponse.account:type_name -> google.protobuf.Any + 23, // 4: cosmos.auth.v1beta1.QueryParamsResponse.params:type_name -> cosmos.auth.v1beta1.Params + 21, // 5: cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts:type_name -> google.protobuf.Any + 21, // 6: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account:type_name -> google.protobuf.Any + 24, // 7: cosmos.auth.v1beta1.QueryAccountInfoResponse.info:type_name -> cosmos.auth.v1beta1.BaseAccount + 0, // 8: cosmos.auth.v1beta1.Query.Accounts:input_type -> cosmos.auth.v1beta1.QueryAccountsRequest + 2, // 9: cosmos.auth.v1beta1.Query.Account:input_type -> cosmos.auth.v1beta1.QueryAccountRequest + 16, // 10: cosmos.auth.v1beta1.Query.AccountAddressByID:input_type -> cosmos.auth.v1beta1.QueryAccountAddressByIDRequest + 4, // 11: cosmos.auth.v1beta1.Query.Params:input_type -> cosmos.auth.v1beta1.QueryParamsRequest + 6, // 12: cosmos.auth.v1beta1.Query.ModuleAccounts:input_type -> cosmos.auth.v1beta1.QueryModuleAccountsRequest + 8, // 13: cosmos.auth.v1beta1.Query.ModuleAccountByName:input_type -> cosmos.auth.v1beta1.QueryModuleAccountByNameRequest + 10, // 14: cosmos.auth.v1beta1.Query.Bech32Prefix:input_type -> cosmos.auth.v1beta1.Bech32PrefixRequest + 12, // 15: cosmos.auth.v1beta1.Query.AddressBytesToString:input_type -> cosmos.auth.v1beta1.AddressBytesToStringRequest + 14, // 16: cosmos.auth.v1beta1.Query.AddressStringToBytes:input_type -> cosmos.auth.v1beta1.AddressStringToBytesRequest + 18, // 17: cosmos.auth.v1beta1.Query.AccountInfo:input_type -> cosmos.auth.v1beta1.QueryAccountInfoRequest + 1, // 18: cosmos.auth.v1beta1.Query.Accounts:output_type -> cosmos.auth.v1beta1.QueryAccountsResponse + 3, // 19: cosmos.auth.v1beta1.Query.Account:output_type -> cosmos.auth.v1beta1.QueryAccountResponse + 17, // 20: cosmos.auth.v1beta1.Query.AccountAddressByID:output_type -> cosmos.auth.v1beta1.QueryAccountAddressByIDResponse + 5, // 21: cosmos.auth.v1beta1.Query.Params:output_type -> cosmos.auth.v1beta1.QueryParamsResponse + 7, // 22: cosmos.auth.v1beta1.Query.ModuleAccounts:output_type -> cosmos.auth.v1beta1.QueryModuleAccountsResponse + 9, // 23: cosmos.auth.v1beta1.Query.ModuleAccountByName:output_type -> cosmos.auth.v1beta1.QueryModuleAccountByNameResponse + 11, // 24: cosmos.auth.v1beta1.Query.Bech32Prefix:output_type -> cosmos.auth.v1beta1.Bech32PrefixResponse + 13, // 25: cosmos.auth.v1beta1.Query.AddressBytesToString:output_type -> cosmos.auth.v1beta1.AddressBytesToStringResponse + 15, // 26: cosmos.auth.v1beta1.Query.AddressStringToBytes:output_type -> cosmos.auth.v1beta1.AddressStringToBytesResponse + 19, // 27: cosmos.auth.v1beta1.Query.AccountInfo:output_type -> cosmos.auth.v1beta1.QueryAccountInfoResponse + 18, // [18:28] is the sub-list for method output_type + 8, // [8:18] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_cosmos_auth_v1beta1_query_proto_init() } +func file_cosmos_auth_v1beta1_query_proto_init() { + if File_cosmos_auth_v1beta1_query_proto != nil { + return + } + file_cosmos_auth_v1beta1_auth_proto_init() + if !protoimpl.UnsafeEnabled { + file_cosmos_auth_v1beta1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAccountsRequest); 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[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAccountsResponse); 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[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAccountRequest); 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[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAccountResponse); 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[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryParamsRequest); 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[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryParamsResponse); 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[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryModuleAccountsRequest); 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[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryModuleAccountsResponse); 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[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryModuleAccountByNameRequest); 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[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryModuleAccountByNameResponse); 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[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Bech32PrefixRequest); 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[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Bech32PrefixResponse); 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[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddressBytesToStringRequest); 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[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddressBytesToStringResponse); 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[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddressStringToBytesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_auth_v1beta1_query_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddressStringToBytesResponse); 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[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAccountAddressByIDRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_auth_v1beta1_query_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAccountAddressByIDResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_auth_v1beta1_query_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAccountInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_auth_v1beta1_query_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAccountInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_cosmos_auth_v1beta1_query_proto_rawDesc, + NumEnums: 0, + NumMessages: 20, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_cosmos_auth_v1beta1_query_proto_goTypes, + DependencyIndexes: file_cosmos_auth_v1beta1_query_proto_depIdxs, + MessageInfos: file_cosmos_auth_v1beta1_query_proto_msgTypes, + }.Build() + File_cosmos_auth_v1beta1_query_proto = out.File + file_cosmos_auth_v1beta1_query_proto_rawDesc = nil + file_cosmos_auth_v1beta1_query_proto_goTypes = nil + file_cosmos_auth_v1beta1_query_proto_depIdxs = nil +} diff --git a/api/cosmos/auth/v1beta1/query_grpc.pb.go b/api/cosmos/auth/v1beta1/query_grpc.pb.go new file mode 100644 index 000000000000..1755c334de47 --- /dev/null +++ b/api/cosmos/auth/v1beta1/query_grpc.pb.go @@ -0,0 +1,483 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc (unknown) +// source: cosmos/auth/v1beta1/query.proto + +package authv1beta1 + +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 { + // Accounts returns all the existing accounts. + // + // When called from another module, this query might consume a high amount of + // gas if the pagination field is incorrectly set. + // + // Since: cosmos-sdk 0.43 + Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) + // Account returns account details based on address. + Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*QueryAccountResponse, error) + // AccountAddressByID returns account address based on account number. + // + // Since: cosmos-sdk 0.46.2 + AccountAddressByID(ctx context.Context, in *QueryAccountAddressByIDRequest, opts ...grpc.CallOption) (*QueryAccountAddressByIDResponse, error) + // Params queries all parameters. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // ModuleAccounts returns all the existing module accounts. + // + // Since: cosmos-sdk 0.46 + ModuleAccounts(ctx context.Context, in *QueryModuleAccountsRequest, opts ...grpc.CallOption) (*QueryModuleAccountsResponse, error) + // ModuleAccountByName returns the module account info by module name + ModuleAccountByName(ctx context.Context, in *QueryModuleAccountByNameRequest, opts ...grpc.CallOption) (*QueryModuleAccountByNameResponse, error) + // Bech32Prefix queries bech32Prefix + // + // Since: cosmos-sdk 0.46 + Bech32Prefix(ctx context.Context, in *Bech32PrefixRequest, opts ...grpc.CallOption) (*Bech32PrefixResponse, error) + // AddressBytesToString converts Account Address bytes to string + // + // Since: cosmos-sdk 0.46 + AddressBytesToString(ctx context.Context, in *AddressBytesToStringRequest, opts ...grpc.CallOption) (*AddressBytesToStringResponse, error) + // AddressStringToBytes converts Address string to bytes + // + // 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 { + cc grpc.ClientConnInterface +} + +func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) { + out := new(QueryAccountsResponse) + err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/Accounts", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*QueryAccountResponse, error) { + out := new(QueryAccountResponse) + err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/Account", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AccountAddressByID(ctx context.Context, in *QueryAccountAddressByIDRequest, opts ...grpc.CallOption) (*QueryAccountAddressByIDResponse, error) { + out := new(QueryAccountAddressByIDResponse) + err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/AccountAddressByID", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ModuleAccounts(ctx context.Context, in *QueryModuleAccountsRequest, opts ...grpc.CallOption) (*QueryModuleAccountsResponse, error) { + out := new(QueryModuleAccountsResponse) + err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/ModuleAccounts", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ModuleAccountByName(ctx context.Context, in *QueryModuleAccountByNameRequest, opts ...grpc.CallOption) (*QueryModuleAccountByNameResponse, error) { + out := new(QueryModuleAccountByNameResponse) + err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/ModuleAccountByName", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Bech32Prefix(ctx context.Context, in *Bech32PrefixRequest, opts ...grpc.CallOption) (*Bech32PrefixResponse, error) { + out := new(Bech32PrefixResponse) + err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/Bech32Prefix", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AddressBytesToString(ctx context.Context, in *AddressBytesToStringRequest, opts ...grpc.CallOption) (*AddressBytesToStringResponse, error) { + out := new(AddressBytesToStringResponse) + err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/AddressBytesToString", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AddressStringToBytes(ctx context.Context, in *AddressStringToBytesRequest, opts ...grpc.CallOption) (*AddressStringToBytesResponse, error) { + out := new(AddressStringToBytesResponse) + err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/AddressStringToBytes", in, out, opts...) + if err != nil { + return nil, err + } + 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 +type QueryServer interface { + // Accounts returns all the existing accounts. + // + // When called from another module, this query might consume a high amount of + // gas if the pagination field is incorrectly set. + // + // Since: cosmos-sdk 0.43 + Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error) + // Account returns account details based on address. + Account(context.Context, *QueryAccountRequest) (*QueryAccountResponse, error) + // AccountAddressByID returns account address based on account number. + // + // Since: cosmos-sdk 0.46.2 + AccountAddressByID(context.Context, *QueryAccountAddressByIDRequest) (*QueryAccountAddressByIDResponse, error) + // Params queries all parameters. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // ModuleAccounts returns all the existing module accounts. + // + // Since: cosmos-sdk 0.46 + ModuleAccounts(context.Context, *QueryModuleAccountsRequest) (*QueryModuleAccountsResponse, error) + // ModuleAccountByName returns the module account info by module name + ModuleAccountByName(context.Context, *QueryModuleAccountByNameRequest) (*QueryModuleAccountByNameResponse, error) + // Bech32Prefix queries bech32Prefix + // + // Since: cosmos-sdk 0.46 + Bech32Prefix(context.Context, *Bech32PrefixRequest) (*Bech32PrefixResponse, error) + // AddressBytesToString converts Account Address bytes to string + // + // Since: cosmos-sdk 0.46 + AddressBytesToString(context.Context, *AddressBytesToStringRequest) (*AddressBytesToStringResponse, error) + // AddressStringToBytes converts Address string to bytes + // + // 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() +} + +// UnimplementedQueryServer must be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (UnimplementedQueryServer) Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Accounts not implemented") +} +func (UnimplementedQueryServer) Account(context.Context, *QueryAccountRequest) (*QueryAccountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Account not implemented") +} +func (UnimplementedQueryServer) AccountAddressByID(context.Context, *QueryAccountAddressByIDRequest) (*QueryAccountAddressByIDResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AccountAddressByID not implemented") +} +func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (UnimplementedQueryServer) ModuleAccounts(context.Context, *QueryModuleAccountsRequest) (*QueryModuleAccountsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ModuleAccounts not implemented") +} +func (UnimplementedQueryServer) ModuleAccountByName(context.Context, *QueryModuleAccountByNameRequest) (*QueryModuleAccountByNameResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ModuleAccountByName not implemented") +} +func (UnimplementedQueryServer) Bech32Prefix(context.Context, *Bech32PrefixRequest) (*Bech32PrefixResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Bech32Prefix not implemented") +} +func (UnimplementedQueryServer) AddressBytesToString(context.Context, *AddressBytesToStringRequest) (*AddressBytesToStringResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddressBytesToString not implemented") +} +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. +// 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_Accounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAccountsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Accounts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1beta1.Query/Accounts", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Accounts(ctx, req.(*QueryAccountsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Account_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Account(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1beta1.Query/Account", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Account(ctx, req.(*QueryAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AccountAddressByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAccountAddressByIDRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AccountAddressByID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1beta1.Query/AccountAddressByID", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AccountAddressByID(ctx, req.(*QueryAccountAddressByIDRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1beta1.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ModuleAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryModuleAccountsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ModuleAccounts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1beta1.Query/ModuleAccounts", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ModuleAccounts(ctx, req.(*QueryModuleAccountsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ModuleAccountByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryModuleAccountByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ModuleAccountByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1beta1.Query/ModuleAccountByName", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ModuleAccountByName(ctx, req.(*QueryModuleAccountByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Bech32Prefix_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Bech32PrefixRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Bech32Prefix(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1beta1.Query/Bech32Prefix", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Bech32Prefix(ctx, req.(*Bech32PrefixRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AddressBytesToString_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddressBytesToStringRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AddressBytesToString(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1beta1.Query/AddressBytesToString", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AddressBytesToString(ctx, req.(*AddressBytesToStringRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AddressStringToBytes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddressStringToBytesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AddressStringToBytes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1beta1.Query/AddressStringToBytes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AddressStringToBytes(ctx, req.(*AddressStringToBytesRequest)) + } + 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) +var Query_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.auth.v1beta1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Accounts", + Handler: _Query_Accounts_Handler, + }, + { + MethodName: "Account", + Handler: _Query_Account_Handler, + }, + { + MethodName: "AccountAddressByID", + Handler: _Query_AccountAddressByID_Handler, + }, + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "ModuleAccounts", + Handler: _Query_ModuleAccounts_Handler, + }, + { + MethodName: "ModuleAccountByName", + Handler: _Query_ModuleAccountByName_Handler, + }, + { + MethodName: "Bech32Prefix", + Handler: _Query_Bech32Prefix_Handler, + }, + { + MethodName: "AddressBytesToString", + Handler: _Query_AddressBytesToString_Handler, + }, + { + 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 4d9759cada6b..3663dfe1f52d 100644 --- a/proto/cosmos/auth/v1beta1/query.proto +++ b/proto/cosmos/auth/v1beta1/query.proto @@ -28,6 +28,56 @@ service Query { rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/cosmos/auth/v1beta1/params"; } +<<<<<<< HEAD +======= + + // ModuleAccounts returns all the existing module accounts. + // + // Since: cosmos-sdk 0.46 + rpc ModuleAccounts(QueryModuleAccountsRequest) returns (QueryModuleAccountsResponse) { + option (cosmos.query.v1.module_query_safe) = true; + option (google.api.http).get = "/cosmos/auth/v1beta1/module_accounts"; + } + + // ModuleAccountByName returns the module account info by module name + rpc ModuleAccountByName(QueryModuleAccountByNameRequest) returns (QueryModuleAccountByNameResponse) { + option (cosmos.query.v1.module_query_safe) = true; + option (google.api.http).get = "/cosmos/auth/v1beta1/module_accounts/{name}"; + } + + // Bech32Prefix queries bech32Prefix + // + // Since: cosmos-sdk 0.46 + rpc Bech32Prefix(Bech32PrefixRequest) returns (Bech32PrefixResponse) { + option (cosmos.query.v1.module_query_safe) = true; + option (google.api.http).get = "/cosmos/auth/v1beta1/bech32"; + } + + // AddressBytesToString converts Account Address bytes to string + // + // Since: cosmos-sdk 0.46 + rpc AddressBytesToString(AddressBytesToStringRequest) returns (AddressBytesToStringResponse) { + option (cosmos.query.v1.module_query_safe) = true; + option (google.api.http).get = "/cosmos/auth/v1beta1/bech32/{address_bytes}"; + } + + // AddressStringToBytes converts Address string to bytes + // + // Since: cosmos-sdk 0.46 + rpc AddressStringToBytes(AddressStringToBytesRequest) returns (AddressStringToBytesResponse) { + option (cosmos.query.v1.module_query_safe) = true; + option (google.api.http).get = "/cosmos/auth/v1beta1/bech32/{address_string}"; + } + + + // AccountInfo queries account info which is common to all account types. + // + // Since: cosmos-sdk 0.47 + rpc AccountInfo(QueryAccountInfoRequest) returns (QueryAccountInfoResponse) { + option (cosmos.query.v1.module_query_safe) = true; + option (google.api.http).get = "/cosmos/auth/v1beta1/account_info/{address}"; + } +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) } // QueryAccountsRequest is the request type for the Query/Accounts RPC method. @@ -55,7 +105,11 @@ message QueryAccountRequest { option (gogoproto.goproto_getters) = false; // address defines the address to query for. +<<<<<<< HEAD string address = 1; +======= + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) } // QueryAccountResponse is the response type for the Query/Account RPC method. @@ -71,4 +125,104 @@ message QueryParamsRequest {} message QueryParamsResponse { // params defines the parameters of the module. Params params = 1 [(gogoproto.nullable) = false]; +<<<<<<< HEAD +======= +} + +// QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. +// +// Since: cosmos-sdk 0.46 +message QueryModuleAccountsRequest {} + +// QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. +// +// Since: cosmos-sdk 0.46 +message QueryModuleAccountsResponse { + repeated google.protobuf.Any accounts = 1 [(cosmos_proto.accepts_interface) = "ModuleAccountI"]; +} + +// QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. +message QueryModuleAccountByNameRequest { + string name = 1; +} + +// QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. +message QueryModuleAccountByNameResponse { + google.protobuf.Any account = 1 [(cosmos_proto.accepts_interface) = "ModuleAccountI"]; +} + +// Bech32PrefixRequest is the request type for Bech32Prefix rpc method. +// +// Since: cosmos-sdk 0.46 +message Bech32PrefixRequest {} + +// Bech32PrefixResponse is the response type for Bech32Prefix rpc method. +// +// Since: cosmos-sdk 0.46 +message Bech32PrefixResponse { + string bech32_prefix = 1; +} + +// AddressBytesToStringRequest is the request type for AddressString rpc method. +// +// Since: cosmos-sdk 0.46 +message AddressBytesToStringRequest { + bytes address_bytes = 1; +} + +// AddressBytesToStringResponse is the response type for AddressString rpc method. +// +// Since: cosmos-sdk 0.46 +message AddressBytesToStringResponse { + string address_string = 1; +} + +// AddressStringToBytesRequest is the request type for AccountBytes rpc method. +// +// Since: cosmos-sdk 0.46 +message AddressStringToBytesRequest { + string address_string = 1; +} + +// AddressStringToBytesResponse is the response type for AddressBytes rpc method. +// +// Since: cosmos-sdk 0.46 +message AddressStringToBytesResponse { + bytes address_bytes = 1; +} + +// QueryAccountAddressByIDRequest is the request type for AccountAddressByID rpc method +// +// Since: cosmos-sdk 0.46.2 +message QueryAccountAddressByIDRequest { + // id is the account number of the address to be queried. This field + // should have been an uint64 (like all account numbers), and will be + // updated to uint64 in a future version of the auth query. + int64 id = 1; +} + +// QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method +// +// Since: cosmos-sdk 0.46.2 +message QueryAccountAddressByIDResponse { + string account_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// QueryAccountInfoRequest is the Query/AccountInfo request type. +// +// Since: cosmos-sdk 0.47 +message QueryAccountInfoRequest { + + // address is the account address string. + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// QueryAccountInfoResponse is the Query/AccountInfo response type. +// +// Since: cosmos-sdk 0.47 +message QueryAccountInfoResponse { + + // info is the account info which is represented by BaseAccount. + BaseAccount info = 1; +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) } diff --git a/tests/e2e/auth/suite.go b/tests/e2e/auth/suite.go new file mode 100644 index 000000000000..3e993901e29c --- /dev/null +++ b/tests/e2e/auth/suite.go @@ -0,0 +1,2040 @@ +package auth + +import ( + "context" + "encoding/base64" + "encoding/json" + "fmt" + "os" + "path/filepath" + "strings" + "testing" + + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" + tmcli "github.com/tendermint/tendermint/libs/cli" + + "cosmossdk.io/depinject" + "cosmossdk.io/math" + + authtestutil "github.com/cosmos/cosmos-sdk/x/auth/testutil" + "github.com/cosmos/cosmos-sdk/x/auth/types" + + "github.com/cosmos/cosmos-sdk/client" + + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/crypto/hd" + "github.com/cosmos/cosmos-sdk/crypto/keyring" + kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/cosmos/cosmos-sdk/testutil" + clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" + "github.com/cosmos/cosmos-sdk/testutil/network" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx" + "github.com/cosmos/cosmos-sdk/types/tx/signing" + authcli "github.com/cosmos/cosmos-sdk/x/auth/client/cli" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + bank "github.com/cosmos/cosmos-sdk/x/bank/client/cli" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" + govtestutil "github.com/cosmos/cosmos-sdk/x/gov/client/testutil" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" +) + +type IntegrationTestSuite struct { + suite.Suite + + cfg network.Config + network *network.Network +} + +func NewIntegrationTestSuite(cfg network.Config) *IntegrationTestSuite { + return &IntegrationTestSuite{cfg: cfg} +} + +func (s *IntegrationTestSuite) SetupSuite() { + s.T().Log("setting up integration test suite") + + var err error + s.network, err = network.New(s.T(), s.T().TempDir(), s.cfg) + s.Require().NoError(err) + + kb := s.network.Validators[0].ClientCtx.Keyring + _, _, err = kb.NewMnemonic("newAccount", keyring.English, sdk.FullFundraiserPath, keyring.DefaultBIP39Passphrase, hd.Secp256k1) + s.Require().NoError(err) + + account1, _, err := kb.NewMnemonic("newAccount1", keyring.English, sdk.FullFundraiserPath, keyring.DefaultBIP39Passphrase, hd.Secp256k1) + s.Require().NoError(err) + + account2, _, err := kb.NewMnemonic("newAccount2", keyring.English, sdk.FullFundraiserPath, keyring.DefaultBIP39Passphrase, hd.Secp256k1) + s.Require().NoError(err) + pub1, err := account1.GetPubKey() + s.Require().NoError(err) + pub2, err := account2.GetPubKey() + s.Require().NoError(err) + + // Create a dummy account for testing purpose + _, _, err = kb.NewMnemonic("dummyAccount", keyring.English, sdk.FullFundraiserPath, keyring.DefaultBIP39Passphrase, hd.Secp256k1) + s.Require().NoError(err) + + multi := kmultisig.NewLegacyAminoPubKey(2, []cryptotypes.PubKey{pub1, pub2}) + _, err = kb.SaveMultisig("multi", multi) + s.Require().NoError(err) + s.Require().NoError(s.network.WaitForNextBlock()) +} + +func (s *IntegrationTestSuite) TearDownSuite() { + s.T().Log("tearing down integration test suite") + s.network.Cleanup() +} + +func (s *IntegrationTestSuite) TestCLIValidateSignatures() { + val := s.network.Validators[0] + sendTokens := sdk.NewCoins( + sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10)), + sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))) + + res, err := s.createBankMsg(val, val.Address, sendTokens, + fmt.Sprintf("--%s=true", flags.FlagGenerateOnly)) + s.Require().NoError(err) + + // write unsigned tx to file + unsignedTx := testutil.WriteToNewTempFile(s.T(), res.String()) + defer unsignedTx.Close() + res, err = TxSignExec(val.ClientCtx, val.Address, unsignedTx.Name()) + s.Require().NoError(err) + signedTx, err := val.ClientCtx.TxConfig.TxJSONDecoder()(res.Bytes()) + s.Require().NoError(err) + + signedTxFile := testutil.WriteToNewTempFile(s.T(), res.String()) + defer signedTxFile.Close() + txBuilder, err := val.ClientCtx.TxConfig.WrapTxBuilder(signedTx) + s.Require().NoError(err) + _, err = TxValidateSignaturesExec(val.ClientCtx, signedTxFile.Name()) + s.Require().NoError(err) + + txBuilder.SetMemo("MODIFIED TX") + bz, err := val.ClientCtx.TxConfig.TxJSONEncoder()(txBuilder.GetTx()) + s.Require().NoError(err) + + modifiedTxFile := testutil.WriteToNewTempFile(s.T(), string(bz)) + defer modifiedTxFile.Close() + + _, err = TxValidateSignaturesExec(val.ClientCtx, modifiedTxFile.Name()) + s.Require().EqualError(err, "signatures validation failed") +} + +func (s *IntegrationTestSuite) TestCLISignGenOnly() { + val := s.network.Validators[0] + val2 := s.network.Validators[1] + + k, err := val.ClientCtx.Keyring.KeyByAddress(val.Address) + s.Require().NoError(err) + keyName := k.Name + + addr, err := k.GetAddress() + s.Require().NoError(err) + + account, err := val.ClientCtx.AccountRetriever.GetAccount(val.ClientCtx, addr) + s.Require().NoError(err) + + sendTokens := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))) + args := []string{ + keyName, // from keyname + val2.Address.String(), + sendTokens.String(), + fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), // shouldn't break if we use keyname with --generate-only flag + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + } + generatedStd, err := clitestutil.ExecTestCLICmd(val.ClientCtx, bank.NewSendTxCmd(), args) + s.Require().NoError(err) + opFile := testutil.WriteToNewTempFile(s.T(), generatedStd.String()) + defer opFile.Close() + + commonArgs := []string{ + fmt.Sprintf("--%s=%s", flags.FlagKeyringBackend, keyring.BackendTest), + fmt.Sprintf("--%s=%s", flags.FlagHome, strings.Replace(val.ClientCtx.HomeDir, "simd", "simcli", 1)), + fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), + } + + cases := []struct { + name string + args []string + expErr bool + errMsg string + }{ + { + "offline mode with account-number, sequence and keyname (valid)", + []string{ + opFile.Name(), + fmt.Sprintf("--%s=true", flags.FlagOffline), + fmt.Sprintf("--%s=%s", flags.FlagFrom, keyName), + fmt.Sprintf("--%s=%d", flags.FlagAccountNumber, account.GetAccountNumber()), + fmt.Sprintf("--%s=%d", flags.FlagSequence, account.GetSequence()), + }, + false, + "", + }, + { + "offline mode with account-number, sequence and address key (valid)", + []string{ + opFile.Name(), + fmt.Sprintf("--%s=true", flags.FlagOffline), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + fmt.Sprintf("--%s=%d", flags.FlagAccountNumber, account.GetAccountNumber()), + fmt.Sprintf("--%s=%d", flags.FlagSequence, account.GetSequence()), + }, + false, + "", + }, + { + "offline mode without account-number and keyname (invalid)", + []string{ + opFile.Name(), + fmt.Sprintf("--%s=true", flags.FlagOffline), + fmt.Sprintf("--%s=%s", flags.FlagFrom, keyName), + fmt.Sprintf("--%s=%d", flags.FlagSequence, account.GetSequence()), + }, + true, + `required flag(s) "account-number" not set`, + }, + { + "offline mode without sequence and keyname (invalid)", + []string{ + opFile.Name(), + fmt.Sprintf("--%s=true", flags.FlagOffline), + fmt.Sprintf("--%s=%s", flags.FlagFrom, keyName), + fmt.Sprintf("--%s=%d", flags.FlagAccountNumber, account.GetAccountNumber()), + }, + true, + `required flag(s) "sequence" not set`, + }, + { + "offline mode without account-number, sequence and keyname (invalid)", + []string{ + opFile.Name(), + fmt.Sprintf("--%s=%s", flags.FlagFrom, keyName), + fmt.Sprintf("--%s=true", flags.FlagOffline), + }, + true, + `required flag(s) "account-number", "sequence" not set`, + }, + } + + for _, tc := range cases { + cmd := authcli.GetSignCommand() + tmcli.PrepareBaseCmd(cmd, "", "") + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, commonArgs...)) + if tc.expErr { + s.Require().Error(err) + s.Require().Contains(err.Error(), tc.errMsg) + } else { + s.Require().NoError(err) + func() { + signedTx := testutil.WriteToNewTempFile(s.T(), out.String()) + defer signedTx.Close() + _, err := TxBroadcastExec(val.ClientCtx, signedTx.Name()) + s.Require().NoError(err) + }() + } + } +} + +func (s *IntegrationTestSuite) TestCLISignBatch() { + val := s.network.Validators[0] + sendTokens := sdk.NewCoins( + sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10)), + sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)), + ) + + generatedStd, err := s.createBankMsg(val, val.Address, + sendTokens, fmt.Sprintf("--%s=true", flags.FlagGenerateOnly)) + s.Require().NoError(err) + + outputFile := testutil.WriteToNewTempFile(s.T(), strings.Repeat(generatedStd.String(), 3)) + defer outputFile.Close() + val.ClientCtx.HomeDir = strings.Replace(val.ClientCtx.HomeDir, "simd", "simcli", 1) + + // sign-batch file - offline is set but account-number and sequence are not + _, err = TxSignBatchExec(val.ClientCtx, val.Address, outputFile.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), "--offline") + s.Require().EqualError(err, "required flag(s) \"account-number\", \"sequence\" not set") + + // sign-batch file - offline and sequence is set but account-number is not set + _, err = TxSignBatchExec(val.ClientCtx, val.Address, outputFile.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), fmt.Sprintf("--%s=%s", flags.FlagSequence, "1"), "--offline") + s.Require().EqualError(err, "required flag(s) \"account-number\" not set") + + // sign-batch file - offline and account-number is set but sequence is not set + _, err = TxSignBatchExec(val.ClientCtx, val.Address, outputFile.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), fmt.Sprintf("--%s=%s", flags.FlagAccountNumber, "1"), "--offline") + s.Require().EqualError(err, "required flag(s) \"sequence\" not set") + + // sign-batch file - sequence and account-number are set when offline is false + res, err := TxSignBatchExec(val.ClientCtx, val.Address, outputFile.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), fmt.Sprintf("--%s=%s", flags.FlagSequence, "1"), fmt.Sprintf("--%s=%s", flags.FlagAccountNumber, "1")) + s.Require().NoError(err) + s.Require().Equal(3, len(strings.Split(strings.Trim(res.String(), "\n"), "\n"))) + + // sign-batch file + res, err = TxSignBatchExec(val.ClientCtx, val.Address, outputFile.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID)) + s.Require().NoError(err) + s.Require().Equal(3, len(strings.Split(strings.Trim(res.String(), "\n"), "\n"))) + + // sign-batch file signature only + res, err = TxSignBatchExec(val.ClientCtx, val.Address, outputFile.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), "--signature-only") + s.Require().NoError(err) + s.Require().Equal(3, len(strings.Split(strings.Trim(res.String(), "\n"), "\n"))) + + // Sign batch malformed tx file. + malformedFile := testutil.WriteToNewTempFile(s.T(), fmt.Sprintf("%smalformed", generatedStd)) + defer malformedFile.Close() + _, err = TxSignBatchExec(val.ClientCtx, val.Address, malformedFile.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID)) + s.Require().Error(err) + + // Sign batch malformed tx file signature only. + _, err = TxSignBatchExec(val.ClientCtx, val.Address, malformedFile.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), "--signature-only") + s.Require().Error(err) + + // make a txn to increase the sequence of sender + _, seq, err := val.ClientCtx.AccountRetriever.GetAccountNumberSequence(val.ClientCtx, val.Address) + s.Require().NoError(err) + + account1, err := val.ClientCtx.Keyring.Key("newAccount1") + s.Require().NoError(err) + + addr, err := account1.GetAddress() + s.Require().NoError(err) + + // Send coins from validator to multisig. + _, err = s.createBankMsg( + val, + addr, + sdk.NewCoins(sdk.NewInt64Coin(s.cfg.BondDenom, 1000)), + ) + s.Require().NoError(err) + s.Require().NoError(s.network.WaitForNextBlock()) + + // fetch the sequence after a tx, should be incremented. + _, seq1, err := val.ClientCtx.AccountRetriever.GetAccountNumberSequence(val.ClientCtx, val.Address) + s.Require().NoError(err) + s.Require().Equal(seq+1, seq1) + + // signing sign-batch should start from the last sequence. + signed, err := TxSignBatchExec(val.ClientCtx, val.Address, outputFile.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), "--signature-only") + s.Require().NoError(err) + signedTxs := strings.Split(strings.Trim(signed.String(), "\n"), "\n") + s.Require().GreaterOrEqual(len(signedTxs), 1) + + sigs, err := s.cfg.TxConfig.UnmarshalSignatureJSON([]byte(signedTxs[0])) + s.Require().NoError(err) + s.Require().Equal(sigs[0].Sequence, seq1) +} + +func (s *IntegrationTestSuite) TestCliGetAccountAddressByID() { + require := s.Require() + val1 := s.network.Validators[0] + testCases := []struct { + name string + args []string + expectErr bool + }{ + { + "not enough args", + []string{fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + true, + }, + { + "invalid account id", + []string{fmt.Sprint(-1), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + true, + }, + { + "valid account id", + []string{fmt.Sprint(0), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + false, + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + cmd := authcli.GetAccountAddressByIDCmd() + clientCtx := val1.ClientCtx + + queryResJSON, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) + if tc.expectErr { + s.Require().Error(err) + } else { + s.Require().NoError(err) + var res authtypes.QueryAccountAddressByIDResponse + require.NoError(val1.ClientCtx.Codec.UnmarshalJSON(queryResJSON.Bytes(), &res)) + require.NotNil(res.GetAccountAddress()) + } + }) + } +} + +func (s *IntegrationTestSuite) TestCLISignAminoJSON() { + require := s.Require() + val1 := s.network.Validators[0] + txCfg := val1.ClientCtx.TxConfig + sendTokens := sdk.NewCoins( + sdk.NewCoin(fmt.Sprintf("%stoken", val1.Moniker), sdk.NewInt(10)), + sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)), + ) + txBz, err := s.createBankMsg(val1, val1.Address, + sendTokens, fmt.Sprintf("--%s=true", flags.FlagGenerateOnly)) + require.NoError(err) + fileUnsigned := testutil.WriteToNewTempFile(s.T(), txBz.String()) + defer fileUnsigned.Close() + chainFlag := fmt.Sprintf("--%s=%s", flags.FlagChainID, val1.ClientCtx.ChainID) + sigOnlyFlag := "--signature-only" + signModeAminoFlag := "--sign-mode=amino-json" + + // SIC! validators have same key names and same addresses as those registered in the keyring, + // BUT the keys are different! + valRecord, err := val1.ClientCtx.Keyring.Key(val1.Moniker) + require.NoError(err) + + // query account info + queryResJSON, err := QueryAccountExec(val1.ClientCtx, val1.Address) + require.NoError(err) + var account authtypes.AccountI + require.NoError(val1.ClientCtx.Codec.UnmarshalInterfaceJSON(queryResJSON.Bytes(), &account)) + + /**** test signature-only ****/ + res, err := TxSignExec(val1.ClientCtx, val1.Address, fileUnsigned.Name(), chainFlag, + sigOnlyFlag, signModeAminoFlag) + require.NoError(err) + pub, err := valRecord.GetPubKey() + require.NoError(err) + checkSignatures(require, txCfg, res.Bytes(), pub) + sigs, err := txCfg.UnmarshalSignatureJSON(res.Bytes()) + require.NoError(err) + require.Equal(1, len(sigs)) + require.Equal(account.GetSequence(), sigs[0].Sequence) + + /**** test full output ****/ + res, err = TxSignExec(val1.ClientCtx, val1.Address, fileUnsigned.Name(), chainFlag, signModeAminoFlag) + require.NoError(err) + + // txCfg.UnmarshalSignatureJSON can't unmarshal a fragment of the signature, so we create this structure. + type txFragment struct { + Signatures []json.RawMessage + } + var txOut txFragment + err = json.Unmarshal(res.Bytes(), &txOut) + require.NoError(err) + require.Len(txOut.Signatures, 1) + + /**** test file output ****/ + filenameSigned := filepath.Join(s.T().TempDir(), "test_sign_out.json") + fileFlag := fmt.Sprintf("--%s=%s", flags.FlagOutputDocument, filenameSigned) + _, err = TxSignExec(val1.ClientCtx, val1.Address, fileUnsigned.Name(), chainFlag, fileFlag, signModeAminoFlag) + require.NoError(err) + fContent, err := os.ReadFile(filenameSigned) + require.NoError(err) + require.Equal(res.String(), string(fContent)) + + /**** try to append to the previously signed transaction ****/ + res, err = TxSignExec(val1.ClientCtx, val1.Address, filenameSigned, chainFlag, + sigOnlyFlag, signModeAminoFlag) + require.NoError(err) + checkSignatures(require, txCfg, res.Bytes(), pub, pub) + + /**** try to overwrite the previously signed transaction ****/ + + // We can't sign with other address, because the bank send message supports only one signer for a simple + // account. Changing the file is too much hacking, because TxDecoder returns sdk.Tx, which doesn't + // provide functionality to check / manage `auth_info`. + // Cases with different keys are are covered in unit tests of `tx.Sign`. + res, err = TxSignExec(val1.ClientCtx, val1.Address, filenameSigned, chainFlag, + sigOnlyFlag, "--overwrite", signModeAminoFlag) + require.NoError(err) + checkSignatures(require, txCfg, res.Bytes(), pub) + + /**** test flagAmino ****/ + res, err = TxSignExec(val1.ClientCtx, val1.Address, filenameSigned, chainFlag, + "--amino=true", signModeAminoFlag) + require.NoError(err) + + var txAmino authcli.BroadcastReq + err = val1.ClientCtx.LegacyAmino.UnmarshalJSON(res.Bytes(), &txAmino) + require.NoError(err) + require.Len(txAmino.Tx.Signatures, 2) + require.Equal(txAmino.Tx.Signatures[0].PubKey, pub) + require.Equal(txAmino.Tx.Signatures[1].PubKey, pub) +} + +func checkSignatures(require *require.Assertions, txCfg client.TxConfig, output []byte, pks ...cryptotypes.PubKey) { + sigs, err := txCfg.UnmarshalSignatureJSON(output) + require.NoError(err, string(output)) + require.Len(sigs, len(pks)) + for i := range pks { + require.True(sigs[i].PubKey.Equals(pks[i]), "Pub key doesn't match. Got: %s, expected: %s, idx: %d", sigs[i].PubKey, pks[i], i) + require.NotEmpty(sigs[i].Data) + } +} + +func (s *IntegrationTestSuite) TestCLIQueryTxCmdByHash() { + val := s.network.Validators[0] + + account2, err := val.ClientCtx.Keyring.Key("newAccount2") + s.Require().NoError(err) + + sendTokens := sdk.NewInt64Coin(s.cfg.BondDenom, 10) + + addr, err := account2.GetAddress() + s.Require().NoError(err) + + // Send coins. + out, err := s.createBankMsg( + val, addr, + sdk.NewCoins(sendTokens), + ) + s.Require().NoError(err) + s.Require().NoError(s.network.WaitForNextBlock()) + + var txRes sdk.TxResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txRes)) + + testCases := []struct { + name string + args []string + expectErr bool + rawLogContains string + }{ + { + "not enough args", + []string{}, + true, "", + }, + { + "with invalid hash", + []string{"somethinginvalid", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + true, "", + }, + { + "with valid and not existing hash", + []string{"C7E7D3A86A17AB3A321172239F3B61357937AF0F25D9FA4D2F4DCCAD9B0D7747", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + true, "", + }, + { + "happy case", + []string{txRes.TxHash, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + false, + sdk.MsgTypeURL(&banktypes.MsgSend{}), + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + cmd := authcli.QueryTxCmd() + clientCtx := val.ClientCtx + + out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) + + if tc.expectErr { + s.Require().Error(err) + s.Require().NotEqual("internal", err.Error()) + } else { + var result sdk.TxResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &result)) + s.Require().NotNil(result.Height) + s.Require().Contains(result.RawLog, tc.rawLogContains) + } + }) + } +} + +func (s *IntegrationTestSuite) TestCLIQueryTxCmdByEvents() { + val := s.network.Validators[0] + + account2, err := val.ClientCtx.Keyring.Key("newAccount2") + s.Require().NoError(err) + + sendTokens := sdk.NewInt64Coin(s.cfg.BondDenom, 10) + + addr2, err := account2.GetAddress() + s.Require().NoError(err) + + // Send coins. + out, err := s.createBankMsg( + val, addr2, + sdk.NewCoins(sendTokens), + ) + s.Require().NoError(err) + var txRes sdk.TxResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txRes)) + s.Require().NoError(s.network.WaitForNextBlock()) + + // Query the tx by hash to get the inner tx. + out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, authcli.QueryTxCmd(), []string{txRes.TxHash, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}) + s.Require().NoError(err) + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txRes)) + protoTx := txRes.GetTx().(*tx.Tx) + + testCases := []struct { + name string + args []string + expectErr bool + expectErrStr string + }{ + { + "invalid --type", + []string{ + fmt.Sprintf("--type=%s", "foo"), + "bar", + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + true, "unknown --type value foo", + }, + { + "--type=acc_seq with no addr+seq", + []string{ + "--type=acc_seq", + "", + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + true, "`acc_seq` type takes an argument '/'", + }, + { + "non-existing addr+seq combo", + []string{ + "--type=acc_seq", + "foobar", + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + true, "found no txs matching given address and sequence combination", + }, + { + "addr+seq happy case", + []string{ + "--type=acc_seq", + fmt.Sprintf("%s/%d", val.Address, protoTx.AuthInfo.SignerInfos[0].Sequence), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + false, "", + }, + { + "--type=signature with no signature", + []string{ + "--type=signature", + "", + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + true, "argument should be comma-separated signatures", + }, + { + "non-existing signatures", + []string{ + "--type=signature", + "foo", + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + true, "found no txs matching given signatures", + }, + { + "with --signatures happy case", + []string{ + "--type=signature", + base64.StdEncoding.EncodeToString(protoTx.Signatures[0]), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + false, "", + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + cmd := authcli.QueryTxCmd() + clientCtx := val.ClientCtx + + out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) + if tc.expectErr { + s.Require().Error(err) + s.Require().Contains(err.Error(), tc.expectErrStr) + } else { + var result sdk.TxResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &result)) + s.Require().NotNil(result.Height) + } + }) + } +} + +func (s *IntegrationTestSuite) TestCLIQueryTxsCmdByEvents() { + val := s.network.Validators[0] + + account2, err := val.ClientCtx.Keyring.Key("newAccount2") + s.Require().NoError(err) + + sendTokens := sdk.NewInt64Coin(s.cfg.BondDenom, 10) + + addr2, err := account2.GetAddress() + s.Require().NoError(err) + // Send coins. + out, err := s.createBankMsg( + val, + addr2, + sdk.NewCoins(sendTokens), + ) + s.Require().NoError(err) + var txRes sdk.TxResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txRes)) + s.Require().NoError(s.network.WaitForNextBlock()) + + // Query the tx by hash to get the inner tx. + out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, authcli.QueryTxCmd(), []string{txRes.TxHash, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}) + s.Require().NoError(err) + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txRes)) + + testCases := []struct { + name string + args []string + expectEmpty bool + }{ + { + "fee event happy case", + []string{ + fmt.Sprintf("--events=tx.fee=%s", + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + false, + }, + { + "no matching fee event", + []string{ + fmt.Sprintf("--events=tx.fee=%s", + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(0))).String()), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + true, + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + cmd := authcli.QueryTxsByEventsCmd() + clientCtx := val.ClientCtx + + out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) + s.Require().NoError(err) + + var result sdk.SearchTxsResult + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &result)) + + if tc.expectEmpty { + s.Require().Equal(0, len(result.Txs)) + } else { + s.Require().NotEqual(0, len(result.Txs)) + s.Require().NotNil(result.Txs[0]) + } + }) + } +} + +func (s *IntegrationTestSuite) TestCLISendGenerateSignAndBroadcast() { + val1 := s.network.Validators[0] + + account, err := val1.ClientCtx.Keyring.Key("newAccount") + s.Require().NoError(err) + + sendTokens := sdk.NewCoin(s.cfg.BondDenom, sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction)) + + addr, err := account.GetAddress() + s.Require().NoError(err) + normalGeneratedTx, err := s.createBankMsg(val1, addr, + sdk.NewCoins(sendTokens), fmt.Sprintf("--%s=true", flags.FlagGenerateOnly)) + s.Require().NoError(err) + + txCfg := val1.ClientCtx.TxConfig + + normalGeneratedStdTx, err := txCfg.TxJSONDecoder()(normalGeneratedTx.Bytes()) + s.Require().NoError(err) + txBuilder, err := txCfg.WrapTxBuilder(normalGeneratedStdTx) + s.Require().NoError(err) + s.Require().Equal(txBuilder.GetTx().GetGas(), uint64(flags.DefaultGasLimit)) + s.Require().Equal(len(txBuilder.GetTx().GetMsgs()), 1) + sigs, err := txBuilder.GetTx().GetSignaturesV2() + s.Require().NoError(err) + s.Require().Equal(0, len(sigs)) + + // Test generate sendTx with --gas=$amount + limitedGasGeneratedTx, err := s.createBankMsg(val1, addr, + sdk.NewCoins(sendTokens), fmt.Sprintf("--gas=%d", 100), + fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), + ) + s.Require().NoError(err) + + limitedGasStdTx, err := txCfg.TxJSONDecoder()(limitedGasGeneratedTx.Bytes()) + s.Require().NoError(err) + txBuilder, err = txCfg.WrapTxBuilder(limitedGasStdTx) + s.Require().NoError(err) + s.Require().Equal(txBuilder.GetTx().GetGas(), uint64(100)) + s.Require().Equal(len(txBuilder.GetTx().GetMsgs()), 1) + sigs, err = txBuilder.GetTx().GetSignaturesV2() + s.Require().NoError(err) + s.Require().Equal(0, len(sigs)) + + resp, err := clitestutil.QueryBalancesExec(val1.ClientCtx, val1.Address) + s.Require().NoError(err) + + var balRes banktypes.QueryAllBalancesResponse + err = val1.ClientCtx.Codec.UnmarshalJSON(resp.Bytes(), &balRes) + s.Require().NoError(err) + startTokens := balRes.Balances.AmountOf(s.cfg.BondDenom) + + // Test generate sendTx, estimate gas + finalGeneratedTx, err := s.createBankMsg(val1, addr, + sdk.NewCoins(sendTokens), fmt.Sprintf("--gas=%d", flags.DefaultGasLimit), + fmt.Sprintf("--%s=true", flags.FlagGenerateOnly)) + s.Require().NoError(err) + + finalStdTx, err := txCfg.TxJSONDecoder()(finalGeneratedTx.Bytes()) + s.Require().NoError(err) + txBuilder, err = txCfg.WrapTxBuilder(finalStdTx) + s.Require().NoError(err) + s.Require().Equal(uint64(flags.DefaultGasLimit), txBuilder.GetTx().GetGas()) + s.Require().Equal(len(finalStdTx.GetMsgs()), 1) + + // Write the output to disk + unsignedTxFile := testutil.WriteToNewTempFile(s.T(), finalGeneratedTx.String()) + defer unsignedTxFile.Close() + + // Test validate-signatures + res, err := TxValidateSignaturesExec(val1.ClientCtx, unsignedTxFile.Name()) + s.Require().EqualError(err, "signatures validation failed") + s.Require().True(strings.Contains(res.String(), fmt.Sprintf("Signers:\n 0: %v\n\nSignatures:\n\n", val1.Address.String()))) + + // Test sign + + // Does not work in offline mode + _, err = TxSignExec(val1.ClientCtx, val1.Address, unsignedTxFile.Name(), "--offline") + s.Require().EqualError(err, "required flag(s) \"account-number\", \"sequence\" not set") + + // But works offline if we set account number and sequence + val1.ClientCtx.HomeDir = strings.Replace(val1.ClientCtx.HomeDir, "simd", "simcli", 1) + _, err = TxSignExec(val1.ClientCtx, val1.Address, unsignedTxFile.Name(), "--offline", "--account-number", "1", "--sequence", "1") + s.Require().NoError(err) + + // Sign transaction + signedTx, err := TxSignExec(val1.ClientCtx, val1.Address, unsignedTxFile.Name()) + s.Require().NoError(err) + signedFinalTx, err := txCfg.TxJSONDecoder()(signedTx.Bytes()) + s.Require().NoError(err) + txBuilder, err = val1.ClientCtx.TxConfig.WrapTxBuilder(signedFinalTx) + s.Require().NoError(err) + s.Require().Equal(len(txBuilder.GetTx().GetMsgs()), 1) + sigs, err = txBuilder.GetTx().GetSignaturesV2() + s.Require().NoError(err) + s.Require().Equal(1, len(sigs)) + s.Require().Equal(val1.Address.String(), txBuilder.GetTx().GetSigners()[0].String()) + + // Write the output to disk + signedTxFile := testutil.WriteToNewTempFile(s.T(), signedTx.String()) + defer signedTxFile.Close() + + // validate Signature + res, err = TxValidateSignaturesExec(val1.ClientCtx, signedTxFile.Name()) + s.Require().NoError(err) + s.Require().True(strings.Contains(res.String(), "[OK]")) + s.Require().NoError(s.network.WaitForNextBlock()) + + // Ensure foo has right amount of funds + resp, err = clitestutil.QueryBalancesExec(val1.ClientCtx, val1.Address) + s.Require().NoError(err) + + err = val1.ClientCtx.Codec.UnmarshalJSON(resp.Bytes(), &balRes) + s.Require().NoError(err) + s.Require().Equal(startTokens, balRes.Balances.AmountOf(s.cfg.BondDenom)) + + // Test broadcast + + // Does not work in offline mode + _, err = TxBroadcastExec(val1.ClientCtx, signedTxFile.Name(), "--offline") + s.Require().EqualError(err, "cannot broadcast tx during offline mode") + s.Require().NoError(s.network.WaitForNextBlock()) + + // Broadcast correct transaction. + val1.ClientCtx.BroadcastMode = flags.BroadcastSync + _, err = TxBroadcastExec(val1.ClientCtx, signedTxFile.Name()) + s.Require().NoError(err) + s.Require().NoError(s.network.WaitForNextBlock()) + + // Ensure destiny account state + resp, err = clitestutil.QueryBalancesExec(val1.ClientCtx, addr) + s.Require().NoError(err) + + err = val1.ClientCtx.Codec.UnmarshalJSON(resp.Bytes(), &balRes) + s.Require().NoError(err) + s.Require().Equal(sendTokens.Amount, balRes.Balances.AmountOf(s.cfg.BondDenom)) + + // Ensure origin account state + resp, err = clitestutil.QueryBalancesExec(val1.ClientCtx, val1.Address) + s.Require().NoError(err) + + err = val1.ClientCtx.Codec.UnmarshalJSON(resp.Bytes(), &balRes) + s.Require().NoError(err) +} + +func (s *IntegrationTestSuite) TestCLIMultisignInsufficientCosigners() { + val1 := s.network.Validators[0] + + // Fetch account and a multisig info + account1, err := val1.ClientCtx.Keyring.Key("newAccount1") + s.Require().NoError(err) + + multisigRecord, err := val1.ClientCtx.Keyring.Key("multi") + s.Require().NoError(err) + + addr, err := multisigRecord.GetAddress() + s.Require().NoError(err) + // Send coins from validator to multisig. + _, err = s.createBankMsg( + val1, + addr, + sdk.NewCoins( + sdk.NewInt64Coin(s.cfg.BondDenom, 10), + ), + ) + s.Require().NoError(err) + s.Require().NoError(s.network.WaitForNextBlock()) + + // Generate multisig transaction. + multiGeneratedTx, err := clitestutil.MsgSendExec( + val1.ClientCtx, + addr, + val1.Address, + sdk.NewCoins( + sdk.NewInt64Coin(s.cfg.BondDenom, 5), + ), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), + ) + s.Require().NoError(err) + + // Save tx to file + multiGeneratedTxFile := testutil.WriteToNewTempFile(s.T(), multiGeneratedTx.String()) + defer multiGeneratedTxFile.Close() + + // Multisign, sign with one signature + val1.ClientCtx.HomeDir = strings.Replace(val1.ClientCtx.HomeDir, "simd", "simcli", 1) + addr1, err := account1.GetAddress() + s.Require().NoError(err) + account1Signature, err := TxSignExec(val1.ClientCtx, addr1, multiGeneratedTxFile.Name(), "--multisig", addr.String()) + s.Require().NoError(err) + + sign1File := testutil.WriteToNewTempFile(s.T(), account1Signature.String()) + defer sign1File.Close() + + multiSigWith1Signature, err := TxMultiSignExec(val1.ClientCtx, multisigRecord.Name, multiGeneratedTxFile.Name(), sign1File.Name()) + s.Require().NoError(err) + + // Save tx to file + multiSigWith1SignatureFile := testutil.WriteToNewTempFile(s.T(), multiSigWith1Signature.String()) + defer multiSigWith1SignatureFile.Close() + + _, err = TxValidateSignaturesExec(val1.ClientCtx, multiSigWith1SignatureFile.Name()) + s.Require().Error(err) +} + +func (s *IntegrationTestSuite) TestCLIEncode() { + val1 := s.network.Validators[0] + + sendTokens := sdk.NewCoin(s.cfg.BondDenom, sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction)) + + normalGeneratedTx, err := s.createBankMsg( + val1, val1.Address, + sdk.NewCoins(sendTokens), + fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), + fmt.Sprintf("--%s=deadbeef", flags.FlagNote), + ) + s.Require().NoError(err) + savedTxFile := testutil.WriteToNewTempFile(s.T(), normalGeneratedTx.String()) + defer savedTxFile.Close() + + // Encode + encodeExec, err := TxEncodeExec(val1.ClientCtx, savedTxFile.Name()) + s.Require().NoError(err) + trimmedBase64 := strings.Trim(encodeExec.String(), "\"\n") + + // Check that the transaction decodes as expected + decodedTx, err := TxDecodeExec(val1.ClientCtx, trimmedBase64) + s.Require().NoError(err) + + txCfg := val1.ClientCtx.TxConfig + theTx, err := txCfg.TxJSONDecoder()(decodedTx.Bytes()) + s.Require().NoError(err) + txBuilder, err := val1.ClientCtx.TxConfig.WrapTxBuilder(theTx) + s.Require().NoError(err) + s.Require().Equal("deadbeef", txBuilder.GetTx().GetMemo()) +} + +func (s *IntegrationTestSuite) TestCLIMultisignSortSignatures() { + val1 := s.network.Validators[0] + + // Generate 2 accounts and a multisig. + account1, err := val1.ClientCtx.Keyring.Key("newAccount1") + s.Require().NoError(err) + + account2, err := val1.ClientCtx.Keyring.Key("newAccount2") + s.Require().NoError(err) + + multisigRecord, err := val1.ClientCtx.Keyring.Key("multi") + s.Require().NoError(err) + + // Generate dummy account which is not a part of multisig. + dummyAcc, err := val1.ClientCtx.Keyring.Key("dummyAccount") + s.Require().NoError(err) + + addr, err := multisigRecord.GetAddress() + s.Require().NoError(err) + resp, err := clitestutil.QueryBalancesExec(val1.ClientCtx, addr) + s.Require().NoError(err) + + var balRes banktypes.QueryAllBalancesResponse + err = val1.ClientCtx.Codec.UnmarshalJSON(resp.Bytes(), &balRes) + s.Require().NoError(err) + intialCoins := balRes.Balances + + s.Require().NoError(s.network.WaitForNextBlock()) + // Send coins from validator to multisig. + sendTokens := sdk.NewInt64Coin(s.cfg.BondDenom, 10) + _, err = s.createBankMsg( + val1, + addr, + sdk.NewCoins(sendTokens), + ) + s.Require().NoError(err) + s.Require().NoError(s.network.WaitForNextBlock()) + + resp, err = clitestutil.QueryBalancesExec(val1.ClientCtx, addr) + s.Require().NoError(err) + + err = val1.ClientCtx.Codec.UnmarshalJSON(resp.Bytes(), &balRes) + s.Require().NoError(err) + diff, _ := balRes.Balances.SafeSub(intialCoins...) + s.Require().Equal(sendTokens.Amount, diff.AmountOf(s.cfg.BondDenom)) + + // Generate multisig transaction. + multiGeneratedTx, err := clitestutil.MsgSendExec( + val1.ClientCtx, + addr, + val1.Address, + sdk.NewCoins( + sdk.NewInt64Coin(s.cfg.BondDenom, 5), + ), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), + ) + s.Require().NoError(err) + + // Save tx to file + multiGeneratedTxFile := testutil.WriteToNewTempFile(s.T(), multiGeneratedTx.String()) + defer multiGeneratedTxFile.Close() + + // Sign with account1 + addr1, err := account1.GetAddress() + s.Require().NoError(err) + val1.ClientCtx.HomeDir = strings.Replace(val1.ClientCtx.HomeDir, "simd", "simcli", 1) + account1Signature, err := TxSignExec(val1.ClientCtx, addr1, multiGeneratedTxFile.Name(), "--multisig", addr.String()) + s.Require().NoError(err) + + sign1File := testutil.WriteToNewTempFile(s.T(), account1Signature.String()) + defer sign1File.Close() + + // Sign with account2 + addr2, err := account2.GetAddress() + s.Require().NoError(err) + account2Signature, err := TxSignExec(val1.ClientCtx, addr2, multiGeneratedTxFile.Name(), "--multisig", addr.String()) + s.Require().NoError(err) + + sign2File := testutil.WriteToNewTempFile(s.T(), account2Signature.String()) + defer sign2File.Close() + + // Sign with dummy account + dummyAddr, err := dummyAcc.GetAddress() + s.Require().NoError(err) + _, err = TxSignExec(val1.ClientCtx, dummyAddr, multiGeneratedTxFile.Name(), "--multisig", addr.String()) + s.Require().Error(err) + s.Require().Contains(err.Error(), "signing key is not a part of multisig key") + + multiSigWith2Signatures, err := TxMultiSignExec(val1.ClientCtx, multisigRecord.Name, multiGeneratedTxFile.Name(), sign1File.Name(), sign2File.Name()) + s.Require().NoError(err) + + // Write the output to disk + signedTxFile := testutil.WriteToNewTempFile(s.T(), multiSigWith2Signatures.String()) + defer signedTxFile.Close() + + _, err = TxValidateSignaturesExec(val1.ClientCtx, signedTxFile.Name()) + s.Require().NoError(err) + + val1.ClientCtx.BroadcastMode = flags.BroadcastSync + _, err = TxBroadcastExec(val1.ClientCtx, signedTxFile.Name()) + s.Require().NoError(err) + + s.Require().NoError(s.network.WaitForNextBlock()) +} + +func (s *IntegrationTestSuite) TestSignWithMultisig() { + val1 := s.network.Validators[0] + + // Generate a account for signing. + account1, err := val1.ClientCtx.Keyring.Key("newAccount1") + s.Require().NoError(err) + + addr1, err := account1.GetAddress() + s.Require().NoError(err) + + // Create an address that is not in the keyring, will be used to simulate `--multisig` + multisig := "cosmos1hd6fsrvnz6qkp87s3u86ludegq97agxsdkwzyh" + multisigAddr, err := sdk.AccAddressFromBech32(multisig) + s.Require().NoError(err) + + // Generate a transaction for testing --multisig with an address not in the keyring. + multisigTx, err := clitestutil.MsgSendExec( + val1.ClientCtx, + val1.Address, + val1.Address, + sdk.NewCoins( + sdk.NewInt64Coin(s.cfg.BondDenom, 5), + ), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), + ) + s.Require().NoError(err) + + // Save multi tx to file + multiGeneratedTx2File := testutil.WriteToNewTempFile(s.T(), multisigTx.String()) + defer multiGeneratedTx2File.Close() + + // Sign using multisig. We're signing a tx on behalf of the multisig address, + // even though the tx signer is NOT the multisig address. This is fine though, + // as the main point of this test is to test the `--multisig` flag with an address + // that is not in the keyring. + _, err = TxSignExec(val1.ClientCtx, addr1, multiGeneratedTx2File.Name(), "--multisig", multisigAddr.String()) + s.Require().Contains(err.Error(), "error getting account from keybase") +} + +func (s *IntegrationTestSuite) TestCLIMultisign() { + val1 := s.network.Validators[0] + + // Generate 2 accounts and a multisig. + account1, err := val1.ClientCtx.Keyring.Key("newAccount1") + s.Require().NoError(err) + + account2, err := val1.ClientCtx.Keyring.Key("newAccount2") + s.Require().NoError(err) + + multisigRecord, err := val1.ClientCtx.Keyring.Key("multi") + s.Require().NoError(err) + + addr, err := multisigRecord.GetAddress() + s.Require().NoError(err) + + // Send coins from validator to multisig. + sendTokens := sdk.NewInt64Coin(s.cfg.BondDenom, 10) + s.Require().NoError(s.network.WaitForNextBlock()) + _, err = s.createBankMsg( + val1, addr, + sdk.NewCoins(sendTokens), + ) + s.Require().NoError(err) + s.Require().NoError(s.network.WaitForNextBlock()) + + resp, err := clitestutil.QueryBalancesExec(val1.ClientCtx, addr) + s.Require().NoError(err) + + var balRes banktypes.QueryAllBalancesResponse + err = val1.ClientCtx.Codec.UnmarshalJSON(resp.Bytes(), &balRes) + s.Require().NoError(err) + s.Require().True(sendTokens.Amount.Equal(balRes.Balances.AmountOf(s.cfg.BondDenom))) + + // Generate multisig transaction. + multiGeneratedTx, err := clitestutil.MsgSendExec( + val1.ClientCtx, + addr, + val1.Address, + sdk.NewCoins( + sdk.NewInt64Coin(s.cfg.BondDenom, 5), + ), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), + ) + s.Require().NoError(err) + + // Save tx to file + multiGeneratedTxFile := testutil.WriteToNewTempFile(s.T(), multiGeneratedTx.String()) + defer multiGeneratedTxFile.Close() + + addr1, err := account1.GetAddress() + s.Require().NoError(err) + // Sign with account1 + val1.ClientCtx.HomeDir = strings.Replace(val1.ClientCtx.HomeDir, "simd", "simcli", 1) + account1Signature, err := TxSignExec(val1.ClientCtx, addr1, multiGeneratedTxFile.Name(), "--multisig", addr.String()) + s.Require().NoError(err) + + sign1File := testutil.WriteToNewTempFile(s.T(), account1Signature.String()) + defer sign1File.Close() + + addr2, err := account2.GetAddress() + s.Require().NoError(err) + // Sign with account2 + account2Signature, err := TxSignExec(val1.ClientCtx, addr2, multiGeneratedTxFile.Name(), "--multisig", addr.String()) + s.Require().NoError(err) + + sign2File := testutil.WriteToNewTempFile(s.T(), account2Signature.String()) + defer sign2File.Close() + + // Does not work in offline mode. + _, err = TxMultiSignExec(val1.ClientCtx, multisigRecord.Name, multiGeneratedTxFile.Name(), "--offline", sign1File.Name(), sign2File.Name()) + s.Require().EqualError(err, fmt.Sprintf("couldn't verify signature for address %s", addr1)) + + val1.ClientCtx.Offline = false + multiSigWith2Signatures, err := TxMultiSignExec(val1.ClientCtx, multisigRecord.Name, multiGeneratedTxFile.Name(), sign1File.Name(), sign2File.Name()) + s.Require().NoError(err) + + // Write the output to disk + signedTxFile := testutil.WriteToNewTempFile(s.T(), multiSigWith2Signatures.String()) + defer signedTxFile.Close() + + _, err = TxValidateSignaturesExec(val1.ClientCtx, signedTxFile.Name()) + s.Require().NoError(err) + + val1.ClientCtx.BroadcastMode = flags.BroadcastSync + _, err = TxBroadcastExec(val1.ClientCtx, signedTxFile.Name()) + s.Require().NoError(err) + + s.Require().NoError(s.network.WaitForNextBlock()) +} + +func (s *IntegrationTestSuite) TestSignBatchMultisig() { + val := s.network.Validators[0] + + // Fetch 2 accounts and a multisig. + account1, err := val.ClientCtx.Keyring.Key("newAccount1") + s.Require().NoError(err) + account2, err := val.ClientCtx.Keyring.Key("newAccount2") + s.Require().NoError(err) + multisigRecord, err := val.ClientCtx.Keyring.Key("multi") + s.Require().NoError(err) + + addr, err := multisigRecord.GetAddress() + s.Require().NoError(err) + // Send coins from validator to multisig. + sendTokens := sdk.NewInt64Coin(s.cfg.BondDenom, 10) + _, err = s.createBankMsg( + val, + addr, + sdk.NewCoins(sendTokens), + ) + s.Require().NoError(err) + s.Require().NoError(s.network.WaitForNextBlock()) + + generatedStd, err := clitestutil.MsgSendExec( + val.ClientCtx, + addr, + val.Address, + sdk.NewCoins( + sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(1)), + ), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), + ) + s.Require().NoError(err) + + // Write the output to disk + filename := testutil.WriteToNewTempFile(s.T(), strings.Repeat(generatedStd.String(), 1)) + defer filename.Close() + val.ClientCtx.HomeDir = strings.Replace(val.ClientCtx.HomeDir, "simd", "simcli", 1) + + addr1, err := account1.GetAddress() + s.Require().NoError(err) + // sign-batch file + res, err := TxSignBatchExec(val.ClientCtx, addr1, filename.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), "--multisig", addr.String(), "--signature-only") + s.Require().NoError(err) + s.Require().Equal(1, len(strings.Split(strings.Trim(res.String(), "\n"), "\n"))) + // write sigs to file + file1 := testutil.WriteToNewTempFile(s.T(), res.String()) + defer file1.Close() + + addr2, err := account2.GetAddress() + s.Require().NoError(err) + // sign-batch file with account2 + res, err = TxSignBatchExec(val.ClientCtx, addr2, filename.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), "--multisig", addr.String(), "--signature-only") + s.Require().NoError(err) + s.Require().Equal(1, len(strings.Split(strings.Trim(res.String(), "\n"), "\n"))) + // write sigs to file2 + file2 := testutil.WriteToNewTempFile(s.T(), res.String()) + defer file2.Close() + _, err = TxMultiSignExec(val.ClientCtx, multisigRecord.Name, filename.Name(), file1.Name(), file2.Name()) + s.Require().NoError(err) +} + +func (s *IntegrationTestSuite) TestMultisignBatch() { + val := s.network.Validators[0] + + // Fetch 2 accounts and a multisig. + account1, err := val.ClientCtx.Keyring.Key("newAccount1") + s.Require().NoError(err) + account2, err := val.ClientCtx.Keyring.Key("newAccount2") + s.Require().NoError(err) + multisigRecord, err := val.ClientCtx.Keyring.Key("multi") + s.Require().NoError(err) + + addr, err := multisigRecord.GetAddress() + s.Require().NoError(err) + // Send coins from validator to multisig. + sendTokens := sdk.NewInt64Coin(s.cfg.BondDenom, 1000) + _, err = s.createBankMsg( + val, + addr, + sdk.NewCoins(sendTokens), + ) + s.Require().NoError(err) + s.Require().NoError(s.network.WaitForNextBlock()) + + generatedStd, err := clitestutil.MsgSendExec( + val.ClientCtx, + addr, + val.Address, + sdk.NewCoins( + sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(1)), + ), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), + ) + s.Require().NoError(err) + + // Write the output to disk + filename := testutil.WriteToNewTempFile(s.T(), strings.Repeat(generatedStd.String(), 3)) + defer filename.Close() + val.ClientCtx.HomeDir = strings.Replace(val.ClientCtx.HomeDir, "simd", "simcli", 1) + + queryResJSON, err := QueryAccountExec(val.ClientCtx, addr) + s.Require().NoError(err) + var account authtypes.AccountI + s.Require().NoError(val.ClientCtx.Codec.UnmarshalInterfaceJSON(queryResJSON.Bytes(), &account)) + + // sign-batch file + addr1, err := account1.GetAddress() + s.Require().NoError(err) + res, err := TxSignBatchExec(val.ClientCtx, addr1, filename.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), "--multisig", addr.String(), fmt.Sprintf("--%s", flags.FlagOffline), fmt.Sprintf("--%s=%s", flags.FlagAccountNumber, fmt.Sprint(account.GetAccountNumber())), fmt.Sprintf("--%s=%s", flags.FlagSequence, fmt.Sprint(account.GetSequence())), "--signature-only") + s.Require().NoError(err) + s.Require().Equal(3, len(strings.Split(strings.Trim(res.String(), "\n"), "\n"))) + // write sigs to file + file1 := testutil.WriteToNewTempFile(s.T(), res.String()) + defer file1.Close() + + // sign-batch file with account2 + addr2, err := account2.GetAddress() + s.Require().NoError(err) + res, err = TxSignBatchExec(val.ClientCtx, addr2, filename.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), "--multisig", addr.String(), fmt.Sprintf("--%s", flags.FlagOffline), fmt.Sprintf("--%s=%s", flags.FlagAccountNumber, fmt.Sprint(account.GetAccountNumber())), fmt.Sprintf("--%s=%s", flags.FlagSequence, fmt.Sprint(account.GetSequence())), "--signature-only") + s.Require().NoError(err) + s.Require().Equal(3, len(strings.Split(strings.Trim(res.String(), "\n"), "\n"))) + + // multisign the file + file2 := testutil.WriteToNewTempFile(s.T(), res.String()) + defer file2.Close() + res, err = TxMultiSignBatchExec(val.ClientCtx, filename.Name(), multisigRecord.Name, file1.Name(), file2.Name()) + s.Require().NoError(err) + signedTxs := strings.Split(strings.Trim(res.String(), "\n"), "\n") + + // Broadcast transactions. + for _, signedTx := range signedTxs { + func() { + signedTxFile := testutil.WriteToNewTempFile(s.T(), signedTx) + defer signedTxFile.Close() + val.ClientCtx.BroadcastMode = flags.BroadcastSync + _, err = TxBroadcastExec(val.ClientCtx, signedTxFile.Name()) + s.Require().NoError(err) + s.Require().NoError(s.network.WaitForNextBlock()) + }() + } +} + +func (s *IntegrationTestSuite) TestGetAccountCmd() { + val := s.network.Validators[0] + _, _, addr1 := testdata.KeyTestPubAddr() + + testCases := []struct { + name string + address sdk.AccAddress + expectErr bool + }{ + { + "invalid address", + addr1, + true, + }, + { + "valid address", + val.Address, + false, + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + clientCtx := val.ClientCtx + + out, err := QueryAccountExec(clientCtx, tc.address) + if tc.expectErr { + s.Require().Error(err) + s.Require().NotEqual("internal", err.Error()) + } else { + var acc authtypes.AccountI + s.Require().NoError(val.ClientCtx.Codec.UnmarshalInterfaceJSON(out.Bytes(), &acc)) + s.Require().Equal(val.Address, acc.GetAddress()) + } + }) + } +} + +func (s *IntegrationTestSuite) TestGetAccountsCmd() { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + + out, err := clitestutil.ExecTestCLICmd(clientCtx, authcli.GetAccountsCmd(), []string{ + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }) + s.Require().NoError(err) + + var res authtypes.QueryAccountsResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) + s.Require().NotEmpty(res.Accounts) +} + +func (s *IntegrationTestSuite) TestQueryModuleAccountByNameCmd() { + val := s.network.Validators[0] + + testCases := []struct { + name string + moduleName string + expectErr bool + }{ + { + "invalid module name", + "gover", + true, + }, + { + "valid module name", + "mint", + false, + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + clientCtx := val.ClientCtx + + out, err := clitestutil.ExecTestCLICmd(clientCtx, authcli.QueryModuleAccountByNameCmd(), []string{ + tc.moduleName, + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }) + if tc.expectErr { + s.Require().Error(err) + s.Require().NotEqual("internal", err.Error()) + } else { + var res authtypes.QueryModuleAccountByNameResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) + + var account types.AccountI + err := val.ClientCtx.InterfaceRegistry.UnpackAny(res.Account, &account) + s.Require().NoError(err) + + moduleAccount, ok := account.(types.ModuleAccountI) + s.Require().True(ok) + s.Require().Equal(tc.moduleName, moduleAccount.GetName()) + } + }) + } +} + +func (s *IntegrationTestSuite) TestQueryModuleAccountsCmd() { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + + out, err := clitestutil.ExecTestCLICmd(clientCtx, authcli.QueryModuleAccountsCmd(), []string{ + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }) + s.Require().NoError(err) + + var res authtypes.QueryModuleAccountsResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) + s.Require().NotEmpty(res.Accounts) +} + +func TestGetBroadcastCommandOfflineFlag(t *testing.T) { + cmd := authcli.GetBroadcastCommand() + _ = testutil.ApplyMockIODiscardOutErr(cmd) + cmd.SetArgs([]string{fmt.Sprintf("--%s=true", flags.FlagOffline), ""}) + + require.EqualError(t, cmd.Execute(), "cannot broadcast tx during offline mode") +} + +func TestGetBroadcastCommandWithoutOfflineFlag(t *testing.T) { + var txCfg client.TxConfig + err := depinject.Inject(authtestutil.AppConfig, &txCfg) + require.NoError(t, err) + clientCtx := client.Context{} + clientCtx = clientCtx.WithTxConfig(txCfg) + + ctx := context.Background() + ctx = context.WithValue(ctx, client.ClientContextKey, &clientCtx) + + cmd := authcli.GetBroadcastCommand() + _, out := testutil.ApplyMockIO(cmd) + + // Create new file with tx + builder := txCfg.NewTxBuilder() + builder.SetGasLimit(200000) + from, err := sdk.AccAddressFromBech32("cosmos1cxlt8kznps92fwu3j6npahx4mjfutydyene2qw") + require.NoError(t, err) + to, err := sdk.AccAddressFromBech32("cosmos1cxlt8kznps92fwu3j6npahx4mjfutydyene2qw") + require.NoError(t, err) + err = builder.SetMsgs(banktypes.NewMsgSend(from, to, sdk.Coins{sdk.NewInt64Coin("stake", 10000)})) + require.NoError(t, err) + txContents, err := txCfg.TxJSONEncoder()(builder.GetTx()) + require.NoError(t, err) + txFile := testutil.WriteToNewTempFile(t, string(txContents)) + defer txFile.Close() + + cmd.SetArgs([]string{txFile.Name()}) + err = cmd.ExecuteContext(ctx) + require.Error(t, err) + require.Contains(t, err.Error(), "connect: connection refused") + require.Contains(t, out.String(), "connect: connection refused") +} + +func (s *IntegrationTestSuite) TestQueryParamsCmd() { + val := s.network.Validators[0] + + testCases := []struct { + name string + args []string + expectErr bool + }{ + { + "happy case", + []string{fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + false, + }, + { + "with specific height", + []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + false, + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + cmd := authcli.QueryParamsCmd() + clientCtx := val.ClientCtx + + out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) + if tc.expectErr { + s.Require().Error(err) + s.Require().NotEqual("internal", err.Error()) + } else { + var authParams authtypes.Params + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &authParams)) + s.Require().NotNil(authParams.MaxMemoCharacters) + } + }) + } +} + +// TestTxWithoutPublicKey makes sure sending a proto tx message without the +// public key doesn't cause any error in the RPC layer (broadcast). +// See https://github.com/cosmos/cosmos-sdk/issues/7585 for more details. +func (s *IntegrationTestSuite) TestTxWithoutPublicKey() { + val1 := s.network.Validators[0] + txCfg := val1.ClientCtx.TxConfig + + // Create a txBuilder with an unsigned tx. + txBuilder := txCfg.NewTxBuilder() + msg := banktypes.NewMsgSend(val1.Address, val1.Address, sdk.NewCoins( + sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)), + )) + err := txBuilder.SetMsgs(msg) + s.Require().NoError(err) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(150)))) + txBuilder.SetGasLimit(testdata.NewTestGasLimit()) + // Set empty signature to set signer infos. + sigV2 := signing.SignatureV2{ + PubKey: val1.PubKey, + Data: &signing.SingleSignatureData{ + SignMode: txCfg.SignModeHandler().DefaultMode(), + Signature: nil, + }, + } + err = txBuilder.SetSignatures(sigV2) + s.Require().NoError(err) + + // Create a file with the unsigned tx. + txJSON, err := txCfg.TxJSONEncoder()(txBuilder.GetTx()) + s.Require().NoError(err) + unsignedTxFile := testutil.WriteToNewTempFile(s.T(), string(txJSON)) + defer unsignedTxFile.Close() + + // Sign the file with the unsignedTx. + signedTx, err := TxSignExec(val1.ClientCtx, val1.Address, unsignedTxFile.Name(), fmt.Sprintf("--%s=true", cli.FlagOverwrite)) + s.Require().NoError(err) + + // Remove the signerInfo's `public_key` field manually from the signedTx. + // Note: this method is only used for test purposes! In general, one should + // use txBuilder and TxEncoder/TxDecoder to manipulate txs. + var tx tx.Tx + err = val1.ClientCtx.Codec.UnmarshalJSON(signedTx.Bytes(), &tx) + s.Require().NoError(err) + tx.AuthInfo.SignerInfos[0].PublicKey = nil + // Re-encode the tx again, to another file. + txJSON, err = val1.ClientCtx.Codec.MarshalJSON(&tx) + s.Require().NoError(err) + signedTxFile := testutil.WriteToNewTempFile(s.T(), string(txJSON)) + defer signedTxFile.Close() + s.Require().True(strings.Contains(string(txJSON), "\"public_key\":null")) + + // Broadcast tx, test that it shouldn't panic. + val1.ClientCtx.BroadcastMode = flags.BroadcastSync + out, err := TxBroadcastExec(val1.ClientCtx, signedTxFile.Name()) + s.Require().NoError(err) + var res sdk.TxResponse + s.Require().NoError(val1.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) + s.Require().NotEqual(0, res.Code) +} + +// TestSignWithMultiSignersAminoJSON tests the case where a transaction with 2 +// messages which has to be signed with 2 different keys. Sign and append the +// signatures using the CLI with Amino signing mode. Finally, send the +// transaction to the blockchain. +func (s *IntegrationTestSuite) TestSignWithMultiSignersAminoJSON() { + require := s.Require() + val0, val1 := s.network.Validators[0], s.network.Validators[1] + val0Coin := sdk.NewCoin(fmt.Sprintf("%stoken", val0.Moniker), sdk.NewInt(10)) + val1Coin := sdk.NewCoin(fmt.Sprintf("%stoken", val1.Moniker), sdk.NewInt(10)) + _, _, addr1 := testdata.KeyTestPubAddr() + + // Creating a tx with 2 msgs from 2 signers: val0 and val1. + // The validators need to sign with SIGN_MODE_LEGACY_AMINO_JSON, + // because DIRECT doesn't support multi signers via the CLI. + // Since we use amino, we don't need to pre-populate signer_infos. + txBuilder := val0.ClientCtx.TxConfig.NewTxBuilder() + txBuilder.SetMsgs( + banktypes.NewMsgSend(val0.Address, addr1, sdk.NewCoins(val0Coin)), + banktypes.NewMsgSend(val1.Address, addr1, sdk.NewCoins(val1Coin)), + ) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)))) + txBuilder.SetGasLimit(testdata.NewTestGasLimit() * 2) + require.Equal([]sdk.AccAddress{val0.Address, val1.Address}, txBuilder.GetTx().GetSigners()) + + // Write the unsigned tx into a file. + txJSON, err := val0.ClientCtx.TxConfig.TxJSONEncoder()(txBuilder.GetTx()) + require.NoError(err) + unsignedTxFile := testutil.WriteToNewTempFile(s.T(), string(txJSON)) + defer unsignedTxFile.Close() + + // Let val0 sign first the file with the unsignedTx. + signedByVal0, err := TxSignExec(val0.ClientCtx, val0.Address, unsignedTxFile.Name(), "--overwrite", "--sign-mode=amino-json") + require.NoError(err) + signedByVal0File := testutil.WriteToNewTempFile(s.T(), signedByVal0.String()) + defer signedByVal0File.Close() + + // Then let val1 sign the file with signedByVal0. + val1AccNum, val1Seq, err := val0.ClientCtx.AccountRetriever.GetAccountNumberSequence(val0.ClientCtx, val1.Address) + require.NoError(err) + + signedTx, err := TxSignExec( + val1.ClientCtx, + val1.Address, + signedByVal0File.Name(), + "--offline", + fmt.Sprintf("--account-number=%d", val1AccNum), + fmt.Sprintf("--sequence=%d", val1Seq), + "--sign-mode=amino-json", + ) + require.NoError(err) + signedTxFile := testutil.WriteToNewTempFile(s.T(), signedTx.String()) + defer signedTxFile.Close() + + res, err := TxBroadcastExec( + val0.ClientCtx, + signedTxFile.Name(), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + ) + require.NoError(err) + require.NoError(s.network.WaitForNextBlock()) + require.NoError(s.network.WaitForNextBlock()) + + var txRes sdk.TxResponse + require.NoError(val0.ClientCtx.Codec.UnmarshalJSON(res.Bytes(), &txRes)) + require.Equal(uint32(0), txRes.Code, txRes.RawLog) + + // Make sure the addr1's balance got funded. + queryResJSON, err := clitestutil.QueryBalancesExec(val0.ClientCtx, addr1) + require.NoError(err) + var queryRes banktypes.QueryAllBalancesResponse + err = val0.ClientCtx.Codec.UnmarshalJSON(queryResJSON.Bytes(), &queryRes) + require.NoError(err) + require.Equal(sdk.NewCoins(val0Coin, val1Coin), queryRes.Balances) +} + +func (s *IntegrationTestSuite) TestAuxSigner() { + require := s.Require() + val := s.network.Validators[0] + val0Coin := sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10)) + + testCases := []struct { + name string + args []string + expectErr bool + }{ + { + "error with SIGN_MODE_DIRECT_AUX and --aux unset", + []string{ + fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirectAux), + }, + true, + }, + { + "no error with SIGN_MDOE_DIRECT_AUX mode and generate-only set (ignores generate-only)", + []string{ + fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirectAux), + fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), + }, + false, + }, + { + "no error with SIGN_MDOE_DIRECT_AUX mode and generate-only, tip flag set", + []string{ + fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirectAux), + fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), + fmt.Sprintf("--%s=%s", flags.FlagTip, val0Coin.String()), + }, + false, + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + _, err := govtestutil.MsgSubmitLegacyProposal( + val.ClientCtx, + val.Address.String(), + "test", + "test desc", + govtypes.ProposalTypeText, + tc.args..., + ) + if tc.expectErr { + require.Error(err) + } else { + require.NoError(err) + } + }) + } +} + +func (s *IntegrationTestSuite) TestAuxToFeeWithTips() { + // Skipping this test as it needs a simapp with the TipDecorator in post handler. + s.T().Skip() + + require := s.Require() + val := s.network.Validators[0] + + kb := s.network.Validators[0].ClientCtx.Keyring + acc, _, err := kb.NewMnemonic("tipperAccount", keyring.English, sdk.FullFundraiserPath, keyring.DefaultBIP39Passphrase, hd.Secp256k1) + require.NoError(err) + + tipper, err := acc.GetAddress() + require.NoError(err) + tipperInitialBal := sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10000)) + + feePayer := val.Address + fee := sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(1000)) + tip := sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(1000)) + + require.NoError(s.network.WaitForNextBlock()) + _, err = s.createBankMsg(val, tipper, sdk.NewCoins(tipperInitialBal)) + require.NoError(err) + require.NoError(s.network.WaitForNextBlock()) + + bal := s.getBalances(val.ClientCtx, tipper, tip.Denom) + require.True(bal.Equal(tipperInitialBal.Amount)) + + testCases := []struct { + name string + tipper sdk.AccAddress + feePayer sdk.AccAddress + tip sdk.Coin + expectErrAux bool + expectErrBroadCast bool + errMsg string + tipperArgs []string + feePayerArgs []string + }{ + { + name: "when --aux and --sign-mode = direct set: error", + tipper: tipper, + feePayer: feePayer, + tip: tip, + tipperArgs: []string{ + fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirect), + fmt.Sprintf("--%s=%s", flags.FlagTip, tip), + fmt.Sprintf("--%s=true", flags.FlagAux), + }, + expectErrAux: true, + feePayerArgs: []string{ + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFrom, feePayer), + fmt.Sprintf("--%s=%s", flags.FlagFees, fee.String()), + }, + }, + { + name: "both tipper, fee payer uses AMINO: no error", + tipper: tipper, + feePayer: feePayer, + tip: tip, + tipperArgs: []string{ + fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), + fmt.Sprintf("--%s=%s", flags.FlagTip, tip), + fmt.Sprintf("--%s=true", flags.FlagAux), + }, + feePayerArgs: []string{ + fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFrom, feePayer), + fmt.Sprintf("--%s=%s", flags.FlagFees, fee.String()), + }, + }, + { + name: "tipper uses DIRECT_AUX, fee payer uses AMINO: no error", + tipper: tipper, + feePayer: feePayer, + tip: tip, + tipperArgs: []string{ + fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirectAux), + fmt.Sprintf("--%s=%s", flags.FlagTip, tip), + fmt.Sprintf("--%s=true", flags.FlagAux), + }, + feePayerArgs: []string{ + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFrom, feePayer), + fmt.Sprintf("--%s=%s", flags.FlagFees, fee.String()), + }, + }, + { + name: "--tip flag unset: no error", + tipper: tipper, + feePayer: feePayer, + tip: sdk.Coin{Denom: fmt.Sprintf("%stoken", val.Moniker), Amount: sdk.NewInt(0)}, + tipperArgs: []string{ + fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirectAux), + fmt.Sprintf("--%s=true", flags.FlagAux), + }, + feePayerArgs: []string{ + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFrom, feePayer), + fmt.Sprintf("--%s=%s", flags.FlagFees, fee.String()), + }, + }, + { + name: "legacy amino json: no error", + tipper: tipper, + feePayer: feePayer, + tip: tip, + tipperArgs: []string{ + fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), + fmt.Sprintf("--%s=%s", flags.FlagTip, tip), + fmt.Sprintf("--%s=true", flags.FlagAux), + }, + feePayerArgs: []string{ + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFrom, feePayer), + fmt.Sprintf("--%s=%s", flags.FlagFees, fee.String()), + }, + }, + { + name: "tipper uses direct aux, fee payer uses direct: happy case", + tipper: tipper, + feePayer: feePayer, + tip: tip, + tipperArgs: []string{ + fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirectAux), + fmt.Sprintf("--%s=%s", flags.FlagTip, tip), + fmt.Sprintf("--%s=true", flags.FlagAux), + }, + feePayerArgs: []string{ + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFrom, feePayer), + fmt.Sprintf("--%s=%s", flags.FlagFees, fee.String()), + }, + }, + { + name: "chain-id mismatch: error", + tipper: tipper, + feePayer: feePayer, + tip: tip, + tipperArgs: []string{ + fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirectAux), + fmt.Sprintf("--%s=%s", flags.FlagTip, tip), + fmt.Sprintf("--%s=true", flags.FlagAux), + }, + expectErrAux: false, + feePayerArgs: []string{ + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFrom, feePayer), + fmt.Sprintf("--%s=%s", flags.FlagFees, fee.String()), + fmt.Sprintf("--%s=%s", flags.FlagChainID, "foobar"), + }, + expectErrBroadCast: true, + }, + { + name: "wrong denom in tip: error", + tipper: tipper, + feePayer: feePayer, + tip: sdk.Coin{Denom: fmt.Sprintf("%stoken", val.Moniker), Amount: sdk.NewInt(0)}, + tipperArgs: []string{ + fmt.Sprintf("--%s=%s", flags.FlagTip, "1000wrongDenom"), + fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirectAux), + fmt.Sprintf("--%s=true", flags.FlagAux), + }, + feePayerArgs: []string{ + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirect), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFrom, feePayer), + fmt.Sprintf("--%s=%s", flags.FlagFees, fee.String()), + }, + errMsg: "insufficient funds", + }, + { + name: "insufficient fees: error", + tipper: tipper, + feePayer: feePayer, + tip: sdk.Coin{Denom: fmt.Sprintf("%stoken", val.Moniker), Amount: sdk.NewInt(0)}, + tipperArgs: []string{ + fmt.Sprintf("--%s=%s", flags.FlagTip, tip), + fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirectAux), + fmt.Sprintf("--%s=true", flags.FlagAux), + }, + feePayerArgs: []string{ + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirect), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFrom, feePayer), + }, + errMsg: "insufficient fees", + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + res, err := govtestutil.MsgSubmitLegacyProposal( + val.ClientCtx, + tipper.String(), + "test", + "test desc", + govtypes.ProposalTypeText, + tc.tipperArgs..., + ) + + if tc.expectErrAux { + require.Error(err) + } else { + require.NoError(err) + genTxFile := testutil.WriteToNewTempFile(s.T(), string(res.Bytes())) + defer genTxFile.Close() + + // broadcast the tx + res, err = TxAuxToFeeExec( + val.ClientCtx, + genTxFile.Name(), + tc.feePayerArgs..., + ) + s.Require().NoError(s.network.WaitForNextBlock()) + + switch { + case tc.expectErrBroadCast: + require.Error(err) + + case tc.errMsg != "": + require.NoError(err) + + var txRes sdk.TxResponse + require.NoError(val.ClientCtx.Codec.UnmarshalJSON(res.Bytes(), &txRes)) + + require.Contains(txRes.RawLog, tc.errMsg) + + default: + require.NoError(err) + + var txRes sdk.TxResponse + require.NoError(val.ClientCtx.Codec.UnmarshalJSON(res.Bytes(), &txRes)) + + require.Equal(uint32(0), txRes.Code) + require.NotNil(int64(0), txRes.Height) + + bal = s.getBalances(val.ClientCtx, tipper, tc.tip.Denom) + tipperInitialBal = tipperInitialBal.Sub(tc.tip) + require.True(bal.Equal(tipperInitialBal.Amount)) + } + } + }) + } +} + +func (s *IntegrationTestSuite) createBankMsg(val *network.Validator, toAddr sdk.AccAddress, amount sdk.Coins, extraFlags ...string) (testutil.BufferWriter, error) { + flags := []string{ + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFees, + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + } + + flags = append(flags, extraFlags...) + return clitestutil.MsgSendExec(val.ClientCtx, val.Address, toAddr, amount, flags...) +} + +func (s *IntegrationTestSuite) getBalances(clientCtx client.Context, addr sdk.AccAddress, denom string) math.Int { + resp, err := clitestutil.QueryBalancesExec(clientCtx, addr) + s.Require().NoError(err) + + var balRes banktypes.QueryAllBalancesResponse + err = clientCtx.Codec.UnmarshalJSON(resp.Bytes(), &balRes) + s.Require().NoError(err) + startTokens := balRes.Balances.AmountOf(denom) + return startTokens +} diff --git a/x/auth/client/cli/query.go b/x/auth/client/cli/query.go index e38dac0e3dd6..0bf3407be832 100644 --- a/x/auth/client/cli/query.go +++ b/x/auth/client/cli/query.go @@ -43,6 +43,11 @@ func GetQueryCmd() *cobra.Command { GetAccountCmd(), GetAccountsCmd(), QueryParamsCmd(), +<<<<<<< HEAD +======= + QueryModuleAccountsCmd(), + QueryModuleAccountByNameCmd(), +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) ) return cmd @@ -143,6 +148,70 @@ func GetAccountsCmd() *cobra.Command { return cmd } +<<<<<<< HEAD +======= +// QueryAllModuleAccountsCmd returns a list of all the existing module accounts with their account information and permissions +func QueryModuleAccountsCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "module-accounts", + Short: "Query all module accounts", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + + res, err := queryClient.ModuleAccounts(context.Background(), &types.QueryModuleAccountsRequest{}) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +// QueryModuleAccountByNameCmd returns a command to +func QueryModuleAccountByNameCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "module-account [module-name]", + Short: "Query module account info by module name", + Args: cobra.ExactArgs(1), + Example: fmt.Sprintf("%s q auth module-account auth", version.AppName), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + moduleName := args[0] + if len(moduleName) == 0 { + return fmt.Errorf("module name should not be empty") + } + + queryClient := types.NewQueryClient(clientCtx) + + res, err := queryClient.ModuleAccountByName(context.Background(), &types.QueryModuleAccountByNameRequest{Name: moduleName}) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) // QueryTxsByEventsCmd returns a command to search through transactions by events. func QueryTxsByEventsCmd() *cobra.Command { cmd := &cobra.Command{ diff --git a/x/auth/keeper/grpc_query.go b/x/auth/keeper/grpc_query.go index 344113cfa019..d25118158729 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -81,3 +81,147 @@ func (ak AccountKeeper) Params(c context.Context, req *types.QueryParamsRequest) return &types.QueryParamsResponse{Params: params}, nil } +<<<<<<< HEAD +======= + +// ModuleAccounts returns all the existing Module Accounts +func (ak AccountKeeper) ModuleAccounts(c context.Context, req *types.QueryModuleAccountsRequest) (*types.QueryModuleAccountsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + 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 = append(sortedPermAddrs, moduleName) + } + sort.Strings(sortedPermAddrs) + + modAccounts := make([]*codectypes.Any, 0, len(ak.permAddrs)) + + for _, moduleName := range sortedPermAddrs { + 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) + } + + return &types.QueryModuleAccountsResponse{Accounts: modAccounts}, nil +} + +// ModuleAccountByName returns module account by module name +func (ak AccountKeeper) ModuleAccountByName(c context.Context, req *types.QueryModuleAccountByNameRequest) (*types.QueryModuleAccountByNameResponse, error) { + if req == nil { + return nil, status.Errorf(codes.InvalidArgument, "empty request") + } + + if len(req.Name) == 0 { + return nil, status.Error(codes.InvalidArgument, "module name is empty") + } + + ctx := sdk.UnwrapSDKContext(c) + moduleName := req.Name + + 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()) + } + + return &types.QueryModuleAccountByNameResponse{Account: any}, nil +} + +// 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() + if err != nil { + return nil, err + } + + return &types.Bech32PrefixResponse{Bech32Prefix: bech32Prefix}, nil +} + +// 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) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + if len(req.AddressBytes) == 0 { + return nil, errors.New("empty address bytes is not allowed") + } + + text, err := ak.addressCdc.BytesToString(req.AddressBytes) + if err != nil { + return nil, err + } + + return &types.AddressBytesToStringResponse{AddressString: text}, nil +} + +// 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) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + if len(strings.TrimSpace(req.AddressString)) == 0 { + return nil, errors.New("empty address string is not allowed") + } + + bz, err := ak.addressCdc.StringToBytes(req.AddressString) + if err != nil { + return nil, err + } + + 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") + } + + 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.BaseAccount{ + Address: addr.String(), + PubKey: pkAny, + AccountNumber: account.GetAccountNumber(), + Sequence: account.GetSequence(), + }, + }, nil +} +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) diff --git a/x/auth/keeper/grpc_query_test.go b/x/auth/keeper/grpc_query_test.go index 789ca3c7ef31..8eb39fd9fff9 100644 --- a/x/auth/keeper/grpc_query_test.go +++ b/x/auth/keeper/grpc_query_test.go @@ -187,3 +187,269 @@ func (suite *KeeperTestSuite) TestGRPCQueryParameters() { }) } } +<<<<<<< HEAD +======= + +func (suite *KeeperTestSuite) TestGRPCQueryModuleAccounts() { + var req *types.QueryModuleAccountsRequest + + testCases := []struct { + msg string + malleate func() + expPass bool + posttests func(res *types.QueryModuleAccountsResponse) + }{ + { + "success", + func() { + req = &types.QueryModuleAccountsRequest{} + }, + true, + func(res *types.QueryModuleAccountsResponse) { + mintModuleExists := false + for _, acc := range res.Accounts { + var account types.AccountI + err := suite.encCfg.InterfaceRegistry.UnpackAny(acc, &account) + suite.Require().NoError(err) + + moduleAccount, ok := account.(types.ModuleAccountI) + + suite.Require().True(ok) + if moduleAccount.GetName() == "mint" { + mintModuleExists = true + } + } + suite.Require().True(mintModuleExists) + }, + }, + { + "invalid module name", + func() { + req = &types.QueryModuleAccountsRequest{} + }, + true, + func(res *types.QueryModuleAccountsResponse) { + mintModuleExists := false + for _, acc := range res.Accounts { + var account types.AccountI + err := suite.encCfg.InterfaceRegistry.UnpackAny(acc, &account) + suite.Require().NoError(err) + + moduleAccount, ok := account.(types.ModuleAccountI) + + suite.Require().True(ok) + if moduleAccount.GetName() == "falseCase" { + mintModuleExists = true + } + } + suite.Require().False(mintModuleExists) + }, + }, + } + + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + suite.SetupTest() // reset + + tc.malleate() + ctx := sdk.WrapSDKContext(suite.ctx) + + res, err := suite.queryClient.ModuleAccounts(ctx, req) + + if tc.expPass { + suite.Require().NoError(err) + suite.Require().NotNil(res) + // Make sure output is sorted alphabetically. + var moduleNames []string + for _, any := range res.Accounts { + var account types.AccountI + err := suite.encCfg.InterfaceRegistry.UnpackAny(any, &account) + suite.Require().NoError(err) + moduleAccount, ok := account.(types.ModuleAccountI) + suite.Require().True(ok) + moduleNames = append(moduleNames, moduleAccount.GetName()) + } + suite.Require().True(sort.StringsAreSorted(moduleNames)) + } else { + suite.Require().Error(err) + suite.Require().Nil(res) + } + + tc.posttests(res) + }) + } +} + +func (suite *KeeperTestSuite) TestGRPCQueryModuleAccountByName() { + var req *types.QueryModuleAccountByNameRequest + + testCases := []struct { + msg string + malleate func() + expPass bool + posttests func(res *types.QueryModuleAccountByNameResponse) + }{ + { + "success", + func() { + req = &types.QueryModuleAccountByNameRequest{Name: "mint"} + }, + true, + func(res *types.QueryModuleAccountByNameResponse) { + var account types.AccountI + err := suite.encCfg.InterfaceRegistry.UnpackAny(res.Account, &account) + suite.Require().NoError(err) + + moduleAccount, ok := account.(types.ModuleAccountI) + suite.Require().True(ok) + suite.Require().Equal(moduleAccount.GetName(), "mint") + }, + }, + { + "invalid module name", + func() { + req = &types.QueryModuleAccountByNameRequest{Name: "gover"} + }, + false, + func(res *types.QueryModuleAccountByNameResponse) { + }, + }, + } + + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + suite.SetupTest() // reset + tc.malleate() + ctx := sdk.WrapSDKContext(suite.ctx) + res, err := suite.queryClient.ModuleAccountByName(ctx, req) + if tc.expPass { + suite.Require().NoError(err) + suite.Require().NotNil(res) + } else { + suite.Require().Error(err) + suite.Require().Nil(res) + } + + tc.posttests(res) + }) + } +} + +func (suite *KeeperTestSuite) TestBech32Prefix() { + suite.SetupTest() // reset + req := &types.Bech32PrefixRequest{} + res, err := suite.queryClient.Bech32Prefix(context.Background(), req) + suite.Require().NoError(err) + suite.Require().NotNil(res) + suite.Require().Equal(sdk.Bech32MainPrefix, res.Bech32Prefix) +} + +func (suite *KeeperTestSuite) TestAddressBytesToString() { + testCases := []struct { + msg string + req *types.AddressBytesToStringRequest + expPass bool + }{ + { + "success", + &types.AddressBytesToStringRequest{AddressBytes: addrBytes}, + true, + }, + { + "request is empty", + &types.AddressBytesToStringRequest{}, + false, + }, + { + "empty account address in request", + &types.AddressBytesToStringRequest{AddressBytes: []byte{}}, + false, + }, + } + + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + suite.SetupTest() // reset + + res, err := suite.queryClient.AddressBytesToString(context.Background(), tc.req) + + if tc.expPass { + suite.Require().NoError(err) + suite.Require().NotNil(res) + suite.Require().Equal(res.AddressString, addrStr) + } else { + suite.Require().Error(err) + suite.Require().Nil(res) + } + }) + } +} + +func (suite *KeeperTestSuite) TestAddressStringToBytes() { + testCases := []struct { + msg string + req *types.AddressStringToBytesRequest + expPass bool + }{ + { + "success", + &types.AddressStringToBytesRequest{AddressString: addrStr}, + true, + }, + { + "request is empty", + &types.AddressStringToBytesRequest{}, + false, + }, + { + "AddressString field in request is empty", + &types.AddressStringToBytesRequest{AddressString: ""}, + false, + }, + { + "address prefix is incorrect", + &types.AddressStringToBytesRequest{AddressString: "regen13c3d4wq2t22dl0dstraf8jc3f902e3fsy9n3wv"}, + false, + }, + } + + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + suite.SetupTest() // reset + + res, err := suite.queryClient.AddressStringToBytes(context.Background(), tc.req) + + if tc.expPass { + suite.Require().NoError(err) + suite.Require().NotNil(res) + suite.Require().True(bytes.Equal(res.AddressBytes, addrBytes)) + } else { + suite.Require().Error(err) + suite.Require().Nil(res) + } + }) + } +} + +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) +} +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) diff --git a/x/auth/types/query.pb.go b/x/auth/types/query.pb.go index 4150c3f6ff16..49d4e080f8be 100644 --- a/x/auth/types/query.pb.go +++ b/x/auth/types/query.pb.go @@ -180,6 +180,15 @@ var xxx_messageInfo_QueryAccountRequest proto.InternalMessageInfo type QueryAccountResponse struct { // account defines the account of the corresponding address. Account *types.Any `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` +<<<<<<< HEAD +} + +func (m *QueryAccountResponse) Reset() { *m = QueryAccountResponse{} } +func (m *QueryAccountResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAccountResponse) ProtoMessage() {} +func (*QueryAccountResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{3} +======= } func (m *QueryAccountResponse) Reset() { *m = QueryAccountResponse{} } @@ -305,6 +314,230 @@ func (m *QueryParamsResponse) GetParams() Params { return Params{} } +// QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. +// +// Since: cosmos-sdk 0.46 +type QueryModuleAccountsRequest struct { +} + +func (m *QueryModuleAccountsRequest) Reset() { *m = QueryModuleAccountsRequest{} } +func (m *QueryModuleAccountsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryModuleAccountsRequest) ProtoMessage() {} +func (*QueryModuleAccountsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{6} +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) +} +func (m *QueryModuleAccountsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryModuleAccountsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryModuleAccountsRequest.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 *QueryModuleAccountsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryModuleAccountsRequest.Merge(m, src) +} +func (m *QueryModuleAccountsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryModuleAccountsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryModuleAccountsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryModuleAccountsRequest proto.InternalMessageInfo + +// QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. +// +// Since: cosmos-sdk 0.46 +type QueryModuleAccountsResponse struct { + Accounts []*types.Any `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` +} + +func (m *QueryModuleAccountsResponse) Reset() { *m = QueryModuleAccountsResponse{} } +func (m *QueryModuleAccountsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryModuleAccountsResponse) ProtoMessage() {} +func (*QueryModuleAccountsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{7} +} +func (m *QueryModuleAccountsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryModuleAccountsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryModuleAccountsResponse.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 *QueryModuleAccountsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryModuleAccountsResponse.Merge(m, src) +} +func (m *QueryModuleAccountsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryModuleAccountsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryModuleAccountsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryModuleAccountsResponse proto.InternalMessageInfo + +func (m *QueryModuleAccountsResponse) GetAccounts() []*types.Any { + if m != nil { + return m.Accounts + } + return nil +} + +// QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. +type QueryModuleAccountByNameRequest struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +<<<<<<< HEAD +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{4} +======= +func (m *QueryModuleAccountByNameRequest) Reset() { *m = QueryModuleAccountByNameRequest{} } +func (m *QueryModuleAccountByNameRequest) String() string { return proto.CompactTextString(m) } +func (*QueryModuleAccountByNameRequest) ProtoMessage() {} +func (*QueryModuleAccountByNameRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{8} +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) +} +func (m *QueryModuleAccountByNameRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryModuleAccountByNameRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryModuleAccountByNameRequest.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 *QueryModuleAccountByNameRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryModuleAccountByNameRequest.Merge(m, src) +} +func (m *QueryModuleAccountByNameRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryModuleAccountByNameRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryModuleAccountByNameRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryModuleAccountByNameRequest proto.InternalMessageInfo + +<<<<<<< HEAD +// QueryParamsResponse is the response type for the Query/Params RPC method. +type QueryParamsResponse struct { + // params defines the parameters of the module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{5} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) +======= +func (m *QueryModuleAccountByNameRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +// QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. +type QueryModuleAccountByNameResponse struct { + Account *types.Any `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` +} + +func (m *QueryModuleAccountByNameResponse) Reset() { *m = QueryModuleAccountByNameResponse{} } +func (m *QueryModuleAccountByNameResponse) String() string { return proto.CompactTextString(m) } +func (*QueryModuleAccountByNameResponse) ProtoMessage() {} +func (*QueryModuleAccountByNameResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{9} +} +func (m *QueryModuleAccountByNameResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryModuleAccountByNameResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryModuleAccountByNameResponse.Marshal(b, m, deterministic) +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +<<<<<<< HEAD +func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() Params { + if m != nil { + return m.Params +======= +func (m *QueryModuleAccountByNameResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryModuleAccountByNameResponse.Merge(m, src) +} +func (m *QueryModuleAccountByNameResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryModuleAccountByNameResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryModuleAccountByNameResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryModuleAccountByNameResponse proto.InternalMessageInfo + +func (m *QueryModuleAccountByNameResponse) GetAccount() *types.Any { + if m != nil { + return m.Account +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) + } + return Params{} +} + func init() { proto.RegisterType((*QueryAccountsRequest)(nil), "cosmos.auth.v1beta1.QueryAccountsRequest") proto.RegisterType((*QueryAccountsResponse)(nil), "cosmos.auth.v1beta1.QueryAccountsResponse") @@ -314,6 +547,7 @@ func init() { proto.RegisterType((*QueryParamsResponse)(nil), "cosmos.auth.v1beta1.QueryParamsResponse") } +<<<<<<< HEAD func init() { proto.RegisterFile("cosmos/auth/v1beta1/query.proto", fileDescriptor_c451370b3929a27c) } var fileDescriptor_c451370b3929a27c = []byte{ @@ -352,6 +586,37 @@ var fileDescriptor_c451370b3929a27c = []byte{ 0x71, 0x3f, 0x3b, 0xca, 0x23, 0xda, 0x95, 0x03, 0x6b, 0x60, 0x3e, 0x7b, 0xaa, 0xf7, 0x8c, 0xbd, 0x34, 0x6e, 0xd9, 0x28, 0x15, 0x2a, 0x2a, 0xe9, 0xb7, 0x77, 0xe3, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2a, 0xe1, 0x81, 0xd3, 0xdf, 0x04, 0x00, 0x00, +======= +func (m *Bech32PrefixRequest) Reset() { *m = Bech32PrefixRequest{} } +func (m *Bech32PrefixRequest) String() string { return proto.CompactTextString(m) } +func (*Bech32PrefixRequest) ProtoMessage() {} +func (*Bech32PrefixRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{10} +} +func (m *Bech32PrefixRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Bech32PrefixRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Bech32PrefixRequest.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 *Bech32PrefixRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_Bech32PrefixRequest.Merge(m, src) +} +func (m *Bech32PrefixRequest) XXX_Size() int { + return m.Size() +} +func (m *Bech32PrefixRequest) XXX_DiscardUnknown() { + xxx_messageInfo_Bech32PrefixRequest.DiscardUnknown(m) +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) } // Reference imports to suppress errors if they are not otherwise used. @@ -376,8 +641,40 @@ type QueryClient interface { Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) } +<<<<<<< HEAD type queryClient struct { cc grpc1.ClientConn +======= +func (m *Bech32PrefixResponse) Reset() { *m = Bech32PrefixResponse{} } +func (m *Bech32PrefixResponse) String() string { return proto.CompactTextString(m) } +func (*Bech32PrefixResponse) ProtoMessage() {} +func (*Bech32PrefixResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{11} +} +func (m *Bech32PrefixResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Bech32PrefixResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Bech32PrefixResponse.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 *Bech32PrefixResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_Bech32PrefixResponse.Merge(m, src) +} +func (m *Bech32PrefixResponse) XXX_Size() int { + return m.Size() +} +func (m *Bech32PrefixResponse) XXX_DiscardUnknown() { + xxx_messageInfo_Bech32PrefixResponse.DiscardUnknown(m) +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) } func NewQueryClient(cc grpc1.ClientConn) QueryClient { @@ -393,11 +690,33 @@ func (c *queryClient) Accounts(ctx context.Context, in *QueryAccountsRequest, op return out, nil } +<<<<<<< HEAD func (c *queryClient) Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*QueryAccountResponse, error) { out := new(QueryAccountResponse) err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/Account", in, out, opts...) if err != nil { return nil, err +======= +func (m *AddressBytesToStringRequest) Reset() { *m = AddressBytesToStringRequest{} } +func (m *AddressBytesToStringRequest) String() string { return proto.CompactTextString(m) } +func (*AddressBytesToStringRequest) ProtoMessage() {} +func (*AddressBytesToStringRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{12} +} +func (m *AddressBytesToStringRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AddressBytesToStringRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AddressBytesToStringRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) } return out, nil } @@ -423,8 +742,31 @@ type QueryServer interface { Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) } +<<<<<<< HEAD // UnimplementedQueryServer can be embedded to have forward compatible implementations. type UnimplementedQueryServer struct { +======= +func (m *AddressBytesToStringResponse) Reset() { *m = AddressBytesToStringResponse{} } +func (m *AddressBytesToStringResponse) String() string { return proto.CompactTextString(m) } +func (*AddressBytesToStringResponse) ProtoMessage() {} +func (*AddressBytesToStringResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{13} +} +func (m *AddressBytesToStringResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AddressBytesToStringResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AddressBytesToStringResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) } func (*UnimplementedQueryServer) Accounts(ctx context.Context, req *QueryAccountsRequest) (*QueryAccountsResponse, error) { @@ -459,10 +801,32 @@ func _Query_Accounts_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } +<<<<<<< HEAD func _Query_Account_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryAccountRequest) if err := dec(in); err != nil { return nil, err +======= +func (m *AddressStringToBytesRequest) Reset() { *m = AddressStringToBytesRequest{} } +func (m *AddressStringToBytesRequest) String() string { return proto.CompactTextString(m) } +func (*AddressStringToBytesRequest) ProtoMessage() {} +func (*AddressStringToBytesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{14} +} +func (m *AddressStringToBytesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AddressStringToBytesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AddressStringToBytesRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) } if interceptor == nil { return srv.(QueryServer).Account(ctx, in) @@ -516,6 +880,7 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Metadata: "cosmos/auth/v1beta1/query.proto", } +<<<<<<< HEAD func (m *QueryAccountsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -524,6 +889,13 @@ func (m *QueryAccountsRequest) Marshal() (dAtA []byte, err error) { return nil, err } return dAtA[:n], nil +======= +func (m *AddressStringToBytesResponse) Reset() { *m = AddressStringToBytesResponse{} } +func (m *AddressStringToBytesResponse) String() string { return proto.CompactTextString(m) } +func (*AddressStringToBytesResponse) ProtoMessage() {} +func (*AddressStringToBytesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{15} +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) } func (m *QueryAccountsRequest) MarshalTo(dAtA []byte) (int, error) { @@ -566,6 +938,7 @@ func (m *QueryAccountsResponse) MarshalTo(dAtA []byte) (int, error) { return m.MarshalToSizedBuffer(dAtA[:size]) } +<<<<<<< HEAD func (m *QueryAccountsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i @@ -579,6 +952,25 @@ func (m *QueryAccountsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i -= size i = encodeVarintQuery(dAtA, i, uint64(size)) +======= +func (m *QueryAccountAddressByIDRequest) Reset() { *m = QueryAccountAddressByIDRequest{} } +func (m *QueryAccountAddressByIDRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAccountAddressByIDRequest) ProtoMessage() {} +func (*QueryAccountAddressByIDRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{16} +} +func (m *QueryAccountAddressByIDRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAccountAddressByIDRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountAddressByIDRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) } i-- dAtA[i] = 0x12 @@ -640,9 +1032,20 @@ func (m *QueryAccountResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } +<<<<<<< HEAD func (m *QueryAccountResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) +======= +func (m *QueryAccountAddressByIDResponse) Reset() { *m = QueryAccountAddressByIDResponse{} } +func (m *QueryAccountAddressByIDResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAccountAddressByIDResponse) ProtoMessage() {} +func (*QueryAccountAddressByIDResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{17} +} +func (m *QueryAccountAddressByIDResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) } func (m *QueryAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { @@ -680,12 +1083,23 @@ func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { return m.MarshalToSizedBuffer(dAtA[:size]) } +<<<<<<< HEAD func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l return len(dAtA) - i, nil +======= +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{18} +} +func (m *QueryAccountInfoRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) } func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { @@ -703,6 +1117,7 @@ func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { return m.MarshalToSizedBuffer(dAtA[:size]) } +<<<<<<< HEAD func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i @@ -710,29 +1125,229 @@ func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = l { size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) +======= +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{19} +} +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) +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) if err != nil { return 0, err } +<<<<<<< HEAD i -= size i = encodeVarintQuery(dAtA, i, uint64(size)) +======= + return b[:n], nil } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, 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) } -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++ +var xxx_messageInfo_QueryAccountInfoResponse proto.InternalMessageInfo + +func (m *QueryAccountInfoResponse) GetInfo() *BaseAccount { + if m != nil { + return m.Info } - dAtA[offset] = uint8(v) - return base + return nil } -func (m *QueryAccountsRequest) Size() (n int) { + +func init() { + proto.RegisterType((*QueryAccountsRequest)(nil), "cosmos.auth.v1beta1.QueryAccountsRequest") + proto.RegisterType((*QueryAccountsResponse)(nil), "cosmos.auth.v1beta1.QueryAccountsResponse") + proto.RegisterType((*QueryAccountRequest)(nil), "cosmos.auth.v1beta1.QueryAccountRequest") + proto.RegisterType((*QueryAccountResponse)(nil), "cosmos.auth.v1beta1.QueryAccountResponse") + proto.RegisterType((*QueryParamsRequest)(nil), "cosmos.auth.v1beta1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "cosmos.auth.v1beta1.QueryParamsResponse") + proto.RegisterType((*QueryModuleAccountsRequest)(nil), "cosmos.auth.v1beta1.QueryModuleAccountsRequest") + proto.RegisterType((*QueryModuleAccountsResponse)(nil), "cosmos.auth.v1beta1.QueryModuleAccountsResponse") + proto.RegisterType((*QueryModuleAccountByNameRequest)(nil), "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest") + proto.RegisterType((*QueryModuleAccountByNameResponse)(nil), "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse") + proto.RegisterType((*Bech32PrefixRequest)(nil), "cosmos.auth.v1beta1.Bech32PrefixRequest") + proto.RegisterType((*Bech32PrefixResponse)(nil), "cosmos.auth.v1beta1.Bech32PrefixResponse") + proto.RegisterType((*AddressBytesToStringRequest)(nil), "cosmos.auth.v1beta1.AddressBytesToStringRequest") + proto.RegisterType((*AddressBytesToStringResponse)(nil), "cosmos.auth.v1beta1.AddressBytesToStringResponse") + proto.RegisterType((*AddressStringToBytesRequest)(nil), "cosmos.auth.v1beta1.AddressStringToBytesRequest") + proto.RegisterType((*AddressStringToBytesResponse)(nil), "cosmos.auth.v1beta1.AddressStringToBytesResponse") + proto.RegisterType((*QueryAccountAddressByIDRequest)(nil), "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest") + proto.RegisterType((*QueryAccountAddressByIDResponse)(nil), "cosmos.auth.v1beta1.QueryAccountAddressByIDResponse") + proto.RegisterType((*QueryAccountInfoRequest)(nil), "cosmos.auth.v1beta1.QueryAccountInfoRequest") + proto.RegisterType((*QueryAccountInfoResponse)(nil), "cosmos.auth.v1beta1.QueryAccountInfoResponse") +} + +func init() { proto.RegisterFile("cosmos/auth/v1beta1/query.proto", fileDescriptor_c451370b3929a27c) } + +var fileDescriptor_c451370b3929a27c = []byte{ + // 1038 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0x4f, 0x6f, 0x1b, 0xc5, + 0x1b, 0xc7, 0xbd, 0x69, 0x7e, 0x49, 0x7e, 0x4f, 0xdc, 0x20, 0x4d, 0x5c, 0x11, 0xd6, 0xa9, 0x1d, + 0x6d, 0xa1, 0x71, 0x42, 0xbd, 0xdb, 0x38, 0xa9, 0x44, 0x01, 0x21, 0x65, 0x1b, 0x40, 0x39, 0x14, + 0x19, 0x37, 0x27, 0x0e, 0x58, 0x63, 0x7b, 0xed, 0xac, 0xa8, 0x77, 0x5c, 0xef, 0x1a, 0xd5, 0x8a, + 0x7c, 0x41, 0x42, 0xea, 0x05, 0x09, 0x09, 0x5e, 0x40, 0x0e, 0x88, 0x33, 0x87, 0xc0, 0x89, 0x17, + 0x50, 0xf5, 0x54, 0xc1, 0x85, 0x13, 0x42, 0x09, 0x12, 0xbc, 0x0a, 0x84, 0x3c, 0xf3, 0xcc, 0xfe, + 0x49, 0xc6, 0xf1, 0x46, 0x9c, 0xb2, 0x9e, 0x79, 0x9e, 0xef, 0xf3, 0x99, 0x99, 0x67, 0xe6, 0x1b, + 0x28, 0x36, 0x99, 0xdf, 0x65, 0xbe, 0x45, 0x07, 0xc1, 0xa1, 0xf5, 0xf9, 0x56, 0xc3, 0x09, 0xe8, + 0x96, 0xf5, 0x64, 0xe0, 0xf4, 0x87, 0x66, 0xaf, 0xcf, 0x02, 0x46, 0x96, 0x45, 0x80, 0x39, 0x0e, + 0x30, 0x31, 0x40, 0xdf, 0xc4, 0xac, 0x06, 0xf5, 0x1d, 0x11, 0x1d, 0xe6, 0xf6, 0x68, 0xc7, 0xf5, + 0x68, 0xe0, 0x32, 0x4f, 0x08, 0xe8, 0xb9, 0x0e, 0xeb, 0x30, 0xfe, 0x69, 0x8d, 0xbf, 0x70, 0xf4, + 0xb5, 0x0e, 0x63, 0x9d, 0xc7, 0x8e, 0xc5, 0x7f, 0x35, 0x06, 0x6d, 0x8b, 0x7a, 0x58, 0x51, 0x5f, + 0xc5, 0x29, 0xda, 0x73, 0x2d, 0xea, 0x79, 0x2c, 0xe0, 0x6a, 0x3e, 0xce, 0x16, 0x54, 0xc0, 0x1c, + 0x0e, 0x85, 0xc5, 0x7c, 0x5d, 0x54, 0x44, 0x78, 0x31, 0x95, 0xc7, 0x54, 0x09, 0x1c, 0x5f, 0xa7, + 0xf1, 0x29, 0xe4, 0x3e, 0x1e, 0xff, 0xdc, 0x6d, 0x36, 0xd9, 0xc0, 0x0b, 0xfc, 0x9a, 0xf3, 0x64, + 0xe0, 0xf8, 0x01, 0xf9, 0x00, 0x20, 0x5a, 0xd2, 0x8a, 0xb6, 0xa6, 0x95, 0x16, 0x2b, 0xb7, 0x4d, + 0xd4, 0x1d, 0xaf, 0xdf, 0x14, 0x2a, 0x88, 0x62, 0x56, 0x69, 0xc7, 0xc1, 0xdc, 0x5a, 0x2c, 0xd3, + 0x38, 0xd6, 0xe0, 0xc6, 0xb9, 0x02, 0x7e, 0x8f, 0x79, 0xbe, 0x43, 0xde, 0x83, 0x05, 0x8a, 0x63, + 0x2b, 0xda, 0xda, 0xb5, 0xd2, 0x62, 0x25, 0x67, 0x8a, 0x2d, 0x30, 0xe5, 0xee, 0x98, 0xbb, 0xde, + 0xd0, 0xce, 0xbe, 0x38, 0x29, 0x2f, 0x60, 0xf6, 0x7e, 0x2d, 0xcc, 0x21, 0x1f, 0x26, 0x08, 0x67, + 0x38, 0xe1, 0xfa, 0x54, 0x42, 0x51, 0x3c, 0x81, 0xf8, 0x08, 0x96, 0xe3, 0x84, 0x72, 0x07, 0x2a, + 0x30, 0x4f, 0x5b, 0xad, 0xbe, 0xe3, 0xfb, 0x7c, 0xf9, 0xff, 0xb7, 0x57, 0x7e, 0x39, 0x29, 0xe7, + 0x50, 0x7f, 0x57, 0xcc, 0x3c, 0x0a, 0xfa, 0xae, 0xd7, 0xa9, 0xc9, 0xc0, 0xb7, 0x17, 0x9e, 0x1d, + 0x17, 0x33, 0x7f, 0x1f, 0x17, 0x33, 0xc6, 0x41, 0x72, 0x5f, 0xc3, 0x55, 0xbf, 0x0b, 0xf3, 0xb8, + 0x02, 0xdc, 0xd4, 0x34, 0x8b, 0x96, 0x29, 0x46, 0x0e, 0x08, 0x57, 0xad, 0xd2, 0x3e, 0xed, 0xca, + 0xb3, 0x32, 0xaa, 0xb8, 0x00, 0x39, 0x8a, 0xa5, 0xee, 0xc3, 0x5c, 0x8f, 0x8f, 0x60, 0xa5, 0xbc, + 0xa9, 0xe8, 0x69, 0x53, 0x24, 0xd9, 0xb3, 0xcf, 0x7f, 0x2f, 0x66, 0x6a, 0x98, 0x60, 0xac, 0x82, + 0xce, 0x15, 0x1f, 0xb2, 0xd6, 0xe0, 0xb1, 0x73, 0xae, 0x37, 0x8c, 0x26, 0xe4, 0x95, 0xb3, 0x58, + 0x77, 0x2f, 0xe5, 0xc1, 0x92, 0x17, 0x27, 0xe5, 0xa5, 0x84, 0x46, 0xec, 0x78, 0x8d, 0x7b, 0x50, + 0xbc, 0x58, 0xc4, 0x1e, 0x7e, 0x44, 0xbb, 0xb2, 0xcf, 0x08, 0x81, 0x59, 0x8f, 0x76, 0x1d, 0x71, + 0x3c, 0x35, 0xfe, 0x6d, 0xb4, 0x61, 0x6d, 0x72, 0x1a, 0x02, 0xda, 0xe9, 0xce, 0x40, 0xc5, 0x17, + 0x9e, 0xc4, 0x0d, 0x58, 0xb6, 0x9d, 0xe6, 0xe1, 0x76, 0xa5, 0xda, 0x77, 0xda, 0xee, 0x53, 0xb9, + 0x35, 0xef, 0x40, 0x2e, 0x39, 0x8c, 0x25, 0x6f, 0xc1, 0xf5, 0x06, 0x1f, 0xaf, 0xf7, 0xf8, 0x04, + 0x32, 0x67, 0x1b, 0xb1, 0x60, 0xc3, 0x86, 0x3c, 0xf6, 0x95, 0x3d, 0x0c, 0x1c, 0xff, 0x80, 0x61, + 0x7b, 0xe1, 0x72, 0x6f, 0xc1, 0x75, 0xec, 0xb3, 0x7a, 0x63, 0x3c, 0xcf, 0x35, 0xb2, 0xb5, 0x2c, + 0x8d, 0xe5, 0x18, 0xef, 0xc3, 0xaa, 0x5a, 0x03, 0x41, 0xde, 0x80, 0x25, 0x29, 0xe2, 0xf3, 0x19, + 0x24, 0x91, 0xd2, 0x22, 0xdc, 0xd8, 0x0b, 0x51, 0xc4, 0xc0, 0x01, 0xe3, 0x72, 0x12, 0x25, 0xa5, + 0xca, 0x83, 0x10, 0xe6, 0x9c, 0x4a, 0xb4, 0x2b, 0xd3, 0x57, 0x74, 0x17, 0x0a, 0xf1, 0x9b, 0x14, + 0xae, 0x6e, 0x7f, 0x4f, 0xd2, 0x2c, 0xc1, 0x8c, 0xdb, 0xe2, 0xb9, 0xd7, 0x6a, 0x33, 0x6e, 0xcb, + 0x68, 0x61, 0xeb, 0xa8, 0x32, 0xb0, 0xf2, 0x2e, 0xbc, 0x82, 0x27, 0x59, 0x4f, 0x7b, 0xc9, 0x97, + 0x68, 0x42, 0xce, 0x78, 0x08, 0xaf, 0xc6, 0xab, 0xec, 0x7b, 0x6d, 0xf6, 0x1f, 0x9e, 0x0e, 0xa3, + 0x0a, 0x2b, 0x17, 0xe5, 0x90, 0x76, 0x07, 0x66, 0x5d, 0xaf, 0xcd, 0xb0, 0x5b, 0xd7, 0x94, 0xf7, + 0xd8, 0xa6, 0xbe, 0x6c, 0xd3, 0x1a, 0x8f, 0xae, 0xfc, 0x93, 0x85, 0xff, 0x71, 0x49, 0xf2, 0x95, + 0x06, 0xf2, 0x31, 0xf1, 0xc9, 0x86, 0x32, 0x5d, 0x65, 0x02, 0xfa, 0x66, 0x9a, 0x50, 0xc1, 0x68, + 0x6c, 0x3e, 0xfb, 0xeb, 0x87, 0x4d, 0xed, 0x8b, 0x5f, 0xff, 0xfc, 0x66, 0xa6, 0x48, 0x6e, 0x5a, + 0x4a, 0xbb, 0x92, 0x08, 0xdf, 0x6a, 0x30, 0x8f, 0x02, 0xa4, 0x34, 0xb5, 0x86, 0xa4, 0xd9, 0x48, + 0x11, 0x89, 0x30, 0x3b, 0x11, 0xcc, 0x06, 0x59, 0xbf, 0x14, 0xc6, 0x3a, 0xc2, 0x13, 0x18, 0x91, + 0x1f, 0x35, 0x20, 0x17, 0x7b, 0x86, 0x6c, 0x4f, 0xad, 0x7b, 0xb1, 0x27, 0xf5, 0x9d, 0xab, 0x25, + 0x5d, 0x81, 0x3b, 0xbc, 0x30, 0x75, 0xb7, 0x65, 0x1d, 0xb9, 0xad, 0x11, 0xf9, 0x52, 0x83, 0x39, + 0xf1, 0x8c, 0x93, 0xf5, 0xc9, 0x65, 0x13, 0x9e, 0xa1, 0x97, 0xa6, 0x07, 0x22, 0x53, 0x29, 0x62, + 0xba, 0x49, 0xf2, 0x4a, 0x26, 0xe1, 0x1a, 0xe4, 0x7b, 0x0d, 0x92, 0xef, 0xa5, 0x4f, 0xac, 0xc9, + 0x65, 0x94, 0xde, 0xa2, 0xdf, 0x4d, 0x9f, 0x80, 0x7c, 0x5b, 0x11, 0xdf, 0x6d, 0xf2, 0xba, 0x92, + 0xaf, 0xcb, 0x33, 0xeb, 0x61, 0xff, 0xfd, 0xac, 0xc1, 0xb2, 0xc2, 0x20, 0xc8, 0x4e, 0xca, 0xe2, + 0x09, 0x1b, 0xd2, 0xef, 0x5d, 0x31, 0x0b, 0xb9, 0xdf, 0x8a, 0xb8, 0xcb, 0xe4, 0xcd, 0x34, 0xdc, + 0xd6, 0xd1, 0xd8, 0xe2, 0x46, 0xe3, 0xeb, 0x9c, 0x8d, 0xbb, 0xcc, 0x84, 0x3b, 0xa4, 0xf0, 0xa7, + 0x09, 0x77, 0x48, 0x65, 0x59, 0x69, 0xce, 0x5d, 0xb8, 0xd7, 0xf8, 0xde, 0xe4, 0x54, 0xa6, 0x43, + 0xd4, 0x87, 0x79, 0x89, 0xc7, 0xe9, 0x5b, 0x57, 0xc8, 0x48, 0xbf, 0x8f, 0x82, 0x33, 0xbc, 0xe9, + 0xc2, 0x6c, 0x46, 0xe4, 0xa7, 0x88, 0x3b, 0xe1, 0x4f, 0x97, 0x73, 0xab, 0x0c, 0xf1, 0x72, 0x6e, + 0xa5, 0xf9, 0x19, 0xf7, 0x23, 0x6e, 0x93, 0xdc, 0x49, 0xc5, 0x2d, 0xbc, 0x76, 0x44, 0xbe, 0xd3, + 0x60, 0x31, 0xe6, 0x13, 0xe4, 0xce, 0xd4, 0xc7, 0x26, 0xe6, 0x4e, 0x7a, 0x39, 0x65, 0x74, 0xfa, + 0xfd, 0x95, 0x56, 0x3a, 0xb6, 0x9d, 0xe8, 0x3d, 0xb5, 0x1f, 0x3c, 0x3f, 0x2d, 0x68, 0x2f, 0x4f, + 0x0b, 0xda, 0x1f, 0xa7, 0x05, 0xed, 0xeb, 0xb3, 0x42, 0xe6, 0xe5, 0x59, 0x21, 0xf3, 0xdb, 0x59, + 0x21, 0xf3, 0xc9, 0x46, 0xc7, 0x0d, 0x0e, 0x07, 0x0d, 0xb3, 0xc9, 0xba, 0x52, 0x50, 0xfc, 0x29, + 0xfb, 0xad, 0xcf, 0xac, 0xa7, 0x42, 0x3d, 0x18, 0xf6, 0x1c, 0xbf, 0x31, 0xc7, 0xff, 0x27, 0xdb, + 0xfe, 0x37, 0x00, 0x00, 0xff, 0xff, 0x49, 0x22, 0x49, 0xcc, 0xb2, 0x0d, 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 { + // Accounts returns all the existing accounts. + // + // When called from another module, this query might consume a high amount of + // gas if the pagination field is incorrectly set. + // + // Since: cosmos-sdk 0.43 + Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) + // Account returns account details based on address. + Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*QueryAccountResponse, error) + // AccountAddressByID returns account address based on account number. + // + // Since: cosmos-sdk 0.46.2 + AccountAddressByID(ctx context.Context, in *QueryAccountAddressByIDRequest, opts ...grpc.CallOption) (*QueryAccountAddressByIDResponse, error) + // Params queries all parameters. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // ModuleAccounts returns all the existing module accounts. + // + // Since: cosmos-sdk 0.46 + ModuleAccounts(ctx context.Context, in *QueryModuleAccountsRequest, opts ...grpc.CallOption) (*QueryModuleAccountsResponse, error) + // ModuleAccountByName returns the module account info by module name + ModuleAccountByName(ctx context.Context, in *QueryModuleAccountByNameRequest, opts ...grpc.CallOption) (*QueryModuleAccountByNameResponse, error) + // Bech32Prefix queries bech32Prefix + // + // Since: cosmos-sdk 0.46 + Bech32Prefix(ctx context.Context, in *Bech32PrefixRequest, opts ...grpc.CallOption) (*Bech32PrefixResponse, error) + // AddressBytesToString converts Account Address bytes to string + // + // Since: cosmos-sdk 0.46 + AddressBytesToString(ctx context.Context, in *AddressBytesToStringRequest, opts ...grpc.CallOption) (*AddressBytesToStringResponse, error) + // AddressStringToBytes converts Address string to bytes + // + // 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 { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) { + out := new(QueryAccountsResponse) + err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/Accounts", in, out, opts...) + if err != nil { + return nil, err +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) + } + 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 *QueryAccountsRequest) Size() (n int) { if m == nil { return 0 } @@ -749,6 +1364,7 @@ func (m *QueryAccountsResponse) Size() (n int) { if m == nil { return 0 } +<<<<<<< HEAD var l int _ = l if len(m.Accounts) > 0 { @@ -756,6 +1372,25 @@ func (m *QueryAccountsResponse) Size() (n int) { l = e.Size() n += 1 + l + sovQuery(uint64(l)) } +======= + return out, nil +} + +func (c *queryClient) ModuleAccountByName(ctx context.Context, in *QueryModuleAccountByNameRequest, opts ...grpc.CallOption) (*QueryModuleAccountByNameResponse, error) { + out := new(QueryModuleAccountByNameResponse) + err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/ModuleAccountByName", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Bech32Prefix(ctx context.Context, in *Bech32PrefixRequest, opts ...grpc.CallOption) (*Bech32PrefixResponse, error) { + out := new(Bech32PrefixResponse) + err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/Bech32Prefix", in, out, opts...) + if err != nil { + return nil, err +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) } if m.Pagination != nil { l = m.Pagination.Size() @@ -774,6 +1409,7 @@ func (m *QueryAccountRequest) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } +<<<<<<< HEAD return n } @@ -786,6 +1422,2150 @@ func (m *QueryAccountResponse) Size() (n int) { if m.Account != nil { l = m.Account.Size() n += 1 + l + sovQuery(uint64(l)) +======= + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Accounts returns all the existing accounts. + // + // When called from another module, this query might consume a high amount of + // gas if the pagination field is incorrectly set. + // + // Since: cosmos-sdk 0.43 + Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error) + // Account returns account details based on address. + Account(context.Context, *QueryAccountRequest) (*QueryAccountResponse, error) + // AccountAddressByID returns account address based on account number. + // + // Since: cosmos-sdk 0.46.2 + AccountAddressByID(context.Context, *QueryAccountAddressByIDRequest) (*QueryAccountAddressByIDResponse, error) + // Params queries all parameters. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // ModuleAccounts returns all the existing module accounts. + // + // Since: cosmos-sdk 0.46 + ModuleAccounts(context.Context, *QueryModuleAccountsRequest) (*QueryModuleAccountsResponse, error) + // ModuleAccountByName returns the module account info by module name + ModuleAccountByName(context.Context, *QueryModuleAccountByNameRequest) (*QueryModuleAccountByNameResponse, error) + // Bech32Prefix queries bech32Prefix + // + // Since: cosmos-sdk 0.46 + Bech32Prefix(context.Context, *Bech32PrefixRequest) (*Bech32PrefixResponse, error) + // AddressBytesToString converts Account Address bytes to string + // + // Since: cosmos-sdk 0.46 + AddressBytesToString(context.Context, *AddressBytesToStringRequest) (*AddressBytesToStringResponse, error) + // AddressStringToBytes converts Address string to bytes + // + // 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. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Accounts(ctx context.Context, req *QueryAccountsRequest) (*QueryAccountsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Accounts not implemented") +} +func (*UnimplementedQueryServer) Account(ctx context.Context, req *QueryAccountRequest) (*QueryAccountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Account not implemented") +} +func (*UnimplementedQueryServer) AccountAddressByID(ctx context.Context, req *QueryAccountAddressByIDRequest) (*QueryAccountAddressByIDResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AccountAddressByID not implemented") +} +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (*UnimplementedQueryServer) ModuleAccounts(ctx context.Context, req *QueryModuleAccountsRequest) (*QueryModuleAccountsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ModuleAccounts not implemented") +} +func (*UnimplementedQueryServer) ModuleAccountByName(ctx context.Context, req *QueryModuleAccountByNameRequest) (*QueryModuleAccountByNameResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ModuleAccountByName not implemented") +} +func (*UnimplementedQueryServer) Bech32Prefix(ctx context.Context, req *Bech32PrefixRequest) (*Bech32PrefixResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Bech32Prefix not implemented") +} +func (*UnimplementedQueryServer) AddressBytesToString(ctx context.Context, req *AddressBytesToStringRequest) (*AddressBytesToStringResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddressBytesToString not implemented") +} +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) +} + +func _Query_Accounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAccountsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Accounts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1beta1.Query/Accounts", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Accounts(ctx, req.(*QueryAccountsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Account_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Account(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1beta1.Query/Account", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Account(ctx, req.(*QueryAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AccountAddressByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAccountAddressByIDRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AccountAddressByID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1beta1.Query/AccountAddressByID", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AccountAddressByID(ctx, req.(*QueryAccountAddressByIDRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1beta1.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ModuleAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryModuleAccountsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ModuleAccounts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1beta1.Query/ModuleAccounts", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ModuleAccounts(ctx, req.(*QueryModuleAccountsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ModuleAccountByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryModuleAccountByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ModuleAccountByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1beta1.Query/ModuleAccountByName", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ModuleAccountByName(ctx, req.(*QueryModuleAccountByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Bech32Prefix_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Bech32PrefixRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Bech32Prefix(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1beta1.Query/Bech32Prefix", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Bech32Prefix(ctx, req.(*Bech32PrefixRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AddressBytesToString_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddressBytesToStringRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AddressBytesToString(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1beta1.Query/AddressBytesToString", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AddressBytesToString(ctx, req.(*AddressBytesToStringRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AddressStringToBytes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddressStringToBytesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AddressStringToBytes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1beta1.Query/AddressStringToBytes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AddressStringToBytes(ctx, req.(*AddressStringToBytesRequest)) + } + 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), + Methods: []grpc.MethodDesc{ + { + MethodName: "Accounts", + Handler: _Query_Accounts_Handler, + }, + { + MethodName: "Account", + Handler: _Query_Account_Handler, + }, + { + MethodName: "AccountAddressByID", + Handler: _Query_AccountAddressByID_Handler, + }, + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "ModuleAccounts", + Handler: _Query_ModuleAccounts_Handler, + }, + { + MethodName: "ModuleAccountByName", + Handler: _Query_ModuleAccountByName_Handler, + }, + { + MethodName: "Bech32Prefix", + Handler: _Query_Bech32Prefix_Handler, + }, + { + MethodName: "AddressBytesToString", + Handler: _Query_AddressBytesToString_Handler, + }, + { + MethodName: "AddressStringToBytes", + Handler: _Query_AddressStringToBytes_Handler, + }, + { + MethodName: "AccountInfo", + Handler: _Query_AccountInfo_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/auth/v1beta1/query.proto", +} + +func (m *QueryAccountsRequest) 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 *QueryAccountsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.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 *QueryAccountsResponse) 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 *QueryAccountsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Accounts) > 0 { + for iNdEx := len(m.Accounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Accounts[iNdEx].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 *QueryAccountRequest) 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 *QueryAccountRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountRequest) 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 *QueryAccountResponse) 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 *QueryAccountResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Account != nil { + { + size, err := m.Account.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 *QueryParamsRequest) 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 *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.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 *QueryModuleAccountsRequest) 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 *QueryModuleAccountsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryModuleAccountsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryModuleAccountsResponse) 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 *QueryModuleAccountsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryModuleAccountsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Accounts) > 0 { + for iNdEx := len(m.Accounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Accounts[iNdEx].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 *QueryModuleAccountByNameRequest) 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 *QueryModuleAccountByNameRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryModuleAccountByNameRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryModuleAccountByNameResponse) 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 *QueryModuleAccountByNameResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryModuleAccountByNameResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Account != nil { + { + size, err := m.Account.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 *Bech32PrefixRequest) 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 *Bech32PrefixRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Bech32PrefixRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *Bech32PrefixResponse) 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 *Bech32PrefixResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Bech32PrefixResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Bech32Prefix) > 0 { + i -= len(m.Bech32Prefix) + copy(dAtA[i:], m.Bech32Prefix) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Bech32Prefix))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AddressBytesToStringRequest) 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 *AddressBytesToStringRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AddressBytesToStringRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AddressBytes) > 0 { + i -= len(m.AddressBytes) + copy(dAtA[i:], m.AddressBytes) + i = encodeVarintQuery(dAtA, i, uint64(len(m.AddressBytes))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AddressBytesToStringResponse) 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 *AddressBytesToStringResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AddressBytesToStringResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + 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 (m *AddressStringToBytesRequest) 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 *AddressStringToBytesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AddressStringToBytesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + 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 (m *AddressStringToBytesResponse) 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 *AddressStringToBytesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AddressStringToBytesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AddressBytes) > 0 { + i -= len(m.AddressBytes) + copy(dAtA[i:], m.AddressBytes) + i = encodeVarintQuery(dAtA, i, uint64(len(m.AddressBytes))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAccountAddressByIDRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAccountAddressByIDRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountAddressByIDRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Id != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryAccountAddressByIDResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAccountAddressByIDResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountAddressByIDResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AccountAddress) > 0 { + i -= len(m.AccountAddress) + copy(dAtA[i:], m.AccountAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.AccountAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAccountInfoRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAccountInfoRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAccountInfoResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAccountInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Info != nil { + { + size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryAccountsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAccountsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Accounts) > 0 { + for _, e := range m.Accounts { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAccountRequest) 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 *QueryAccountResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Account != nil { + l = m.Account.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryModuleAccountsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryModuleAccountsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Accounts) > 0 { + for _, e := range m.Accounts { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryModuleAccountByNameRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryModuleAccountByNameResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Account != nil { + l = m.Account.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *Bech32PrefixRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *Bech32PrefixResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Bech32Prefix) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *AddressBytesToStringRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AddressBytes) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *AddressBytesToStringResponse) 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)) + } + return n +} + +func (m *AddressStringToBytesRequest) 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)) + } + return n +} + +func (m *AddressStringToBytesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AddressBytes) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAccountAddressByIDRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovQuery(uint64(m.Id)) + } + return n +} + +func (m *QueryAccountAddressByIDResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AccountAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAccountInfoRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAccountInfoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Info != nil { + l = m.Info.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryAccountsRequest) 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: QueryAccountsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAccountsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.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 *QueryAccountsResponse) 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: QueryAccountsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAccountsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Accounts", 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 + } + m.Accounts = append(m.Accounts, &types.Any{}) + if err := m.Accounts[len(m.Accounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.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 *QueryAccountRequest) 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: QueryAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAccountRequest: 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 *QueryAccountResponse) 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: QueryAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", 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.Account == nil { + m.Account = &types.Any{} + } + if err := m.Account.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 *QueryParamsRequest) 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: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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 *QueryParamsResponse) 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: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", 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 err := m.Params.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 *QueryModuleAccountsRequest) 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: QueryModuleAccountsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryModuleAccountsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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 *QueryModuleAccountsResponse) 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: QueryModuleAccountsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryModuleAccountsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Accounts", 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 + } + m.Accounts = append(m.Accounts, &types.Any{}) + if err := m.Accounts[len(m.Accounts)-1].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 *QueryModuleAccountByNameRequest) 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: QueryModuleAccountByNameRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryModuleAccountByNameRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.Name = 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 *QueryModuleAccountByNameResponse) 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: QueryModuleAccountByNameResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryModuleAccountByNameResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", 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.Account == nil { + m.Account = &types.Any{} + } + if err := m.Account.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 *Bech32PrefixRequest) 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: Bech32PrefixRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Bech32PrefixRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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 *Bech32PrefixResponse) 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: Bech32PrefixResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Bech32PrefixResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bech32Prefix", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.Bech32Prefix = 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 + } +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) } return n } diff --git a/x/auth/types/query.pb.gw.go b/x/auth/types/query.pb.gw.go index f6d93f2924f2..bcbe548d65a6 100644 --- a/x/auth/types/query.pb.gw.go +++ b/x/auth/types/query.pb.gw.go @@ -139,6 +139,261 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal } +<<<<<<< HEAD +======= +func request_Query_ModuleAccounts_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryModuleAccountsRequest + var metadata runtime.ServerMetadata + + msg, err := client.ModuleAccounts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ModuleAccounts_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryModuleAccountsRequest + var metadata runtime.ServerMetadata + + msg, err := server.ModuleAccounts(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_ModuleAccountByName_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryModuleAccountByNameRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.ModuleAccountByName(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ModuleAccountByName_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryModuleAccountByNameRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.ModuleAccountByName(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Bech32Prefix_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq Bech32PrefixRequest + var metadata runtime.ServerMetadata + + msg, err := client.Bech32Prefix(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Bech32Prefix_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq Bech32PrefixRequest + var metadata runtime.ServerMetadata + + msg, err := server.Bech32Prefix(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_AddressBytesToString_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddressBytesToStringRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address_bytes"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address_bytes") + } + + protoReq.AddressBytes, err = runtime.Bytes(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address_bytes", err) + } + + msg, err := client.AddressBytesToString(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AddressBytesToString_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddressBytesToStringRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address_bytes"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address_bytes") + } + + protoReq.AddressBytes, err = runtime.Bytes(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address_bytes", err) + } + + msg, err := server.AddressBytesToString(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_AddressStringToBytes_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddressStringToBytesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address_string"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address_string") + } + + protoReq.AddressString, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address_string", err) + } + + msg, err := client.AddressStringToBytes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AddressStringToBytes_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddressStringToBytesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address_string"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address_string") + } + + protoReq.AddressString, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address_string", err) + } + + msg, err := server.AddressStringToBytes(ctx, &protoReq) + return msg, metadata, err + +} + +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 + +} + +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) // 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. @@ -205,6 +460,147 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) +<<<<<<< HEAD +======= + mux.Handle("GET", pattern_Query_ModuleAccounts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ModuleAccounts_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_ModuleAccounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ModuleAccountByName_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + 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_ModuleAccountByName_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_ModuleAccountByName_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Bech32Prefix_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_Bech32Prefix_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_Bech32Prefix_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AddressBytesToString_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_AddressBytesToString_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_AddressBytesToString_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AddressStringToBytes_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_AddressStringToBytes_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_AddressStringToBytes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + 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()...) + + }) + +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) return nil } @@ -306,6 +702,129 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) +<<<<<<< HEAD +======= + mux.Handle("GET", pattern_Query_ModuleAccounts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + 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_ModuleAccounts_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_ModuleAccounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ModuleAccountByName_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + 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_ModuleAccountByName_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_ModuleAccountByName_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Bech32Prefix_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_Bech32Prefix_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_Bech32Prefix_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AddressBytesToString_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_AddressBytesToString_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_AddressBytesToString_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AddressStringToBytes_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_AddressStringToBytes_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_AddressStringToBytes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + 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()...) + + }) + +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) return nil } @@ -315,6 +834,21 @@ var ( pattern_Query_Account_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "auth", "v1beta1", "accounts", "address"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "auth", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(false))) +<<<<<<< HEAD +======= + + pattern_Query_ModuleAccounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "auth", "v1beta1", "module_accounts"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_ModuleAccountByName_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", "module_accounts", "name"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Bech32Prefix_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "auth", "v1beta1", "bech32"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_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))) +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) ) var ( @@ -323,4 +857,19 @@ var ( forward_Query_Account_0 = runtime.ForwardResponseMessage forward_Query_Params_0 = runtime.ForwardResponseMessage +<<<<<<< HEAD +======= + + forward_Query_ModuleAccounts_0 = runtime.ForwardResponseMessage + + forward_Query_ModuleAccountByName_0 = runtime.ForwardResponseMessage + + forward_Query_Bech32Prefix_0 = runtime.ForwardResponseMessage + + forward_Query_AddressBytesToString_0 = runtime.ForwardResponseMessage + + forward_Query_AddressStringToBytes_0 = runtime.ForwardResponseMessage + + forward_Query_AccountInfo_0 = runtime.ForwardResponseMessage +>>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) ) From 37b2c8cbd40baf709a1f1e3bbd01d50f56f7c219 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Sat, 22 Oct 2022 23:36:17 +0200 Subject: [PATCH 2/3] update changelog --- CHANGELOG.md | 17 - api/cosmos/auth/v1beta1/query.pulsar.go | 9847 ---------------------- api/cosmos/auth/v1beta1/query_grpc.pb.go | 483 -- 3 files changed, 10347 deletions(-) delete mode 100644 api/cosmos/auth/v1beta1/query.pulsar.go delete mode 100644 api/cosmos/auth/v1beta1/query_grpc.pb.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b335798b2e3..e69e595ceaa3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,26 +39,9 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Features -<<<<<<< HEAD * (grpc) [#13485](https://github.com/cosmos/cosmos-sdk/pull/13485) Implement a new gRPC query, `/cosmos/base/node/v1beta1/config`, which provides operator configuration. Applications that wish to expose operator minimum gas prices via gRPC should have their application implement the `ApplicationQueryService` interface (see `SimApp#RegisterNodeService` as an example). * [#13557](https://github.com/cosmos/cosmos-sdk/pull/#13557) - Add `GenSignedMockTx`. This can be used as workaround for #12437 revertion. `v0.46+` contains as well a `GenSignedMockTx` that behaves the same way. -======= -* (core) [#13306](https://github.com/cosmos/cosmos-sdk/pull/13306) Add a `FormatCoins` function to in `core/coins` to format sdk Coins following the Value Renderers spec. -* (math) [#13306](https://github.com/cosmos/cosmos-sdk/pull/13306) Add `FormatInt` and `FormatDec` functiosn in `math` to format integers and decimals following the Value Renderers spec. -* (x/staking) [#13122](https://github.com/cosmos/cosmos-sdk/pull/13122) Add `UnbondingCanComplete` and `PutUnbondingOnHold` to `x/staking` module. -* [#13437](https://github.com/cosmos/cosmos-sdk/pull/13437) Add new flag `--modules-to-export` in `simd export` command to export only selected modules. -* [#13298](https://github.com/cosmos/cosmos-sdk/pull/13298) Add `AddGenesisAccount` helper func in x/auth module which helps adding accounts to genesis state. -* (x/authz) [#12648](https://github.com/cosmos/cosmos-sdk/pull/12648) Add an allow list, an optional list of addresses allowed to receive bank assets via authz MsgSend grant. -* (sdk.Coins) [#12627](https://github.com/cosmos/cosmos-sdk/pull/12627) Make a Denoms method on sdk.Coins. -* (testutil) [#12973](https://github.com/cosmos/cosmos-sdk/pull/12973) Add generic `testutil.RandSliceElem` function which selects a random element from the list. -* (client) [#12936](https://github.com/cosmos/cosmos-sdk/pull/12936) Add capability to preprocess transactions before broadcasting from a higher level chain. -* (cli) [#13064](https://github.com/cosmos/cosmos-sdk/pull/13064) Add `debug prefixes` to list supported HRP prefixes via . -* (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. -* (x/consensus) [#12905](https://github.com/cosmos/cosmos-sdk/pull/12905) Create a new `x/consensus` module that is now responsible for maintaining Tendermint consensus parameters instead of `x/param`. Legacy types remain in order to facilitate parameter migration from the deprecated `x/params`. App developers should ensure that they execute `baseapp.MigrateParams` during their chain upgrade. These legacy types will be removed in a future release. * (x/auth) [#13612](https://github.com/cosmos/cosmos-sdk/pull/13612) Add `Query/ModuleAccountByName` endpoint for accessing the module account info by module name. ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) ### Improvements diff --git a/api/cosmos/auth/v1beta1/query.pulsar.go b/api/cosmos/auth/v1beta1/query.pulsar.go deleted file mode 100644 index 5f7a90427a7a..000000000000 --- a/api/cosmos/auth/v1beta1/query.pulsar.go +++ /dev/null @@ -1,9847 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package authv1beta1 - -import ( - v1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" - _ "cosmossdk.io/api/cosmos/query/v1" - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - _ "google.golang.org/genproto/googleapis/api/annotations" - 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_QueryAccountsRequest protoreflect.MessageDescriptor - fd_QueryAccountsRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_QueryAccountsRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryAccountsRequest") - fd_QueryAccountsRequest_pagination = md_QueryAccountsRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryAccountsRequest)(nil) - -type fastReflection_QueryAccountsRequest QueryAccountsRequest - -func (x *QueryAccountsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAccountsRequest)(x) -} - -func (x *QueryAccountsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_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_QueryAccountsRequest_messageType fastReflection_QueryAccountsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryAccountsRequest_messageType{} - -type fastReflection_QueryAccountsRequest_messageType struct{} - -func (x fastReflection_QueryAccountsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAccountsRequest)(nil) -} -func (x fastReflection_QueryAccountsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAccountsRequest) -} -func (x fastReflection_QueryAccountsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAccountsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAccountsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAccountsRequest -} - -// 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_QueryAccountsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryAccountsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAccountsRequest) New() protoreflect.Message { - return new(fastReflection_QueryAccountsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAccountsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryAccountsRequest)(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_QueryAccountsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryAccountsRequest_pagination, 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_QueryAccountsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountsRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsRequest 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_QueryAccountsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountsRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsRequest 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_QueryAccountsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1beta1.QueryAccountsRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsRequest 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_QueryAccountsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountsRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsRequest 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_QueryAccountsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountsRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsRequest 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_QueryAccountsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountsRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsRequest 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_QueryAccountsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryAccountsRequest", 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_QueryAccountsRequest) 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_QueryAccountsRequest) 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_QueryAccountsRequest) 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_QueryAccountsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAccountsRequest) - 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.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryAccountsRequest) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - 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().(*QueryAccountsRequest) - 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: QueryAccountsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountsRequest: 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 Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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 _ protoreflect.List = (*_QueryAccountsResponse_1_list)(nil) - -type _QueryAccountsResponse_1_list struct { - list *[]*anypb.Any -} - -func (x *_QueryAccountsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryAccountsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryAccountsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_QueryAccountsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryAccountsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAccountsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryAccountsResponse_1_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAccountsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryAccountsResponse protoreflect.MessageDescriptor - fd_QueryAccountsResponse_accounts protoreflect.FieldDescriptor - fd_QueryAccountsResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_QueryAccountsResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryAccountsResponse") - fd_QueryAccountsResponse_accounts = md_QueryAccountsResponse.Fields().ByName("accounts") - fd_QueryAccountsResponse_pagination = md_QueryAccountsResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryAccountsResponse)(nil) - -type fastReflection_QueryAccountsResponse QueryAccountsResponse - -func (x *QueryAccountsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAccountsResponse)(x) -} - -func (x *QueryAccountsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_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_QueryAccountsResponse_messageType fastReflection_QueryAccountsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryAccountsResponse_messageType{} - -type fastReflection_QueryAccountsResponse_messageType struct{} - -func (x fastReflection_QueryAccountsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAccountsResponse)(nil) -} -func (x fastReflection_QueryAccountsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAccountsResponse) -} -func (x fastReflection_QueryAccountsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAccountsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAccountsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAccountsResponse -} - -// 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_QueryAccountsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryAccountsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAccountsResponse) New() protoreflect.Message { - return new(fastReflection_QueryAccountsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAccountsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryAccountsResponse)(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_QueryAccountsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Accounts) != 0 { - value := protoreflect.ValueOfList(&_QueryAccountsResponse_1_list{list: &x.Accounts}) - if !f(fd_QueryAccountsResponse_accounts, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryAccountsResponse_pagination, 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_QueryAccountsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountsResponse.accounts": - return len(x.Accounts) != 0 - case "cosmos.auth.v1beta1.QueryAccountsResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsResponse 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_QueryAccountsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountsResponse.accounts": - x.Accounts = nil - case "cosmos.auth.v1beta1.QueryAccountsResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsResponse 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_QueryAccountsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1beta1.QueryAccountsResponse.accounts": - if len(x.Accounts) == 0 { - return protoreflect.ValueOfList(&_QueryAccountsResponse_1_list{}) - } - listValue := &_QueryAccountsResponse_1_list{list: &x.Accounts} - return protoreflect.ValueOfList(listValue) - case "cosmos.auth.v1beta1.QueryAccountsResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsResponse 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_QueryAccountsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountsResponse.accounts": - lv := value.List() - clv := lv.(*_QueryAccountsResponse_1_list) - x.Accounts = *clv.list - case "cosmos.auth.v1beta1.QueryAccountsResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsResponse 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_QueryAccountsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountsResponse.accounts": - if x.Accounts == nil { - x.Accounts = []*anypb.Any{} - } - value := &_QueryAccountsResponse_1_list{list: &x.Accounts} - return protoreflect.ValueOfList(value) - case "cosmos.auth.v1beta1.QueryAccountsResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsResponse 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_QueryAccountsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountsResponse.accounts": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_QueryAccountsResponse_1_list{list: &list}) - case "cosmos.auth.v1beta1.QueryAccountsResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountsResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountsResponse 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_QueryAccountsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryAccountsResponse", 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_QueryAccountsResponse) 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_QueryAccountsResponse) 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_QueryAccountsResponse) 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_QueryAccountsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAccountsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Accounts) > 0 { - for _, e := range x.Accounts { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - 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().(*QueryAccountsResponse) - 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.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - 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.Accounts) > 0 { - for iNdEx := len(x.Accounts) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Accounts[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 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().(*QueryAccountsResponse) - 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: QueryAccountsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountsResponse: 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 Accounts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Accounts = append(x.Accounts, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Accounts[len(x.Accounts)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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_QueryAccountRequest protoreflect.MessageDescriptor - fd_QueryAccountRequest_address protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_QueryAccountRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryAccountRequest") - fd_QueryAccountRequest_address = md_QueryAccountRequest.Fields().ByName("address") -} - -var _ protoreflect.Message = (*fastReflection_QueryAccountRequest)(nil) - -type fastReflection_QueryAccountRequest QueryAccountRequest - -func (x *QueryAccountRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAccountRequest)(x) -} - -func (x *QueryAccountRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_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_QueryAccountRequest_messageType fastReflection_QueryAccountRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryAccountRequest_messageType{} - -type fastReflection_QueryAccountRequest_messageType struct{} - -func (x fastReflection_QueryAccountRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAccountRequest)(nil) -} -func (x fastReflection_QueryAccountRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAccountRequest) -} -func (x fastReflection_QueryAccountRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAccountRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAccountRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAccountRequest -} - -// 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_QueryAccountRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryAccountRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAccountRequest) New() protoreflect.Message { - return new(fastReflection_QueryAccountRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAccountRequest) Interface() protoreflect.ProtoMessage { - return (*QueryAccountRequest)(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_QueryAccountRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_QueryAccountRequest_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_QueryAccountRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountRequest.address": - return x.Address != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountRequest 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_QueryAccountRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountRequest.address": - x.Address = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountRequest 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_QueryAccountRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1beta1.QueryAccountRequest.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.QueryAccountRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountRequest 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_QueryAccountRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountRequest.address": - x.Address = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountRequest 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_QueryAccountRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountRequest.address": - panic(fmt.Errorf("field address of message cosmos.auth.v1beta1.QueryAccountRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountRequest 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_QueryAccountRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountRequest.address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountRequest 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_QueryAccountRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryAccountRequest", 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_QueryAccountRequest) 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_QueryAccountRequest) 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_QueryAccountRequest) 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_QueryAccountRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAccountRequest) - 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().(*QueryAccountRequest) - 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().(*QueryAccountRequest) - 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: QueryAccountRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountRequest: 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_QueryAccountResponse protoreflect.MessageDescriptor - fd_QueryAccountResponse_account protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_QueryAccountResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryAccountResponse") - fd_QueryAccountResponse_account = md_QueryAccountResponse.Fields().ByName("account") -} - -var _ protoreflect.Message = (*fastReflection_QueryAccountResponse)(nil) - -type fastReflection_QueryAccountResponse QueryAccountResponse - -func (x *QueryAccountResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAccountResponse)(x) -} - -func (x *QueryAccountResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAccountResponse_messageType fastReflection_QueryAccountResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryAccountResponse_messageType{} - -type fastReflection_QueryAccountResponse_messageType struct{} - -func (x fastReflection_QueryAccountResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAccountResponse)(nil) -} -func (x fastReflection_QueryAccountResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAccountResponse) -} -func (x fastReflection_QueryAccountResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAccountResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAccountResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAccountResponse -} - -// 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_QueryAccountResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryAccountResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAccountResponse) New() protoreflect.Message { - return new(fastReflection_QueryAccountResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAccountResponse) Interface() protoreflect.ProtoMessage { - return (*QueryAccountResponse)(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_QueryAccountResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Account != nil { - value := protoreflect.ValueOfMessage(x.Account.ProtoReflect()) - if !f(fd_QueryAccountResponse_account, 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_QueryAccountResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountResponse.account": - return x.Account != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse 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_QueryAccountResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountResponse.account": - x.Account = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse 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_QueryAccountResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1beta1.QueryAccountResponse.account": - value := x.Account - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse 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_QueryAccountResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountResponse.account": - x.Account = value.Message().Interface().(*anypb.Any) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse 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_QueryAccountResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountResponse.account": - if x.Account == nil { - x.Account = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Account.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse 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_QueryAccountResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountResponse.account": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse 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_QueryAccountResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryAccountResponse", 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_QueryAccountResponse) 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_QueryAccountResponse) 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_QueryAccountResponse) 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_QueryAccountResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAccountResponse) - 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.Account != nil { - l = options.Size(x.Account) - 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().(*QueryAccountResponse) - 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.Account != nil { - encoded, err := options.Marshal(x.Account) - 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().(*QueryAccountResponse) - 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: QueryAccountResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountResponse: 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 Account", 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.Account == nil { - x.Account = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Account); 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_QueryParamsRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_QueryParamsRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryParamsRequest") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) - -type fastReflection_QueryParamsRequest QueryParamsRequest - -func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(x) -} - -func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} - -type fastReflection_QueryParamsRequest_messageType struct{} - -func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(nil) -} -func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) -} -func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsRequest -} - -// 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_QueryParamsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryParamsRequest)(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_QueryParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest 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_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest 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_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest 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_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest 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_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest 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_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest 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_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryParamsRequest", 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_QueryParamsRequest) 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_QueryParamsRequest) 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_QueryParamsRequest) 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_QueryParamsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsRequest) - 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: QueryParamsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryParamsResponse protoreflect.MessageDescriptor - fd_QueryParamsResponse_params protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_QueryParamsResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryParamsResponse") - fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) - -type fastReflection_QueryParamsResponse QueryParamsResponse - -func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsResponse)(x) -} - -func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{} - -type fastReflection_QueryParamsResponse_messageType struct{} - -func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsResponse)(nil) -} -func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsResponse) -} -func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsResponse -} - -// 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_QueryParamsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message { - return new(fastReflection_QueryParamsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryParamsResponse)(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_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_QueryParamsResponse_params, 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_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryParamsResponse.params": - return x.Params != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse 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_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryParamsResponse.params": - x.Params = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse 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_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1beta1.QueryParamsResponse.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse 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_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryParamsResponse.params": - x.Params = value.Message().Interface().(*Params) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse 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_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryParamsResponse.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse 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_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryParamsResponse.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse 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_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryParamsResponse", 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_QueryParamsResponse) 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_QueryParamsResponse) 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_QueryParamsResponse) 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_QueryParamsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsResponse) - 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.Params != nil { - l = options.Size(x.Params) - 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().(*QueryParamsResponse) - 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.Params != nil { - encoded, err := options.Marshal(x.Params) - 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().(*QueryParamsResponse) - 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: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: 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 Params", 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.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); 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_QueryModuleAccountsRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_QueryModuleAccountsRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryModuleAccountsRequest") -} - -var _ protoreflect.Message = (*fastReflection_QueryModuleAccountsRequest)(nil) - -type fastReflection_QueryModuleAccountsRequest QueryModuleAccountsRequest - -func (x *QueryModuleAccountsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryModuleAccountsRequest)(x) -} - -func (x *QueryModuleAccountsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryModuleAccountsRequest_messageType fastReflection_QueryModuleAccountsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryModuleAccountsRequest_messageType{} - -type fastReflection_QueryModuleAccountsRequest_messageType struct{} - -func (x fastReflection_QueryModuleAccountsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryModuleAccountsRequest)(nil) -} -func (x fastReflection_QueryModuleAccountsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryModuleAccountsRequest) -} -func (x fastReflection_QueryModuleAccountsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryModuleAccountsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryModuleAccountsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryModuleAccountsRequest -} - -// 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_QueryModuleAccountsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryModuleAccountsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryModuleAccountsRequest) New() protoreflect.Message { - return new(fastReflection_QueryModuleAccountsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryModuleAccountsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryModuleAccountsRequest)(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_QueryModuleAccountsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryModuleAccountsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest 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_QueryModuleAccountsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest 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_QueryModuleAccountsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest 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_QueryModuleAccountsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest 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_QueryModuleAccountsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest 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_QueryModuleAccountsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest 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_QueryModuleAccountsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryModuleAccountsRequest", 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_QueryModuleAccountsRequest) 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_QueryModuleAccountsRequest) 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_QueryModuleAccountsRequest) 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_QueryModuleAccountsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryModuleAccountsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryModuleAccountsRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryModuleAccountsRequest) - 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: QueryModuleAccountsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryModuleAccountsResponse_1_list)(nil) - -type _QueryModuleAccountsResponse_1_list struct { - list *[]*anypb.Any -} - -func (x *_QueryModuleAccountsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryModuleAccountsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryModuleAccountsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_QueryModuleAccountsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryModuleAccountsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryModuleAccountsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryModuleAccountsResponse_1_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryModuleAccountsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryModuleAccountsResponse protoreflect.MessageDescriptor - fd_QueryModuleAccountsResponse_accounts protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_QueryModuleAccountsResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryModuleAccountsResponse") - fd_QueryModuleAccountsResponse_accounts = md_QueryModuleAccountsResponse.Fields().ByName("accounts") -} - -var _ protoreflect.Message = (*fastReflection_QueryModuleAccountsResponse)(nil) - -type fastReflection_QueryModuleAccountsResponse QueryModuleAccountsResponse - -func (x *QueryModuleAccountsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryModuleAccountsResponse)(x) -} - -func (x *QueryModuleAccountsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryModuleAccountsResponse_messageType fastReflection_QueryModuleAccountsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryModuleAccountsResponse_messageType{} - -type fastReflection_QueryModuleAccountsResponse_messageType struct{} - -func (x fastReflection_QueryModuleAccountsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryModuleAccountsResponse)(nil) -} -func (x fastReflection_QueryModuleAccountsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryModuleAccountsResponse) -} -func (x fastReflection_QueryModuleAccountsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryModuleAccountsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryModuleAccountsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryModuleAccountsResponse -} - -// 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_QueryModuleAccountsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryModuleAccountsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryModuleAccountsResponse) New() protoreflect.Message { - return new(fastReflection_QueryModuleAccountsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryModuleAccountsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryModuleAccountsResponse)(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_QueryModuleAccountsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Accounts) != 0 { - value := protoreflect.ValueOfList(&_QueryModuleAccountsResponse_1_list{list: &x.Accounts}) - if !f(fd_QueryModuleAccountsResponse_accounts, 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_QueryModuleAccountsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": - return len(x.Accounts) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse 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_QueryModuleAccountsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": - x.Accounts = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse 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_QueryModuleAccountsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": - if len(x.Accounts) == 0 { - return protoreflect.ValueOfList(&_QueryModuleAccountsResponse_1_list{}) - } - listValue := &_QueryModuleAccountsResponse_1_list{list: &x.Accounts} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse 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_QueryModuleAccountsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": - lv := value.List() - clv := lv.(*_QueryModuleAccountsResponse_1_list) - x.Accounts = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse 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_QueryModuleAccountsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": - if x.Accounts == nil { - x.Accounts = []*anypb.Any{} - } - value := &_QueryModuleAccountsResponse_1_list{list: &x.Accounts} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse 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_QueryModuleAccountsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_QueryModuleAccountsResponse_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse 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_QueryModuleAccountsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryModuleAccountsResponse", 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_QueryModuleAccountsResponse) 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_QueryModuleAccountsResponse) 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_QueryModuleAccountsResponse) 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_QueryModuleAccountsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryModuleAccountsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Accounts) > 0 { - for _, e := range x.Accounts { - l = options.Size(e) - 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().(*QueryModuleAccountsResponse) - 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.Accounts) > 0 { - for iNdEx := len(x.Accounts) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Accounts[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 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().(*QueryModuleAccountsResponse) - 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: QueryModuleAccountsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountsResponse: 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 Accounts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Accounts = append(x.Accounts, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Accounts[len(x.Accounts)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryModuleAccountByNameRequest protoreflect.MessageDescriptor - fd_QueryModuleAccountByNameRequest_name protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_QueryModuleAccountByNameRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryModuleAccountByNameRequest") - fd_QueryModuleAccountByNameRequest_name = md_QueryModuleAccountByNameRequest.Fields().ByName("name") -} - -var _ protoreflect.Message = (*fastReflection_QueryModuleAccountByNameRequest)(nil) - -type fastReflection_QueryModuleAccountByNameRequest QueryModuleAccountByNameRequest - -func (x *QueryModuleAccountByNameRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryModuleAccountByNameRequest)(x) -} - -func (x *QueryModuleAccountByNameRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[8] - 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_QueryModuleAccountByNameRequest_messageType fastReflection_QueryModuleAccountByNameRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryModuleAccountByNameRequest_messageType{} - -type fastReflection_QueryModuleAccountByNameRequest_messageType struct{} - -func (x fastReflection_QueryModuleAccountByNameRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryModuleAccountByNameRequest)(nil) -} -func (x fastReflection_QueryModuleAccountByNameRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryModuleAccountByNameRequest) -} -func (x fastReflection_QueryModuleAccountByNameRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryModuleAccountByNameRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryModuleAccountByNameRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryModuleAccountByNameRequest -} - -// 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_QueryModuleAccountByNameRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryModuleAccountByNameRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryModuleAccountByNameRequest) New() protoreflect.Message { - return new(fastReflection_QueryModuleAccountByNameRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryModuleAccountByNameRequest) Interface() protoreflect.ProtoMessage { - return (*QueryModuleAccountByNameRequest)(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_QueryModuleAccountByNameRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_QueryModuleAccountByNameRequest_name, 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_QueryModuleAccountByNameRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest.name": - return x.Name != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameRequest 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_QueryModuleAccountByNameRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest.name": - x.Name = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameRequest 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_QueryModuleAccountByNameRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest.name": - value := x.Name - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameRequest 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_QueryModuleAccountByNameRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest.name": - x.Name = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameRequest 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_QueryModuleAccountByNameRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest.name": - panic(fmt.Errorf("field name of message cosmos.auth.v1beta1.QueryModuleAccountByNameRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameRequest 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_QueryModuleAccountByNameRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest.name": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameRequest 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_QueryModuleAccountByNameRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryModuleAccountByNameRequest", 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_QueryModuleAccountByNameRequest) 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_QueryModuleAccountByNameRequest) 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_QueryModuleAccountByNameRequest) 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_QueryModuleAccountByNameRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryModuleAccountByNameRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - 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().(*QueryModuleAccountByNameRequest) - 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.Name) > 0 { - i -= len(x.Name) - copy(dAtA[i:], x.Name) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryModuleAccountByNameRequest) - 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: QueryModuleAccountByNameRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountByNameRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - 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_QueryModuleAccountByNameResponse protoreflect.MessageDescriptor - fd_QueryModuleAccountByNameResponse_account protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_QueryModuleAccountByNameResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryModuleAccountByNameResponse") - fd_QueryModuleAccountByNameResponse_account = md_QueryModuleAccountByNameResponse.Fields().ByName("account") -} - -var _ protoreflect.Message = (*fastReflection_QueryModuleAccountByNameResponse)(nil) - -type fastReflection_QueryModuleAccountByNameResponse QueryModuleAccountByNameResponse - -func (x *QueryModuleAccountByNameResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryModuleAccountByNameResponse)(x) -} - -func (x *QueryModuleAccountByNameResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[9] - 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_QueryModuleAccountByNameResponse_messageType fastReflection_QueryModuleAccountByNameResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryModuleAccountByNameResponse_messageType{} - -type fastReflection_QueryModuleAccountByNameResponse_messageType struct{} - -func (x fastReflection_QueryModuleAccountByNameResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryModuleAccountByNameResponse)(nil) -} -func (x fastReflection_QueryModuleAccountByNameResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryModuleAccountByNameResponse) -} -func (x fastReflection_QueryModuleAccountByNameResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryModuleAccountByNameResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryModuleAccountByNameResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryModuleAccountByNameResponse -} - -// 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_QueryModuleAccountByNameResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryModuleAccountByNameResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryModuleAccountByNameResponse) New() protoreflect.Message { - return new(fastReflection_QueryModuleAccountByNameResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryModuleAccountByNameResponse) Interface() protoreflect.ProtoMessage { - return (*QueryModuleAccountByNameResponse)(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_QueryModuleAccountByNameResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Account != nil { - value := protoreflect.ValueOfMessage(x.Account.ProtoReflect()) - if !f(fd_QueryModuleAccountByNameResponse_account, 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_QueryModuleAccountByNameResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account": - return x.Account != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameResponse 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_QueryModuleAccountByNameResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account": - x.Account = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameResponse 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_QueryModuleAccountByNameResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account": - value := x.Account - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameResponse 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_QueryModuleAccountByNameResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account": - x.Account = value.Message().Interface().(*anypb.Any) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameResponse 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_QueryModuleAccountByNameResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account": - if x.Account == nil { - x.Account = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Account.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameResponse 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_QueryModuleAccountByNameResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameResponse 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_QueryModuleAccountByNameResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryModuleAccountByNameResponse", 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_QueryModuleAccountByNameResponse) 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_QueryModuleAccountByNameResponse) 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_QueryModuleAccountByNameResponse) 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_QueryModuleAccountByNameResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryModuleAccountByNameResponse) - 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.Account != nil { - l = options.Size(x.Account) - 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().(*QueryModuleAccountByNameResponse) - 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.Account != nil { - encoded, err := options.Marshal(x.Account) - 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().(*QueryModuleAccountByNameResponse) - 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: QueryModuleAccountByNameResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountByNameResponse: 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 Account", 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.Account == nil { - x.Account = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Account); 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_Bech32PrefixRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_Bech32PrefixRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("Bech32PrefixRequest") -} - -var _ protoreflect.Message = (*fastReflection_Bech32PrefixRequest)(nil) - -type fastReflection_Bech32PrefixRequest Bech32PrefixRequest - -func (x *Bech32PrefixRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_Bech32PrefixRequest)(x) -} - -func (x *Bech32PrefixRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[10] - 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_Bech32PrefixRequest_messageType fastReflection_Bech32PrefixRequest_messageType -var _ protoreflect.MessageType = fastReflection_Bech32PrefixRequest_messageType{} - -type fastReflection_Bech32PrefixRequest_messageType struct{} - -func (x fastReflection_Bech32PrefixRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_Bech32PrefixRequest)(nil) -} -func (x fastReflection_Bech32PrefixRequest_messageType) New() protoreflect.Message { - return new(fastReflection_Bech32PrefixRequest) -} -func (x fastReflection_Bech32PrefixRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Bech32PrefixRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Bech32PrefixRequest) Descriptor() protoreflect.MessageDescriptor { - return md_Bech32PrefixRequest -} - -// 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_Bech32PrefixRequest) Type() protoreflect.MessageType { - return _fastReflection_Bech32PrefixRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Bech32PrefixRequest) New() protoreflect.Message { - return new(fastReflection_Bech32PrefixRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Bech32PrefixRequest) Interface() protoreflect.ProtoMessage { - return (*Bech32PrefixRequest)(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_Bech32PrefixRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Bech32PrefixRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixRequest 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_Bech32PrefixRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixRequest 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_Bech32PrefixRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixRequest 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_Bech32PrefixRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixRequest 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_Bech32PrefixRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixRequest 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_Bech32PrefixRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixRequest 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_Bech32PrefixRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.Bech32PrefixRequest", 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_Bech32PrefixRequest) 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_Bech32PrefixRequest) 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_Bech32PrefixRequest) 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_Bech32PrefixRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Bech32PrefixRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Bech32PrefixRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Bech32PrefixRequest) - 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: Bech32PrefixRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Bech32PrefixRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Bech32PrefixResponse protoreflect.MessageDescriptor - fd_Bech32PrefixResponse_bech32_prefix protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_Bech32PrefixResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("Bech32PrefixResponse") - fd_Bech32PrefixResponse_bech32_prefix = md_Bech32PrefixResponse.Fields().ByName("bech32_prefix") -} - -var _ protoreflect.Message = (*fastReflection_Bech32PrefixResponse)(nil) - -type fastReflection_Bech32PrefixResponse Bech32PrefixResponse - -func (x *Bech32PrefixResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_Bech32PrefixResponse)(x) -} - -func (x *Bech32PrefixResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[11] - 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_Bech32PrefixResponse_messageType fastReflection_Bech32PrefixResponse_messageType -var _ protoreflect.MessageType = fastReflection_Bech32PrefixResponse_messageType{} - -type fastReflection_Bech32PrefixResponse_messageType struct{} - -func (x fastReflection_Bech32PrefixResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_Bech32PrefixResponse)(nil) -} -func (x fastReflection_Bech32PrefixResponse_messageType) New() protoreflect.Message { - return new(fastReflection_Bech32PrefixResponse) -} -func (x fastReflection_Bech32PrefixResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Bech32PrefixResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Bech32PrefixResponse) Descriptor() protoreflect.MessageDescriptor { - return md_Bech32PrefixResponse -} - -// 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_Bech32PrefixResponse) Type() protoreflect.MessageType { - return _fastReflection_Bech32PrefixResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Bech32PrefixResponse) New() protoreflect.Message { - return new(fastReflection_Bech32PrefixResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Bech32PrefixResponse) Interface() protoreflect.ProtoMessage { - return (*Bech32PrefixResponse)(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_Bech32PrefixResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Bech32Prefix != "" { - value := protoreflect.ValueOfString(x.Bech32Prefix) - if !f(fd_Bech32PrefixResponse_bech32_prefix, 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_Bech32PrefixResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1beta1.Bech32PrefixResponse.bech32_prefix": - return x.Bech32Prefix != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixResponse 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_Bech32PrefixResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.Bech32PrefixResponse.bech32_prefix": - x.Bech32Prefix = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixResponse 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_Bech32PrefixResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1beta1.Bech32PrefixResponse.bech32_prefix": - value := x.Bech32Prefix - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixResponse 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_Bech32PrefixResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.Bech32PrefixResponse.bech32_prefix": - x.Bech32Prefix = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixResponse 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_Bech32PrefixResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.Bech32PrefixResponse.bech32_prefix": - panic(fmt.Errorf("field bech32_prefix of message cosmos.auth.v1beta1.Bech32PrefixResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixResponse 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_Bech32PrefixResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.Bech32PrefixResponse.bech32_prefix": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.Bech32PrefixResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.Bech32PrefixResponse 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_Bech32PrefixResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.Bech32PrefixResponse", 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_Bech32PrefixResponse) 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_Bech32PrefixResponse) 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_Bech32PrefixResponse) 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_Bech32PrefixResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Bech32PrefixResponse) - 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.Bech32Prefix) - 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().(*Bech32PrefixResponse) - 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.Bech32Prefix) > 0 { - i -= len(x.Bech32Prefix) - copy(dAtA[i:], x.Bech32Prefix) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bech32Prefix))) - 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().(*Bech32PrefixResponse) - 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: Bech32PrefixResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Bech32PrefixResponse: 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 Bech32Prefix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Bech32Prefix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - 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_AddressBytesToStringRequest protoreflect.MessageDescriptor - fd_AddressBytesToStringRequest_address_bytes protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_AddressBytesToStringRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("AddressBytesToStringRequest") - fd_AddressBytesToStringRequest_address_bytes = md_AddressBytesToStringRequest.Fields().ByName("address_bytes") -} - -var _ protoreflect.Message = (*fastReflection_AddressBytesToStringRequest)(nil) - -type fastReflection_AddressBytesToStringRequest AddressBytesToStringRequest - -func (x *AddressBytesToStringRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_AddressBytesToStringRequest)(x) -} - -func (x *AddressBytesToStringRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[12] - 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_AddressBytesToStringRequest_messageType fastReflection_AddressBytesToStringRequest_messageType -var _ protoreflect.MessageType = fastReflection_AddressBytesToStringRequest_messageType{} - -type fastReflection_AddressBytesToStringRequest_messageType struct{} - -func (x fastReflection_AddressBytesToStringRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_AddressBytesToStringRequest)(nil) -} -func (x fastReflection_AddressBytesToStringRequest_messageType) New() protoreflect.Message { - return new(fastReflection_AddressBytesToStringRequest) -} -func (x fastReflection_AddressBytesToStringRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_AddressBytesToStringRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_AddressBytesToStringRequest) Descriptor() protoreflect.MessageDescriptor { - return md_AddressBytesToStringRequest -} - -// 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_AddressBytesToStringRequest) Type() protoreflect.MessageType { - return _fastReflection_AddressBytesToStringRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_AddressBytesToStringRequest) New() protoreflect.Message { - return new(fastReflection_AddressBytesToStringRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_AddressBytesToStringRequest) Interface() protoreflect.ProtoMessage { - return (*AddressBytesToStringRequest)(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_AddressBytesToStringRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.AddressBytes) != 0 { - value := protoreflect.ValueOfBytes(x.AddressBytes) - if !f(fd_AddressBytesToStringRequest_address_bytes, 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_AddressBytesToStringRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressBytesToStringRequest.address_bytes": - return len(x.AddressBytes) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringRequest 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_AddressBytesToStringRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressBytesToStringRequest.address_bytes": - x.AddressBytes = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringRequest 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_AddressBytesToStringRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1beta1.AddressBytesToStringRequest.address_bytes": - value := x.AddressBytes - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringRequest 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_AddressBytesToStringRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressBytesToStringRequest.address_bytes": - x.AddressBytes = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringRequest 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_AddressBytesToStringRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressBytesToStringRequest.address_bytes": - panic(fmt.Errorf("field address_bytes of message cosmos.auth.v1beta1.AddressBytesToStringRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringRequest 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_AddressBytesToStringRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressBytesToStringRequest.address_bytes": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringRequest 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_AddressBytesToStringRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.AddressBytesToStringRequest", 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_AddressBytesToStringRequest) 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_AddressBytesToStringRequest) 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_AddressBytesToStringRequest) 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_AddressBytesToStringRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*AddressBytesToStringRequest) - 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.AddressBytes) - 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().(*AddressBytesToStringRequest) - 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.AddressBytes) > 0 { - i -= len(x.AddressBytes) - copy(dAtA[i:], x.AddressBytes) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AddressBytes))) - 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().(*AddressBytesToStringRequest) - 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: AddressBytesToStringRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AddressBytesToStringRequest: 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 AddressBytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AddressBytes = append(x.AddressBytes[:0], dAtA[iNdEx:postIndex]...) - if x.AddressBytes == nil { - x.AddressBytes = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_AddressBytesToStringResponse protoreflect.MessageDescriptor - fd_AddressBytesToStringResponse_address_string protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_AddressBytesToStringResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("AddressBytesToStringResponse") - fd_AddressBytesToStringResponse_address_string = md_AddressBytesToStringResponse.Fields().ByName("address_string") -} - -var _ protoreflect.Message = (*fastReflection_AddressBytesToStringResponse)(nil) - -type fastReflection_AddressBytesToStringResponse AddressBytesToStringResponse - -func (x *AddressBytesToStringResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_AddressBytesToStringResponse)(x) -} - -func (x *AddressBytesToStringResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[13] - 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_AddressBytesToStringResponse_messageType fastReflection_AddressBytesToStringResponse_messageType -var _ protoreflect.MessageType = fastReflection_AddressBytesToStringResponse_messageType{} - -type fastReflection_AddressBytesToStringResponse_messageType struct{} - -func (x fastReflection_AddressBytesToStringResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_AddressBytesToStringResponse)(nil) -} -func (x fastReflection_AddressBytesToStringResponse_messageType) New() protoreflect.Message { - return new(fastReflection_AddressBytesToStringResponse) -} -func (x fastReflection_AddressBytesToStringResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_AddressBytesToStringResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_AddressBytesToStringResponse) Descriptor() protoreflect.MessageDescriptor { - return md_AddressBytesToStringResponse -} - -// 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_AddressBytesToStringResponse) Type() protoreflect.MessageType { - return _fastReflection_AddressBytesToStringResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_AddressBytesToStringResponse) New() protoreflect.Message { - return new(fastReflection_AddressBytesToStringResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_AddressBytesToStringResponse) Interface() protoreflect.ProtoMessage { - return (*AddressBytesToStringResponse)(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_AddressBytesToStringResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.AddressString != "" { - value := protoreflect.ValueOfString(x.AddressString) - if !f(fd_AddressBytesToStringResponse_address_string, 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_AddressBytesToStringResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressBytesToStringResponse.address_string": - return x.AddressString != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringResponse 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_AddressBytesToStringResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressBytesToStringResponse.address_string": - x.AddressString = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringResponse 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_AddressBytesToStringResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1beta1.AddressBytesToStringResponse.address_string": - value := x.AddressString - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringResponse 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_AddressBytesToStringResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressBytesToStringResponse.address_string": - x.AddressString = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringResponse 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_AddressBytesToStringResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressBytesToStringResponse.address_string": - panic(fmt.Errorf("field address_string of message cosmos.auth.v1beta1.AddressBytesToStringResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringResponse 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_AddressBytesToStringResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressBytesToStringResponse.address_string": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressBytesToStringResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressBytesToStringResponse 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_AddressBytesToStringResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.AddressBytesToStringResponse", 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_AddressBytesToStringResponse) 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_AddressBytesToStringResponse) 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_AddressBytesToStringResponse) 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_AddressBytesToStringResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*AddressBytesToStringResponse) - 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.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().(*AddressBytesToStringResponse) - 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.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().(*AddressBytesToStringResponse) - 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: AddressBytesToStringResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AddressBytesToStringResponse: 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 - 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_AddressStringToBytesRequest protoreflect.MessageDescriptor - fd_AddressStringToBytesRequest_address_string protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_AddressStringToBytesRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("AddressStringToBytesRequest") - fd_AddressStringToBytesRequest_address_string = md_AddressStringToBytesRequest.Fields().ByName("address_string") -} - -var _ protoreflect.Message = (*fastReflection_AddressStringToBytesRequest)(nil) - -type fastReflection_AddressStringToBytesRequest AddressStringToBytesRequest - -func (x *AddressStringToBytesRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_AddressStringToBytesRequest)(x) -} - -func (x *AddressStringToBytesRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_AddressStringToBytesRequest_messageType fastReflection_AddressStringToBytesRequest_messageType -var _ protoreflect.MessageType = fastReflection_AddressStringToBytesRequest_messageType{} - -type fastReflection_AddressStringToBytesRequest_messageType struct{} - -func (x fastReflection_AddressStringToBytesRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_AddressStringToBytesRequest)(nil) -} -func (x fastReflection_AddressStringToBytesRequest_messageType) New() protoreflect.Message { - return new(fastReflection_AddressStringToBytesRequest) -} -func (x fastReflection_AddressStringToBytesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_AddressStringToBytesRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_AddressStringToBytesRequest) Descriptor() protoreflect.MessageDescriptor { - return md_AddressStringToBytesRequest -} - -// 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_AddressStringToBytesRequest) Type() protoreflect.MessageType { - return _fastReflection_AddressStringToBytesRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_AddressStringToBytesRequest) New() protoreflect.Message { - return new(fastReflection_AddressStringToBytesRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_AddressStringToBytesRequest) Interface() protoreflect.ProtoMessage { - return (*AddressStringToBytesRequest)(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_AddressStringToBytesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.AddressString != "" { - value := protoreflect.ValueOfString(x.AddressString) - if !f(fd_AddressStringToBytesRequest_address_string, 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_AddressStringToBytesRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressStringToBytesRequest.address_string": - return x.AddressString != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesRequest 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_AddressStringToBytesRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressStringToBytesRequest.address_string": - x.AddressString = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesRequest 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_AddressStringToBytesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1beta1.AddressStringToBytesRequest.address_string": - value := x.AddressString - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesRequest 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_AddressStringToBytesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressStringToBytesRequest.address_string": - x.AddressString = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesRequest 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_AddressStringToBytesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressStringToBytesRequest.address_string": - panic(fmt.Errorf("field address_string of message cosmos.auth.v1beta1.AddressStringToBytesRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesRequest 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_AddressStringToBytesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressStringToBytesRequest.address_string": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesRequest 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_AddressStringToBytesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.AddressStringToBytesRequest", 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_AddressStringToBytesRequest) 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_AddressStringToBytesRequest) 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_AddressStringToBytesRequest) 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_AddressStringToBytesRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*AddressStringToBytesRequest) - 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.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().(*AddressStringToBytesRequest) - 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.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().(*AddressStringToBytesRequest) - 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: AddressStringToBytesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AddressStringToBytesRequest: 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 - 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_AddressStringToBytesResponse protoreflect.MessageDescriptor - fd_AddressStringToBytesResponse_address_bytes protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_AddressStringToBytesResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("AddressStringToBytesResponse") - fd_AddressStringToBytesResponse_address_bytes = md_AddressStringToBytesResponse.Fields().ByName("address_bytes") -} - -var _ protoreflect.Message = (*fastReflection_AddressStringToBytesResponse)(nil) - -type fastReflection_AddressStringToBytesResponse AddressStringToBytesResponse - -func (x *AddressStringToBytesResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_AddressStringToBytesResponse)(x) -} - -func (x *AddressStringToBytesResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_AddressStringToBytesResponse_messageType fastReflection_AddressStringToBytesResponse_messageType -var _ protoreflect.MessageType = fastReflection_AddressStringToBytesResponse_messageType{} - -type fastReflection_AddressStringToBytesResponse_messageType struct{} - -func (x fastReflection_AddressStringToBytesResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_AddressStringToBytesResponse)(nil) -} -func (x fastReflection_AddressStringToBytesResponse_messageType) New() protoreflect.Message { - return new(fastReflection_AddressStringToBytesResponse) -} -func (x fastReflection_AddressStringToBytesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_AddressStringToBytesResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_AddressStringToBytesResponse) Descriptor() protoreflect.MessageDescriptor { - return md_AddressStringToBytesResponse -} - -// 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_AddressStringToBytesResponse) Type() protoreflect.MessageType { - return _fastReflection_AddressStringToBytesResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_AddressStringToBytesResponse) New() protoreflect.Message { - return new(fastReflection_AddressStringToBytesResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_AddressStringToBytesResponse) Interface() protoreflect.ProtoMessage { - return (*AddressStringToBytesResponse)(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_AddressStringToBytesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.AddressBytes) != 0 { - value := protoreflect.ValueOfBytes(x.AddressBytes) - if !f(fd_AddressStringToBytesResponse_address_bytes, 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_AddressStringToBytesResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressStringToBytesResponse.address_bytes": - return len(x.AddressBytes) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesResponse 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_AddressStringToBytesResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressStringToBytesResponse.address_bytes": - x.AddressBytes = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesResponse 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_AddressStringToBytesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1beta1.AddressStringToBytesResponse.address_bytes": - value := x.AddressBytes - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesResponse 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_AddressStringToBytesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressStringToBytesResponse.address_bytes": - x.AddressBytes = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesResponse 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_AddressStringToBytesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressStringToBytesResponse.address_bytes": - panic(fmt.Errorf("field address_bytes of message cosmos.auth.v1beta1.AddressStringToBytesResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesResponse 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_AddressStringToBytesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.AddressStringToBytesResponse.address_bytes": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.AddressStringToBytesResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.AddressStringToBytesResponse 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_AddressStringToBytesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.AddressStringToBytesResponse", 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_AddressStringToBytesResponse) 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_AddressStringToBytesResponse) 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_AddressStringToBytesResponse) 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_AddressStringToBytesResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*AddressStringToBytesResponse) - 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.AddressBytes) - 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().(*AddressStringToBytesResponse) - 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.AddressBytes) > 0 { - i -= len(x.AddressBytes) - copy(dAtA[i:], x.AddressBytes) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AddressBytes))) - 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().(*AddressStringToBytesResponse) - 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: AddressStringToBytesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AddressStringToBytesResponse: 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 AddressBytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AddressBytes = append(x.AddressBytes[:0], dAtA[iNdEx:postIndex]...) - if x.AddressBytes == nil { - x.AddressBytes = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryAccountAddressByIDRequest protoreflect.MessageDescriptor - fd_QueryAccountAddressByIDRequest_id protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_QueryAccountAddressByIDRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryAccountAddressByIDRequest") - fd_QueryAccountAddressByIDRequest_id = md_QueryAccountAddressByIDRequest.Fields().ByName("id") -} - -var _ protoreflect.Message = (*fastReflection_QueryAccountAddressByIDRequest)(nil) - -type fastReflection_QueryAccountAddressByIDRequest QueryAccountAddressByIDRequest - -func (x *QueryAccountAddressByIDRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAccountAddressByIDRequest)(x) -} - -func (x *QueryAccountAddressByIDRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[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_QueryAccountAddressByIDRequest_messageType fastReflection_QueryAccountAddressByIDRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryAccountAddressByIDRequest_messageType{} - -type fastReflection_QueryAccountAddressByIDRequest_messageType struct{} - -func (x fastReflection_QueryAccountAddressByIDRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAccountAddressByIDRequest)(nil) -} -func (x fastReflection_QueryAccountAddressByIDRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAccountAddressByIDRequest) -} -func (x fastReflection_QueryAccountAddressByIDRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAccountAddressByIDRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAccountAddressByIDRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAccountAddressByIDRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryAccountAddressByIDRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryAccountAddressByIDRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAccountAddressByIDRequest) New() protoreflect.Message { - return new(fastReflection_QueryAccountAddressByIDRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAccountAddressByIDRequest) Interface() protoreflect.ProtoMessage { - return (*QueryAccountAddressByIDRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryAccountAddressByIDRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != int64(0) { - value := protoreflect.ValueOfInt64(x.Id) - if !f(fd_QueryAccountAddressByIDRequest_id, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAccountAddressByIDRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.id": - return x.Id != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAccountAddressByIDRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.id": - x.Id = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryAccountAddressByIDRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.id": - value := x.Id - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAccountAddressByIDRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.id": - x.Id = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAccountAddressByIDRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.id": - panic(fmt.Errorf("field id of message cosmos.auth.v1beta1.QueryAccountAddressByIDRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryAccountAddressByIDRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest.id": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryAccountAddressByIDRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryAccountAddressByIDRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryAccountAddressByIDRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAccountAddressByIDRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryAccountAddressByIDRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryAccountAddressByIDRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAccountAddressByIDRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAccountAddressByIDRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAccountAddressByIDRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountAddressByIDRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountAddressByIDRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryAccountAddressByIDResponse protoreflect.MessageDescriptor - fd_QueryAccountAddressByIDResponse_account_address protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_auth_v1beta1_query_proto_init() - md_QueryAccountAddressByIDResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryAccountAddressByIDResponse") - fd_QueryAccountAddressByIDResponse_account_address = md_QueryAccountAddressByIDResponse.Fields().ByName("account_address") -} - -var _ protoreflect.Message = (*fastReflection_QueryAccountAddressByIDResponse)(nil) - -type fastReflection_QueryAccountAddressByIDResponse QueryAccountAddressByIDResponse - -func (x *QueryAccountAddressByIDResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAccountAddressByIDResponse)(x) -} - -func (x *QueryAccountAddressByIDResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[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_QueryAccountAddressByIDResponse_messageType fastReflection_QueryAccountAddressByIDResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryAccountAddressByIDResponse_messageType{} - -type fastReflection_QueryAccountAddressByIDResponse_messageType struct{} - -func (x fastReflection_QueryAccountAddressByIDResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAccountAddressByIDResponse)(nil) -} -func (x fastReflection_QueryAccountAddressByIDResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAccountAddressByIDResponse) -} -func (x fastReflection_QueryAccountAddressByIDResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAccountAddressByIDResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAccountAddressByIDResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAccountAddressByIDResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryAccountAddressByIDResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryAccountAddressByIDResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAccountAddressByIDResponse) New() protoreflect.Message { - return new(fastReflection_QueryAccountAddressByIDResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAccountAddressByIDResponse) Interface() protoreflect.ProtoMessage { - return (*QueryAccountAddressByIDResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryAccountAddressByIDResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.AccountAddress != "" { - value := protoreflect.ValueOfString(x.AccountAddress) - if !f(fd_QueryAccountAddressByIDResponse_account_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAccountAddressByIDResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountAddressByIDResponse.account_address": - return x.AccountAddress != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAccountAddressByIDResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountAddressByIDResponse.account_address": - x.AccountAddress = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryAccountAddressByIDResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.auth.v1beta1.QueryAccountAddressByIDResponse.account_address": - value := x.AccountAddress - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAccountAddressByIDResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountAddressByIDResponse.account_address": - x.AccountAddress = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAccountAddressByIDResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountAddressByIDResponse.account_address": - panic(fmt.Errorf("field account_address of message cosmos.auth.v1beta1.QueryAccountAddressByIDResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryAccountAddressByIDResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountAddressByIDResponse.account_address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountAddressByIDResponse")) - } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountAddressByIDResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryAccountAddressByIDResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryAccountAddressByIDResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryAccountAddressByIDResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAccountAddressByIDResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryAccountAddressByIDResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryAccountAddressByIDResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAccountAddressByIDResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.AccountAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAccountAddressByIDResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.AccountAddress) > 0 { - i -= len(x.AccountAddress) - copy(dAtA[i:], x.AccountAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AccountAddress))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAccountAddressByIDResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountAddressByIDResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountAddressByIDResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AccountAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AccountAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -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[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_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[19] - 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().(*BaseAccount) - 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(BaseAccount) - } - 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(BaseAccount) - 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 = &BaseAccount{} - } - 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, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/auth/v1beta1/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) -) - -// QueryAccountsRequest is the request type for the Query/Accounts RPC method. -// -// Since: cosmos-sdk 0.43 -type QueryAccountsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // pagination defines an optional pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryAccountsRequest) Reset() { - *x = QueryAccountsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAccountsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAccountsRequest) ProtoMessage() {} - -// Deprecated: Use QueryAccountsRequest.ProtoReflect.Descriptor instead. -func (*QueryAccountsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{0} -} - -func (x *QueryAccountsRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryAccountsResponse is the response type for the Query/Accounts RPC method. -// -// Since: cosmos-sdk 0.43 -type QueryAccountsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // accounts are the existing accounts - Accounts []*anypb.Any `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` - // pagination defines the pagination in the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryAccountsResponse) Reset() { - *x = QueryAccountsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAccountsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAccountsResponse) ProtoMessage() {} - -// Deprecated: Use QueryAccountsResponse.ProtoReflect.Descriptor instead. -func (*QueryAccountsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryAccountsResponse) GetAccounts() []*anypb.Any { - if x != nil { - return x.Accounts - } - return nil -} - -func (x *QueryAccountsResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// QueryAccountRequest is the request type for the Query/Account RPC method. -type QueryAccountRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address defines the address to query for. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (x *QueryAccountRequest) Reset() { - *x = QueryAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAccountRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAccountRequest) ProtoMessage() {} - -// Deprecated: Use QueryAccountRequest.ProtoReflect.Descriptor instead. -func (*QueryAccountRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{2} -} - -func (x *QueryAccountRequest) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -// QueryAccountResponse is the response type for the Query/Account RPC method. -type QueryAccountResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // account defines the account of the corresponding address. - Account *anypb.Any `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` -} - -func (x *QueryAccountResponse) Reset() { - *x = QueryAccountResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAccountResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAccountResponse) ProtoMessage() {} - -// Deprecated: Use QueryAccountResponse.ProtoReflect.Descriptor instead. -func (*QueryAccountResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{3} -} - -func (x *QueryAccountResponse) GetAccount() *anypb.Any { - if x != nil { - return x.Account - } - return nil -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -type QueryParamsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryParamsRequest) Reset() { - *x = QueryParamsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsRequest) ProtoMessage() {} - -// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{4} -} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -type QueryParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // params defines the parameters of the module. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *QueryParamsResponse) Reset() { - *x = QueryParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsResponse) ProtoMessage() {} - -// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{5} -} - -func (x *QueryParamsResponse) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -// QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. -// -// Since: cosmos-sdk 0.46 -type QueryModuleAccountsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryModuleAccountsRequest) Reset() { - *x = QueryModuleAccountsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryModuleAccountsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryModuleAccountsRequest) ProtoMessage() {} - -// Deprecated: Use QueryModuleAccountsRequest.ProtoReflect.Descriptor instead. -func (*QueryModuleAccountsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{6} -} - -// QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. -// -// Since: cosmos-sdk 0.46 -type QueryModuleAccountsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Accounts []*anypb.Any `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` -} - -func (x *QueryModuleAccountsResponse) Reset() { - *x = QueryModuleAccountsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryModuleAccountsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryModuleAccountsResponse) ProtoMessage() {} - -// Deprecated: Use QueryModuleAccountsResponse.ProtoReflect.Descriptor instead. -func (*QueryModuleAccountsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{7} -} - -func (x *QueryModuleAccountsResponse) GetAccounts() []*anypb.Any { - if x != nil { - return x.Accounts - } - return nil -} - -// QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. -type QueryModuleAccountByNameRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *QueryModuleAccountByNameRequest) Reset() { - *x = QueryModuleAccountByNameRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryModuleAccountByNameRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryModuleAccountByNameRequest) ProtoMessage() {} - -// Deprecated: Use QueryModuleAccountByNameRequest.ProtoReflect.Descriptor instead. -func (*QueryModuleAccountByNameRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{8} -} - -func (x *QueryModuleAccountByNameRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. -type QueryModuleAccountByNameResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Account *anypb.Any `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` -} - -func (x *QueryModuleAccountByNameResponse) Reset() { - *x = QueryModuleAccountByNameResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryModuleAccountByNameResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryModuleAccountByNameResponse) ProtoMessage() {} - -// Deprecated: Use QueryModuleAccountByNameResponse.ProtoReflect.Descriptor instead. -func (*QueryModuleAccountByNameResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{9} -} - -func (x *QueryModuleAccountByNameResponse) GetAccount() *anypb.Any { - if x != nil { - return x.Account - } - return nil -} - -// Bech32PrefixRequest is the request type for Bech32Prefix rpc method. -// -// Since: cosmos-sdk 0.46 -type Bech32PrefixRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *Bech32PrefixRequest) Reset() { - *x = Bech32PrefixRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Bech32PrefixRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Bech32PrefixRequest) ProtoMessage() {} - -// Deprecated: Use Bech32PrefixRequest.ProtoReflect.Descriptor instead. -func (*Bech32PrefixRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{10} -} - -// Bech32PrefixResponse is the response type for Bech32Prefix rpc method. -// -// Since: cosmos-sdk 0.46 -type Bech32PrefixResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Bech32Prefix string `protobuf:"bytes,1,opt,name=bech32_prefix,json=bech32Prefix,proto3" json:"bech32_prefix,omitempty"` -} - -func (x *Bech32PrefixResponse) Reset() { - *x = Bech32PrefixResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Bech32PrefixResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Bech32PrefixResponse) ProtoMessage() {} - -// Deprecated: Use Bech32PrefixResponse.ProtoReflect.Descriptor instead. -func (*Bech32PrefixResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{11} -} - -func (x *Bech32PrefixResponse) GetBech32Prefix() string { - if x != nil { - return x.Bech32Prefix - } - return "" -} - -// AddressBytesToStringRequest is the request type for AddressString rpc method. -// -// Since: cosmos-sdk 0.46 -type AddressBytesToStringRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AddressBytes []byte `protobuf:"bytes,1,opt,name=address_bytes,json=addressBytes,proto3" json:"address_bytes,omitempty"` -} - -func (x *AddressBytesToStringRequest) Reset() { - *x = AddressBytesToStringRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddressBytesToStringRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddressBytesToStringRequest) ProtoMessage() {} - -// Deprecated: Use AddressBytesToStringRequest.ProtoReflect.Descriptor instead. -func (*AddressBytesToStringRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{12} -} - -func (x *AddressBytesToStringRequest) GetAddressBytes() []byte { - if x != nil { - return x.AddressBytes - } - return nil -} - -// AddressBytesToStringResponse is the response type for AddressString rpc method. -// -// Since: cosmos-sdk 0.46 -type AddressBytesToStringResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AddressString string `protobuf:"bytes,1,opt,name=address_string,json=addressString,proto3" json:"address_string,omitempty"` -} - -func (x *AddressBytesToStringResponse) Reset() { - *x = AddressBytesToStringResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddressBytesToStringResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddressBytesToStringResponse) ProtoMessage() {} - -// Deprecated: Use AddressBytesToStringResponse.ProtoReflect.Descriptor instead. -func (*AddressBytesToStringResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{13} -} - -func (x *AddressBytesToStringResponse) GetAddressString() string { - if x != nil { - return x.AddressString - } - return "" -} - -// AddressStringToBytesRequest is the request type for AccountBytes rpc method. -// -// Since: cosmos-sdk 0.46 -type AddressStringToBytesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AddressString string `protobuf:"bytes,1,opt,name=address_string,json=addressString,proto3" json:"address_string,omitempty"` -} - -func (x *AddressStringToBytesRequest) Reset() { - *x = AddressStringToBytesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddressStringToBytesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddressStringToBytesRequest) ProtoMessage() {} - -// Deprecated: Use AddressStringToBytesRequest.ProtoReflect.Descriptor instead. -func (*AddressStringToBytesRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{14} -} - -func (x *AddressStringToBytesRequest) GetAddressString() string { - if x != nil { - return x.AddressString - } - return "" -} - -// AddressStringToBytesResponse is the response type for AddressBytes rpc method. -// -// Since: cosmos-sdk 0.46 -type AddressStringToBytesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AddressBytes []byte `protobuf:"bytes,1,opt,name=address_bytes,json=addressBytes,proto3" json:"address_bytes,omitempty"` -} - -func (x *AddressStringToBytesResponse) Reset() { - *x = AddressStringToBytesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddressStringToBytesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddressStringToBytesResponse) ProtoMessage() {} - -// Deprecated: Use AddressStringToBytesResponse.ProtoReflect.Descriptor instead. -func (*AddressStringToBytesResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{15} -} - -func (x *AddressStringToBytesResponse) GetAddressBytes() []byte { - if x != nil { - return x.AddressBytes - } - return nil -} - -// QueryAccountAddressByIDRequest is the request type for AccountAddressByID rpc method -// -// Since: cosmos-sdk 0.46.2 -type QueryAccountAddressByIDRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // id is the account number of the address to be queried. This field - // should have been an uint64 (like all account numbers), and will be - // updated to uint64 in a future version of the auth query. - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *QueryAccountAddressByIDRequest) Reset() { - *x = QueryAccountAddressByIDRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAccountAddressByIDRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAccountAddressByIDRequest) ProtoMessage() {} - -// Deprecated: Use QueryAccountAddressByIDRequest.ProtoReflect.Descriptor instead. -func (*QueryAccountAddressByIDRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{16} -} - -func (x *QueryAccountAddressByIDRequest) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -// QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method -// -// Since: cosmos-sdk 0.46.2 -type QueryAccountAddressByIDResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AccountAddress string `protobuf:"bytes,1,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` -} - -func (x *QueryAccountAddressByIDResponse) Reset() { - *x = QueryAccountAddressByIDResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAccountAddressByIDResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAccountAddressByIDResponse) ProtoMessage() {} - -// Deprecated: Use QueryAccountAddressByIDResponse.ProtoReflect.Descriptor instead. -func (*QueryAccountAddressByIDResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{17} -} - -func (x *QueryAccountAddressByIDResponse) GetAccountAddress() string { - if x != nil { - return x.AccountAddress - } - return "" -} - -// QueryAccountInfoRequest is the Query/AccountInfo request type. -// -// Since: cosmos-sdk 0.47 -type QueryAccountInfoRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address is the account address string. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (x *QueryAccountInfoRequest) Reset() { - *x = QueryAccountInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAccountInfoRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAccountInfoRequest) ProtoMessage() {} - -// Deprecated: Use QueryAccountInfoRequest.ProtoReflect.Descriptor instead. -func (*QueryAccountInfoRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{18} -} - -func (x *QueryAccountInfoRequest) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -// QueryAccountInfoResponse is the Query/AccountInfo response type. -// -// Since: cosmos-sdk 0.47 -type QueryAccountInfoResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // info is the account info which is represented by BaseAccount. - Info *BaseAccount `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` -} - -func (x *QueryAccountInfoResponse) Reset() { - *x = QueryAccountInfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAccountInfoResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAccountInfoResponse) ProtoMessage() {} - -// Deprecated: Use QueryAccountInfoResponse.ProtoReflect.Descriptor instead. -func (*QueryAccountInfoResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{19} -} - -func (x *QueryAccountInfoResponse) GetInfo() *BaseAccount { - if x != nil { - return x.Info - } - return nil -} - -var File_cosmos_auth_v1beta1_query_proto protoreflect.FileDescriptor - -var file_cosmos_auth_v1beta1_query_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, - 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, - 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 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, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x19, 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, 0x1b, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5e, 0x0a, 0x14, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa0, 0x01, 0x0a, 0x15, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x0c, 0xca, 0xb4, 0x2d, - 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x53, 0x0a, 0x13, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, - 0x00, 0x22, 0x54, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 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, - 0x42, 0x0c, 0xca, 0xb4, 0x2d, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x52, 0x07, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x50, 0x0a, - 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, - 0x1c, 0x0a, 0x1a, 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, 0x22, 0x63, 0x0a, - 0x1b, 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, 0x12, 0x44, 0x0a, 0x08, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x22, 0x35, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x66, 0x0a, 0x20, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, - 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, - 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 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, 0x42, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x22, 0x15, 0x0a, 0x13, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3b, 0x0a, 0x14, 0x42, 0x65, 0x63, 0x68, - 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0x42, 0x0a, 0x1b, 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, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, - 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x45, 0x0a, 0x1c, 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, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x22, 0x44, 0x0a, 0x1b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x25, 0x0a, 0x0e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x43, 0x0a, 0x1c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x30, 0x0a, 0x1e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x64, 0x0a, - 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x41, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 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, 0x42, 0x61, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x04, - 0x69, 0x6e, 0x66, 0x6f, 0x32, 0xfe, 0x0c, 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, - 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, 0xbc, - 0x01, 0x0a, 0x13, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, - 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x38, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, - 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 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, 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, -} - -var ( - file_cosmos_auth_v1beta1_query_proto_rawDescOnce sync.Once - file_cosmos_auth_v1beta1_query_proto_rawDescData = file_cosmos_auth_v1beta1_query_proto_rawDesc -) - -func file_cosmos_auth_v1beta1_query_proto_rawDescGZIP() []byte { - file_cosmos_auth_v1beta1_query_proto_rawDescOnce.Do(func() { - file_cosmos_auth_v1beta1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_auth_v1beta1_query_proto_rawDescData) - }) - return file_cosmos_auth_v1beta1_query_proto_rawDescData -} - -var file_cosmos_auth_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 20) -var file_cosmos_auth_v1beta1_query_proto_goTypes = []interface{}{ - (*QueryAccountsRequest)(nil), // 0: cosmos.auth.v1beta1.QueryAccountsRequest - (*QueryAccountsResponse)(nil), // 1: cosmos.auth.v1beta1.QueryAccountsResponse - (*QueryAccountRequest)(nil), // 2: cosmos.auth.v1beta1.QueryAccountRequest - (*QueryAccountResponse)(nil), // 3: cosmos.auth.v1beta1.QueryAccountResponse - (*QueryParamsRequest)(nil), // 4: cosmos.auth.v1beta1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 5: cosmos.auth.v1beta1.QueryParamsResponse - (*QueryModuleAccountsRequest)(nil), // 6: cosmos.auth.v1beta1.QueryModuleAccountsRequest - (*QueryModuleAccountsResponse)(nil), // 7: cosmos.auth.v1beta1.QueryModuleAccountsResponse - (*QueryModuleAccountByNameRequest)(nil), // 8: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest - (*QueryModuleAccountByNameResponse)(nil), // 9: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse - (*Bech32PrefixRequest)(nil), // 10: cosmos.auth.v1beta1.Bech32PrefixRequest - (*Bech32PrefixResponse)(nil), // 11: cosmos.auth.v1beta1.Bech32PrefixResponse - (*AddressBytesToStringRequest)(nil), // 12: cosmos.auth.v1beta1.AddressBytesToStringRequest - (*AddressBytesToStringResponse)(nil), // 13: cosmos.auth.v1beta1.AddressBytesToStringResponse - (*AddressStringToBytesRequest)(nil), // 14: cosmos.auth.v1beta1.AddressStringToBytesRequest - (*AddressStringToBytesResponse)(nil), // 15: cosmos.auth.v1beta1.AddressStringToBytesResponse - (*QueryAccountAddressByIDRequest)(nil), // 16: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest - (*QueryAccountAddressByIDResponse)(nil), // 17: cosmos.auth.v1beta1.QueryAccountAddressByIDResponse - (*QueryAccountInfoRequest)(nil), // 18: cosmos.auth.v1beta1.QueryAccountInfoRequest - (*QueryAccountInfoResponse)(nil), // 19: cosmos.auth.v1beta1.QueryAccountInfoResponse - (*v1beta1.PageRequest)(nil), // 20: cosmos.base.query.v1beta1.PageRequest - (*anypb.Any)(nil), // 21: google.protobuf.Any - (*v1beta1.PageResponse)(nil), // 22: cosmos.base.query.v1beta1.PageResponse - (*Params)(nil), // 23: cosmos.auth.v1beta1.Params - (*BaseAccount)(nil), // 24: cosmos.auth.v1beta1.BaseAccount -} -var file_cosmos_auth_v1beta1_query_proto_depIdxs = []int32{ - 20, // 0: cosmos.auth.v1beta1.QueryAccountsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 21, // 1: cosmos.auth.v1beta1.QueryAccountsResponse.accounts:type_name -> google.protobuf.Any - 22, // 2: cosmos.auth.v1beta1.QueryAccountsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 21, // 3: cosmos.auth.v1beta1.QueryAccountResponse.account:type_name -> google.protobuf.Any - 23, // 4: cosmos.auth.v1beta1.QueryParamsResponse.params:type_name -> cosmos.auth.v1beta1.Params - 21, // 5: cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts:type_name -> google.protobuf.Any - 21, // 6: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account:type_name -> google.protobuf.Any - 24, // 7: cosmos.auth.v1beta1.QueryAccountInfoResponse.info:type_name -> cosmos.auth.v1beta1.BaseAccount - 0, // 8: cosmos.auth.v1beta1.Query.Accounts:input_type -> cosmos.auth.v1beta1.QueryAccountsRequest - 2, // 9: cosmos.auth.v1beta1.Query.Account:input_type -> cosmos.auth.v1beta1.QueryAccountRequest - 16, // 10: cosmos.auth.v1beta1.Query.AccountAddressByID:input_type -> cosmos.auth.v1beta1.QueryAccountAddressByIDRequest - 4, // 11: cosmos.auth.v1beta1.Query.Params:input_type -> cosmos.auth.v1beta1.QueryParamsRequest - 6, // 12: cosmos.auth.v1beta1.Query.ModuleAccounts:input_type -> cosmos.auth.v1beta1.QueryModuleAccountsRequest - 8, // 13: cosmos.auth.v1beta1.Query.ModuleAccountByName:input_type -> cosmos.auth.v1beta1.QueryModuleAccountByNameRequest - 10, // 14: cosmos.auth.v1beta1.Query.Bech32Prefix:input_type -> cosmos.auth.v1beta1.Bech32PrefixRequest - 12, // 15: cosmos.auth.v1beta1.Query.AddressBytesToString:input_type -> cosmos.auth.v1beta1.AddressBytesToStringRequest - 14, // 16: cosmos.auth.v1beta1.Query.AddressStringToBytes:input_type -> cosmos.auth.v1beta1.AddressStringToBytesRequest - 18, // 17: cosmos.auth.v1beta1.Query.AccountInfo:input_type -> cosmos.auth.v1beta1.QueryAccountInfoRequest - 1, // 18: cosmos.auth.v1beta1.Query.Accounts:output_type -> cosmos.auth.v1beta1.QueryAccountsResponse - 3, // 19: cosmos.auth.v1beta1.Query.Account:output_type -> cosmos.auth.v1beta1.QueryAccountResponse - 17, // 20: cosmos.auth.v1beta1.Query.AccountAddressByID:output_type -> cosmos.auth.v1beta1.QueryAccountAddressByIDResponse - 5, // 21: cosmos.auth.v1beta1.Query.Params:output_type -> cosmos.auth.v1beta1.QueryParamsResponse - 7, // 22: cosmos.auth.v1beta1.Query.ModuleAccounts:output_type -> cosmos.auth.v1beta1.QueryModuleAccountsResponse - 9, // 23: cosmos.auth.v1beta1.Query.ModuleAccountByName:output_type -> cosmos.auth.v1beta1.QueryModuleAccountByNameResponse - 11, // 24: cosmos.auth.v1beta1.Query.Bech32Prefix:output_type -> cosmos.auth.v1beta1.Bech32PrefixResponse - 13, // 25: cosmos.auth.v1beta1.Query.AddressBytesToString:output_type -> cosmos.auth.v1beta1.AddressBytesToStringResponse - 15, // 26: cosmos.auth.v1beta1.Query.AddressStringToBytes:output_type -> cosmos.auth.v1beta1.AddressStringToBytesResponse - 19, // 27: cosmos.auth.v1beta1.Query.AccountInfo:output_type -> cosmos.auth.v1beta1.QueryAccountInfoResponse - 18, // [18:28] is the sub-list for method output_type - 8, // [8:18] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name -} - -func init() { file_cosmos_auth_v1beta1_query_proto_init() } -func file_cosmos_auth_v1beta1_query_proto_init() { - if File_cosmos_auth_v1beta1_query_proto != nil { - return - } - file_cosmos_auth_v1beta1_auth_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_auth_v1beta1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAccountsRequest); 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[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAccountsResponse); 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[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAccountRequest); 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[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAccountResponse); 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[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsRequest); 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[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsResponse); 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[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryModuleAccountsRequest); 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[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryModuleAccountsResponse); 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[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryModuleAccountByNameRequest); 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[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryModuleAccountByNameResponse); 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[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Bech32PrefixRequest); 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[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Bech32PrefixResponse); 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[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddressBytesToStringRequest); 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[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddressBytesToStringResponse); 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[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddressStringToBytesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_auth_v1beta1_query_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddressStringToBytesResponse); 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[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAccountAddressByIDRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_auth_v1beta1_query_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAccountAddressByIDResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_auth_v1beta1_query_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAccountInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_auth_v1beta1_query_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAccountInfoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_auth_v1beta1_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 20, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_auth_v1beta1_query_proto_goTypes, - DependencyIndexes: file_cosmos_auth_v1beta1_query_proto_depIdxs, - MessageInfos: file_cosmos_auth_v1beta1_query_proto_msgTypes, - }.Build() - File_cosmos_auth_v1beta1_query_proto = out.File - file_cosmos_auth_v1beta1_query_proto_rawDesc = nil - file_cosmos_auth_v1beta1_query_proto_goTypes = nil - file_cosmos_auth_v1beta1_query_proto_depIdxs = nil -} diff --git a/api/cosmos/auth/v1beta1/query_grpc.pb.go b/api/cosmos/auth/v1beta1/query_grpc.pb.go deleted file mode 100644 index 1755c334de47..000000000000 --- a/api/cosmos/auth/v1beta1/query_grpc.pb.go +++ /dev/null @@ -1,483 +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/v1beta1/query.proto - -package authv1beta1 - -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 { - // Accounts returns all the existing accounts. - // - // When called from another module, this query might consume a high amount of - // gas if the pagination field is incorrectly set. - // - // Since: cosmos-sdk 0.43 - Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) - // Account returns account details based on address. - Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*QueryAccountResponse, error) - // AccountAddressByID returns account address based on account number. - // - // Since: cosmos-sdk 0.46.2 - AccountAddressByID(ctx context.Context, in *QueryAccountAddressByIDRequest, opts ...grpc.CallOption) (*QueryAccountAddressByIDResponse, error) - // Params queries all parameters. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // ModuleAccounts returns all the existing module accounts. - // - // Since: cosmos-sdk 0.46 - ModuleAccounts(ctx context.Context, in *QueryModuleAccountsRequest, opts ...grpc.CallOption) (*QueryModuleAccountsResponse, error) - // ModuleAccountByName returns the module account info by module name - ModuleAccountByName(ctx context.Context, in *QueryModuleAccountByNameRequest, opts ...grpc.CallOption) (*QueryModuleAccountByNameResponse, error) - // Bech32Prefix queries bech32Prefix - // - // Since: cosmos-sdk 0.46 - Bech32Prefix(ctx context.Context, in *Bech32PrefixRequest, opts ...grpc.CallOption) (*Bech32PrefixResponse, error) - // AddressBytesToString converts Account Address bytes to string - // - // Since: cosmos-sdk 0.46 - AddressBytesToString(ctx context.Context, in *AddressBytesToStringRequest, opts ...grpc.CallOption) (*AddressBytesToStringResponse, error) - // AddressStringToBytes converts Address string to bytes - // - // 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 { - cc grpc.ClientConnInterface -} - -func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) { - out := new(QueryAccountsResponse) - err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/Accounts", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*QueryAccountResponse, error) { - out := new(QueryAccountResponse) - err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/Account", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) AccountAddressByID(ctx context.Context, in *QueryAccountAddressByIDRequest, opts ...grpc.CallOption) (*QueryAccountAddressByIDResponse, error) { - out := new(QueryAccountAddressByIDResponse) - err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/AccountAddressByID", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/Params", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ModuleAccounts(ctx context.Context, in *QueryModuleAccountsRequest, opts ...grpc.CallOption) (*QueryModuleAccountsResponse, error) { - out := new(QueryModuleAccountsResponse) - err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/ModuleAccounts", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ModuleAccountByName(ctx context.Context, in *QueryModuleAccountByNameRequest, opts ...grpc.CallOption) (*QueryModuleAccountByNameResponse, error) { - out := new(QueryModuleAccountByNameResponse) - err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/ModuleAccountByName", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Bech32Prefix(ctx context.Context, in *Bech32PrefixRequest, opts ...grpc.CallOption) (*Bech32PrefixResponse, error) { - out := new(Bech32PrefixResponse) - err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/Bech32Prefix", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) AddressBytesToString(ctx context.Context, in *AddressBytesToStringRequest, opts ...grpc.CallOption) (*AddressBytesToStringResponse, error) { - out := new(AddressBytesToStringResponse) - err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/AddressBytesToString", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) AddressStringToBytes(ctx context.Context, in *AddressStringToBytesRequest, opts ...grpc.CallOption) (*AddressStringToBytesResponse, error) { - out := new(AddressStringToBytesResponse) - err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/AddressStringToBytes", in, out, opts...) - if err != nil { - return nil, err - } - 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 -type QueryServer interface { - // Accounts returns all the existing accounts. - // - // When called from another module, this query might consume a high amount of - // gas if the pagination field is incorrectly set. - // - // Since: cosmos-sdk 0.43 - Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error) - // Account returns account details based on address. - Account(context.Context, *QueryAccountRequest) (*QueryAccountResponse, error) - // AccountAddressByID returns account address based on account number. - // - // Since: cosmos-sdk 0.46.2 - AccountAddressByID(context.Context, *QueryAccountAddressByIDRequest) (*QueryAccountAddressByIDResponse, error) - // Params queries all parameters. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // ModuleAccounts returns all the existing module accounts. - // - // Since: cosmos-sdk 0.46 - ModuleAccounts(context.Context, *QueryModuleAccountsRequest) (*QueryModuleAccountsResponse, error) - // ModuleAccountByName returns the module account info by module name - ModuleAccountByName(context.Context, *QueryModuleAccountByNameRequest) (*QueryModuleAccountByNameResponse, error) - // Bech32Prefix queries bech32Prefix - // - // Since: cosmos-sdk 0.46 - Bech32Prefix(context.Context, *Bech32PrefixRequest) (*Bech32PrefixResponse, error) - // AddressBytesToString converts Account Address bytes to string - // - // Since: cosmos-sdk 0.46 - AddressBytesToString(context.Context, *AddressBytesToStringRequest) (*AddressBytesToStringResponse, error) - // AddressStringToBytes converts Address string to bytes - // - // 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() -} - -// UnimplementedQueryServer must be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (UnimplementedQueryServer) Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Accounts not implemented") -} -func (UnimplementedQueryServer) Account(context.Context, *QueryAccountRequest) (*QueryAccountResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Account not implemented") -} -func (UnimplementedQueryServer) AccountAddressByID(context.Context, *QueryAccountAddressByIDRequest) (*QueryAccountAddressByIDResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AccountAddressByID not implemented") -} -func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} -func (UnimplementedQueryServer) ModuleAccounts(context.Context, *QueryModuleAccountsRequest) (*QueryModuleAccountsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ModuleAccounts not implemented") -} -func (UnimplementedQueryServer) ModuleAccountByName(context.Context, *QueryModuleAccountByNameRequest) (*QueryModuleAccountByNameResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ModuleAccountByName not implemented") -} -func (UnimplementedQueryServer) Bech32Prefix(context.Context, *Bech32PrefixRequest) (*Bech32PrefixResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Bech32Prefix not implemented") -} -func (UnimplementedQueryServer) AddressBytesToString(context.Context, *AddressBytesToStringRequest) (*AddressBytesToStringResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddressBytesToString not implemented") -} -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. -// 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_Accounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAccountsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Accounts(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.auth.v1beta1.Query/Accounts", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Accounts(ctx, req.(*QueryAccountsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Account_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Account(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.auth.v1beta1.Query/Account", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Account(ctx, req.(*QueryAccountRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_AccountAddressByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAccountAddressByIDRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).AccountAddressByID(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.auth.v1beta1.Query/AccountAddressByID", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AccountAddressByID(ctx, req.(*QueryAccountAddressByIDRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.auth.v1beta1.Query/Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ModuleAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryModuleAccountsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ModuleAccounts(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.auth.v1beta1.Query/ModuleAccounts", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ModuleAccounts(ctx, req.(*QueryModuleAccountsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ModuleAccountByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryModuleAccountByNameRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ModuleAccountByName(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.auth.v1beta1.Query/ModuleAccountByName", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ModuleAccountByName(ctx, req.(*QueryModuleAccountByNameRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Bech32Prefix_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Bech32PrefixRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Bech32Prefix(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.auth.v1beta1.Query/Bech32Prefix", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Bech32Prefix(ctx, req.(*Bech32PrefixRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_AddressBytesToString_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddressBytesToStringRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).AddressBytesToString(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.auth.v1beta1.Query/AddressBytesToString", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AddressBytesToString(ctx, req.(*AddressBytesToStringRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_AddressStringToBytes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddressStringToBytesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).AddressStringToBytes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.auth.v1beta1.Query/AddressStringToBytes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AddressStringToBytes(ctx, req.(*AddressStringToBytesRequest)) - } - 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) -var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.auth.v1beta1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Accounts", - Handler: _Query_Accounts_Handler, - }, - { - MethodName: "Account", - Handler: _Query_Account_Handler, - }, - { - MethodName: "AccountAddressByID", - Handler: _Query_AccountAddressByID_Handler, - }, - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - { - MethodName: "ModuleAccounts", - Handler: _Query_ModuleAccounts_Handler, - }, - { - MethodName: "ModuleAccountByName", - Handler: _Query_ModuleAccountByName_Handler, - }, - { - MethodName: "Bech32Prefix", - Handler: _Query_Bech32Prefix_Handler, - }, - { - MethodName: "AddressBytesToString", - Handler: _Query_AddressBytesToString_Handler, - }, - { - MethodName: "AddressStringToBytes", - Handler: _Query_AddressStringToBytes_Handler, - }, - { - MethodName: "AccountInfo", - Handler: _Query_AccountInfo_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/auth/v1beta1/query.proto", -} From 3155871a362a1862c5079d47940e147fe970c66c Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Mon, 24 Oct 2022 14:01:52 +0200 Subject: [PATCH 3/3] fix conflicts --- docs/core/proto-docs.md | 33 + proto/cosmos/auth/v1beta1/query.proto | 141 +- tests/e2e/auth/suite.go | 2040 ---------------- x/auth/client/cli/query.go | 35 +- x/auth/client/testutil/suite.go | 48 + x/auth/keeper/grpc_query.go | 119 - x/auth/keeper/grpc_query_test.go | 213 +- x/auth/types/query.pb.go | 3159 +++---------------------- x/auth/types/query.pb.gw.go | 451 ---- 9 files changed, 471 insertions(+), 5768 deletions(-) delete mode 100644 tests/e2e/auth/suite.go diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index a25269b0c3a8..808904049f2f 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -21,6 +21,8 @@ - [QueryAccountResponse](#cosmos.auth.v1beta1.QueryAccountResponse) - [QueryAccountsRequest](#cosmos.auth.v1beta1.QueryAccountsRequest) - [QueryAccountsResponse](#cosmos.auth.v1beta1.QueryAccountsResponse) + - [QueryModuleAccountByNameRequest](#cosmos.auth.v1beta1.QueryModuleAccountByNameRequest) + - [QueryModuleAccountByNameResponse](#cosmos.auth.v1beta1.QueryModuleAccountByNameResponse) - [QueryParamsRequest](#cosmos.auth.v1beta1.QueryParamsRequest) - [QueryParamsResponse](#cosmos.auth.v1beta1.QueryParamsResponse) @@ -846,6 +848,36 @@ Since: cosmos-sdk 0.43 + + +### QueryModuleAccountByNameRequest +QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `name` | [string](#string) | | | + + + + + + + + +### QueryModuleAccountByNameResponse +QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `account` | [google.protobuf.Any](#google.protobuf.Any) | | | + + + + + + ### QueryParamsRequest @@ -889,6 +921,7 @@ Query defines the gRPC querier service. Since: cosmos-sdk 0.43 | GET|/cosmos/auth/v1beta1/accounts| | `Account` | [QueryAccountRequest](#cosmos.auth.v1beta1.QueryAccountRequest) | [QueryAccountResponse](#cosmos.auth.v1beta1.QueryAccountResponse) | Account returns account details based on address. | GET|/cosmos/auth/v1beta1/accounts/{address}| | `Params` | [QueryParamsRequest](#cosmos.auth.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cosmos.auth.v1beta1.QueryParamsResponse) | Params queries all parameters. | GET|/cosmos/auth/v1beta1/params| +| `ModuleAccountByName` | [QueryModuleAccountByNameRequest](#cosmos.auth.v1beta1.QueryModuleAccountByNameRequest) | [QueryModuleAccountByNameResponse](#cosmos.auth.v1beta1.QueryModuleAccountByNameResponse) | ModuleAccountByName returns the module account info by module name | GET|/cosmos/auth/v1beta1/module_accounts/{name}| diff --git a/proto/cosmos/auth/v1beta1/query.proto b/proto/cosmos/auth/v1beta1/query.proto index 3663dfe1f52d..79799a4b71aa 100644 --- a/proto/cosmos/auth/v1beta1/query.proto +++ b/proto/cosmos/auth/v1beta1/query.proto @@ -28,56 +28,11 @@ service Query { rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/cosmos/auth/v1beta1/params"; } -<<<<<<< HEAD -======= - - // ModuleAccounts returns all the existing module accounts. - // - // Since: cosmos-sdk 0.46 - rpc ModuleAccounts(QueryModuleAccountsRequest) returns (QueryModuleAccountsResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/auth/v1beta1/module_accounts"; - } // ModuleAccountByName returns the module account info by module name rpc ModuleAccountByName(QueryModuleAccountByNameRequest) returns (QueryModuleAccountByNameResponse) { - option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/cosmos/auth/v1beta1/module_accounts/{name}"; } - - // Bech32Prefix queries bech32Prefix - // - // Since: cosmos-sdk 0.46 - rpc Bech32Prefix(Bech32PrefixRequest) returns (Bech32PrefixResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/auth/v1beta1/bech32"; - } - - // AddressBytesToString converts Account Address bytes to string - // - // Since: cosmos-sdk 0.46 - rpc AddressBytesToString(AddressBytesToStringRequest) returns (AddressBytesToStringResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/auth/v1beta1/bech32/{address_bytes}"; - } - - // AddressStringToBytes converts Address string to bytes - // - // Since: cosmos-sdk 0.46 - rpc AddressStringToBytes(AddressStringToBytesRequest) returns (AddressStringToBytesResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/auth/v1beta1/bech32/{address_string}"; - } - - - // AccountInfo queries account info which is common to all account types. - // - // Since: cosmos-sdk 0.47 - rpc AccountInfo(QueryAccountInfoRequest) returns (QueryAccountInfoResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/auth/v1beta1/account_info/{address}"; - } ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) } // QueryAccountsRequest is the request type for the Query/Accounts RPC method. @@ -105,11 +60,7 @@ message QueryAccountRequest { option (gogoproto.goproto_getters) = false; // address defines the address to query for. -<<<<<<< HEAD string address = 1; -======= - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) } // QueryAccountResponse is the response type for the Query/Account RPC method. @@ -125,20 +76,6 @@ message QueryParamsRequest {} message QueryParamsResponse { // params defines the parameters of the module. Params params = 1 [(gogoproto.nullable) = false]; -<<<<<<< HEAD -======= -} - -// QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. -// -// Since: cosmos-sdk 0.46 -message QueryModuleAccountsRequest {} - -// QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. -// -// Since: cosmos-sdk 0.46 -message QueryModuleAccountsResponse { - repeated google.protobuf.Any accounts = 1 [(cosmos_proto.accepts_interface) = "ModuleAccountI"]; } // QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. @@ -149,80 +86,4 @@ message QueryModuleAccountByNameRequest { // QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. message QueryModuleAccountByNameResponse { google.protobuf.Any account = 1 [(cosmos_proto.accepts_interface) = "ModuleAccountI"]; -} - -// Bech32PrefixRequest is the request type for Bech32Prefix rpc method. -// -// Since: cosmos-sdk 0.46 -message Bech32PrefixRequest {} - -// Bech32PrefixResponse is the response type for Bech32Prefix rpc method. -// -// Since: cosmos-sdk 0.46 -message Bech32PrefixResponse { - string bech32_prefix = 1; -} - -// AddressBytesToStringRequest is the request type for AddressString rpc method. -// -// Since: cosmos-sdk 0.46 -message AddressBytesToStringRequest { - bytes address_bytes = 1; -} - -// AddressBytesToStringResponse is the response type for AddressString rpc method. -// -// Since: cosmos-sdk 0.46 -message AddressBytesToStringResponse { - string address_string = 1; -} - -// AddressStringToBytesRequest is the request type for AccountBytes rpc method. -// -// Since: cosmos-sdk 0.46 -message AddressStringToBytesRequest { - string address_string = 1; -} - -// AddressStringToBytesResponse is the response type for AddressBytes rpc method. -// -// Since: cosmos-sdk 0.46 -message AddressStringToBytesResponse { - bytes address_bytes = 1; -} - -// QueryAccountAddressByIDRequest is the request type for AccountAddressByID rpc method -// -// Since: cosmos-sdk 0.46.2 -message QueryAccountAddressByIDRequest { - // id is the account number of the address to be queried. This field - // should have been an uint64 (like all account numbers), and will be - // updated to uint64 in a future version of the auth query. - int64 id = 1; -} - -// QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method -// -// Since: cosmos-sdk 0.46.2 -message QueryAccountAddressByIDResponse { - string account_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryAccountInfoRequest is the Query/AccountInfo request type. -// -// Since: cosmos-sdk 0.47 -message QueryAccountInfoRequest { - - // address is the account address string. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryAccountInfoResponse is the Query/AccountInfo response type. -// -// Since: cosmos-sdk 0.47 -message QueryAccountInfoResponse { - - // info is the account info which is represented by BaseAccount. - BaseAccount info = 1; ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) -} +} \ No newline at end of file diff --git a/tests/e2e/auth/suite.go b/tests/e2e/auth/suite.go deleted file mode 100644 index 3e993901e29c..000000000000 --- a/tests/e2e/auth/suite.go +++ /dev/null @@ -1,2040 +0,0 @@ -package auth - -import ( - "context" - "encoding/base64" - "encoding/json" - "fmt" - "os" - "path/filepath" - "strings" - "testing" - - "github.com/stretchr/testify/require" - "github.com/stretchr/testify/suite" - tmcli "github.com/tendermint/tendermint/libs/cli" - - "cosmossdk.io/depinject" - "cosmossdk.io/math" - - authtestutil "github.com/cosmos/cosmos-sdk/x/auth/testutil" - "github.com/cosmos/cosmos-sdk/x/auth/types" - - "github.com/cosmos/cosmos-sdk/client" - - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/crypto/hd" - "github.com/cosmos/cosmos-sdk/crypto/keyring" - kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - "github.com/cosmos/cosmos-sdk/testutil" - clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - "github.com/cosmos/cosmos-sdk/testutil/network" - "github.com/cosmos/cosmos-sdk/testutil/testdata" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - authcli "github.com/cosmos/cosmos-sdk/x/auth/client/cli" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - bank "github.com/cosmos/cosmos-sdk/x/bank/client/cli" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" - govtestutil "github.com/cosmos/cosmos-sdk/x/gov/client/testutil" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" -) - -type IntegrationTestSuite struct { - suite.Suite - - cfg network.Config - network *network.Network -} - -func NewIntegrationTestSuite(cfg network.Config) *IntegrationTestSuite { - return &IntegrationTestSuite{cfg: cfg} -} - -func (s *IntegrationTestSuite) SetupSuite() { - s.T().Log("setting up integration test suite") - - var err error - s.network, err = network.New(s.T(), s.T().TempDir(), s.cfg) - s.Require().NoError(err) - - kb := s.network.Validators[0].ClientCtx.Keyring - _, _, err = kb.NewMnemonic("newAccount", keyring.English, sdk.FullFundraiserPath, keyring.DefaultBIP39Passphrase, hd.Secp256k1) - s.Require().NoError(err) - - account1, _, err := kb.NewMnemonic("newAccount1", keyring.English, sdk.FullFundraiserPath, keyring.DefaultBIP39Passphrase, hd.Secp256k1) - s.Require().NoError(err) - - account2, _, err := kb.NewMnemonic("newAccount2", keyring.English, sdk.FullFundraiserPath, keyring.DefaultBIP39Passphrase, hd.Secp256k1) - s.Require().NoError(err) - pub1, err := account1.GetPubKey() - s.Require().NoError(err) - pub2, err := account2.GetPubKey() - s.Require().NoError(err) - - // Create a dummy account for testing purpose - _, _, err = kb.NewMnemonic("dummyAccount", keyring.English, sdk.FullFundraiserPath, keyring.DefaultBIP39Passphrase, hd.Secp256k1) - s.Require().NoError(err) - - multi := kmultisig.NewLegacyAminoPubKey(2, []cryptotypes.PubKey{pub1, pub2}) - _, err = kb.SaveMultisig("multi", multi) - s.Require().NoError(err) - s.Require().NoError(s.network.WaitForNextBlock()) -} - -func (s *IntegrationTestSuite) TearDownSuite() { - s.T().Log("tearing down integration test suite") - s.network.Cleanup() -} - -func (s *IntegrationTestSuite) TestCLIValidateSignatures() { - val := s.network.Validators[0] - sendTokens := sdk.NewCoins( - sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10)), - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))) - - res, err := s.createBankMsg(val, val.Address, sendTokens, - fmt.Sprintf("--%s=true", flags.FlagGenerateOnly)) - s.Require().NoError(err) - - // write unsigned tx to file - unsignedTx := testutil.WriteToNewTempFile(s.T(), res.String()) - defer unsignedTx.Close() - res, err = TxSignExec(val.ClientCtx, val.Address, unsignedTx.Name()) - s.Require().NoError(err) - signedTx, err := val.ClientCtx.TxConfig.TxJSONDecoder()(res.Bytes()) - s.Require().NoError(err) - - signedTxFile := testutil.WriteToNewTempFile(s.T(), res.String()) - defer signedTxFile.Close() - txBuilder, err := val.ClientCtx.TxConfig.WrapTxBuilder(signedTx) - s.Require().NoError(err) - _, err = TxValidateSignaturesExec(val.ClientCtx, signedTxFile.Name()) - s.Require().NoError(err) - - txBuilder.SetMemo("MODIFIED TX") - bz, err := val.ClientCtx.TxConfig.TxJSONEncoder()(txBuilder.GetTx()) - s.Require().NoError(err) - - modifiedTxFile := testutil.WriteToNewTempFile(s.T(), string(bz)) - defer modifiedTxFile.Close() - - _, err = TxValidateSignaturesExec(val.ClientCtx, modifiedTxFile.Name()) - s.Require().EqualError(err, "signatures validation failed") -} - -func (s *IntegrationTestSuite) TestCLISignGenOnly() { - val := s.network.Validators[0] - val2 := s.network.Validators[1] - - k, err := val.ClientCtx.Keyring.KeyByAddress(val.Address) - s.Require().NoError(err) - keyName := k.Name - - addr, err := k.GetAddress() - s.Require().NoError(err) - - account, err := val.ClientCtx.AccountRetriever.GetAccount(val.ClientCtx, addr) - s.Require().NoError(err) - - sendTokens := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))) - args := []string{ - keyName, // from keyname - val2.Address.String(), - sendTokens.String(), - fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), // shouldn't break if we use keyname with --generate-only flag - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - } - generatedStd, err := clitestutil.ExecTestCLICmd(val.ClientCtx, bank.NewSendTxCmd(), args) - s.Require().NoError(err) - opFile := testutil.WriteToNewTempFile(s.T(), generatedStd.String()) - defer opFile.Close() - - commonArgs := []string{ - fmt.Sprintf("--%s=%s", flags.FlagKeyringBackend, keyring.BackendTest), - fmt.Sprintf("--%s=%s", flags.FlagHome, strings.Replace(val.ClientCtx.HomeDir, "simd", "simcli", 1)), - fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), - } - - cases := []struct { - name string - args []string - expErr bool - errMsg string - }{ - { - "offline mode with account-number, sequence and keyname (valid)", - []string{ - opFile.Name(), - fmt.Sprintf("--%s=true", flags.FlagOffline), - fmt.Sprintf("--%s=%s", flags.FlagFrom, keyName), - fmt.Sprintf("--%s=%d", flags.FlagAccountNumber, account.GetAccountNumber()), - fmt.Sprintf("--%s=%d", flags.FlagSequence, account.GetSequence()), - }, - false, - "", - }, - { - "offline mode with account-number, sequence and address key (valid)", - []string{ - opFile.Name(), - fmt.Sprintf("--%s=true", flags.FlagOffline), - fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), - fmt.Sprintf("--%s=%d", flags.FlagAccountNumber, account.GetAccountNumber()), - fmt.Sprintf("--%s=%d", flags.FlagSequence, account.GetSequence()), - }, - false, - "", - }, - { - "offline mode without account-number and keyname (invalid)", - []string{ - opFile.Name(), - fmt.Sprintf("--%s=true", flags.FlagOffline), - fmt.Sprintf("--%s=%s", flags.FlagFrom, keyName), - fmt.Sprintf("--%s=%d", flags.FlagSequence, account.GetSequence()), - }, - true, - `required flag(s) "account-number" not set`, - }, - { - "offline mode without sequence and keyname (invalid)", - []string{ - opFile.Name(), - fmt.Sprintf("--%s=true", flags.FlagOffline), - fmt.Sprintf("--%s=%s", flags.FlagFrom, keyName), - fmt.Sprintf("--%s=%d", flags.FlagAccountNumber, account.GetAccountNumber()), - }, - true, - `required flag(s) "sequence" not set`, - }, - { - "offline mode without account-number, sequence and keyname (invalid)", - []string{ - opFile.Name(), - fmt.Sprintf("--%s=%s", flags.FlagFrom, keyName), - fmt.Sprintf("--%s=true", flags.FlagOffline), - }, - true, - `required flag(s) "account-number", "sequence" not set`, - }, - } - - for _, tc := range cases { - cmd := authcli.GetSignCommand() - tmcli.PrepareBaseCmd(cmd, "", "") - out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, append(tc.args, commonArgs...)) - if tc.expErr { - s.Require().Error(err) - s.Require().Contains(err.Error(), tc.errMsg) - } else { - s.Require().NoError(err) - func() { - signedTx := testutil.WriteToNewTempFile(s.T(), out.String()) - defer signedTx.Close() - _, err := TxBroadcastExec(val.ClientCtx, signedTx.Name()) - s.Require().NoError(err) - }() - } - } -} - -func (s *IntegrationTestSuite) TestCLISignBatch() { - val := s.network.Validators[0] - sendTokens := sdk.NewCoins( - sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10)), - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)), - ) - - generatedStd, err := s.createBankMsg(val, val.Address, - sendTokens, fmt.Sprintf("--%s=true", flags.FlagGenerateOnly)) - s.Require().NoError(err) - - outputFile := testutil.WriteToNewTempFile(s.T(), strings.Repeat(generatedStd.String(), 3)) - defer outputFile.Close() - val.ClientCtx.HomeDir = strings.Replace(val.ClientCtx.HomeDir, "simd", "simcli", 1) - - // sign-batch file - offline is set but account-number and sequence are not - _, err = TxSignBatchExec(val.ClientCtx, val.Address, outputFile.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), "--offline") - s.Require().EqualError(err, "required flag(s) \"account-number\", \"sequence\" not set") - - // sign-batch file - offline and sequence is set but account-number is not set - _, err = TxSignBatchExec(val.ClientCtx, val.Address, outputFile.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), fmt.Sprintf("--%s=%s", flags.FlagSequence, "1"), "--offline") - s.Require().EqualError(err, "required flag(s) \"account-number\" not set") - - // sign-batch file - offline and account-number is set but sequence is not set - _, err = TxSignBatchExec(val.ClientCtx, val.Address, outputFile.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), fmt.Sprintf("--%s=%s", flags.FlagAccountNumber, "1"), "--offline") - s.Require().EqualError(err, "required flag(s) \"sequence\" not set") - - // sign-batch file - sequence and account-number are set when offline is false - res, err := TxSignBatchExec(val.ClientCtx, val.Address, outputFile.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), fmt.Sprintf("--%s=%s", flags.FlagSequence, "1"), fmt.Sprintf("--%s=%s", flags.FlagAccountNumber, "1")) - s.Require().NoError(err) - s.Require().Equal(3, len(strings.Split(strings.Trim(res.String(), "\n"), "\n"))) - - // sign-batch file - res, err = TxSignBatchExec(val.ClientCtx, val.Address, outputFile.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID)) - s.Require().NoError(err) - s.Require().Equal(3, len(strings.Split(strings.Trim(res.String(), "\n"), "\n"))) - - // sign-batch file signature only - res, err = TxSignBatchExec(val.ClientCtx, val.Address, outputFile.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), "--signature-only") - s.Require().NoError(err) - s.Require().Equal(3, len(strings.Split(strings.Trim(res.String(), "\n"), "\n"))) - - // Sign batch malformed tx file. - malformedFile := testutil.WriteToNewTempFile(s.T(), fmt.Sprintf("%smalformed", generatedStd)) - defer malformedFile.Close() - _, err = TxSignBatchExec(val.ClientCtx, val.Address, malformedFile.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID)) - s.Require().Error(err) - - // Sign batch malformed tx file signature only. - _, err = TxSignBatchExec(val.ClientCtx, val.Address, malformedFile.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), "--signature-only") - s.Require().Error(err) - - // make a txn to increase the sequence of sender - _, seq, err := val.ClientCtx.AccountRetriever.GetAccountNumberSequence(val.ClientCtx, val.Address) - s.Require().NoError(err) - - account1, err := val.ClientCtx.Keyring.Key("newAccount1") - s.Require().NoError(err) - - addr, err := account1.GetAddress() - s.Require().NoError(err) - - // Send coins from validator to multisig. - _, err = s.createBankMsg( - val, - addr, - sdk.NewCoins(sdk.NewInt64Coin(s.cfg.BondDenom, 1000)), - ) - s.Require().NoError(err) - s.Require().NoError(s.network.WaitForNextBlock()) - - // fetch the sequence after a tx, should be incremented. - _, seq1, err := val.ClientCtx.AccountRetriever.GetAccountNumberSequence(val.ClientCtx, val.Address) - s.Require().NoError(err) - s.Require().Equal(seq+1, seq1) - - // signing sign-batch should start from the last sequence. - signed, err := TxSignBatchExec(val.ClientCtx, val.Address, outputFile.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), "--signature-only") - s.Require().NoError(err) - signedTxs := strings.Split(strings.Trim(signed.String(), "\n"), "\n") - s.Require().GreaterOrEqual(len(signedTxs), 1) - - sigs, err := s.cfg.TxConfig.UnmarshalSignatureJSON([]byte(signedTxs[0])) - s.Require().NoError(err) - s.Require().Equal(sigs[0].Sequence, seq1) -} - -func (s *IntegrationTestSuite) TestCliGetAccountAddressByID() { - require := s.Require() - val1 := s.network.Validators[0] - testCases := []struct { - name string - args []string - expectErr bool - }{ - { - "not enough args", - []string{fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - true, - }, - { - "invalid account id", - []string{fmt.Sprint(-1), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - true, - }, - { - "valid account id", - []string{fmt.Sprint(0), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - false, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := authcli.GetAccountAddressByIDCmd() - clientCtx := val1.ClientCtx - - queryResJSON, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - var res authtypes.QueryAccountAddressByIDResponse - require.NoError(val1.ClientCtx.Codec.UnmarshalJSON(queryResJSON.Bytes(), &res)) - require.NotNil(res.GetAccountAddress()) - } - }) - } -} - -func (s *IntegrationTestSuite) TestCLISignAminoJSON() { - require := s.Require() - val1 := s.network.Validators[0] - txCfg := val1.ClientCtx.TxConfig - sendTokens := sdk.NewCoins( - sdk.NewCoin(fmt.Sprintf("%stoken", val1.Moniker), sdk.NewInt(10)), - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)), - ) - txBz, err := s.createBankMsg(val1, val1.Address, - sendTokens, fmt.Sprintf("--%s=true", flags.FlagGenerateOnly)) - require.NoError(err) - fileUnsigned := testutil.WriteToNewTempFile(s.T(), txBz.String()) - defer fileUnsigned.Close() - chainFlag := fmt.Sprintf("--%s=%s", flags.FlagChainID, val1.ClientCtx.ChainID) - sigOnlyFlag := "--signature-only" - signModeAminoFlag := "--sign-mode=amino-json" - - // SIC! validators have same key names and same addresses as those registered in the keyring, - // BUT the keys are different! - valRecord, err := val1.ClientCtx.Keyring.Key(val1.Moniker) - require.NoError(err) - - // query account info - queryResJSON, err := QueryAccountExec(val1.ClientCtx, val1.Address) - require.NoError(err) - var account authtypes.AccountI - require.NoError(val1.ClientCtx.Codec.UnmarshalInterfaceJSON(queryResJSON.Bytes(), &account)) - - /**** test signature-only ****/ - res, err := TxSignExec(val1.ClientCtx, val1.Address, fileUnsigned.Name(), chainFlag, - sigOnlyFlag, signModeAminoFlag) - require.NoError(err) - pub, err := valRecord.GetPubKey() - require.NoError(err) - checkSignatures(require, txCfg, res.Bytes(), pub) - sigs, err := txCfg.UnmarshalSignatureJSON(res.Bytes()) - require.NoError(err) - require.Equal(1, len(sigs)) - require.Equal(account.GetSequence(), sigs[0].Sequence) - - /**** test full output ****/ - res, err = TxSignExec(val1.ClientCtx, val1.Address, fileUnsigned.Name(), chainFlag, signModeAminoFlag) - require.NoError(err) - - // txCfg.UnmarshalSignatureJSON can't unmarshal a fragment of the signature, so we create this structure. - type txFragment struct { - Signatures []json.RawMessage - } - var txOut txFragment - err = json.Unmarshal(res.Bytes(), &txOut) - require.NoError(err) - require.Len(txOut.Signatures, 1) - - /**** test file output ****/ - filenameSigned := filepath.Join(s.T().TempDir(), "test_sign_out.json") - fileFlag := fmt.Sprintf("--%s=%s", flags.FlagOutputDocument, filenameSigned) - _, err = TxSignExec(val1.ClientCtx, val1.Address, fileUnsigned.Name(), chainFlag, fileFlag, signModeAminoFlag) - require.NoError(err) - fContent, err := os.ReadFile(filenameSigned) - require.NoError(err) - require.Equal(res.String(), string(fContent)) - - /**** try to append to the previously signed transaction ****/ - res, err = TxSignExec(val1.ClientCtx, val1.Address, filenameSigned, chainFlag, - sigOnlyFlag, signModeAminoFlag) - require.NoError(err) - checkSignatures(require, txCfg, res.Bytes(), pub, pub) - - /**** try to overwrite the previously signed transaction ****/ - - // We can't sign with other address, because the bank send message supports only one signer for a simple - // account. Changing the file is too much hacking, because TxDecoder returns sdk.Tx, which doesn't - // provide functionality to check / manage `auth_info`. - // Cases with different keys are are covered in unit tests of `tx.Sign`. - res, err = TxSignExec(val1.ClientCtx, val1.Address, filenameSigned, chainFlag, - sigOnlyFlag, "--overwrite", signModeAminoFlag) - require.NoError(err) - checkSignatures(require, txCfg, res.Bytes(), pub) - - /**** test flagAmino ****/ - res, err = TxSignExec(val1.ClientCtx, val1.Address, filenameSigned, chainFlag, - "--amino=true", signModeAminoFlag) - require.NoError(err) - - var txAmino authcli.BroadcastReq - err = val1.ClientCtx.LegacyAmino.UnmarshalJSON(res.Bytes(), &txAmino) - require.NoError(err) - require.Len(txAmino.Tx.Signatures, 2) - require.Equal(txAmino.Tx.Signatures[0].PubKey, pub) - require.Equal(txAmino.Tx.Signatures[1].PubKey, pub) -} - -func checkSignatures(require *require.Assertions, txCfg client.TxConfig, output []byte, pks ...cryptotypes.PubKey) { - sigs, err := txCfg.UnmarshalSignatureJSON(output) - require.NoError(err, string(output)) - require.Len(sigs, len(pks)) - for i := range pks { - require.True(sigs[i].PubKey.Equals(pks[i]), "Pub key doesn't match. Got: %s, expected: %s, idx: %d", sigs[i].PubKey, pks[i], i) - require.NotEmpty(sigs[i].Data) - } -} - -func (s *IntegrationTestSuite) TestCLIQueryTxCmdByHash() { - val := s.network.Validators[0] - - account2, err := val.ClientCtx.Keyring.Key("newAccount2") - s.Require().NoError(err) - - sendTokens := sdk.NewInt64Coin(s.cfg.BondDenom, 10) - - addr, err := account2.GetAddress() - s.Require().NoError(err) - - // Send coins. - out, err := s.createBankMsg( - val, addr, - sdk.NewCoins(sendTokens), - ) - s.Require().NoError(err) - s.Require().NoError(s.network.WaitForNextBlock()) - - var txRes sdk.TxResponse - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txRes)) - - testCases := []struct { - name string - args []string - expectErr bool - rawLogContains string - }{ - { - "not enough args", - []string{}, - true, "", - }, - { - "with invalid hash", - []string{"somethinginvalid", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - true, "", - }, - { - "with valid and not existing hash", - []string{"C7E7D3A86A17AB3A321172239F3B61357937AF0F25D9FA4D2F4DCCAD9B0D7747", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - true, "", - }, - { - "happy case", - []string{txRes.TxHash, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - false, - sdk.MsgTypeURL(&banktypes.MsgSend{}), - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := authcli.QueryTxCmd() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - - if tc.expectErr { - s.Require().Error(err) - s.Require().NotEqual("internal", err.Error()) - } else { - var result sdk.TxResponse - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &result)) - s.Require().NotNil(result.Height) - s.Require().Contains(result.RawLog, tc.rawLogContains) - } - }) - } -} - -func (s *IntegrationTestSuite) TestCLIQueryTxCmdByEvents() { - val := s.network.Validators[0] - - account2, err := val.ClientCtx.Keyring.Key("newAccount2") - s.Require().NoError(err) - - sendTokens := sdk.NewInt64Coin(s.cfg.BondDenom, 10) - - addr2, err := account2.GetAddress() - s.Require().NoError(err) - - // Send coins. - out, err := s.createBankMsg( - val, addr2, - sdk.NewCoins(sendTokens), - ) - s.Require().NoError(err) - var txRes sdk.TxResponse - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txRes)) - s.Require().NoError(s.network.WaitForNextBlock()) - - // Query the tx by hash to get the inner tx. - out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, authcli.QueryTxCmd(), []string{txRes.TxHash, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}) - s.Require().NoError(err) - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txRes)) - protoTx := txRes.GetTx().(*tx.Tx) - - testCases := []struct { - name string - args []string - expectErr bool - expectErrStr string - }{ - { - "invalid --type", - []string{ - fmt.Sprintf("--type=%s", "foo"), - "bar", - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - true, "unknown --type value foo", - }, - { - "--type=acc_seq with no addr+seq", - []string{ - "--type=acc_seq", - "", - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - true, "`acc_seq` type takes an argument '/'", - }, - { - "non-existing addr+seq combo", - []string{ - "--type=acc_seq", - "foobar", - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - true, "found no txs matching given address and sequence combination", - }, - { - "addr+seq happy case", - []string{ - "--type=acc_seq", - fmt.Sprintf("%s/%d", val.Address, protoTx.AuthInfo.SignerInfos[0].Sequence), - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - false, "", - }, - { - "--type=signature with no signature", - []string{ - "--type=signature", - "", - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - true, "argument should be comma-separated signatures", - }, - { - "non-existing signatures", - []string{ - "--type=signature", - "foo", - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - true, "found no txs matching given signatures", - }, - { - "with --signatures happy case", - []string{ - "--type=signature", - base64.StdEncoding.EncodeToString(protoTx.Signatures[0]), - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - false, "", - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := authcli.QueryTxCmd() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - s.Require().Contains(err.Error(), tc.expectErrStr) - } else { - var result sdk.TxResponse - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &result)) - s.Require().NotNil(result.Height) - } - }) - } -} - -func (s *IntegrationTestSuite) TestCLIQueryTxsCmdByEvents() { - val := s.network.Validators[0] - - account2, err := val.ClientCtx.Keyring.Key("newAccount2") - s.Require().NoError(err) - - sendTokens := sdk.NewInt64Coin(s.cfg.BondDenom, 10) - - addr2, err := account2.GetAddress() - s.Require().NoError(err) - // Send coins. - out, err := s.createBankMsg( - val, - addr2, - sdk.NewCoins(sendTokens), - ) - s.Require().NoError(err) - var txRes sdk.TxResponse - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txRes)) - s.Require().NoError(s.network.WaitForNextBlock()) - - // Query the tx by hash to get the inner tx. - out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, authcli.QueryTxCmd(), []string{txRes.TxHash, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}) - s.Require().NoError(err) - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txRes)) - - testCases := []struct { - name string - args []string - expectEmpty bool - }{ - { - "fee event happy case", - []string{ - fmt.Sprintf("--events=tx.fee=%s", - sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - false, - }, - { - "no matching fee event", - []string{ - fmt.Sprintf("--events=tx.fee=%s", - sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(0))).String()), - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - true, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := authcli.QueryTxsByEventsCmd() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - s.Require().NoError(err) - - var result sdk.SearchTxsResult - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &result)) - - if tc.expectEmpty { - s.Require().Equal(0, len(result.Txs)) - } else { - s.Require().NotEqual(0, len(result.Txs)) - s.Require().NotNil(result.Txs[0]) - } - }) - } -} - -func (s *IntegrationTestSuite) TestCLISendGenerateSignAndBroadcast() { - val1 := s.network.Validators[0] - - account, err := val1.ClientCtx.Keyring.Key("newAccount") - s.Require().NoError(err) - - sendTokens := sdk.NewCoin(s.cfg.BondDenom, sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction)) - - addr, err := account.GetAddress() - s.Require().NoError(err) - normalGeneratedTx, err := s.createBankMsg(val1, addr, - sdk.NewCoins(sendTokens), fmt.Sprintf("--%s=true", flags.FlagGenerateOnly)) - s.Require().NoError(err) - - txCfg := val1.ClientCtx.TxConfig - - normalGeneratedStdTx, err := txCfg.TxJSONDecoder()(normalGeneratedTx.Bytes()) - s.Require().NoError(err) - txBuilder, err := txCfg.WrapTxBuilder(normalGeneratedStdTx) - s.Require().NoError(err) - s.Require().Equal(txBuilder.GetTx().GetGas(), uint64(flags.DefaultGasLimit)) - s.Require().Equal(len(txBuilder.GetTx().GetMsgs()), 1) - sigs, err := txBuilder.GetTx().GetSignaturesV2() - s.Require().NoError(err) - s.Require().Equal(0, len(sigs)) - - // Test generate sendTx with --gas=$amount - limitedGasGeneratedTx, err := s.createBankMsg(val1, addr, - sdk.NewCoins(sendTokens), fmt.Sprintf("--gas=%d", 100), - fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), - ) - s.Require().NoError(err) - - limitedGasStdTx, err := txCfg.TxJSONDecoder()(limitedGasGeneratedTx.Bytes()) - s.Require().NoError(err) - txBuilder, err = txCfg.WrapTxBuilder(limitedGasStdTx) - s.Require().NoError(err) - s.Require().Equal(txBuilder.GetTx().GetGas(), uint64(100)) - s.Require().Equal(len(txBuilder.GetTx().GetMsgs()), 1) - sigs, err = txBuilder.GetTx().GetSignaturesV2() - s.Require().NoError(err) - s.Require().Equal(0, len(sigs)) - - resp, err := clitestutil.QueryBalancesExec(val1.ClientCtx, val1.Address) - s.Require().NoError(err) - - var balRes banktypes.QueryAllBalancesResponse - err = val1.ClientCtx.Codec.UnmarshalJSON(resp.Bytes(), &balRes) - s.Require().NoError(err) - startTokens := balRes.Balances.AmountOf(s.cfg.BondDenom) - - // Test generate sendTx, estimate gas - finalGeneratedTx, err := s.createBankMsg(val1, addr, - sdk.NewCoins(sendTokens), fmt.Sprintf("--gas=%d", flags.DefaultGasLimit), - fmt.Sprintf("--%s=true", flags.FlagGenerateOnly)) - s.Require().NoError(err) - - finalStdTx, err := txCfg.TxJSONDecoder()(finalGeneratedTx.Bytes()) - s.Require().NoError(err) - txBuilder, err = txCfg.WrapTxBuilder(finalStdTx) - s.Require().NoError(err) - s.Require().Equal(uint64(flags.DefaultGasLimit), txBuilder.GetTx().GetGas()) - s.Require().Equal(len(finalStdTx.GetMsgs()), 1) - - // Write the output to disk - unsignedTxFile := testutil.WriteToNewTempFile(s.T(), finalGeneratedTx.String()) - defer unsignedTxFile.Close() - - // Test validate-signatures - res, err := TxValidateSignaturesExec(val1.ClientCtx, unsignedTxFile.Name()) - s.Require().EqualError(err, "signatures validation failed") - s.Require().True(strings.Contains(res.String(), fmt.Sprintf("Signers:\n 0: %v\n\nSignatures:\n\n", val1.Address.String()))) - - // Test sign - - // Does not work in offline mode - _, err = TxSignExec(val1.ClientCtx, val1.Address, unsignedTxFile.Name(), "--offline") - s.Require().EqualError(err, "required flag(s) \"account-number\", \"sequence\" not set") - - // But works offline if we set account number and sequence - val1.ClientCtx.HomeDir = strings.Replace(val1.ClientCtx.HomeDir, "simd", "simcli", 1) - _, err = TxSignExec(val1.ClientCtx, val1.Address, unsignedTxFile.Name(), "--offline", "--account-number", "1", "--sequence", "1") - s.Require().NoError(err) - - // Sign transaction - signedTx, err := TxSignExec(val1.ClientCtx, val1.Address, unsignedTxFile.Name()) - s.Require().NoError(err) - signedFinalTx, err := txCfg.TxJSONDecoder()(signedTx.Bytes()) - s.Require().NoError(err) - txBuilder, err = val1.ClientCtx.TxConfig.WrapTxBuilder(signedFinalTx) - s.Require().NoError(err) - s.Require().Equal(len(txBuilder.GetTx().GetMsgs()), 1) - sigs, err = txBuilder.GetTx().GetSignaturesV2() - s.Require().NoError(err) - s.Require().Equal(1, len(sigs)) - s.Require().Equal(val1.Address.String(), txBuilder.GetTx().GetSigners()[0].String()) - - // Write the output to disk - signedTxFile := testutil.WriteToNewTempFile(s.T(), signedTx.String()) - defer signedTxFile.Close() - - // validate Signature - res, err = TxValidateSignaturesExec(val1.ClientCtx, signedTxFile.Name()) - s.Require().NoError(err) - s.Require().True(strings.Contains(res.String(), "[OK]")) - s.Require().NoError(s.network.WaitForNextBlock()) - - // Ensure foo has right amount of funds - resp, err = clitestutil.QueryBalancesExec(val1.ClientCtx, val1.Address) - s.Require().NoError(err) - - err = val1.ClientCtx.Codec.UnmarshalJSON(resp.Bytes(), &balRes) - s.Require().NoError(err) - s.Require().Equal(startTokens, balRes.Balances.AmountOf(s.cfg.BondDenom)) - - // Test broadcast - - // Does not work in offline mode - _, err = TxBroadcastExec(val1.ClientCtx, signedTxFile.Name(), "--offline") - s.Require().EqualError(err, "cannot broadcast tx during offline mode") - s.Require().NoError(s.network.WaitForNextBlock()) - - // Broadcast correct transaction. - val1.ClientCtx.BroadcastMode = flags.BroadcastSync - _, err = TxBroadcastExec(val1.ClientCtx, signedTxFile.Name()) - s.Require().NoError(err) - s.Require().NoError(s.network.WaitForNextBlock()) - - // Ensure destiny account state - resp, err = clitestutil.QueryBalancesExec(val1.ClientCtx, addr) - s.Require().NoError(err) - - err = val1.ClientCtx.Codec.UnmarshalJSON(resp.Bytes(), &balRes) - s.Require().NoError(err) - s.Require().Equal(sendTokens.Amount, balRes.Balances.AmountOf(s.cfg.BondDenom)) - - // Ensure origin account state - resp, err = clitestutil.QueryBalancesExec(val1.ClientCtx, val1.Address) - s.Require().NoError(err) - - err = val1.ClientCtx.Codec.UnmarshalJSON(resp.Bytes(), &balRes) - s.Require().NoError(err) -} - -func (s *IntegrationTestSuite) TestCLIMultisignInsufficientCosigners() { - val1 := s.network.Validators[0] - - // Fetch account and a multisig info - account1, err := val1.ClientCtx.Keyring.Key("newAccount1") - s.Require().NoError(err) - - multisigRecord, err := val1.ClientCtx.Keyring.Key("multi") - s.Require().NoError(err) - - addr, err := multisigRecord.GetAddress() - s.Require().NoError(err) - // Send coins from validator to multisig. - _, err = s.createBankMsg( - val1, - addr, - sdk.NewCoins( - sdk.NewInt64Coin(s.cfg.BondDenom, 10), - ), - ) - s.Require().NoError(err) - s.Require().NoError(s.network.WaitForNextBlock()) - - // Generate multisig transaction. - multiGeneratedTx, err := clitestutil.MsgSendExec( - val1.ClientCtx, - addr, - val1.Address, - sdk.NewCoins( - sdk.NewInt64Coin(s.cfg.BondDenom, 5), - ), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), - ) - s.Require().NoError(err) - - // Save tx to file - multiGeneratedTxFile := testutil.WriteToNewTempFile(s.T(), multiGeneratedTx.String()) - defer multiGeneratedTxFile.Close() - - // Multisign, sign with one signature - val1.ClientCtx.HomeDir = strings.Replace(val1.ClientCtx.HomeDir, "simd", "simcli", 1) - addr1, err := account1.GetAddress() - s.Require().NoError(err) - account1Signature, err := TxSignExec(val1.ClientCtx, addr1, multiGeneratedTxFile.Name(), "--multisig", addr.String()) - s.Require().NoError(err) - - sign1File := testutil.WriteToNewTempFile(s.T(), account1Signature.String()) - defer sign1File.Close() - - multiSigWith1Signature, err := TxMultiSignExec(val1.ClientCtx, multisigRecord.Name, multiGeneratedTxFile.Name(), sign1File.Name()) - s.Require().NoError(err) - - // Save tx to file - multiSigWith1SignatureFile := testutil.WriteToNewTempFile(s.T(), multiSigWith1Signature.String()) - defer multiSigWith1SignatureFile.Close() - - _, err = TxValidateSignaturesExec(val1.ClientCtx, multiSigWith1SignatureFile.Name()) - s.Require().Error(err) -} - -func (s *IntegrationTestSuite) TestCLIEncode() { - val1 := s.network.Validators[0] - - sendTokens := sdk.NewCoin(s.cfg.BondDenom, sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction)) - - normalGeneratedTx, err := s.createBankMsg( - val1, val1.Address, - sdk.NewCoins(sendTokens), - fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), - fmt.Sprintf("--%s=deadbeef", flags.FlagNote), - ) - s.Require().NoError(err) - savedTxFile := testutil.WriteToNewTempFile(s.T(), normalGeneratedTx.String()) - defer savedTxFile.Close() - - // Encode - encodeExec, err := TxEncodeExec(val1.ClientCtx, savedTxFile.Name()) - s.Require().NoError(err) - trimmedBase64 := strings.Trim(encodeExec.String(), "\"\n") - - // Check that the transaction decodes as expected - decodedTx, err := TxDecodeExec(val1.ClientCtx, trimmedBase64) - s.Require().NoError(err) - - txCfg := val1.ClientCtx.TxConfig - theTx, err := txCfg.TxJSONDecoder()(decodedTx.Bytes()) - s.Require().NoError(err) - txBuilder, err := val1.ClientCtx.TxConfig.WrapTxBuilder(theTx) - s.Require().NoError(err) - s.Require().Equal("deadbeef", txBuilder.GetTx().GetMemo()) -} - -func (s *IntegrationTestSuite) TestCLIMultisignSortSignatures() { - val1 := s.network.Validators[0] - - // Generate 2 accounts and a multisig. - account1, err := val1.ClientCtx.Keyring.Key("newAccount1") - s.Require().NoError(err) - - account2, err := val1.ClientCtx.Keyring.Key("newAccount2") - s.Require().NoError(err) - - multisigRecord, err := val1.ClientCtx.Keyring.Key("multi") - s.Require().NoError(err) - - // Generate dummy account which is not a part of multisig. - dummyAcc, err := val1.ClientCtx.Keyring.Key("dummyAccount") - s.Require().NoError(err) - - addr, err := multisigRecord.GetAddress() - s.Require().NoError(err) - resp, err := clitestutil.QueryBalancesExec(val1.ClientCtx, addr) - s.Require().NoError(err) - - var balRes banktypes.QueryAllBalancesResponse - err = val1.ClientCtx.Codec.UnmarshalJSON(resp.Bytes(), &balRes) - s.Require().NoError(err) - intialCoins := balRes.Balances - - s.Require().NoError(s.network.WaitForNextBlock()) - // Send coins from validator to multisig. - sendTokens := sdk.NewInt64Coin(s.cfg.BondDenom, 10) - _, err = s.createBankMsg( - val1, - addr, - sdk.NewCoins(sendTokens), - ) - s.Require().NoError(err) - s.Require().NoError(s.network.WaitForNextBlock()) - - resp, err = clitestutil.QueryBalancesExec(val1.ClientCtx, addr) - s.Require().NoError(err) - - err = val1.ClientCtx.Codec.UnmarshalJSON(resp.Bytes(), &balRes) - s.Require().NoError(err) - diff, _ := balRes.Balances.SafeSub(intialCoins...) - s.Require().Equal(sendTokens.Amount, diff.AmountOf(s.cfg.BondDenom)) - - // Generate multisig transaction. - multiGeneratedTx, err := clitestutil.MsgSendExec( - val1.ClientCtx, - addr, - val1.Address, - sdk.NewCoins( - sdk.NewInt64Coin(s.cfg.BondDenom, 5), - ), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), - ) - s.Require().NoError(err) - - // Save tx to file - multiGeneratedTxFile := testutil.WriteToNewTempFile(s.T(), multiGeneratedTx.String()) - defer multiGeneratedTxFile.Close() - - // Sign with account1 - addr1, err := account1.GetAddress() - s.Require().NoError(err) - val1.ClientCtx.HomeDir = strings.Replace(val1.ClientCtx.HomeDir, "simd", "simcli", 1) - account1Signature, err := TxSignExec(val1.ClientCtx, addr1, multiGeneratedTxFile.Name(), "--multisig", addr.String()) - s.Require().NoError(err) - - sign1File := testutil.WriteToNewTempFile(s.T(), account1Signature.String()) - defer sign1File.Close() - - // Sign with account2 - addr2, err := account2.GetAddress() - s.Require().NoError(err) - account2Signature, err := TxSignExec(val1.ClientCtx, addr2, multiGeneratedTxFile.Name(), "--multisig", addr.String()) - s.Require().NoError(err) - - sign2File := testutil.WriteToNewTempFile(s.T(), account2Signature.String()) - defer sign2File.Close() - - // Sign with dummy account - dummyAddr, err := dummyAcc.GetAddress() - s.Require().NoError(err) - _, err = TxSignExec(val1.ClientCtx, dummyAddr, multiGeneratedTxFile.Name(), "--multisig", addr.String()) - s.Require().Error(err) - s.Require().Contains(err.Error(), "signing key is not a part of multisig key") - - multiSigWith2Signatures, err := TxMultiSignExec(val1.ClientCtx, multisigRecord.Name, multiGeneratedTxFile.Name(), sign1File.Name(), sign2File.Name()) - s.Require().NoError(err) - - // Write the output to disk - signedTxFile := testutil.WriteToNewTempFile(s.T(), multiSigWith2Signatures.String()) - defer signedTxFile.Close() - - _, err = TxValidateSignaturesExec(val1.ClientCtx, signedTxFile.Name()) - s.Require().NoError(err) - - val1.ClientCtx.BroadcastMode = flags.BroadcastSync - _, err = TxBroadcastExec(val1.ClientCtx, signedTxFile.Name()) - s.Require().NoError(err) - - s.Require().NoError(s.network.WaitForNextBlock()) -} - -func (s *IntegrationTestSuite) TestSignWithMultisig() { - val1 := s.network.Validators[0] - - // Generate a account for signing. - account1, err := val1.ClientCtx.Keyring.Key("newAccount1") - s.Require().NoError(err) - - addr1, err := account1.GetAddress() - s.Require().NoError(err) - - // Create an address that is not in the keyring, will be used to simulate `--multisig` - multisig := "cosmos1hd6fsrvnz6qkp87s3u86ludegq97agxsdkwzyh" - multisigAddr, err := sdk.AccAddressFromBech32(multisig) - s.Require().NoError(err) - - // Generate a transaction for testing --multisig with an address not in the keyring. - multisigTx, err := clitestutil.MsgSendExec( - val1.ClientCtx, - val1.Address, - val1.Address, - sdk.NewCoins( - sdk.NewInt64Coin(s.cfg.BondDenom, 5), - ), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), - ) - s.Require().NoError(err) - - // Save multi tx to file - multiGeneratedTx2File := testutil.WriteToNewTempFile(s.T(), multisigTx.String()) - defer multiGeneratedTx2File.Close() - - // Sign using multisig. We're signing a tx on behalf of the multisig address, - // even though the tx signer is NOT the multisig address. This is fine though, - // as the main point of this test is to test the `--multisig` flag with an address - // that is not in the keyring. - _, err = TxSignExec(val1.ClientCtx, addr1, multiGeneratedTx2File.Name(), "--multisig", multisigAddr.String()) - s.Require().Contains(err.Error(), "error getting account from keybase") -} - -func (s *IntegrationTestSuite) TestCLIMultisign() { - val1 := s.network.Validators[0] - - // Generate 2 accounts and a multisig. - account1, err := val1.ClientCtx.Keyring.Key("newAccount1") - s.Require().NoError(err) - - account2, err := val1.ClientCtx.Keyring.Key("newAccount2") - s.Require().NoError(err) - - multisigRecord, err := val1.ClientCtx.Keyring.Key("multi") - s.Require().NoError(err) - - addr, err := multisigRecord.GetAddress() - s.Require().NoError(err) - - // Send coins from validator to multisig. - sendTokens := sdk.NewInt64Coin(s.cfg.BondDenom, 10) - s.Require().NoError(s.network.WaitForNextBlock()) - _, err = s.createBankMsg( - val1, addr, - sdk.NewCoins(sendTokens), - ) - s.Require().NoError(err) - s.Require().NoError(s.network.WaitForNextBlock()) - - resp, err := clitestutil.QueryBalancesExec(val1.ClientCtx, addr) - s.Require().NoError(err) - - var balRes banktypes.QueryAllBalancesResponse - err = val1.ClientCtx.Codec.UnmarshalJSON(resp.Bytes(), &balRes) - s.Require().NoError(err) - s.Require().True(sendTokens.Amount.Equal(balRes.Balances.AmountOf(s.cfg.BondDenom))) - - // Generate multisig transaction. - multiGeneratedTx, err := clitestutil.MsgSendExec( - val1.ClientCtx, - addr, - val1.Address, - sdk.NewCoins( - sdk.NewInt64Coin(s.cfg.BondDenom, 5), - ), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), - ) - s.Require().NoError(err) - - // Save tx to file - multiGeneratedTxFile := testutil.WriteToNewTempFile(s.T(), multiGeneratedTx.String()) - defer multiGeneratedTxFile.Close() - - addr1, err := account1.GetAddress() - s.Require().NoError(err) - // Sign with account1 - val1.ClientCtx.HomeDir = strings.Replace(val1.ClientCtx.HomeDir, "simd", "simcli", 1) - account1Signature, err := TxSignExec(val1.ClientCtx, addr1, multiGeneratedTxFile.Name(), "--multisig", addr.String()) - s.Require().NoError(err) - - sign1File := testutil.WriteToNewTempFile(s.T(), account1Signature.String()) - defer sign1File.Close() - - addr2, err := account2.GetAddress() - s.Require().NoError(err) - // Sign with account2 - account2Signature, err := TxSignExec(val1.ClientCtx, addr2, multiGeneratedTxFile.Name(), "--multisig", addr.String()) - s.Require().NoError(err) - - sign2File := testutil.WriteToNewTempFile(s.T(), account2Signature.String()) - defer sign2File.Close() - - // Does not work in offline mode. - _, err = TxMultiSignExec(val1.ClientCtx, multisigRecord.Name, multiGeneratedTxFile.Name(), "--offline", sign1File.Name(), sign2File.Name()) - s.Require().EqualError(err, fmt.Sprintf("couldn't verify signature for address %s", addr1)) - - val1.ClientCtx.Offline = false - multiSigWith2Signatures, err := TxMultiSignExec(val1.ClientCtx, multisigRecord.Name, multiGeneratedTxFile.Name(), sign1File.Name(), sign2File.Name()) - s.Require().NoError(err) - - // Write the output to disk - signedTxFile := testutil.WriteToNewTempFile(s.T(), multiSigWith2Signatures.String()) - defer signedTxFile.Close() - - _, err = TxValidateSignaturesExec(val1.ClientCtx, signedTxFile.Name()) - s.Require().NoError(err) - - val1.ClientCtx.BroadcastMode = flags.BroadcastSync - _, err = TxBroadcastExec(val1.ClientCtx, signedTxFile.Name()) - s.Require().NoError(err) - - s.Require().NoError(s.network.WaitForNextBlock()) -} - -func (s *IntegrationTestSuite) TestSignBatchMultisig() { - val := s.network.Validators[0] - - // Fetch 2 accounts and a multisig. - account1, err := val.ClientCtx.Keyring.Key("newAccount1") - s.Require().NoError(err) - account2, err := val.ClientCtx.Keyring.Key("newAccount2") - s.Require().NoError(err) - multisigRecord, err := val.ClientCtx.Keyring.Key("multi") - s.Require().NoError(err) - - addr, err := multisigRecord.GetAddress() - s.Require().NoError(err) - // Send coins from validator to multisig. - sendTokens := sdk.NewInt64Coin(s.cfg.BondDenom, 10) - _, err = s.createBankMsg( - val, - addr, - sdk.NewCoins(sendTokens), - ) - s.Require().NoError(err) - s.Require().NoError(s.network.WaitForNextBlock()) - - generatedStd, err := clitestutil.MsgSendExec( - val.ClientCtx, - addr, - val.Address, - sdk.NewCoins( - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(1)), - ), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), - ) - s.Require().NoError(err) - - // Write the output to disk - filename := testutil.WriteToNewTempFile(s.T(), strings.Repeat(generatedStd.String(), 1)) - defer filename.Close() - val.ClientCtx.HomeDir = strings.Replace(val.ClientCtx.HomeDir, "simd", "simcli", 1) - - addr1, err := account1.GetAddress() - s.Require().NoError(err) - // sign-batch file - res, err := TxSignBatchExec(val.ClientCtx, addr1, filename.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), "--multisig", addr.String(), "--signature-only") - s.Require().NoError(err) - s.Require().Equal(1, len(strings.Split(strings.Trim(res.String(), "\n"), "\n"))) - // write sigs to file - file1 := testutil.WriteToNewTempFile(s.T(), res.String()) - defer file1.Close() - - addr2, err := account2.GetAddress() - s.Require().NoError(err) - // sign-batch file with account2 - res, err = TxSignBatchExec(val.ClientCtx, addr2, filename.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), "--multisig", addr.String(), "--signature-only") - s.Require().NoError(err) - s.Require().Equal(1, len(strings.Split(strings.Trim(res.String(), "\n"), "\n"))) - // write sigs to file2 - file2 := testutil.WriteToNewTempFile(s.T(), res.String()) - defer file2.Close() - _, err = TxMultiSignExec(val.ClientCtx, multisigRecord.Name, filename.Name(), file1.Name(), file2.Name()) - s.Require().NoError(err) -} - -func (s *IntegrationTestSuite) TestMultisignBatch() { - val := s.network.Validators[0] - - // Fetch 2 accounts and a multisig. - account1, err := val.ClientCtx.Keyring.Key("newAccount1") - s.Require().NoError(err) - account2, err := val.ClientCtx.Keyring.Key("newAccount2") - s.Require().NoError(err) - multisigRecord, err := val.ClientCtx.Keyring.Key("multi") - s.Require().NoError(err) - - addr, err := multisigRecord.GetAddress() - s.Require().NoError(err) - // Send coins from validator to multisig. - sendTokens := sdk.NewInt64Coin(s.cfg.BondDenom, 1000) - _, err = s.createBankMsg( - val, - addr, - sdk.NewCoins(sendTokens), - ) - s.Require().NoError(err) - s.Require().NoError(s.network.WaitForNextBlock()) - - generatedStd, err := clitestutil.MsgSendExec( - val.ClientCtx, - addr, - val.Address, - sdk.NewCoins( - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(1)), - ), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), - ) - s.Require().NoError(err) - - // Write the output to disk - filename := testutil.WriteToNewTempFile(s.T(), strings.Repeat(generatedStd.String(), 3)) - defer filename.Close() - val.ClientCtx.HomeDir = strings.Replace(val.ClientCtx.HomeDir, "simd", "simcli", 1) - - queryResJSON, err := QueryAccountExec(val.ClientCtx, addr) - s.Require().NoError(err) - var account authtypes.AccountI - s.Require().NoError(val.ClientCtx.Codec.UnmarshalInterfaceJSON(queryResJSON.Bytes(), &account)) - - // sign-batch file - addr1, err := account1.GetAddress() - s.Require().NoError(err) - res, err := TxSignBatchExec(val.ClientCtx, addr1, filename.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), "--multisig", addr.String(), fmt.Sprintf("--%s", flags.FlagOffline), fmt.Sprintf("--%s=%s", flags.FlagAccountNumber, fmt.Sprint(account.GetAccountNumber())), fmt.Sprintf("--%s=%s", flags.FlagSequence, fmt.Sprint(account.GetSequence())), "--signature-only") - s.Require().NoError(err) - s.Require().Equal(3, len(strings.Split(strings.Trim(res.String(), "\n"), "\n"))) - // write sigs to file - file1 := testutil.WriteToNewTempFile(s.T(), res.String()) - defer file1.Close() - - // sign-batch file with account2 - addr2, err := account2.GetAddress() - s.Require().NoError(err) - res, err = TxSignBatchExec(val.ClientCtx, addr2, filename.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), "--multisig", addr.String(), fmt.Sprintf("--%s", flags.FlagOffline), fmt.Sprintf("--%s=%s", flags.FlagAccountNumber, fmt.Sprint(account.GetAccountNumber())), fmt.Sprintf("--%s=%s", flags.FlagSequence, fmt.Sprint(account.GetSequence())), "--signature-only") - s.Require().NoError(err) - s.Require().Equal(3, len(strings.Split(strings.Trim(res.String(), "\n"), "\n"))) - - // multisign the file - file2 := testutil.WriteToNewTempFile(s.T(), res.String()) - defer file2.Close() - res, err = TxMultiSignBatchExec(val.ClientCtx, filename.Name(), multisigRecord.Name, file1.Name(), file2.Name()) - s.Require().NoError(err) - signedTxs := strings.Split(strings.Trim(res.String(), "\n"), "\n") - - // Broadcast transactions. - for _, signedTx := range signedTxs { - func() { - signedTxFile := testutil.WriteToNewTempFile(s.T(), signedTx) - defer signedTxFile.Close() - val.ClientCtx.BroadcastMode = flags.BroadcastSync - _, err = TxBroadcastExec(val.ClientCtx, signedTxFile.Name()) - s.Require().NoError(err) - s.Require().NoError(s.network.WaitForNextBlock()) - }() - } -} - -func (s *IntegrationTestSuite) TestGetAccountCmd() { - val := s.network.Validators[0] - _, _, addr1 := testdata.KeyTestPubAddr() - - testCases := []struct { - name string - address sdk.AccAddress - expectErr bool - }{ - { - "invalid address", - addr1, - true, - }, - { - "valid address", - val.Address, - false, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - clientCtx := val.ClientCtx - - out, err := QueryAccountExec(clientCtx, tc.address) - if tc.expectErr { - s.Require().Error(err) - s.Require().NotEqual("internal", err.Error()) - } else { - var acc authtypes.AccountI - s.Require().NoError(val.ClientCtx.Codec.UnmarshalInterfaceJSON(out.Bytes(), &acc)) - s.Require().Equal(val.Address, acc.GetAddress()) - } - }) - } -} - -func (s *IntegrationTestSuite) TestGetAccountsCmd() { - val := s.network.Validators[0] - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, authcli.GetAccountsCmd(), []string{ - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }) - s.Require().NoError(err) - - var res authtypes.QueryAccountsResponse - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) - s.Require().NotEmpty(res.Accounts) -} - -func (s *IntegrationTestSuite) TestQueryModuleAccountByNameCmd() { - val := s.network.Validators[0] - - testCases := []struct { - name string - moduleName string - expectErr bool - }{ - { - "invalid module name", - "gover", - true, - }, - { - "valid module name", - "mint", - false, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, authcli.QueryModuleAccountByNameCmd(), []string{ - tc.moduleName, - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }) - if tc.expectErr { - s.Require().Error(err) - s.Require().NotEqual("internal", err.Error()) - } else { - var res authtypes.QueryModuleAccountByNameResponse - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) - - var account types.AccountI - err := val.ClientCtx.InterfaceRegistry.UnpackAny(res.Account, &account) - s.Require().NoError(err) - - moduleAccount, ok := account.(types.ModuleAccountI) - s.Require().True(ok) - s.Require().Equal(tc.moduleName, moduleAccount.GetName()) - } - }) - } -} - -func (s *IntegrationTestSuite) TestQueryModuleAccountsCmd() { - val := s.network.Validators[0] - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, authcli.QueryModuleAccountsCmd(), []string{ - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }) - s.Require().NoError(err) - - var res authtypes.QueryModuleAccountsResponse - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) - s.Require().NotEmpty(res.Accounts) -} - -func TestGetBroadcastCommandOfflineFlag(t *testing.T) { - cmd := authcli.GetBroadcastCommand() - _ = testutil.ApplyMockIODiscardOutErr(cmd) - cmd.SetArgs([]string{fmt.Sprintf("--%s=true", flags.FlagOffline), ""}) - - require.EqualError(t, cmd.Execute(), "cannot broadcast tx during offline mode") -} - -func TestGetBroadcastCommandWithoutOfflineFlag(t *testing.T) { - var txCfg client.TxConfig - err := depinject.Inject(authtestutil.AppConfig, &txCfg) - require.NoError(t, err) - clientCtx := client.Context{} - clientCtx = clientCtx.WithTxConfig(txCfg) - - ctx := context.Background() - ctx = context.WithValue(ctx, client.ClientContextKey, &clientCtx) - - cmd := authcli.GetBroadcastCommand() - _, out := testutil.ApplyMockIO(cmd) - - // Create new file with tx - builder := txCfg.NewTxBuilder() - builder.SetGasLimit(200000) - from, err := sdk.AccAddressFromBech32("cosmos1cxlt8kznps92fwu3j6npahx4mjfutydyene2qw") - require.NoError(t, err) - to, err := sdk.AccAddressFromBech32("cosmos1cxlt8kznps92fwu3j6npahx4mjfutydyene2qw") - require.NoError(t, err) - err = builder.SetMsgs(banktypes.NewMsgSend(from, to, sdk.Coins{sdk.NewInt64Coin("stake", 10000)})) - require.NoError(t, err) - txContents, err := txCfg.TxJSONEncoder()(builder.GetTx()) - require.NoError(t, err) - txFile := testutil.WriteToNewTempFile(t, string(txContents)) - defer txFile.Close() - - cmd.SetArgs([]string{txFile.Name()}) - err = cmd.ExecuteContext(ctx) - require.Error(t, err) - require.Contains(t, err.Error(), "connect: connection refused") - require.Contains(t, out.String(), "connect: connection refused") -} - -func (s *IntegrationTestSuite) TestQueryParamsCmd() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expectErr bool - }{ - { - "happy case", - []string{fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - false, - }, - { - "with specific height", - []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - false, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - cmd := authcli.QueryParamsCmd() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - if tc.expectErr { - s.Require().Error(err) - s.Require().NotEqual("internal", err.Error()) - } else { - var authParams authtypes.Params - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &authParams)) - s.Require().NotNil(authParams.MaxMemoCharacters) - } - }) - } -} - -// TestTxWithoutPublicKey makes sure sending a proto tx message without the -// public key doesn't cause any error in the RPC layer (broadcast). -// See https://github.com/cosmos/cosmos-sdk/issues/7585 for more details. -func (s *IntegrationTestSuite) TestTxWithoutPublicKey() { - val1 := s.network.Validators[0] - txCfg := val1.ClientCtx.TxConfig - - // Create a txBuilder with an unsigned tx. - txBuilder := txCfg.NewTxBuilder() - msg := banktypes.NewMsgSend(val1.Address, val1.Address, sdk.NewCoins( - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)), - )) - err := txBuilder.SetMsgs(msg) - s.Require().NoError(err) - txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(150)))) - txBuilder.SetGasLimit(testdata.NewTestGasLimit()) - // Set empty signature to set signer infos. - sigV2 := signing.SignatureV2{ - PubKey: val1.PubKey, - Data: &signing.SingleSignatureData{ - SignMode: txCfg.SignModeHandler().DefaultMode(), - Signature: nil, - }, - } - err = txBuilder.SetSignatures(sigV2) - s.Require().NoError(err) - - // Create a file with the unsigned tx. - txJSON, err := txCfg.TxJSONEncoder()(txBuilder.GetTx()) - s.Require().NoError(err) - unsignedTxFile := testutil.WriteToNewTempFile(s.T(), string(txJSON)) - defer unsignedTxFile.Close() - - // Sign the file with the unsignedTx. - signedTx, err := TxSignExec(val1.ClientCtx, val1.Address, unsignedTxFile.Name(), fmt.Sprintf("--%s=true", cli.FlagOverwrite)) - s.Require().NoError(err) - - // Remove the signerInfo's `public_key` field manually from the signedTx. - // Note: this method is only used for test purposes! In general, one should - // use txBuilder and TxEncoder/TxDecoder to manipulate txs. - var tx tx.Tx - err = val1.ClientCtx.Codec.UnmarshalJSON(signedTx.Bytes(), &tx) - s.Require().NoError(err) - tx.AuthInfo.SignerInfos[0].PublicKey = nil - // Re-encode the tx again, to another file. - txJSON, err = val1.ClientCtx.Codec.MarshalJSON(&tx) - s.Require().NoError(err) - signedTxFile := testutil.WriteToNewTempFile(s.T(), string(txJSON)) - defer signedTxFile.Close() - s.Require().True(strings.Contains(string(txJSON), "\"public_key\":null")) - - // Broadcast tx, test that it shouldn't panic. - val1.ClientCtx.BroadcastMode = flags.BroadcastSync - out, err := TxBroadcastExec(val1.ClientCtx, signedTxFile.Name()) - s.Require().NoError(err) - var res sdk.TxResponse - s.Require().NoError(val1.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) - s.Require().NotEqual(0, res.Code) -} - -// TestSignWithMultiSignersAminoJSON tests the case where a transaction with 2 -// messages which has to be signed with 2 different keys. Sign and append the -// signatures using the CLI with Amino signing mode. Finally, send the -// transaction to the blockchain. -func (s *IntegrationTestSuite) TestSignWithMultiSignersAminoJSON() { - require := s.Require() - val0, val1 := s.network.Validators[0], s.network.Validators[1] - val0Coin := sdk.NewCoin(fmt.Sprintf("%stoken", val0.Moniker), sdk.NewInt(10)) - val1Coin := sdk.NewCoin(fmt.Sprintf("%stoken", val1.Moniker), sdk.NewInt(10)) - _, _, addr1 := testdata.KeyTestPubAddr() - - // Creating a tx with 2 msgs from 2 signers: val0 and val1. - // The validators need to sign with SIGN_MODE_LEGACY_AMINO_JSON, - // because DIRECT doesn't support multi signers via the CLI. - // Since we use amino, we don't need to pre-populate signer_infos. - txBuilder := val0.ClientCtx.TxConfig.NewTxBuilder() - txBuilder.SetMsgs( - banktypes.NewMsgSend(val0.Address, addr1, sdk.NewCoins(val0Coin)), - banktypes.NewMsgSend(val1.Address, addr1, sdk.NewCoins(val1Coin)), - ) - txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)))) - txBuilder.SetGasLimit(testdata.NewTestGasLimit() * 2) - require.Equal([]sdk.AccAddress{val0.Address, val1.Address}, txBuilder.GetTx().GetSigners()) - - // Write the unsigned tx into a file. - txJSON, err := val0.ClientCtx.TxConfig.TxJSONEncoder()(txBuilder.GetTx()) - require.NoError(err) - unsignedTxFile := testutil.WriteToNewTempFile(s.T(), string(txJSON)) - defer unsignedTxFile.Close() - - // Let val0 sign first the file with the unsignedTx. - signedByVal0, err := TxSignExec(val0.ClientCtx, val0.Address, unsignedTxFile.Name(), "--overwrite", "--sign-mode=amino-json") - require.NoError(err) - signedByVal0File := testutil.WriteToNewTempFile(s.T(), signedByVal0.String()) - defer signedByVal0File.Close() - - // Then let val1 sign the file with signedByVal0. - val1AccNum, val1Seq, err := val0.ClientCtx.AccountRetriever.GetAccountNumberSequence(val0.ClientCtx, val1.Address) - require.NoError(err) - - signedTx, err := TxSignExec( - val1.ClientCtx, - val1.Address, - signedByVal0File.Name(), - "--offline", - fmt.Sprintf("--account-number=%d", val1AccNum), - fmt.Sprintf("--sequence=%d", val1Seq), - "--sign-mode=amino-json", - ) - require.NoError(err) - signedTxFile := testutil.WriteToNewTempFile(s.T(), signedTx.String()) - defer signedTxFile.Close() - - res, err := TxBroadcastExec( - val0.ClientCtx, - signedTxFile.Name(), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - ) - require.NoError(err) - require.NoError(s.network.WaitForNextBlock()) - require.NoError(s.network.WaitForNextBlock()) - - var txRes sdk.TxResponse - require.NoError(val0.ClientCtx.Codec.UnmarshalJSON(res.Bytes(), &txRes)) - require.Equal(uint32(0), txRes.Code, txRes.RawLog) - - // Make sure the addr1's balance got funded. - queryResJSON, err := clitestutil.QueryBalancesExec(val0.ClientCtx, addr1) - require.NoError(err) - var queryRes banktypes.QueryAllBalancesResponse - err = val0.ClientCtx.Codec.UnmarshalJSON(queryResJSON.Bytes(), &queryRes) - require.NoError(err) - require.Equal(sdk.NewCoins(val0Coin, val1Coin), queryRes.Balances) -} - -func (s *IntegrationTestSuite) TestAuxSigner() { - require := s.Require() - val := s.network.Validators[0] - val0Coin := sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10)) - - testCases := []struct { - name string - args []string - expectErr bool - }{ - { - "error with SIGN_MODE_DIRECT_AUX and --aux unset", - []string{ - fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirectAux), - }, - true, - }, - { - "no error with SIGN_MDOE_DIRECT_AUX mode and generate-only set (ignores generate-only)", - []string{ - fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirectAux), - fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), - }, - false, - }, - { - "no error with SIGN_MDOE_DIRECT_AUX mode and generate-only, tip flag set", - []string{ - fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirectAux), - fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), - fmt.Sprintf("--%s=%s", flags.FlagTip, val0Coin.String()), - }, - false, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - _, err := govtestutil.MsgSubmitLegacyProposal( - val.ClientCtx, - val.Address.String(), - "test", - "test desc", - govtypes.ProposalTypeText, - tc.args..., - ) - if tc.expectErr { - require.Error(err) - } else { - require.NoError(err) - } - }) - } -} - -func (s *IntegrationTestSuite) TestAuxToFeeWithTips() { - // Skipping this test as it needs a simapp with the TipDecorator in post handler. - s.T().Skip() - - require := s.Require() - val := s.network.Validators[0] - - kb := s.network.Validators[0].ClientCtx.Keyring - acc, _, err := kb.NewMnemonic("tipperAccount", keyring.English, sdk.FullFundraiserPath, keyring.DefaultBIP39Passphrase, hd.Secp256k1) - require.NoError(err) - - tipper, err := acc.GetAddress() - require.NoError(err) - tipperInitialBal := sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(10000)) - - feePayer := val.Address - fee := sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(1000)) - tip := sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), sdk.NewInt(1000)) - - require.NoError(s.network.WaitForNextBlock()) - _, err = s.createBankMsg(val, tipper, sdk.NewCoins(tipperInitialBal)) - require.NoError(err) - require.NoError(s.network.WaitForNextBlock()) - - bal := s.getBalances(val.ClientCtx, tipper, tip.Denom) - require.True(bal.Equal(tipperInitialBal.Amount)) - - testCases := []struct { - name string - tipper sdk.AccAddress - feePayer sdk.AccAddress - tip sdk.Coin - expectErrAux bool - expectErrBroadCast bool - errMsg string - tipperArgs []string - feePayerArgs []string - }{ - { - name: "when --aux and --sign-mode = direct set: error", - tipper: tipper, - feePayer: feePayer, - tip: tip, - tipperArgs: []string{ - fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirect), - fmt.Sprintf("--%s=%s", flags.FlagTip, tip), - fmt.Sprintf("--%s=true", flags.FlagAux), - }, - expectErrAux: true, - feePayerArgs: []string{ - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFrom, feePayer), - fmt.Sprintf("--%s=%s", flags.FlagFees, fee.String()), - }, - }, - { - name: "both tipper, fee payer uses AMINO: no error", - tipper: tipper, - feePayer: feePayer, - tip: tip, - tipperArgs: []string{ - fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), - fmt.Sprintf("--%s=%s", flags.FlagTip, tip), - fmt.Sprintf("--%s=true", flags.FlagAux), - }, - feePayerArgs: []string{ - fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFrom, feePayer), - fmt.Sprintf("--%s=%s", flags.FlagFees, fee.String()), - }, - }, - { - name: "tipper uses DIRECT_AUX, fee payer uses AMINO: no error", - tipper: tipper, - feePayer: feePayer, - tip: tip, - tipperArgs: []string{ - fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirectAux), - fmt.Sprintf("--%s=%s", flags.FlagTip, tip), - fmt.Sprintf("--%s=true", flags.FlagAux), - }, - feePayerArgs: []string{ - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFrom, feePayer), - fmt.Sprintf("--%s=%s", flags.FlagFees, fee.String()), - }, - }, - { - name: "--tip flag unset: no error", - tipper: tipper, - feePayer: feePayer, - tip: sdk.Coin{Denom: fmt.Sprintf("%stoken", val.Moniker), Amount: sdk.NewInt(0)}, - tipperArgs: []string{ - fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirectAux), - fmt.Sprintf("--%s=true", flags.FlagAux), - }, - feePayerArgs: []string{ - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFrom, feePayer), - fmt.Sprintf("--%s=%s", flags.FlagFees, fee.String()), - }, - }, - { - name: "legacy amino json: no error", - tipper: tipper, - feePayer: feePayer, - tip: tip, - tipperArgs: []string{ - fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), - fmt.Sprintf("--%s=%s", flags.FlagTip, tip), - fmt.Sprintf("--%s=true", flags.FlagAux), - }, - feePayerArgs: []string{ - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFrom, feePayer), - fmt.Sprintf("--%s=%s", flags.FlagFees, fee.String()), - }, - }, - { - name: "tipper uses direct aux, fee payer uses direct: happy case", - tipper: tipper, - feePayer: feePayer, - tip: tip, - tipperArgs: []string{ - fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirectAux), - fmt.Sprintf("--%s=%s", flags.FlagTip, tip), - fmt.Sprintf("--%s=true", flags.FlagAux), - }, - feePayerArgs: []string{ - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFrom, feePayer), - fmt.Sprintf("--%s=%s", flags.FlagFees, fee.String()), - }, - }, - { - name: "chain-id mismatch: error", - tipper: tipper, - feePayer: feePayer, - tip: tip, - tipperArgs: []string{ - fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirectAux), - fmt.Sprintf("--%s=%s", flags.FlagTip, tip), - fmt.Sprintf("--%s=true", flags.FlagAux), - }, - expectErrAux: false, - feePayerArgs: []string{ - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFrom, feePayer), - fmt.Sprintf("--%s=%s", flags.FlagFees, fee.String()), - fmt.Sprintf("--%s=%s", flags.FlagChainID, "foobar"), - }, - expectErrBroadCast: true, - }, - { - name: "wrong denom in tip: error", - tipper: tipper, - feePayer: feePayer, - tip: sdk.Coin{Denom: fmt.Sprintf("%stoken", val.Moniker), Amount: sdk.NewInt(0)}, - tipperArgs: []string{ - fmt.Sprintf("--%s=%s", flags.FlagTip, "1000wrongDenom"), - fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirectAux), - fmt.Sprintf("--%s=true", flags.FlagAux), - }, - feePayerArgs: []string{ - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirect), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFrom, feePayer), - fmt.Sprintf("--%s=%s", flags.FlagFees, fee.String()), - }, - errMsg: "insufficient funds", - }, - { - name: "insufficient fees: error", - tipper: tipper, - feePayer: feePayer, - tip: sdk.Coin{Denom: fmt.Sprintf("%stoken", val.Moniker), Amount: sdk.NewInt(0)}, - tipperArgs: []string{ - fmt.Sprintf("--%s=%s", flags.FlagTip, tip), - fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirectAux), - fmt.Sprintf("--%s=true", flags.FlagAux), - }, - feePayerArgs: []string{ - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeDirect), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFrom, feePayer), - }, - errMsg: "insufficient fees", - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - res, err := govtestutil.MsgSubmitLegacyProposal( - val.ClientCtx, - tipper.String(), - "test", - "test desc", - govtypes.ProposalTypeText, - tc.tipperArgs..., - ) - - if tc.expectErrAux { - require.Error(err) - } else { - require.NoError(err) - genTxFile := testutil.WriteToNewTempFile(s.T(), string(res.Bytes())) - defer genTxFile.Close() - - // broadcast the tx - res, err = TxAuxToFeeExec( - val.ClientCtx, - genTxFile.Name(), - tc.feePayerArgs..., - ) - s.Require().NoError(s.network.WaitForNextBlock()) - - switch { - case tc.expectErrBroadCast: - require.Error(err) - - case tc.errMsg != "": - require.NoError(err) - - var txRes sdk.TxResponse - require.NoError(val.ClientCtx.Codec.UnmarshalJSON(res.Bytes(), &txRes)) - - require.Contains(txRes.RawLog, tc.errMsg) - - default: - require.NoError(err) - - var txRes sdk.TxResponse - require.NoError(val.ClientCtx.Codec.UnmarshalJSON(res.Bytes(), &txRes)) - - require.Equal(uint32(0), txRes.Code) - require.NotNil(int64(0), txRes.Height) - - bal = s.getBalances(val.ClientCtx, tipper, tc.tip.Denom) - tipperInitialBal = tipperInitialBal.Sub(tc.tip) - require.True(bal.Equal(tipperInitialBal.Amount)) - } - } - }) - } -} - -func (s *IntegrationTestSuite) createBankMsg(val *network.Validator, toAddr sdk.AccAddress, amount sdk.Coins, extraFlags ...string) (testutil.BufferWriter, error) { - flags := []string{ - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, - sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - } - - flags = append(flags, extraFlags...) - return clitestutil.MsgSendExec(val.ClientCtx, val.Address, toAddr, amount, flags...) -} - -func (s *IntegrationTestSuite) getBalances(clientCtx client.Context, addr sdk.AccAddress, denom string) math.Int { - resp, err := clitestutil.QueryBalancesExec(clientCtx, addr) - s.Require().NoError(err) - - var balRes banktypes.QueryAllBalancesResponse - err = clientCtx.Codec.UnmarshalJSON(resp.Bytes(), &balRes) - s.Require().NoError(err) - startTokens := balRes.Balances.AmountOf(denom) - return startTokens -} diff --git a/x/auth/client/cli/query.go b/x/auth/client/cli/query.go index 0bf3407be832..b74d3529738c 100644 --- a/x/auth/client/cli/query.go +++ b/x/auth/client/cli/query.go @@ -1,6 +1,7 @@ package cli import ( + "context" "fmt" "strings" @@ -43,11 +44,7 @@ func GetQueryCmd() *cobra.Command { GetAccountCmd(), GetAccountsCmd(), QueryParamsCmd(), -<<<<<<< HEAD -======= - QueryModuleAccountsCmd(), QueryModuleAccountByNameCmd(), ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) ) return cmd @@ -148,35 +145,6 @@ func GetAccountsCmd() *cobra.Command { return cmd } -<<<<<<< HEAD -======= -// QueryAllModuleAccountsCmd returns a list of all the existing module accounts with their account information and permissions -func QueryModuleAccountsCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "module-accounts", - Short: "Query all module accounts", - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - res, err := queryClient.ModuleAccounts(context.Background(), &types.QueryModuleAccountsRequest{}) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - // QueryModuleAccountByNameCmd returns a command to func QueryModuleAccountByNameCmd() *cobra.Command { cmd := &cobra.Command{ @@ -211,7 +179,6 @@ func QueryModuleAccountByNameCmd() *cobra.Command { return cmd } ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) // QueryTxsByEventsCmd returns a command to search through transactions by events. func QueryTxsByEventsCmd() *cobra.Command { cmd := &cobra.Command{ diff --git a/x/auth/client/testutil/suite.go b/x/auth/client/testutil/suite.go index 9e6fd2f03408..822bb2b3e00d 100644 --- a/x/auth/client/testutil/suite.go +++ b/x/auth/client/testutil/suite.go @@ -1131,6 +1131,54 @@ func (s *IntegrationTestSuite) TestGetAccountsCmd() { s.Require().NotEmpty(res.Accounts) } +func (s *IntegrationTestSuite) TestQueryModuleAccountByNameCmd() { + val := s.network.Validators[0] + + testCases := []struct { + name string + moduleName string + expectErr bool + }{ + { + "invalid module name", + "gover", + true, + }, + { + "valid module name", + "mint", + false, + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + clientCtx := val.ClientCtx + + out, err := clitestutil.ExecTestCLICmd(clientCtx, authcli.QueryModuleAccountByNameCmd(), []string{ + tc.moduleName, + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }) + if tc.expectErr { + s.Require().Error(err) + s.Require().NotEqual("internal", err.Error()) + } else { + var res authtypes.QueryModuleAccountByNameResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) + + var account authtypes.AccountI + err := val.ClientCtx.InterfaceRegistry.UnpackAny(res.Account, &account) + s.Require().NoError(err) + + moduleAccount, ok := account.(authtypes.ModuleAccountI) + s.Require().True(ok) + s.Require().Equal(tc.moduleName, moduleAccount.GetName()) + } + }) + } +} + func TestGetBroadcastCommandOfflineFlag(t *testing.T) { clientCtx := client.Context{}.WithOffline(true) clientCtx = clientCtx.WithTxConfig(simapp.MakeTestEncodingConfig().TxConfig) //nolint:staticcheck diff --git a/x/auth/keeper/grpc_query.go b/x/auth/keeper/grpc_query.go index d25118158729..79da18f7cf98 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -81,40 +81,6 @@ func (ak AccountKeeper) Params(c context.Context, req *types.QueryParamsRequest) return &types.QueryParamsResponse{Params: params}, nil } -<<<<<<< HEAD -======= - -// ModuleAccounts returns all the existing Module Accounts -func (ak AccountKeeper) ModuleAccounts(c context.Context, req *types.QueryModuleAccountsRequest) (*types.QueryModuleAccountsResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "empty request") - } - - 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 = append(sortedPermAddrs, moduleName) - } - sort.Strings(sortedPermAddrs) - - modAccounts := make([]*codectypes.Any, 0, len(ak.permAddrs)) - - for _, moduleName := range sortedPermAddrs { - 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) - } - - return &types.QueryModuleAccountsResponse{Accounts: modAccounts}, nil -} // ModuleAccountByName returns module account by module name func (ak AccountKeeper) ModuleAccountByName(c context.Context, req *types.QueryModuleAccountByNameRequest) (*types.QueryModuleAccountByNameResponse, error) { @@ -140,88 +106,3 @@ func (ak AccountKeeper) ModuleAccountByName(c context.Context, req *types.QueryM return &types.QueryModuleAccountByNameResponse{Account: any}, nil } - -// 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() - if err != nil { - return nil, err - } - - return &types.Bech32PrefixResponse{Bech32Prefix: bech32Prefix}, nil -} - -// 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) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "empty request") - } - - if len(req.AddressBytes) == 0 { - return nil, errors.New("empty address bytes is not allowed") - } - - text, err := ak.addressCdc.BytesToString(req.AddressBytes) - if err != nil { - return nil, err - } - - return &types.AddressBytesToStringResponse{AddressString: text}, nil -} - -// 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) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "empty request") - } - - if len(strings.TrimSpace(req.AddressString)) == 0 { - return nil, errors.New("empty address string is not allowed") - } - - bz, err := ak.addressCdc.StringToBytes(req.AddressString) - if err != nil { - return nil, err - } - - 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") - } - - 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.BaseAccount{ - Address: addr.String(), - PubKey: pkAny, - AccountNumber: account.GetAccountNumber(), - Sequence: account.GetSequence(), - }, - }, nil -} ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) diff --git a/x/auth/keeper/grpc_query_test.go b/x/auth/keeper/grpc_query_test.go index 8eb39fd9fff9..2a6f5a6d6d87 100644 --- a/x/auth/keeper/grpc_query_test.go +++ b/x/auth/keeper/grpc_query_test.go @@ -187,98 +187,6 @@ func (suite *KeeperTestSuite) TestGRPCQueryParameters() { }) } } -<<<<<<< HEAD -======= - -func (suite *KeeperTestSuite) TestGRPCQueryModuleAccounts() { - var req *types.QueryModuleAccountsRequest - - testCases := []struct { - msg string - malleate func() - expPass bool - posttests func(res *types.QueryModuleAccountsResponse) - }{ - { - "success", - func() { - req = &types.QueryModuleAccountsRequest{} - }, - true, - func(res *types.QueryModuleAccountsResponse) { - mintModuleExists := false - for _, acc := range res.Accounts { - var account types.AccountI - err := suite.encCfg.InterfaceRegistry.UnpackAny(acc, &account) - suite.Require().NoError(err) - - moduleAccount, ok := account.(types.ModuleAccountI) - - suite.Require().True(ok) - if moduleAccount.GetName() == "mint" { - mintModuleExists = true - } - } - suite.Require().True(mintModuleExists) - }, - }, - { - "invalid module name", - func() { - req = &types.QueryModuleAccountsRequest{} - }, - true, - func(res *types.QueryModuleAccountsResponse) { - mintModuleExists := false - for _, acc := range res.Accounts { - var account types.AccountI - err := suite.encCfg.InterfaceRegistry.UnpackAny(acc, &account) - suite.Require().NoError(err) - - moduleAccount, ok := account.(types.ModuleAccountI) - - suite.Require().True(ok) - if moduleAccount.GetName() == "falseCase" { - mintModuleExists = true - } - } - suite.Require().False(mintModuleExists) - }, - }, - } - - for _, tc := range testCases { - suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { - suite.SetupTest() // reset - - tc.malleate() - ctx := sdk.WrapSDKContext(suite.ctx) - - res, err := suite.queryClient.ModuleAccounts(ctx, req) - - if tc.expPass { - suite.Require().NoError(err) - suite.Require().NotNil(res) - // Make sure output is sorted alphabetically. - var moduleNames []string - for _, any := range res.Accounts { - var account types.AccountI - err := suite.encCfg.InterfaceRegistry.UnpackAny(any, &account) - suite.Require().NoError(err) - moduleAccount, ok := account.(types.ModuleAccountI) - suite.Require().True(ok) - moduleNames = append(moduleNames, moduleAccount.GetName()) - } - suite.Require().True(sort.StringsAreSorted(moduleNames)) - } else { - suite.Require().Error(err) - suite.Require().Nil(res) - } - - tc.posttests(res) - }) - } -} func (suite *KeeperTestSuite) TestGRPCQueryModuleAccountByName() { var req *types.QueryModuleAccountByNameRequest @@ -297,7 +205,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryModuleAccountByName() { true, func(res *types.QueryModuleAccountByNameResponse) { var account types.AccountI - err := suite.encCfg.InterfaceRegistry.UnpackAny(res.Account, &account) + err := suite.app.InterfaceRegistry().UnpackAny(res.Account, &account) suite.Require().NoError(err) moduleAccount, ok := account.(types.ModuleAccountI) @@ -334,122 +242,3 @@ func (suite *KeeperTestSuite) TestGRPCQueryModuleAccountByName() { }) } } - -func (suite *KeeperTestSuite) TestBech32Prefix() { - suite.SetupTest() // reset - req := &types.Bech32PrefixRequest{} - res, err := suite.queryClient.Bech32Prefix(context.Background(), req) - suite.Require().NoError(err) - suite.Require().NotNil(res) - suite.Require().Equal(sdk.Bech32MainPrefix, res.Bech32Prefix) -} - -func (suite *KeeperTestSuite) TestAddressBytesToString() { - testCases := []struct { - msg string - req *types.AddressBytesToStringRequest - expPass bool - }{ - { - "success", - &types.AddressBytesToStringRequest{AddressBytes: addrBytes}, - true, - }, - { - "request is empty", - &types.AddressBytesToStringRequest{}, - false, - }, - { - "empty account address in request", - &types.AddressBytesToStringRequest{AddressBytes: []byte{}}, - false, - }, - } - - for _, tc := range testCases { - suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { - suite.SetupTest() // reset - - res, err := suite.queryClient.AddressBytesToString(context.Background(), tc.req) - - if tc.expPass { - suite.Require().NoError(err) - suite.Require().NotNil(res) - suite.Require().Equal(res.AddressString, addrStr) - } else { - suite.Require().Error(err) - suite.Require().Nil(res) - } - }) - } -} - -func (suite *KeeperTestSuite) TestAddressStringToBytes() { - testCases := []struct { - msg string - req *types.AddressStringToBytesRequest - expPass bool - }{ - { - "success", - &types.AddressStringToBytesRequest{AddressString: addrStr}, - true, - }, - { - "request is empty", - &types.AddressStringToBytesRequest{}, - false, - }, - { - "AddressString field in request is empty", - &types.AddressStringToBytesRequest{AddressString: ""}, - false, - }, - { - "address prefix is incorrect", - &types.AddressStringToBytesRequest{AddressString: "regen13c3d4wq2t22dl0dstraf8jc3f902e3fsy9n3wv"}, - false, - }, - } - - for _, tc := range testCases { - suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { - suite.SetupTest() // reset - - res, err := suite.queryClient.AddressStringToBytes(context.Background(), tc.req) - - if tc.expPass { - suite.Require().NoError(err) - suite.Require().NotNil(res) - suite.Require().True(bytes.Equal(res.AddressBytes, addrBytes)) - } else { - suite.Require().Error(err) - suite.Require().Nil(res) - } - }) - } -} - -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) -} ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) diff --git a/x/auth/types/query.pb.go b/x/auth/types/query.pb.go index 49d4e080f8be..22fc3476fe03 100644 --- a/x/auth/types/query.pb.go +++ b/x/auth/types/query.pb.go @@ -180,15 +180,6 @@ var xxx_messageInfo_QueryAccountRequest proto.InternalMessageInfo type QueryAccountResponse struct { // account defines the account of the corresponding address. Account *types.Any `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` -<<<<<<< HEAD -} - -func (m *QueryAccountResponse) Reset() { *m = QueryAccountResponse{} } -func (m *QueryAccountResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAccountResponse) ProtoMessage() {} -func (*QueryAccountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{3} -======= } func (m *QueryAccountResponse) Reset() { *m = QueryAccountResponse{} } @@ -314,111 +305,16 @@ func (m *QueryParamsResponse) GetParams() Params { return Params{} } -// QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. -// -// Since: cosmos-sdk 0.46 -type QueryModuleAccountsRequest struct { -} - -func (m *QueryModuleAccountsRequest) Reset() { *m = QueryModuleAccountsRequest{} } -func (m *QueryModuleAccountsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryModuleAccountsRequest) ProtoMessage() {} -func (*QueryModuleAccountsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{6} ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) -} -func (m *QueryModuleAccountsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryModuleAccountsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryModuleAccountsRequest.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 *QueryModuleAccountsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryModuleAccountsRequest.Merge(m, src) -} -func (m *QueryModuleAccountsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryModuleAccountsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryModuleAccountsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryModuleAccountsRequest proto.InternalMessageInfo - -// QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. -// -// Since: cosmos-sdk 0.46 -type QueryModuleAccountsResponse struct { - Accounts []*types.Any `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` -} - -func (m *QueryModuleAccountsResponse) Reset() { *m = QueryModuleAccountsResponse{} } -func (m *QueryModuleAccountsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryModuleAccountsResponse) ProtoMessage() {} -func (*QueryModuleAccountsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{7} -} -func (m *QueryModuleAccountsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryModuleAccountsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryModuleAccountsResponse.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 *QueryModuleAccountsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryModuleAccountsResponse.Merge(m, src) -} -func (m *QueryModuleAccountsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryModuleAccountsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryModuleAccountsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryModuleAccountsResponse proto.InternalMessageInfo - -func (m *QueryModuleAccountsResponse) GetAccounts() []*types.Any { - if m != nil { - return m.Accounts - } - return nil -} - // QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. type QueryModuleAccountByNameRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } -<<<<<<< HEAD -func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } -func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryParamsRequest) ProtoMessage() {} -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{4} -======= func (m *QueryModuleAccountByNameRequest) Reset() { *m = QueryModuleAccountByNameRequest{} } func (m *QueryModuleAccountByNameRequest) String() string { return proto.CompactTextString(m) } func (*QueryModuleAccountByNameRequest) ProtoMessage() {} func (*QueryModuleAccountByNameRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{8} ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) + return fileDescriptor_c451370b3929a27c, []int{6} } func (m *QueryModuleAccountByNameRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -447,26 +343,6 @@ func (m *QueryModuleAccountByNameRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryModuleAccountByNameRequest proto.InternalMessageInfo -<<<<<<< HEAD -// QueryParamsResponse is the response type for the Query/Params RPC method. -type QueryParamsResponse struct { - // params defines the parameters of the module. - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` -} - -func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } -func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryParamsResponse) ProtoMessage() {} -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{5} -} -func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) -======= func (m *QueryModuleAccountByNameRequest) GetName() string { if m != nil { return m.Name @@ -483,7 +359,7 @@ func (m *QueryModuleAccountByNameResponse) Reset() { *m = QueryModuleAcc func (m *QueryModuleAccountByNameResponse) String() string { return proto.CompactTextString(m) } func (*QueryModuleAccountByNameResponse) ProtoMessage() {} func (*QueryModuleAccountByNameResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{9} + return fileDescriptor_c451370b3929a27c, []int{7} } func (m *QueryModuleAccountByNameResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -491,7 +367,6 @@ func (m *QueryModuleAccountByNameResponse) XXX_Unmarshal(b []byte) error { func (m *QueryModuleAccountByNameResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryModuleAccountByNameResponse.Marshal(b, m, deterministic) ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -501,23 +376,6 @@ func (m *QueryModuleAccountByNameResponse) XXX_Marshal(b []byte, deterministic b return b[:n], nil } } -<<<<<<< HEAD -func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsResponse.Merge(m, src) -} -func (m *QueryParamsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo - -func (m *QueryParamsResponse) GetParams() Params { - if m != nil { - return m.Params -======= func (m *QueryModuleAccountByNameResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryModuleAccountByNameResponse.Merge(m, src) } @@ -533,9 +391,8 @@ var xxx_messageInfo_QueryModuleAccountByNameResponse proto.InternalMessageInfo func (m *QueryModuleAccountByNameResponse) GetAccount() *types.Any { if m != nil { return m.Account ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) } - return Params{} + return nil } func init() { @@ -545,78 +402,54 @@ func init() { proto.RegisterType((*QueryAccountResponse)(nil), "cosmos.auth.v1beta1.QueryAccountResponse") proto.RegisterType((*QueryParamsRequest)(nil), "cosmos.auth.v1beta1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "cosmos.auth.v1beta1.QueryParamsResponse") + proto.RegisterType((*QueryModuleAccountByNameRequest)(nil), "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest") + proto.RegisterType((*QueryModuleAccountByNameResponse)(nil), "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse") } -<<<<<<< HEAD func init() { proto.RegisterFile("cosmos/auth/v1beta1/query.proto", fileDescriptor_c451370b3929a27c) } var fileDescriptor_c451370b3929a27c = []byte{ - // 537 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x41, 0x6b, 0x13, 0x4f, - 0x18, 0xc6, 0x77, 0xda, 0xff, 0x3f, 0x89, 0x53, 0x4f, 0xd3, 0x08, 0x71, 0x6b, 0x77, 0xcb, 0x8a, - 0x26, 0x29, 0x74, 0x86, 0xc6, 0x53, 0x45, 0x84, 0x46, 0x50, 0xbc, 0xc5, 0xc5, 0x93, 0x07, 0x65, - 0x36, 0x19, 0xb7, 0x41, 0xb3, 0xb3, 0xcd, 0xec, 0x8a, 0x41, 0x04, 0xf1, 0xd4, 0x9b, 0x82, 0x5f, - 0x20, 0x37, 0xbf, 0x80, 0x1f, 0xa2, 0x78, 0x2a, 0x78, 0xf1, 0x24, 0x92, 0x78, 0xf0, 0x63, 0x48, - 0x66, 0xde, 0x89, 0x8d, 0xac, 0x26, 0xa7, 0xdd, 0x99, 0x79, 0x9f, 0xe7, 0xf9, 0xbd, 0xef, 0x0c, - 0xf6, 0xbb, 0x52, 0x0d, 0xa4, 0x62, 0x3c, 0xcf, 0x8e, 0xd8, 0x8b, 0xfd, 0x48, 0x64, 0x7c, 0x9f, - 0x1d, 0xe7, 0x62, 0x38, 0xa2, 0xe9, 0x50, 0x66, 0x92, 0x6c, 0x9a, 0x02, 0x3a, 0x2b, 0xa0, 0x50, - 0xe0, 0xee, 0x82, 0x2a, 0xe2, 0x4a, 0x98, 0xea, 0xb9, 0x36, 0xe5, 0x71, 0x3f, 0xe1, 0x59, 0x5f, - 0x26, 0xc6, 0xc0, 0xad, 0xc6, 0x32, 0x96, 0xfa, 0x97, 0xcd, 0xfe, 0x60, 0xf7, 0x72, 0x2c, 0x65, - 0xfc, 0x5c, 0x30, 0xbd, 0x8a, 0xf2, 0xa7, 0x8c, 0x27, 0x90, 0xe8, 0x5e, 0x81, 0x23, 0x9e, 0xf6, - 0x19, 0x4f, 0x12, 0x99, 0x69, 0x37, 0x05, 0xa7, 0x5e, 0x11, 0xb0, 0x86, 0x03, 0x63, 0x73, 0xfe, - 0xc4, 0x24, 0x02, 0xbc, 0x5e, 0x04, 0x8f, 0x71, 0xf5, 0xc1, 0x8c, 0xf5, 0xb0, 0xdb, 0x95, 0x79, - 0x92, 0xa9, 0x50, 0x1c, 0xe7, 0x42, 0x65, 0xe4, 0x2e, 0xc6, 0xbf, 0xa9, 0x6b, 0x68, 0x07, 0x35, - 0x36, 0x5a, 0xd7, 0x29, 0x48, 0x67, 0x2d, 0x52, 0x33, 0x10, 0x48, 0xa3, 0x1d, 0x1e, 0x0b, 0xd0, - 0x86, 0xe7, 0x94, 0xc1, 0x18, 0xe1, 0x4b, 0x7f, 0x04, 0xa8, 0x54, 0x26, 0x4a, 0x90, 0xdb, 0xb8, - 0xc2, 0x61, 0xaf, 0x86, 0x76, 0xd6, 0x1b, 0x1b, 0xad, 0x2a, 0x35, 0x5d, 0x52, 0x3b, 0x00, 0x7a, - 0x98, 0x8c, 0xda, 0x17, 0x3f, 0x7f, 0xda, 0xab, 0x80, 0xfa, 0x7e, 0x38, 0xd7, 0x90, 0x7b, 0x0b, - 0x84, 0x6b, 0x9a, 0xb0, 0xbe, 0x94, 0xd0, 0x84, 0x2f, 0x20, 0x1e, 0xe0, 0xcd, 0xf3, 0x84, 0x76, - 0x02, 0x35, 0x5c, 0xe6, 0xbd, 0xde, 0x50, 0x28, 0xa5, 0xdb, 0xbf, 0x10, 0xda, 0xe5, 0xcd, 0xca, - 0xc9, 0xd8, 0x77, 0x7e, 0x8e, 0x7d, 0x27, 0x78, 0xb8, 0x38, 0xbd, 0x79, 0x6f, 0xb7, 0x70, 0x19, - 0x38, 0x61, 0x74, 0xab, 0xb4, 0x66, 0x25, 0x41, 0x15, 0x13, 0xed, 0xda, 0xe1, 0x43, 0x3e, 0xb0, - 0x37, 0x12, 0x74, 0x00, 0xd3, 0xee, 0x42, 0xd4, 0x01, 0x2e, 0xa5, 0x7a, 0x07, 0x92, 0xb6, 0x68, - 0xc1, 0xe3, 0xa4, 0x46, 0xd4, 0xfe, 0xef, 0xf4, 0x9b, 0xef, 0x84, 0x20, 0x68, 0x7d, 0x5c, 0xc7, - 0xff, 0x6b, 0x4b, 0x72, 0x82, 0xb0, 0xe5, 0x50, 0xa4, 0x59, 0xe8, 0x50, 0xf4, 0x4a, 0xdc, 0xdd, - 0x55, 0x4a, 0x0d, 0x68, 0x70, 0xed, 0xed, 0x97, 0x1f, 0x1f, 0xd6, 0x7c, 0xb2, 0xcd, 0x0a, 0x5f, - 0xab, 0x4d, 0x7f, 0x87, 0x70, 0x19, 0xb4, 0xa4, 0xb1, 0xd4, 0xde, 0x82, 0x34, 0x57, 0xa8, 0x04, - 0x0e, 0xa6, 0x39, 0x9a, 0xa4, 0xfe, 0x4f, 0x0e, 0xf6, 0x0a, 0x6e, 0xfb, 0x35, 0x79, 0x83, 0x70, - 0xc9, 0xcc, 0x8f, 0xd4, 0xff, 0x1e, 0xb3, 0x70, 0x59, 0x6e, 0x63, 0x79, 0x21, 0xe0, 0x5c, 0xd5, - 0x38, 0xdb, 0x64, 0xab, 0x10, 0xc7, 0xdc, 0x54, 0xfb, 0xce, 0xe9, 0xc4, 0x43, 0x67, 0x13, 0x0f, - 0x7d, 0x9f, 0x78, 0xe8, 0xfd, 0xd4, 0x73, 0xce, 0xa6, 0x9e, 0xf3, 0x75, 0xea, 0x39, 0x8f, 0x9a, - 0x71, 0x3f, 0x3b, 0xca, 0x23, 0xda, 0x95, 0x03, 0x6b, 0x60, 0x3e, 0x7b, 0xaa, 0xf7, 0x8c, 0xbd, - 0x34, 0x6e, 0xd9, 0x28, 0x15, 0x2a, 0x2a, 0xe9, 0xb7, 0x77, 0xe3, 0x57, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x2a, 0xe1, 0x81, 0xd3, 0xdf, 0x04, 0x00, 0x00, -======= -func (m *Bech32PrefixRequest) Reset() { *m = Bech32PrefixRequest{} } -func (m *Bech32PrefixRequest) String() string { return proto.CompactTextString(m) } -func (*Bech32PrefixRequest) ProtoMessage() {} -func (*Bech32PrefixRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{10} -} -func (m *Bech32PrefixRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Bech32PrefixRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Bech32PrefixRequest.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 *Bech32PrefixRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_Bech32PrefixRequest.Merge(m, src) -} -func (m *Bech32PrefixRequest) XXX_Size() int { - return m.Size() -} -func (m *Bech32PrefixRequest) XXX_DiscardUnknown() { - xxx_messageInfo_Bech32PrefixRequest.DiscardUnknown(m) ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) + // 625 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x4f, 0x6b, 0x13, 0x4f, + 0x18, 0xc7, 0x77, 0xfb, 0xeb, 0x2f, 0x89, 0x53, 0xf1, 0x30, 0x89, 0x10, 0xb7, 0x76, 0x37, 0xac, + 0x68, 0x92, 0x4a, 0x66, 0x69, 0x6a, 0x0f, 0x15, 0x11, 0x1a, 0x41, 0xf1, 0xa0, 0xc4, 0xe0, 0xc9, + 0x83, 0x65, 0x92, 0x4c, 0xb7, 0xc1, 0xee, 0xce, 0x36, 0xb3, 0x2b, 0x06, 0x29, 0x88, 0xa7, 0xde, + 0x14, 0x7c, 0x03, 0x79, 0x11, 0x05, 0xdf, 0x42, 0xe9, 0xa9, 0xe0, 0xc5, 0x93, 0x68, 0xe2, 0xc1, + 0x97, 0x21, 0x99, 0x79, 0x36, 0x69, 0x64, 0x63, 0xe2, 0x69, 0xe7, 0xcf, 0xf3, 0x7d, 0xbe, 0x9f, + 0xe7, 0x99, 0x67, 0x91, 0xd5, 0xe2, 0xc2, 0xe3, 0xc2, 0xa1, 0x51, 0xb8, 0xef, 0xbc, 0xde, 0x68, + 0xb2, 0x90, 0x6e, 0x38, 0x87, 0x11, 0xeb, 0xf6, 0x48, 0xd0, 0xe5, 0x21, 0xc7, 0x59, 0x15, 0x40, + 0x46, 0x01, 0x04, 0x02, 0x8c, 0x75, 0x50, 0x35, 0xa9, 0x60, 0x2a, 0x7a, 0xac, 0x0d, 0xa8, 0xdb, + 0xf1, 0x69, 0xd8, 0xe1, 0xbe, 0x4a, 0x60, 0xe4, 0x5c, 0xee, 0x72, 0xb9, 0x74, 0x46, 0x2b, 0x38, + 0xbd, 0xe6, 0x72, 0xee, 0x1e, 0x30, 0x47, 0xee, 0x9a, 0xd1, 0x9e, 0x43, 0x7d, 0x70, 0x34, 0xae, + 0xc3, 0x15, 0x0d, 0x3a, 0x0e, 0xf5, 0x7d, 0x1e, 0xca, 0x6c, 0x02, 0x6e, 0xcd, 0x24, 0x60, 0x09, + 0x07, 0x89, 0xd5, 0xfd, 0xae, 0x72, 0x04, 0x78, 0xb9, 0xb1, 0x5f, 0xa2, 0xdc, 0xb3, 0x11, 0xeb, + 0x4e, 0xab, 0xc5, 0x23, 0x3f, 0x14, 0x0d, 0x76, 0x18, 0x31, 0x11, 0xe2, 0x87, 0x08, 0x4d, 0xa8, + 0xf3, 0x7a, 0x41, 0x2f, 0xad, 0x54, 0x6f, 0x11, 0x90, 0x8e, 0x4a, 0x24, 0xaa, 0x21, 0xe0, 0x46, + 0xea, 0xd4, 0x65, 0xa0, 0x6d, 0x5c, 0x50, 0xda, 0x7d, 0x1d, 0x5d, 0xfd, 0xc3, 0x40, 0x04, 0xdc, + 0x17, 0x0c, 0xdf, 0x47, 0x19, 0x0a, 0x67, 0x79, 0xbd, 0xf0, 0x5f, 0x69, 0xa5, 0x9a, 0x23, 0xaa, + 0x4a, 0x12, 0x37, 0x80, 0xec, 0xf8, 0xbd, 0xda, 0xe5, 0xb3, 0x93, 0x4a, 0x06, 0xd4, 0x8f, 0x1b, + 0x63, 0x0d, 0x7e, 0x34, 0x45, 0xb8, 0x24, 0x09, 0x8b, 0x73, 0x09, 0x95, 0xf9, 0x14, 0xe2, 0x36, + 0xca, 0x5e, 0x24, 0x8c, 0x3b, 0x90, 0x47, 0x69, 0xda, 0x6e, 0x77, 0x99, 0x10, 0xb2, 0xfc, 0x4b, + 0x8d, 0x78, 0x7b, 0x37, 0x73, 0xdc, 0xb7, 0xb4, 0x5f, 0x7d, 0x4b, 0xb3, 0x9f, 0x4f, 0x77, 0x6f, + 0x5c, 0xdb, 0x3d, 0x94, 0x06, 0x4e, 0x68, 0xdd, 0x22, 0xa5, 0xc5, 0x12, 0x3b, 0x87, 0xb0, 0xcc, + 0x5a, 0xa7, 0x5d, 0xea, 0xc5, 0x2f, 0x62, 0xd7, 0x01, 0x33, 0x3e, 0x05, 0xab, 0x6d, 0x94, 0x0a, + 0xe4, 0x09, 0x38, 0xad, 0x92, 0x84, 0xe1, 0x24, 0x4a, 0x54, 0x5b, 0x3e, 0xfd, 0x66, 0x69, 0x0d, + 0x10, 0xd8, 0x5b, 0xc8, 0x92, 0x19, 0x9f, 0xf0, 0x76, 0x74, 0xc0, 0x80, 0xa3, 0xd6, 0x7b, 0x4a, + 0xbd, 0xf8, 0x29, 0x31, 0x46, 0xcb, 0x3e, 0xf5, 0x18, 0x74, 0x40, 0xae, 0xed, 0x3d, 0x54, 0x98, + 0x2d, 0x03, 0xaa, 0xda, 0x62, 0x0d, 0xc0, 0x67, 0x27, 0x95, 0x2b, 0x53, 0x79, 0x26, 0x6d, 0xa8, + 0xfe, 0x58, 0x46, 0xff, 0x4b, 0x23, 0x7c, 0xac, 0xa3, 0xb8, 0x4d, 0x02, 0x97, 0x13, 0x0b, 0x4c, + 0x1a, 0x62, 0x63, 0x7d, 0x91, 0x50, 0x45, 0x6c, 0xdf, 0x7c, 0xff, 0xe5, 0xe7, 0xa7, 0x25, 0x0b, + 0xaf, 0x39, 0x89, 0x3f, 0x53, 0xec, 0xfe, 0x41, 0x47, 0x69, 0xd0, 0xe2, 0xd2, 0xdc, 0xf4, 0x31, + 0x48, 0x79, 0x81, 0x48, 0xe0, 0x70, 0x24, 0x47, 0x19, 0x17, 0xff, 0xca, 0xe1, 0xbc, 0x85, 0x61, + 0x3c, 0xc2, 0xef, 0x74, 0x94, 0x52, 0xcf, 0x8b, 0x8b, 0xb3, 0x6d, 0xa6, 0x66, 0xc9, 0x28, 0xcd, + 0x0f, 0x04, 0x9c, 0x1b, 0x12, 0x67, 0x0d, 0xaf, 0x26, 0xe2, 0xa8, 0x41, 0xc2, 0x9f, 0x75, 0x94, + 0x4d, 0x98, 0x06, 0x7c, 0x67, 0xb6, 0xcd, 0xec, 0x99, 0x33, 0xb6, 0xfe, 0x51, 0x05, 0xa4, 0x9b, + 0x92, 0xb4, 0x82, 0x6f, 0x27, 0x92, 0x7a, 0x52, 0xb9, 0x3b, 0xe9, 0xdf, 0x68, 0x94, 0x8f, 0x6a, + 0x0f, 0x4e, 0x07, 0xa6, 0x7e, 0x3e, 0x30, 0xf5, 0xef, 0x03, 0x53, 0xff, 0x38, 0x34, 0xb5, 0xf3, + 0xa1, 0xa9, 0x7d, 0x1d, 0x9a, 0xda, 0x8b, 0xb2, 0xdb, 0x09, 0xf7, 0xa3, 0x26, 0x69, 0x71, 0x2f, + 0x4e, 0xa8, 0x3e, 0x15, 0xd1, 0x7e, 0xe5, 0xbc, 0x51, 0xd9, 0xc3, 0x5e, 0xc0, 0x44, 0x33, 0x25, + 0x67, 0x7a, 0xf3, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xde, 0x85, 0xd2, 0xba, 0x38, 0x06, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -639,42 +472,12 @@ type QueryClient interface { Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*QueryAccountResponse, error) // Params queries all parameters. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // ModuleAccountByName returns the module account info by module name + ModuleAccountByName(ctx context.Context, in *QueryModuleAccountByNameRequest, opts ...grpc.CallOption) (*QueryModuleAccountByNameResponse, error) } -<<<<<<< HEAD type queryClient struct { cc grpc1.ClientConn -======= -func (m *Bech32PrefixResponse) Reset() { *m = Bech32PrefixResponse{} } -func (m *Bech32PrefixResponse) String() string { return proto.CompactTextString(m) } -func (*Bech32PrefixResponse) ProtoMessage() {} -func (*Bech32PrefixResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{11} -} -func (m *Bech32PrefixResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Bech32PrefixResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Bech32PrefixResponse.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 *Bech32PrefixResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_Bech32PrefixResponse.Merge(m, src) -} -func (m *Bech32PrefixResponse) XXX_Size() int { - return m.Size() -} -func (m *Bech32PrefixResponse) XXX_DiscardUnknown() { - xxx_messageInfo_Bech32PrefixResponse.DiscardUnknown(m) ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) } func NewQueryClient(cc grpc1.ClientConn) QueryClient { @@ -690,33 +493,11 @@ func (c *queryClient) Accounts(ctx context.Context, in *QueryAccountsRequest, op return out, nil } -<<<<<<< HEAD func (c *queryClient) Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*QueryAccountResponse, error) { out := new(QueryAccountResponse) err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/Account", in, out, opts...) if err != nil { return nil, err -======= -func (m *AddressBytesToStringRequest) Reset() { *m = AddressBytesToStringRequest{} } -func (m *AddressBytesToStringRequest) String() string { return proto.CompactTextString(m) } -func (*AddressBytesToStringRequest) ProtoMessage() {} -func (*AddressBytesToStringRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{12} -} -func (m *AddressBytesToStringRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AddressBytesToStringRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AddressBytesToStringRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) } return out, nil } @@ -730,6 +511,15 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } +func (c *queryClient) ModuleAccountByName(ctx context.Context, in *QueryModuleAccountByNameRequest, opts ...grpc.CallOption) (*QueryModuleAccountByNameResponse, error) { + out := new(QueryModuleAccountByNameResponse) + err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/ModuleAccountByName", 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 @@ -740,33 +530,12 @@ type QueryServer interface { Account(context.Context, *QueryAccountRequest) (*QueryAccountResponse, error) // Params queries all parameters. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // ModuleAccountByName returns the module account info by module name + ModuleAccountByName(context.Context, *QueryModuleAccountByNameRequest) (*QueryModuleAccountByNameResponse, error) } -<<<<<<< HEAD // UnimplementedQueryServer can be embedded to have forward compatible implementations. type UnimplementedQueryServer struct { -======= -func (m *AddressBytesToStringResponse) Reset() { *m = AddressBytesToStringResponse{} } -func (m *AddressBytesToStringResponse) String() string { return proto.CompactTextString(m) } -func (*AddressBytesToStringResponse) ProtoMessage() {} -func (*AddressBytesToStringResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{13} -} -func (m *AddressBytesToStringResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AddressBytesToStringResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AddressBytesToStringResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) } func (*UnimplementedQueryServer) Accounts(ctx context.Context, req *QueryAccountsRequest) (*QueryAccountsResponse, error) { @@ -778,6 +547,9 @@ func (*UnimplementedQueryServer) Account(ctx context.Context, req *QueryAccountR func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } +func (*UnimplementedQueryServer) ModuleAccountByName(ctx context.Context, req *QueryModuleAccountByNameRequest) (*QueryModuleAccountByNameResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ModuleAccountByName not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -801,32 +573,10 @@ func _Query_Accounts_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } -<<<<<<< HEAD func _Query_Account_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryAccountRequest) if err := dec(in); err != nil { return nil, err -======= -func (m *AddressStringToBytesRequest) Reset() { *m = AddressStringToBytesRequest{} } -func (m *AddressStringToBytesRequest) String() string { return proto.CompactTextString(m) } -func (*AddressStringToBytesRequest) ProtoMessage() {} -func (*AddressStringToBytesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{14} -} -func (m *AddressStringToBytesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AddressStringToBytesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AddressStringToBytesRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) } if interceptor == nil { return srv.(QueryServer).Account(ctx, in) @@ -859,6 +609,24 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } +func _Query_ModuleAccountByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryModuleAccountByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ModuleAccountByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1beta1.Query/ModuleAccountByName", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ModuleAccountByName(ctx, req.(*QueryModuleAccountByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.auth.v1beta1.Query", HandlerType: (*QueryServer)(nil), @@ -875,12 +643,15 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Params", Handler: _Query_Params_Handler, }, + { + MethodName: "ModuleAccountByName", + Handler: _Query_ModuleAccountByName_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/auth/v1beta1/query.proto", } -<<<<<<< HEAD func (m *QueryAccountsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -889,13 +660,6 @@ func (m *QueryAccountsRequest) Marshal() (dAtA []byte, err error) { return nil, err } return dAtA[:n], nil -======= -func (m *AddressStringToBytesResponse) Reset() { *m = AddressStringToBytesResponse{} } -func (m *AddressStringToBytesResponse) String() string { return proto.CompactTextString(m) } -func (*AddressStringToBytesResponse) ProtoMessage() {} -func (*AddressStringToBytesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{15} ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) } func (m *QueryAccountsRequest) MarshalTo(dAtA []byte) (int, error) { @@ -938,7 +702,6 @@ func (m *QueryAccountsResponse) MarshalTo(dAtA []byte) (int, error) { return m.MarshalToSizedBuffer(dAtA[:size]) } -<<<<<<< HEAD func (m *QueryAccountsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i @@ -952,25 +715,6 @@ func (m *QueryAccountsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i -= size i = encodeVarintQuery(dAtA, i, uint64(size)) -======= -func (m *QueryAccountAddressByIDRequest) Reset() { *m = QueryAccountAddressByIDRequest{} } -func (m *QueryAccountAddressByIDRequest) String() string { return proto.CompactTextString(m) } -func (*QueryAccountAddressByIDRequest) ProtoMessage() {} -func (*QueryAccountAddressByIDRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{16} -} -func (m *QueryAccountAddressByIDRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAccountAddressByIDRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAccountAddressByIDRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) } i-- dAtA[i] = 0x12 @@ -1032,20 +776,9 @@ func (m *QueryAccountResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -<<<<<<< HEAD func (m *QueryAccountResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) -======= -func (m *QueryAccountAddressByIDResponse) Reset() { *m = QueryAccountAddressByIDResponse{} } -func (m *QueryAccountAddressByIDResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAccountAddressByIDResponse) ProtoMessage() {} -func (*QueryAccountAddressByIDResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{17} -} -func (m *QueryAccountAddressByIDResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) } func (m *QueryAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { @@ -1083,23 +816,12 @@ func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { return m.MarshalToSizedBuffer(dAtA[:size]) } -<<<<<<< HEAD func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l return len(dAtA) - i, nil -======= -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{18} -} -func (m *QueryAccountInfoRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) } func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { @@ -1117,7 +839,6 @@ func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { return m.MarshalToSizedBuffer(dAtA[:size]) } -<<<<<<< HEAD func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i @@ -1125,2447 +846,147 @@ func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = l { size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) -======= -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{19} -} -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) ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) if err != nil { return 0, err } -<<<<<<< HEAD i -= size i = encodeVarintQuery(dAtA, i, uint64(size)) -======= - return b[:n], nil } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, 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() *BaseAccount { - if m != nil { - return m.Info +func (m *QueryModuleAccountByNameRequest) 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 nil -} - -func init() { - proto.RegisterType((*QueryAccountsRequest)(nil), "cosmos.auth.v1beta1.QueryAccountsRequest") - proto.RegisterType((*QueryAccountsResponse)(nil), "cosmos.auth.v1beta1.QueryAccountsResponse") - proto.RegisterType((*QueryAccountRequest)(nil), "cosmos.auth.v1beta1.QueryAccountRequest") - proto.RegisterType((*QueryAccountResponse)(nil), "cosmos.auth.v1beta1.QueryAccountResponse") - proto.RegisterType((*QueryParamsRequest)(nil), "cosmos.auth.v1beta1.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "cosmos.auth.v1beta1.QueryParamsResponse") - proto.RegisterType((*QueryModuleAccountsRequest)(nil), "cosmos.auth.v1beta1.QueryModuleAccountsRequest") - proto.RegisterType((*QueryModuleAccountsResponse)(nil), "cosmos.auth.v1beta1.QueryModuleAccountsResponse") - proto.RegisterType((*QueryModuleAccountByNameRequest)(nil), "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest") - proto.RegisterType((*QueryModuleAccountByNameResponse)(nil), "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse") - proto.RegisterType((*Bech32PrefixRequest)(nil), "cosmos.auth.v1beta1.Bech32PrefixRequest") - proto.RegisterType((*Bech32PrefixResponse)(nil), "cosmos.auth.v1beta1.Bech32PrefixResponse") - proto.RegisterType((*AddressBytesToStringRequest)(nil), "cosmos.auth.v1beta1.AddressBytesToStringRequest") - proto.RegisterType((*AddressBytesToStringResponse)(nil), "cosmos.auth.v1beta1.AddressBytesToStringResponse") - proto.RegisterType((*AddressStringToBytesRequest)(nil), "cosmos.auth.v1beta1.AddressStringToBytesRequest") - proto.RegisterType((*AddressStringToBytesResponse)(nil), "cosmos.auth.v1beta1.AddressStringToBytesResponse") - proto.RegisterType((*QueryAccountAddressByIDRequest)(nil), "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest") - proto.RegisterType((*QueryAccountAddressByIDResponse)(nil), "cosmos.auth.v1beta1.QueryAccountAddressByIDResponse") - proto.RegisterType((*QueryAccountInfoRequest)(nil), "cosmos.auth.v1beta1.QueryAccountInfoRequest") - proto.RegisterType((*QueryAccountInfoResponse)(nil), "cosmos.auth.v1beta1.QueryAccountInfoResponse") + return dAtA[:n], nil } -func init() { proto.RegisterFile("cosmos/auth/v1beta1/query.proto", fileDescriptor_c451370b3929a27c) } - -var fileDescriptor_c451370b3929a27c = []byte{ - // 1038 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0x4f, 0x6f, 0x1b, 0xc5, - 0x1b, 0xc7, 0xbd, 0x69, 0x7e, 0x49, 0x7e, 0x4f, 0xdc, 0x20, 0x4d, 0x5c, 0x11, 0xd6, 0xa9, 0x1d, - 0x6d, 0xa1, 0x71, 0x42, 0xbd, 0xdb, 0x38, 0xa9, 0x44, 0x01, 0x21, 0x65, 0x1b, 0x40, 0x39, 0x14, - 0x19, 0x37, 0x27, 0x0e, 0x58, 0x63, 0x7b, 0xed, 0xac, 0xa8, 0x77, 0x5c, 0xef, 0x1a, 0xd5, 0x8a, - 0x7c, 0x41, 0x42, 0xea, 0x05, 0x09, 0x09, 0x5e, 0x40, 0x0e, 0x88, 0x33, 0x87, 0xc0, 0x89, 0x17, - 0x50, 0xf5, 0x54, 0xc1, 0x85, 0x13, 0x42, 0x09, 0x12, 0xbc, 0x0a, 0x84, 0x3c, 0xf3, 0xcc, 0xfe, - 0x49, 0xc6, 0xf1, 0x46, 0x9c, 0xb2, 0x9e, 0x79, 0x9e, 0xef, 0xf3, 0x99, 0x99, 0x67, 0xe6, 0x1b, - 0x28, 0x36, 0x99, 0xdf, 0x65, 0xbe, 0x45, 0x07, 0xc1, 0xa1, 0xf5, 0xf9, 0x56, 0xc3, 0x09, 0xe8, - 0x96, 0xf5, 0x64, 0xe0, 0xf4, 0x87, 0x66, 0xaf, 0xcf, 0x02, 0x46, 0x96, 0x45, 0x80, 0x39, 0x0e, - 0x30, 0x31, 0x40, 0xdf, 0xc4, 0xac, 0x06, 0xf5, 0x1d, 0x11, 0x1d, 0xe6, 0xf6, 0x68, 0xc7, 0xf5, - 0x68, 0xe0, 0x32, 0x4f, 0x08, 0xe8, 0xb9, 0x0e, 0xeb, 0x30, 0xfe, 0x69, 0x8d, 0xbf, 0x70, 0xf4, - 0xb5, 0x0e, 0x63, 0x9d, 0xc7, 0x8e, 0xc5, 0x7f, 0x35, 0x06, 0x6d, 0x8b, 0x7a, 0x58, 0x51, 0x5f, - 0xc5, 0x29, 0xda, 0x73, 0x2d, 0xea, 0x79, 0x2c, 0xe0, 0x6a, 0x3e, 0xce, 0x16, 0x54, 0xc0, 0x1c, - 0x0e, 0x85, 0xc5, 0x7c, 0x5d, 0x54, 0x44, 0x78, 0x31, 0x95, 0xc7, 0x54, 0x09, 0x1c, 0x5f, 0xa7, - 0xf1, 0x29, 0xe4, 0x3e, 0x1e, 0xff, 0xdc, 0x6d, 0x36, 0xd9, 0xc0, 0x0b, 0xfc, 0x9a, 0xf3, 0x64, - 0xe0, 0xf8, 0x01, 0xf9, 0x00, 0x20, 0x5a, 0xd2, 0x8a, 0xb6, 0xa6, 0x95, 0x16, 0x2b, 0xb7, 0x4d, - 0xd4, 0x1d, 0xaf, 0xdf, 0x14, 0x2a, 0x88, 0x62, 0x56, 0x69, 0xc7, 0xc1, 0xdc, 0x5a, 0x2c, 0xd3, - 0x38, 0xd6, 0xe0, 0xc6, 0xb9, 0x02, 0x7e, 0x8f, 0x79, 0xbe, 0x43, 0xde, 0x83, 0x05, 0x8a, 0x63, - 0x2b, 0xda, 0xda, 0xb5, 0xd2, 0x62, 0x25, 0x67, 0x8a, 0x2d, 0x30, 0xe5, 0xee, 0x98, 0xbb, 0xde, - 0xd0, 0xce, 0xbe, 0x38, 0x29, 0x2f, 0x60, 0xf6, 0x7e, 0x2d, 0xcc, 0x21, 0x1f, 0x26, 0x08, 0x67, - 0x38, 0xe1, 0xfa, 0x54, 0x42, 0x51, 0x3c, 0x81, 0xf8, 0x08, 0x96, 0xe3, 0x84, 0x72, 0x07, 0x2a, - 0x30, 0x4f, 0x5b, 0xad, 0xbe, 0xe3, 0xfb, 0x7c, 0xf9, 0xff, 0xb7, 0x57, 0x7e, 0x39, 0x29, 0xe7, - 0x50, 0x7f, 0x57, 0xcc, 0x3c, 0x0a, 0xfa, 0xae, 0xd7, 0xa9, 0xc9, 0xc0, 0xb7, 0x17, 0x9e, 0x1d, - 0x17, 0x33, 0x7f, 0x1f, 0x17, 0x33, 0xc6, 0x41, 0x72, 0x5f, 0xc3, 0x55, 0xbf, 0x0b, 0xf3, 0xb8, - 0x02, 0xdc, 0xd4, 0x34, 0x8b, 0x96, 0x29, 0x46, 0x0e, 0x08, 0x57, 0xad, 0xd2, 0x3e, 0xed, 0xca, - 0xb3, 0x32, 0xaa, 0xb8, 0x00, 0x39, 0x8a, 0xa5, 0xee, 0xc3, 0x5c, 0x8f, 0x8f, 0x60, 0xa5, 0xbc, - 0xa9, 0xe8, 0x69, 0x53, 0x24, 0xd9, 0xb3, 0xcf, 0x7f, 0x2f, 0x66, 0x6a, 0x98, 0x60, 0xac, 0x82, - 0xce, 0x15, 0x1f, 0xb2, 0xd6, 0xe0, 0xb1, 0x73, 0xae, 0x37, 0x8c, 0x26, 0xe4, 0x95, 0xb3, 0x58, - 0x77, 0x2f, 0xe5, 0xc1, 0x92, 0x17, 0x27, 0xe5, 0xa5, 0x84, 0x46, 0xec, 0x78, 0x8d, 0x7b, 0x50, - 0xbc, 0x58, 0xc4, 0x1e, 0x7e, 0x44, 0xbb, 0xb2, 0xcf, 0x08, 0x81, 0x59, 0x8f, 0x76, 0x1d, 0x71, - 0x3c, 0x35, 0xfe, 0x6d, 0xb4, 0x61, 0x6d, 0x72, 0x1a, 0x02, 0xda, 0xe9, 0xce, 0x40, 0xc5, 0x17, - 0x9e, 0xc4, 0x0d, 0x58, 0xb6, 0x9d, 0xe6, 0xe1, 0x76, 0xa5, 0xda, 0x77, 0xda, 0xee, 0x53, 0xb9, - 0x35, 0xef, 0x40, 0x2e, 0x39, 0x8c, 0x25, 0x6f, 0xc1, 0xf5, 0x06, 0x1f, 0xaf, 0xf7, 0xf8, 0x04, - 0x32, 0x67, 0x1b, 0xb1, 0x60, 0xc3, 0x86, 0x3c, 0xf6, 0x95, 0x3d, 0x0c, 0x1c, 0xff, 0x80, 0x61, - 0x7b, 0xe1, 0x72, 0x6f, 0xc1, 0x75, 0xec, 0xb3, 0x7a, 0x63, 0x3c, 0xcf, 0x35, 0xb2, 0xb5, 0x2c, - 0x8d, 0xe5, 0x18, 0xef, 0xc3, 0xaa, 0x5a, 0x03, 0x41, 0xde, 0x80, 0x25, 0x29, 0xe2, 0xf3, 0x19, - 0x24, 0x91, 0xd2, 0x22, 0xdc, 0xd8, 0x0b, 0x51, 0xc4, 0xc0, 0x01, 0xe3, 0x72, 0x12, 0x25, 0xa5, - 0xca, 0x83, 0x10, 0xe6, 0x9c, 0x4a, 0xb4, 0x2b, 0xd3, 0x57, 0x74, 0x17, 0x0a, 0xf1, 0x9b, 0x14, - 0xae, 0x6e, 0x7f, 0x4f, 0xd2, 0x2c, 0xc1, 0x8c, 0xdb, 0xe2, 0xb9, 0xd7, 0x6a, 0x33, 0x6e, 0xcb, - 0x68, 0x61, 0xeb, 0xa8, 0x32, 0xb0, 0xf2, 0x2e, 0xbc, 0x82, 0x27, 0x59, 0x4f, 0x7b, 0xc9, 0x97, - 0x68, 0x42, 0xce, 0x78, 0x08, 0xaf, 0xc6, 0xab, 0xec, 0x7b, 0x6d, 0xf6, 0x1f, 0x9e, 0x0e, 0xa3, - 0x0a, 0x2b, 0x17, 0xe5, 0x90, 0x76, 0x07, 0x66, 0x5d, 0xaf, 0xcd, 0xb0, 0x5b, 0xd7, 0x94, 0xf7, - 0xd8, 0xa6, 0xbe, 0x6c, 0xd3, 0x1a, 0x8f, 0xae, 0xfc, 0x93, 0x85, 0xff, 0x71, 0x49, 0xf2, 0x95, - 0x06, 0xf2, 0x31, 0xf1, 0xc9, 0x86, 0x32, 0x5d, 0x65, 0x02, 0xfa, 0x66, 0x9a, 0x50, 0xc1, 0x68, - 0x6c, 0x3e, 0xfb, 0xeb, 0x87, 0x4d, 0xed, 0x8b, 0x5f, 0xff, 0xfc, 0x66, 0xa6, 0x48, 0x6e, 0x5a, - 0x4a, 0xbb, 0x92, 0x08, 0xdf, 0x6a, 0x30, 0x8f, 0x02, 0xa4, 0x34, 0xb5, 0x86, 0xa4, 0xd9, 0x48, - 0x11, 0x89, 0x30, 0x3b, 0x11, 0xcc, 0x06, 0x59, 0xbf, 0x14, 0xc6, 0x3a, 0xc2, 0x13, 0x18, 0x91, - 0x1f, 0x35, 0x20, 0x17, 0x7b, 0x86, 0x6c, 0x4f, 0xad, 0x7b, 0xb1, 0x27, 0xf5, 0x9d, 0xab, 0x25, - 0x5d, 0x81, 0x3b, 0xbc, 0x30, 0x75, 0xb7, 0x65, 0x1d, 0xb9, 0xad, 0x11, 0xf9, 0x52, 0x83, 0x39, - 0xf1, 0x8c, 0x93, 0xf5, 0xc9, 0x65, 0x13, 0x9e, 0xa1, 0x97, 0xa6, 0x07, 0x22, 0x53, 0x29, 0x62, - 0xba, 0x49, 0xf2, 0x4a, 0x26, 0xe1, 0x1a, 0xe4, 0x7b, 0x0d, 0x92, 0xef, 0xa5, 0x4f, 0xac, 0xc9, - 0x65, 0x94, 0xde, 0xa2, 0xdf, 0x4d, 0x9f, 0x80, 0x7c, 0x5b, 0x11, 0xdf, 0x6d, 0xf2, 0xba, 0x92, - 0xaf, 0xcb, 0x33, 0xeb, 0x61, 0xff, 0xfd, 0xac, 0xc1, 0xb2, 0xc2, 0x20, 0xc8, 0x4e, 0xca, 0xe2, - 0x09, 0x1b, 0xd2, 0xef, 0x5d, 0x31, 0x0b, 0xb9, 0xdf, 0x8a, 0xb8, 0xcb, 0xe4, 0xcd, 0x34, 0xdc, - 0xd6, 0xd1, 0xd8, 0xe2, 0x46, 0xe3, 0xeb, 0x9c, 0x8d, 0xbb, 0xcc, 0x84, 0x3b, 0xa4, 0xf0, 0xa7, - 0x09, 0x77, 0x48, 0x65, 0x59, 0x69, 0xce, 0x5d, 0xb8, 0xd7, 0xf8, 0xde, 0xe4, 0x54, 0xa6, 0x43, - 0xd4, 0x87, 0x79, 0x89, 0xc7, 0xe9, 0x5b, 0x57, 0xc8, 0x48, 0xbf, 0x8f, 0x82, 0x33, 0xbc, 0xe9, - 0xc2, 0x6c, 0x46, 0xe4, 0xa7, 0x88, 0x3b, 0xe1, 0x4f, 0x97, 0x73, 0xab, 0x0c, 0xf1, 0x72, 0x6e, - 0xa5, 0xf9, 0x19, 0xf7, 0x23, 0x6e, 0x93, 0xdc, 0x49, 0xc5, 0x2d, 0xbc, 0x76, 0x44, 0xbe, 0xd3, - 0x60, 0x31, 0xe6, 0x13, 0xe4, 0xce, 0xd4, 0xc7, 0x26, 0xe6, 0x4e, 0x7a, 0x39, 0x65, 0x74, 0xfa, - 0xfd, 0x95, 0x56, 0x3a, 0xb6, 0x9d, 0xe8, 0x3d, 0xb5, 0x1f, 0x3c, 0x3f, 0x2d, 0x68, 0x2f, 0x4f, - 0x0b, 0xda, 0x1f, 0xa7, 0x05, 0xed, 0xeb, 0xb3, 0x42, 0xe6, 0xe5, 0x59, 0x21, 0xf3, 0xdb, 0x59, - 0x21, 0xf3, 0xc9, 0x46, 0xc7, 0x0d, 0x0e, 0x07, 0x0d, 0xb3, 0xc9, 0xba, 0x52, 0x50, 0xfc, 0x29, - 0xfb, 0xad, 0xcf, 0xac, 0xa7, 0x42, 0x3d, 0x18, 0xf6, 0x1c, 0xbf, 0x31, 0xc7, 0xff, 0x27, 0xdb, - 0xfe, 0x37, 0x00, 0x00, 0xff, 0xff, 0x49, 0x22, 0x49, 0xcc, 0xb2, 0x0d, 0x00, 0x00, +func (m *QueryModuleAccountByNameRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -// 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 { - // Accounts returns all the existing accounts. - // - // When called from another module, this query might consume a high amount of - // gas if the pagination field is incorrectly set. - // - // Since: cosmos-sdk 0.43 - Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) - // Account returns account details based on address. - Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*QueryAccountResponse, error) - // AccountAddressByID returns account address based on account number. - // - // Since: cosmos-sdk 0.46.2 - AccountAddressByID(ctx context.Context, in *QueryAccountAddressByIDRequest, opts ...grpc.CallOption) (*QueryAccountAddressByIDResponse, error) - // Params queries all parameters. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // ModuleAccounts returns all the existing module accounts. - // - // Since: cosmos-sdk 0.46 - ModuleAccounts(ctx context.Context, in *QueryModuleAccountsRequest, opts ...grpc.CallOption) (*QueryModuleAccountsResponse, error) - // ModuleAccountByName returns the module account info by module name - ModuleAccountByName(ctx context.Context, in *QueryModuleAccountByNameRequest, opts ...grpc.CallOption) (*QueryModuleAccountByNameResponse, error) - // Bech32Prefix queries bech32Prefix - // - // Since: cosmos-sdk 0.46 - Bech32Prefix(ctx context.Context, in *Bech32PrefixRequest, opts ...grpc.CallOption) (*Bech32PrefixResponse, error) - // AddressBytesToString converts Account Address bytes to string - // - // Since: cosmos-sdk 0.46 - AddressBytesToString(ctx context.Context, in *AddressBytesToStringRequest, opts ...grpc.CallOption) (*AddressBytesToStringResponse, error) - // AddressStringToBytes converts Address string to bytes - // - // 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 { - cc grpc1.ClientConn -} - -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) { - out := new(QueryAccountsResponse) - err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/Accounts", in, out, opts...) - if err != nil { - return nil, err ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) - } - 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 *QueryAccountsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAccountsResponse) Size() (n int) { - if m == nil { - return 0 - } -<<<<<<< HEAD +func (m *QueryModuleAccountByNameRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.Accounts) > 0 { - for _, e := range m.Accounts { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } -======= - return out, nil -} - -func (c *queryClient) ModuleAccountByName(ctx context.Context, in *QueryModuleAccountByNameRequest, opts ...grpc.CallOption) (*QueryModuleAccountByNameResponse, error) { - out := new(QueryModuleAccountByNameResponse) - err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/ModuleAccountByName", in, out, opts...) - if err != nil { - return nil, err + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return out, nil + return len(dAtA) - i, nil } -func (c *queryClient) Bech32Prefix(ctx context.Context, in *Bech32PrefixRequest, opts ...grpc.CallOption) (*Bech32PrefixResponse, error) { - out := new(Bech32PrefixResponse) - err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/Bech32Prefix", in, out, opts...) +func (m *QueryModuleAccountByNameResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) } - return n + return dAtA[:n], nil } -func (m *QueryAccountRequest) 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)) - } -<<<<<<< HEAD - return n +func (m *QueryModuleAccountByNameResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryAccountResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryModuleAccountByNameResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l if m.Account != nil { - l = m.Account.Size() - n += 1 + l + sovQuery(uint64(l)) -======= - return out, nil -} - -// QueryServer is the server API for Query service. -type QueryServer interface { - // Accounts returns all the existing accounts. - // - // When called from another module, this query might consume a high amount of - // gas if the pagination field is incorrectly set. - // - // Since: cosmos-sdk 0.43 - Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error) - // Account returns account details based on address. - Account(context.Context, *QueryAccountRequest) (*QueryAccountResponse, error) - // AccountAddressByID returns account address based on account number. - // - // Since: cosmos-sdk 0.46.2 - AccountAddressByID(context.Context, *QueryAccountAddressByIDRequest) (*QueryAccountAddressByIDResponse, error) - // Params queries all parameters. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // ModuleAccounts returns all the existing module accounts. - // - // Since: cosmos-sdk 0.46 - ModuleAccounts(context.Context, *QueryModuleAccountsRequest) (*QueryModuleAccountsResponse, error) - // ModuleAccountByName returns the module account info by module name - ModuleAccountByName(context.Context, *QueryModuleAccountByNameRequest) (*QueryModuleAccountByNameResponse, error) - // Bech32Prefix queries bech32Prefix - // - // Since: cosmos-sdk 0.46 - Bech32Prefix(context.Context, *Bech32PrefixRequest) (*Bech32PrefixResponse, error) - // AddressBytesToString converts Account Address bytes to string - // - // Since: cosmos-sdk 0.46 - AddressBytesToString(context.Context, *AddressBytesToStringRequest) (*AddressBytesToStringResponse, error) - // AddressStringToBytes converts Address string to bytes - // - // 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. -type UnimplementedQueryServer struct { -} - -func (*UnimplementedQueryServer) Accounts(ctx context.Context, req *QueryAccountsRequest) (*QueryAccountsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Accounts not implemented") -} -func (*UnimplementedQueryServer) Account(ctx context.Context, req *QueryAccountRequest) (*QueryAccountResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Account not implemented") -} -func (*UnimplementedQueryServer) AccountAddressByID(ctx context.Context, req *QueryAccountAddressByIDRequest) (*QueryAccountAddressByIDResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AccountAddressByID not implemented") -} -func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} -func (*UnimplementedQueryServer) ModuleAccounts(ctx context.Context, req *QueryModuleAccountsRequest) (*QueryModuleAccountsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ModuleAccounts not implemented") -} -func (*UnimplementedQueryServer) ModuleAccountByName(ctx context.Context, req *QueryModuleAccountByNameRequest) (*QueryModuleAccountByNameResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ModuleAccountByName not implemented") -} -func (*UnimplementedQueryServer) Bech32Prefix(ctx context.Context, req *Bech32PrefixRequest) (*Bech32PrefixResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Bech32Prefix not implemented") -} -func (*UnimplementedQueryServer) AddressBytesToString(ctx context.Context, req *AddressBytesToStringRequest) (*AddressBytesToStringResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddressBytesToString not implemented") -} -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) -} - -func _Query_Accounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAccountsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Accounts(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.auth.v1beta1.Query/Accounts", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Accounts(ctx, req.(*QueryAccountsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Account_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Account(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.auth.v1beta1.Query/Account", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Account(ctx, req.(*QueryAccountRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_AccountAddressByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAccountAddressByIDRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).AccountAddressByID(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.auth.v1beta1.Query/AccountAddressByID", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AccountAddressByID(ctx, req.(*QueryAccountAddressByIDRequest)) + { + size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return interceptor(ctx, in, info, handler) + return len(dAtA) - i, nil } -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.auth.v1beta1.Query/Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ModuleAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryModuleAccountsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ModuleAccounts(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.auth.v1beta1.Query/ModuleAccounts", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ModuleAccounts(ctx, req.(*QueryModuleAccountsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ModuleAccountByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryModuleAccountByNameRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ModuleAccountByName(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.auth.v1beta1.Query/ModuleAccountByName", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ModuleAccountByName(ctx, req.(*QueryModuleAccountByNameRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Bech32Prefix_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Bech32PrefixRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Bech32Prefix(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.auth.v1beta1.Query/Bech32Prefix", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Bech32Prefix(ctx, req.(*Bech32PrefixRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_AddressBytesToString_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddressBytesToStringRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).AddressBytesToString(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.auth.v1beta1.Query/AddressBytesToString", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AddressBytesToString(ctx, req.(*AddressBytesToStringRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_AddressStringToBytes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddressStringToBytesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).AddressStringToBytes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.auth.v1beta1.Query/AddressStringToBytes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AddressStringToBytes(ctx, req.(*AddressStringToBytesRequest)) - } - 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), - Methods: []grpc.MethodDesc{ - { - MethodName: "Accounts", - Handler: _Query_Accounts_Handler, - }, - { - MethodName: "Account", - Handler: _Query_Account_Handler, - }, - { - MethodName: "AccountAddressByID", - Handler: _Query_AccountAddressByID_Handler, - }, - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - { - MethodName: "ModuleAccounts", - Handler: _Query_ModuleAccounts_Handler, - }, - { - MethodName: "ModuleAccountByName", - Handler: _Query_ModuleAccountByName_Handler, - }, - { - MethodName: "Bech32Prefix", - Handler: _Query_Bech32Prefix_Handler, - }, - { - MethodName: "AddressBytesToString", - Handler: _Query_AddressBytesToString_Handler, - }, - { - MethodName: "AddressStringToBytes", - Handler: _Query_AddressStringToBytes_Handler, - }, - { - MethodName: "AccountInfo", - Handler: _Query_AccountInfo_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/auth/v1beta1/query.proto", -} - -func (m *QueryAccountsRequest) 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 *QueryAccountsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAccountsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.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 *QueryAccountsResponse) 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 *QueryAccountsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAccountsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Accounts) > 0 { - for iNdEx := len(m.Accounts) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Accounts[iNdEx].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 *QueryAccountRequest) 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 *QueryAccountRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAccountRequest) 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 *QueryAccountResponse) 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 *QueryAccountResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Account != nil { - { - size, err := m.Account.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 *QueryParamsRequest) 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 *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.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 *QueryModuleAccountsRequest) 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 *QueryModuleAccountsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryModuleAccountsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryModuleAccountsResponse) 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 *QueryModuleAccountsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryModuleAccountsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Accounts) > 0 { - for iNdEx := len(m.Accounts) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Accounts[iNdEx].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 *QueryModuleAccountByNameRequest) 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 *QueryModuleAccountByNameRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryModuleAccountByNameRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryModuleAccountByNameResponse) 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 *QueryModuleAccountByNameResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryModuleAccountByNameResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Account != nil { - { - size, err := m.Account.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 *Bech32PrefixRequest) 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 *Bech32PrefixRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Bech32PrefixRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *Bech32PrefixResponse) 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 *Bech32PrefixResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Bech32PrefixResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Bech32Prefix) > 0 { - i -= len(m.Bech32Prefix) - copy(dAtA[i:], m.Bech32Prefix) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Bech32Prefix))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AddressBytesToStringRequest) 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 *AddressBytesToStringRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AddressBytesToStringRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AddressBytes) > 0 { - i -= len(m.AddressBytes) - copy(dAtA[i:], m.AddressBytes) - i = encodeVarintQuery(dAtA, i, uint64(len(m.AddressBytes))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AddressBytesToStringResponse) 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 *AddressBytesToStringResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AddressBytesToStringResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - 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 (m *AddressStringToBytesRequest) 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 *AddressStringToBytesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AddressStringToBytesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - 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 (m *AddressStringToBytesResponse) 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 *AddressStringToBytesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AddressStringToBytesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AddressBytes) > 0 { - i -= len(m.AddressBytes) - copy(dAtA[i:], m.AddressBytes) - i = encodeVarintQuery(dAtA, i, uint64(len(m.AddressBytes))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryAccountAddressByIDRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAccountAddressByIDRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAccountAddressByIDRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Id != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *QueryAccountAddressByIDResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAccountAddressByIDResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAccountAddressByIDResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AccountAddress) > 0 { - i -= len(m.AccountAddress) - copy(dAtA[i:], m.AccountAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.AccountAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryAccountInfoRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAccountInfoRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAccountInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryAccountInfoResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAccountInfoResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAccountInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Info != nil { - { - size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryAccountsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAccountsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Accounts) > 0 { - for _, e := range m.Accounts { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAccountRequest) 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 *QueryAccountResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Account != nil { - l = m.Account.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryParamsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryModuleAccountsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryModuleAccountsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Accounts) > 0 { - for _, e := range m.Accounts { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func (m *QueryModuleAccountByNameRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryModuleAccountByNameResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Account != nil { - l = m.Account.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *Bech32PrefixRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *Bech32PrefixResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Bech32Prefix) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *AddressBytesToStringRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.AddressBytes) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *AddressBytesToStringResponse) 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)) - } - return n -} - -func (m *AddressStringToBytesRequest) 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)) - } - return n -} - -func (m *AddressStringToBytesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.AddressBytes) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAccountAddressByIDRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovQuery(uint64(m.Id)) - } - return n -} - -func (m *QueryAccountAddressByIDResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.AccountAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAccountInfoRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAccountInfoResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Info != nil { - l = m.Info.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *QueryAccountsRequest) 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: QueryAccountsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAccountsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.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 *QueryAccountsResponse) 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: QueryAccountsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAccountsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Accounts", 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 - } - m.Accounts = append(m.Accounts, &types.Any{}) - if err := m.Accounts[len(m.Accounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.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 *QueryAccountRequest) 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: QueryAccountRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAccountRequest: 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 *QueryAccountResponse) 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: QueryAccountResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Account", 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.Account == nil { - m.Account = &types.Any{} - } - if err := m.Account.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 *QueryParamsRequest) 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: QueryParamsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - 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 *QueryParamsResponse) 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: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", 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 err := m.Params.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 *QueryModuleAccountsRequest) 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: QueryModuleAccountsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryModuleAccountsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - 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 *QueryModuleAccountsResponse) 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: QueryModuleAccountsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryModuleAccountsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Accounts", 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 - } - m.Accounts = append(m.Accounts, &types.Any{}) - if err := m.Accounts[len(m.Accounts)-1].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 *QueryModuleAccountByNameRequest) 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: QueryModuleAccountByNameRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryModuleAccountByNameRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 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.Name = 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 *QueryModuleAccountByNameResponse) 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: QueryModuleAccountByNameResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryModuleAccountByNameResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Account", 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.Account == nil { - m.Account = &types.Any{} - } - if err := m.Account.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 *Bech32PrefixRequest) 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: Bech32PrefixRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Bech32PrefixRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - 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 *Bech32PrefixResponse) 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: Bech32PrefixResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Bech32PrefixResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bech32Prefix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 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.Bech32Prefix = 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 +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 *QueryAccountsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAccountsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Accounts) > 0 { + for _, e := range m.Accounts { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) } ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAccountRequest) 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 *QueryAccountResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Account != nil { + l = m.Account.Size() + n += 1 + l + sovQuery(uint64(l)) } return n } @@ -3590,6 +1011,32 @@ func (m *QueryParamsResponse) Size() (n int) { return n } +func (m *QueryModuleAccountByNameRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryModuleAccountByNameResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Account != nil { + l = m.Account.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -4103,6 +1550,174 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryModuleAccountByNameRequest) 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: QueryModuleAccountByNameRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryModuleAccountByNameRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.Name = 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 *QueryModuleAccountByNameResponse) 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: QueryModuleAccountByNameResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryModuleAccountByNameResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", 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.Account == nil { + m.Account = &types.Any{} + } + if err := m.Account.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 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 bcbe548d65a6..3836985c2c3e 100644 --- a/x/auth/types/query.pb.gw.go +++ b/x/auth/types/query.pb.gw.go @@ -139,26 +139,6 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal } -<<<<<<< HEAD -======= -func request_Query_ModuleAccounts_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryModuleAccountsRequest - var metadata runtime.ServerMetadata - - msg, err := client.ModuleAccounts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_ModuleAccounts_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryModuleAccountsRequest - var metadata runtime.ServerMetadata - - msg, err := server.ModuleAccounts(ctx, &protoReq) - return msg, metadata, err - -} - func request_Query_ModuleAccountByName_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryModuleAccountByNameRequest var metadata runtime.ServerMetadata @@ -213,187 +193,6 @@ func local_request_Query_ModuleAccountByName_0(ctx context.Context, marshaler ru } -func request_Query_Bech32Prefix_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq Bech32PrefixRequest - var metadata runtime.ServerMetadata - - msg, err := client.Bech32Prefix(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Bech32Prefix_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq Bech32PrefixRequest - var metadata runtime.ServerMetadata - - msg, err := server.Bech32Prefix(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_AddressBytesToString_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddressBytesToStringRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["address_bytes"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address_bytes") - } - - protoReq.AddressBytes, err = runtime.Bytes(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address_bytes", err) - } - - msg, err := client.AddressBytesToString(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_AddressBytesToString_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddressBytesToStringRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["address_bytes"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address_bytes") - } - - protoReq.AddressBytes, err = runtime.Bytes(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address_bytes", err) - } - - msg, err := server.AddressBytesToString(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_AddressStringToBytes_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddressStringToBytesRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["address_string"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address_string") - } - - protoReq.AddressString, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address_string", err) - } - - msg, err := client.AddressStringToBytes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_AddressStringToBytes_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddressStringToBytesRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["address_string"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address_string") - } - - protoReq.AddressString, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address_string", err) - } - - msg, err := server.AddressStringToBytes(ctx, &protoReq) - return msg, metadata, err - -} - -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 - -} - ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) // 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. @@ -460,36 +259,9 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) -<<<<<<< HEAD -======= - mux.Handle("GET", pattern_Query_ModuleAccounts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_ModuleAccounts_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_ModuleAccounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_ModuleAccountByName_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - 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 { @@ -497,7 +269,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_ModuleAccountByName_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) @@ -508,99 +279,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_Bech32Prefix_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_Bech32Prefix_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_Bech32Prefix_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_AddressBytesToString_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_AddressBytesToString_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_AddressBytesToString_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_AddressStringToBytes_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_AddressStringToBytes_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_AddressStringToBytes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - 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()...) - - }) - ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) return nil } @@ -702,28 +380,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) -<<<<<<< HEAD -======= - mux.Handle("GET", pattern_Query_ModuleAccounts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - 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_ModuleAccounts_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_ModuleAccounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_ModuleAccountByName_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -744,87 +400,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_Bech32Prefix_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_Bech32Prefix_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_Bech32Prefix_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_AddressBytesToString_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_AddressBytesToString_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_AddressBytesToString_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_AddressStringToBytes_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_AddressStringToBytes_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_AddressStringToBytes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - 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()...) - - }) - ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) return nil } @@ -834,21 +409,8 @@ var ( pattern_Query_Account_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "auth", "v1beta1", "accounts", "address"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "auth", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(false))) -<<<<<<< HEAD -======= - - pattern_Query_ModuleAccounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "auth", "v1beta1", "module_accounts"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_ModuleAccountByName_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", "module_accounts", "name"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_Bech32Prefix_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "auth", "v1beta1", "bech32"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_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))) ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) ) var ( @@ -857,19 +419,6 @@ var ( forward_Query_Account_0 = runtime.ForwardResponseMessage forward_Query_Params_0 = runtime.ForwardResponseMessage -<<<<<<< HEAD -======= - - forward_Query_ModuleAccounts_0 = runtime.ForwardResponseMessage forward_Query_ModuleAccountByName_0 = runtime.ForwardResponseMessage - - forward_Query_Bech32Prefix_0 = runtime.ForwardResponseMessage - - forward_Query_AddressBytesToString_0 = runtime.ForwardResponseMessage - - forward_Query_AddressStringToBytes_0 = runtime.ForwardResponseMessage - - forward_Query_AccountInfo_0 = runtime.ForwardResponseMessage ->>>>>>> ddf5cf0d8 (feat(cli): add module-account cli cmd and grpc get api (#13612)) )