From 4a88a58e1bc1ca670229353ec090283ed54df1d2 Mon Sep 17 00:00:00 2001 From: testinginprod <98415576+testinginprod@users.noreply.github.com> Date: Thu, 15 Feb 2024 13:24:33 +0100 Subject: [PATCH] refactor(accounts): Remove UserOperation in favour of using Tx for abstracted accounts (#19395) --- Dockerfile | 1 + .../accounts/defaults/base/v1/base.pulsar.go | 2705 ++++++++++++++++ .../v1/interface.pulsar.go | 2717 ++-------------- .../accounts/v1/account_abstraction.pulsar.go | 2868 ----------------- api/cosmos/accounts/v1/query.pulsar.go | 1309 +------- api/cosmos/accounts/v1/query_grpc.pb.go | 47 +- api/cosmos/accounts/v1/tx.pulsar.go | 896 ++++- client/v2/go.mod | 3 + contrib/images/simd-env/Dockerfile | 1 + go.mod | 2 + .../accounts/defaults/base/v1/base.proto | 34 + .../account_abstraction/v1/interface.proto | 56 +- .../accounts/v1/account_abstraction.proto | 86 - proto/cosmos/accounts/v1/query.proto | 20 - proto/cosmos/accounts/v1/tx.proto | 14 +- simapp/ante.go | 2 +- simapp/app.go | 16 +- .../e2e/accounts/account_abstraction_test.go | 323 +- tests/e2e/accounts/base_account_test.go | 84 + x/accounts/accountstd/exports.go | 8 + x/accounts/coin_transfer.go | 10 + x/accounts/defaults/base/account.go | 216 ++ x/accounts/defaults/base/v1/base.pb.go | 1018 ++++++ x/accounts/go.mod | 4 +- .../account_abstraction/v1/interface.pb.go | 1036 +----- x/accounts/keeper.go | 104 +- x/accounts/keeper_account_abstraction.go | 236 +- x/accounts/msg_server.go | 12 +- x/accounts/query_server.go | 18 - .../testing/account_abstraction/full.go | 77 - .../testing/account_abstraction/minimal.go | 3 - x/accounts/v1/account_abstraction.pb.go | 1417 -------- x/accounts/v1/query.pb.go | 527 +-- x/accounts/v1/tx.pb.go | 342 +- x/auth/ante/ante.go | 17 +- x/auth/ante/sigverify.go | 50 +- x/auth/ante/sigverify_test.go | 6 +- x/auth/go.mod | 2 + x/auth/tx/builder.go | 8 + x/authz/go.mod | 3 + x/bank/go.mod | 3 + x/circuit/go.mod | 2 + x/distribution/go.mod | 2 + x/evidence/go.mod | 2 + x/feegrant/go.mod | 3 + x/gov/go.mod | 3 + x/group/go.mod | 2 + x/mint/go.mod | 3 + x/nft/go.mod | 2 + x/params/go.mod | 2 + x/protocolpool/go.mod | 2 + x/slashing/go.mod | 2 + x/staking/go.mod | 3 + x/upgrade/go.mod | 2 + 54 files changed, 5867 insertions(+), 10464 deletions(-) create mode 100644 api/cosmos/accounts/defaults/base/v1/base.pulsar.go delete mode 100644 api/cosmos/accounts/v1/account_abstraction.pulsar.go create mode 100644 proto/cosmos/accounts/defaults/base/v1/base.proto delete mode 100644 proto/cosmos/accounts/v1/account_abstraction.proto create mode 100644 tests/e2e/accounts/base_account_test.go create mode 100644 x/accounts/defaults/base/account.go create mode 100644 x/accounts/defaults/base/v1/base.pb.go delete mode 100644 x/accounts/testing/account_abstraction/full.go delete mode 100644 x/accounts/v1/account_abstraction.pb.go diff --git a/Dockerfile b/Dockerfile index 1f03e2fbe9..a3b704abb0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,6 +28,7 @@ COPY api/go.mod api/go.sum ./api/ COPY core/go.mod core/go.sum ./core/ COPY collections/go.mod collections/go.sum ./collections/ COPY store/go.mod store/go.sum ./store/ +COPY x/accounts/go.mod x/accounts/go.sum ./x/accounts/ COPY x/tx/go.mod x/tx/go.sum /x/tx/ COPY x/protocolpool/go.mod x/protocolpool/go.sum ./x/protocolpool/ COPY x/gov/go.mod x/gov/go.sum ./x/gov/ diff --git a/api/cosmos/accounts/defaults/base/v1/base.pulsar.go b/api/cosmos/accounts/defaults/base/v1/base.pulsar.go new file mode 100644 index 0000000000..cc079ae338 --- /dev/null +++ b/api/cosmos/accounts/defaults/base/v1/base.pulsar.go @@ -0,0 +1,2705 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package basev1 + +import ( + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_MsgInit protoreflect.MessageDescriptor + fd_MsgInit_pub_key protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_base_v1_base_proto_init() + md_MsgInit = File_cosmos_accounts_defaults_base_v1_base_proto.Messages().ByName("MsgInit") + fd_MsgInit_pub_key = md_MsgInit.Fields().ByName("pub_key") +} + +var _ protoreflect.Message = (*fastReflection_MsgInit)(nil) + +type fastReflection_MsgInit MsgInit + +func (x *MsgInit) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgInit)(x) +} + +func (x *MsgInit) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_base_v1_base_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_MsgInit_messageType fastReflection_MsgInit_messageType +var _ protoreflect.MessageType = fastReflection_MsgInit_messageType{} + +type fastReflection_MsgInit_messageType struct{} + +func (x fastReflection_MsgInit_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgInit)(nil) +} +func (x fastReflection_MsgInit_messageType) New() protoreflect.Message { + return new(fastReflection_MsgInit) +} +func (x fastReflection_MsgInit_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInit +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgInit) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInit +} + +// 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_MsgInit) Type() protoreflect.MessageType { + return _fastReflection_MsgInit_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgInit) New() protoreflect.Message { + return new(fastReflection_MsgInit) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgInit) Interface() protoreflect.ProtoMessage { + return (*MsgInit)(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_MsgInit) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.PubKey) != 0 { + value := protoreflect.ValueOfBytes(x.PubKey) + if !f(fd_MsgInit_pub_key, 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_MsgInit) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.base.v1.MsgInit.pub_key": + return len(x.PubKey) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.MsgInit")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.MsgInit 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_MsgInit) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.base.v1.MsgInit.pub_key": + x.PubKey = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.MsgInit")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.MsgInit 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_MsgInit) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.base.v1.MsgInit.pub_key": + value := x.PubKey + return protoreflect.ValueOfBytes(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.MsgInit")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.MsgInit 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_MsgInit) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.base.v1.MsgInit.pub_key": + x.PubKey = value.Bytes() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.MsgInit")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.MsgInit 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_MsgInit) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.base.v1.MsgInit.pub_key": + panic(fmt.Errorf("field pub_key of message cosmos.accounts.defaults.base.v1.MsgInit is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.MsgInit")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.MsgInit 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_MsgInit) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.base.v1.MsgInit.pub_key": + return protoreflect.ValueOfBytes(nil) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.MsgInit")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.MsgInit 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_MsgInit) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.base.v1.MsgInit", 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_MsgInit) 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_MsgInit) 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_MsgInit) 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_MsgInit) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgInit) + 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.PubKey) + 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().(*MsgInit) + 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.PubKey) > 0 { + i -= len(x.PubKey) + copy(dAtA[i:], x.PubKey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PubKey))) + 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().(*MsgInit) + 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: MsgInit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInit: 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 PubKey", 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.PubKey = append(x.PubKey[:0], dAtA[iNdEx:postIndex]...) + if x.PubKey == nil { + x.PubKey = []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_MsgInitResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_accounts_defaults_base_v1_base_proto_init() + md_MsgInitResponse = File_cosmos_accounts_defaults_base_v1_base_proto.Messages().ByName("MsgInitResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgInitResponse)(nil) + +type fastReflection_MsgInitResponse MsgInitResponse + +func (x *MsgInitResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgInitResponse)(x) +} + +func (x *MsgInitResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_base_v1_base_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_MsgInitResponse_messageType fastReflection_MsgInitResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgInitResponse_messageType{} + +type fastReflection_MsgInitResponse_messageType struct{} + +func (x fastReflection_MsgInitResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgInitResponse)(nil) +} +func (x fastReflection_MsgInitResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgInitResponse) +} +func (x fastReflection_MsgInitResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgInitResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitResponse +} + +// 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_MsgInitResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgInitResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgInitResponse) New() protoreflect.Message { + return new(fastReflection_MsgInitResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgInitResponse) Interface() protoreflect.ProtoMessage { + return (*MsgInitResponse)(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_MsgInitResponse) 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_MsgInitResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.MsgInitResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.MsgInitResponse 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_MsgInitResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.MsgInitResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.MsgInitResponse 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_MsgInitResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.MsgInitResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.MsgInitResponse 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_MsgInitResponse) 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.accounts.defaults.base.v1.MsgInitResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.MsgInitResponse 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_MsgInitResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.MsgInitResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.MsgInitResponse 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_MsgInitResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.MsgInitResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.MsgInitResponse 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_MsgInitResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.base.v1.MsgInitResponse", 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_MsgInitResponse) 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_MsgInitResponse) 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_MsgInitResponse) 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_MsgInitResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgInitResponse) + 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().(*MsgInitResponse) + 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().(*MsgInitResponse) + 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: MsgInitResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitResponse: 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_MsgSwapPubKey protoreflect.MessageDescriptor + fd_MsgSwapPubKey_new_pub_key protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_base_v1_base_proto_init() + md_MsgSwapPubKey = File_cosmos_accounts_defaults_base_v1_base_proto.Messages().ByName("MsgSwapPubKey") + fd_MsgSwapPubKey_new_pub_key = md_MsgSwapPubKey.Fields().ByName("new_pub_key") +} + +var _ protoreflect.Message = (*fastReflection_MsgSwapPubKey)(nil) + +type fastReflection_MsgSwapPubKey MsgSwapPubKey + +func (x *MsgSwapPubKey) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSwapPubKey)(x) +} + +func (x *MsgSwapPubKey) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_base_v1_base_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_MsgSwapPubKey_messageType fastReflection_MsgSwapPubKey_messageType +var _ protoreflect.MessageType = fastReflection_MsgSwapPubKey_messageType{} + +type fastReflection_MsgSwapPubKey_messageType struct{} + +func (x fastReflection_MsgSwapPubKey_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSwapPubKey)(nil) +} +func (x fastReflection_MsgSwapPubKey_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSwapPubKey) +} +func (x fastReflection_MsgSwapPubKey_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSwapPubKey +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgSwapPubKey) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSwapPubKey +} + +// 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_MsgSwapPubKey) Type() protoreflect.MessageType { + return _fastReflection_MsgSwapPubKey_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgSwapPubKey) New() protoreflect.Message { + return new(fastReflection_MsgSwapPubKey) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgSwapPubKey) Interface() protoreflect.ProtoMessage { + return (*MsgSwapPubKey)(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_MsgSwapPubKey) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.NewPubKey) != 0 { + value := protoreflect.ValueOfBytes(x.NewPubKey) + if !f(fd_MsgSwapPubKey_new_pub_key, 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_MsgSwapPubKey) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.base.v1.MsgSwapPubKey.new_pub_key": + return len(x.NewPubKey) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.MsgSwapPubKey")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.MsgSwapPubKey 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_MsgSwapPubKey) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.base.v1.MsgSwapPubKey.new_pub_key": + x.NewPubKey = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.MsgSwapPubKey")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.MsgSwapPubKey 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_MsgSwapPubKey) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.base.v1.MsgSwapPubKey.new_pub_key": + value := x.NewPubKey + return protoreflect.ValueOfBytes(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.MsgSwapPubKey")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.MsgSwapPubKey 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_MsgSwapPubKey) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.base.v1.MsgSwapPubKey.new_pub_key": + x.NewPubKey = value.Bytes() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.MsgSwapPubKey")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.MsgSwapPubKey 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_MsgSwapPubKey) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.base.v1.MsgSwapPubKey.new_pub_key": + panic(fmt.Errorf("field new_pub_key of message cosmos.accounts.defaults.base.v1.MsgSwapPubKey is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.MsgSwapPubKey")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.MsgSwapPubKey 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_MsgSwapPubKey) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.base.v1.MsgSwapPubKey.new_pub_key": + return protoreflect.ValueOfBytes(nil) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.MsgSwapPubKey")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.MsgSwapPubKey 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_MsgSwapPubKey) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.base.v1.MsgSwapPubKey", 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_MsgSwapPubKey) 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_MsgSwapPubKey) 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_MsgSwapPubKey) 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_MsgSwapPubKey) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgSwapPubKey) + 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.NewPubKey) + 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().(*MsgSwapPubKey) + 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.NewPubKey) > 0 { + i -= len(x.NewPubKey) + copy(dAtA[i:], x.NewPubKey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NewPubKey))) + 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().(*MsgSwapPubKey) + 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: MsgSwapPubKey: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSwapPubKey: 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 NewPubKey", 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.NewPubKey = append(x.NewPubKey[:0], dAtA[iNdEx:postIndex]...) + if x.NewPubKey == nil { + x.NewPubKey = []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_MsgSwapPubKeyResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_accounts_defaults_base_v1_base_proto_init() + md_MsgSwapPubKeyResponse = File_cosmos_accounts_defaults_base_v1_base_proto.Messages().ByName("MsgSwapPubKeyResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgSwapPubKeyResponse)(nil) + +type fastReflection_MsgSwapPubKeyResponse MsgSwapPubKeyResponse + +func (x *MsgSwapPubKeyResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSwapPubKeyResponse)(x) +} + +func (x *MsgSwapPubKeyResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_base_v1_base_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_MsgSwapPubKeyResponse_messageType fastReflection_MsgSwapPubKeyResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgSwapPubKeyResponse_messageType{} + +type fastReflection_MsgSwapPubKeyResponse_messageType struct{} + +func (x fastReflection_MsgSwapPubKeyResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSwapPubKeyResponse)(nil) +} +func (x fastReflection_MsgSwapPubKeyResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSwapPubKeyResponse) +} +func (x fastReflection_MsgSwapPubKeyResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSwapPubKeyResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgSwapPubKeyResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSwapPubKeyResponse +} + +// 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_MsgSwapPubKeyResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgSwapPubKeyResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgSwapPubKeyResponse) New() protoreflect.Message { + return new(fastReflection_MsgSwapPubKeyResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgSwapPubKeyResponse) Interface() protoreflect.ProtoMessage { + return (*MsgSwapPubKeyResponse)(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_MsgSwapPubKeyResponse) 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_MsgSwapPubKeyResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.MsgSwapPubKeyResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.MsgSwapPubKeyResponse 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_MsgSwapPubKeyResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.MsgSwapPubKeyResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.MsgSwapPubKeyResponse 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_MsgSwapPubKeyResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.MsgSwapPubKeyResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.MsgSwapPubKeyResponse 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_MsgSwapPubKeyResponse) 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.accounts.defaults.base.v1.MsgSwapPubKeyResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.MsgSwapPubKeyResponse 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_MsgSwapPubKeyResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.MsgSwapPubKeyResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.MsgSwapPubKeyResponse 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_MsgSwapPubKeyResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.MsgSwapPubKeyResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.MsgSwapPubKeyResponse 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_MsgSwapPubKeyResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.base.v1.MsgSwapPubKeyResponse", 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_MsgSwapPubKeyResponse) 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_MsgSwapPubKeyResponse) 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_MsgSwapPubKeyResponse) 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_MsgSwapPubKeyResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgSwapPubKeyResponse) + 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().(*MsgSwapPubKeyResponse) + 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().(*MsgSwapPubKeyResponse) + 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: MsgSwapPubKeyResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSwapPubKeyResponse: 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_QuerySequence protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_accounts_defaults_base_v1_base_proto_init() + md_QuerySequence = File_cosmos_accounts_defaults_base_v1_base_proto.Messages().ByName("QuerySequence") +} + +var _ protoreflect.Message = (*fastReflection_QuerySequence)(nil) + +type fastReflection_QuerySequence QuerySequence + +func (x *QuerySequence) ProtoReflect() protoreflect.Message { + return (*fastReflection_QuerySequence)(x) +} + +func (x *QuerySequence) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_base_v1_base_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_QuerySequence_messageType fastReflection_QuerySequence_messageType +var _ protoreflect.MessageType = fastReflection_QuerySequence_messageType{} + +type fastReflection_QuerySequence_messageType struct{} + +func (x fastReflection_QuerySequence_messageType) Zero() protoreflect.Message { + return (*fastReflection_QuerySequence)(nil) +} +func (x fastReflection_QuerySequence_messageType) New() protoreflect.Message { + return new(fastReflection_QuerySequence) +} +func (x fastReflection_QuerySequence_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySequence +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QuerySequence) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySequence +} + +// 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_QuerySequence) Type() protoreflect.MessageType { + return _fastReflection_QuerySequence_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QuerySequence) New() protoreflect.Message { + return new(fastReflection_QuerySequence) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QuerySequence) Interface() protoreflect.ProtoMessage { + return (*QuerySequence)(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_QuerySequence) 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_QuerySequence) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.QuerySequence")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.QuerySequence 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_QuerySequence) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.QuerySequence")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.QuerySequence 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_QuerySequence) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.QuerySequence")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.QuerySequence 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_QuerySequence) 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.accounts.defaults.base.v1.QuerySequence")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.QuerySequence 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_QuerySequence) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.QuerySequence")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.QuerySequence 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_QuerySequence) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.QuerySequence")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.QuerySequence 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_QuerySequence) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.base.v1.QuerySequence", 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_QuerySequence) 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_QuerySequence) 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_QuerySequence) 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_QuerySequence) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QuerySequence) + 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().(*QuerySequence) + 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().(*QuerySequence) + 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: QuerySequence: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySequence: 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_QuerySequenceResponse protoreflect.MessageDescriptor + fd_QuerySequenceResponse_sequence protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_base_v1_base_proto_init() + md_QuerySequenceResponse = File_cosmos_accounts_defaults_base_v1_base_proto.Messages().ByName("QuerySequenceResponse") + fd_QuerySequenceResponse_sequence = md_QuerySequenceResponse.Fields().ByName("sequence") +} + +var _ protoreflect.Message = (*fastReflection_QuerySequenceResponse)(nil) + +type fastReflection_QuerySequenceResponse QuerySequenceResponse + +func (x *QuerySequenceResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QuerySequenceResponse)(x) +} + +func (x *QuerySequenceResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_base_v1_base_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_QuerySequenceResponse_messageType fastReflection_QuerySequenceResponse_messageType +var _ protoreflect.MessageType = fastReflection_QuerySequenceResponse_messageType{} + +type fastReflection_QuerySequenceResponse_messageType struct{} + +func (x fastReflection_QuerySequenceResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QuerySequenceResponse)(nil) +} +func (x fastReflection_QuerySequenceResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QuerySequenceResponse) +} +func (x fastReflection_QuerySequenceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySequenceResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QuerySequenceResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySequenceResponse +} + +// 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_QuerySequenceResponse) Type() protoreflect.MessageType { + return _fastReflection_QuerySequenceResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QuerySequenceResponse) New() protoreflect.Message { + return new(fastReflection_QuerySequenceResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QuerySequenceResponse) Interface() protoreflect.ProtoMessage { + return (*QuerySequenceResponse)(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_QuerySequenceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Sequence != uint64(0) { + value := protoreflect.ValueOfUint64(x.Sequence) + if !f(fd_QuerySequenceResponse_sequence, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QuerySequenceResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.base.v1.QuerySequenceResponse.sequence": + return x.Sequence != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.QuerySequenceResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.QuerySequenceResponse 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_QuerySequenceResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.base.v1.QuerySequenceResponse.sequence": + x.Sequence = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.QuerySequenceResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.QuerySequenceResponse 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_QuerySequenceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.base.v1.QuerySequenceResponse.sequence": + value := x.Sequence + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.QuerySequenceResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.QuerySequenceResponse 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_QuerySequenceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.base.v1.QuerySequenceResponse.sequence": + x.Sequence = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.QuerySequenceResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.QuerySequenceResponse 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_QuerySequenceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.base.v1.QuerySequenceResponse.sequence": + panic(fmt.Errorf("field sequence of message cosmos.accounts.defaults.base.v1.QuerySequenceResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.QuerySequenceResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.QuerySequenceResponse 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_QuerySequenceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.base.v1.QuerySequenceResponse.sequence": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.QuerySequenceResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.base.v1.QuerySequenceResponse 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_QuerySequenceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.base.v1.QuerySequenceResponse", 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_QuerySequenceResponse) 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_QuerySequenceResponse) 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_QuerySequenceResponse) 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_QuerySequenceResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QuerySequenceResponse) + 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.Sequence != 0 { + n += 1 + runtime.Sov(uint64(x.Sequence)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QuerySequenceResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Sequence != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) + i-- + dAtA[i] = 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().(*QuerySequenceResponse) + 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: QuerySequenceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySequenceResponse: 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 Sequence", wireType) + } + x.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: cosmos/accounts/defaults/base/v1/base.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) +) + +// MsgInit is used to initialize a base account. +type MsgInit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // pub_key defines the secp256k1 pubkey for the account. + PubKey []byte `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` +} + +func (x *MsgInit) Reset() { + *x = MsgInit{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_base_v1_base_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgInit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgInit) ProtoMessage() {} + +// Deprecated: Use MsgInit.ProtoReflect.Descriptor instead. +func (*MsgInit) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_base_v1_base_proto_rawDescGZIP(), []int{0} +} + +func (x *MsgInit) GetPubKey() []byte { + if x != nil { + return x.PubKey + } + return nil +} + +// MsgInitResponse is the response returned after base account initialization. +// This is empty. +type MsgInitResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgInitResponse) Reset() { + *x = MsgInitResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_base_v1_base_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgInitResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgInitResponse) ProtoMessage() {} + +// Deprecated: Use MsgInitResponse.ProtoReflect.Descriptor instead. +func (*MsgInitResponse) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_base_v1_base_proto_rawDescGZIP(), []int{1} +} + +// MsgSwapPubKey is used to change the pubkey for the account. +type MsgSwapPubKey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // new_pub_key defines the secp256k1 pubkey to swap the account to. + NewPubKey []byte `protobuf:"bytes,1,opt,name=new_pub_key,json=newPubKey,proto3" json:"new_pub_key,omitempty"` +} + +func (x *MsgSwapPubKey) Reset() { + *x = MsgSwapPubKey{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_base_v1_base_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgSwapPubKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgSwapPubKey) ProtoMessage() {} + +// Deprecated: Use MsgSwapPubKey.ProtoReflect.Descriptor instead. +func (*MsgSwapPubKey) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_base_v1_base_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgSwapPubKey) GetNewPubKey() []byte { + if x != nil { + return x.NewPubKey + } + return nil +} + +// MsgSwapPubKeyResponse is the response for the MsgSwapPubKey message. +// This is empty. +type MsgSwapPubKeyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgSwapPubKeyResponse) Reset() { + *x = MsgSwapPubKeyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_base_v1_base_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgSwapPubKeyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgSwapPubKeyResponse) ProtoMessage() {} + +// Deprecated: Use MsgSwapPubKeyResponse.ProtoReflect.Descriptor instead. +func (*MsgSwapPubKeyResponse) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_base_v1_base_proto_rawDescGZIP(), []int{3} +} + +// QuerySequence is the request for the account sequence. +type QuerySequence struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QuerySequence) Reset() { + *x = QuerySequence{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_base_v1_base_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuerySequence) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuerySequence) ProtoMessage() {} + +// Deprecated: Use QuerySequence.ProtoReflect.Descriptor instead. +func (*QuerySequence) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_base_v1_base_proto_rawDescGZIP(), []int{4} +} + +// QuerySequenceResponse returns the sequence of the account. +type QuerySequenceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // sequence is the current sequence of the account. + Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"` +} + +func (x *QuerySequenceResponse) Reset() { + *x = QuerySequenceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_base_v1_base_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuerySequenceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuerySequenceResponse) ProtoMessage() {} + +// Deprecated: Use QuerySequenceResponse.ProtoReflect.Descriptor instead. +func (*QuerySequenceResponse) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_base_v1_base_proto_rawDescGZIP(), []int{5} +} + +func (x *QuerySequenceResponse) GetSequence() uint64 { + if x != nil { + return x.Sequence + } + return 0 +} + +var File_cosmos_accounts_defaults_base_v1_base_proto protoreflect.FileDescriptor + +var file_cosmos_accounts_defaults_base_v1_base_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x2f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, + 0x76, 0x31, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x64, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x22, + 0x22, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, + 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, + 0x4b, 0x65, 0x79, 0x22, 0x11, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x53, 0x77, 0x61, + 0x70, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x70, + 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x6e, 0x65, + 0x77, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x22, 0x17, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x53, 0x77, + 0x61, 0x70, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x0f, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, + 0x65, 0x22, 0x33, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, + 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, + 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, + 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x90, 0x02, 0x0a, 0x24, 0x63, 0x6f, 0x6d, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x64, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x42, + 0x09, 0x42, 0x61, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 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, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x64, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x3b, + 0x62, 0x61, 0x73, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x04, 0x43, 0x41, 0x44, 0x42, 0xaa, 0x02, 0x20, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, + 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x5c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x5c, 0x42, 0x61, 0x73, 0x65, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x2c, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x5c, 0x42, + 0x61, 0x73, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x24, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x3a, 0x3a, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x3a, + 0x3a, 0x42, 0x61, 0x73, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_cosmos_accounts_defaults_base_v1_base_proto_rawDescOnce sync.Once + file_cosmos_accounts_defaults_base_v1_base_proto_rawDescData = file_cosmos_accounts_defaults_base_v1_base_proto_rawDesc +) + +func file_cosmos_accounts_defaults_base_v1_base_proto_rawDescGZIP() []byte { + file_cosmos_accounts_defaults_base_v1_base_proto_rawDescOnce.Do(func() { + file_cosmos_accounts_defaults_base_v1_base_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_accounts_defaults_base_v1_base_proto_rawDescData) + }) + return file_cosmos_accounts_defaults_base_v1_base_proto_rawDescData +} + +var file_cosmos_accounts_defaults_base_v1_base_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_cosmos_accounts_defaults_base_v1_base_proto_goTypes = []interface{}{ + (*MsgInit)(nil), // 0: cosmos.accounts.defaults.base.v1.MsgInit + (*MsgInitResponse)(nil), // 1: cosmos.accounts.defaults.base.v1.MsgInitResponse + (*MsgSwapPubKey)(nil), // 2: cosmos.accounts.defaults.base.v1.MsgSwapPubKey + (*MsgSwapPubKeyResponse)(nil), // 3: cosmos.accounts.defaults.base.v1.MsgSwapPubKeyResponse + (*QuerySequence)(nil), // 4: cosmos.accounts.defaults.base.v1.QuerySequence + (*QuerySequenceResponse)(nil), // 5: cosmos.accounts.defaults.base.v1.QuerySequenceResponse +} +var file_cosmos_accounts_defaults_base_v1_base_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_cosmos_accounts_defaults_base_v1_base_proto_init() } +func file_cosmos_accounts_defaults_base_v1_base_proto_init() { + if File_cosmos_accounts_defaults_base_v1_base_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_cosmos_accounts_defaults_base_v1_base_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgInit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_base_v1_base_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgInitResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_base_v1_base_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgSwapPubKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_base_v1_base_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgSwapPubKeyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_base_v1_base_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuerySequence); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_base_v1_base_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuerySequenceResponse); 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_accounts_defaults_base_v1_base_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_cosmos_accounts_defaults_base_v1_base_proto_goTypes, + DependencyIndexes: file_cosmos_accounts_defaults_base_v1_base_proto_depIdxs, + MessageInfos: file_cosmos_accounts_defaults_base_v1_base_proto_msgTypes, + }.Build() + File_cosmos_accounts_defaults_base_v1_base_proto = out.File + file_cosmos_accounts_defaults_base_v1_base_proto_rawDesc = nil + file_cosmos_accounts_defaults_base_v1_base_proto_goTypes = nil + file_cosmos_accounts_defaults_base_v1_base_proto_depIdxs = nil +} diff --git a/api/cosmos/accounts/interfaces/account_abstraction/v1/interface.pulsar.go b/api/cosmos/accounts/interfaces/account_abstraction/v1/interface.pulsar.go index 3708e80079..2fd8280a19 100644 --- a/api/cosmos/accounts/interfaces/account_abstraction/v1/interface.pulsar.go +++ b/api/cosmos/accounts/interfaces/account_abstraction/v1/interface.pulsar.go @@ -2,29 +2,33 @@ package account_abstractionv1 import ( - v1 "cosmossdk.io/api/cosmos/accounts/v1" + v1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" + _ "google.golang.org/protobuf/types/known/anypb" io "io" reflect "reflect" sync "sync" ) var ( - md_MsgAuthenticate protoreflect.MessageDescriptor - fd_MsgAuthenticate_bundler protoreflect.FieldDescriptor - fd_MsgAuthenticate_user_operation protoreflect.FieldDescriptor + md_MsgAuthenticate protoreflect.MessageDescriptor + fd_MsgAuthenticate_bundler protoreflect.FieldDescriptor + fd_MsgAuthenticate_raw_tx protoreflect.FieldDescriptor + fd_MsgAuthenticate_tx protoreflect.FieldDescriptor + fd_MsgAuthenticate_signer_index protoreflect.FieldDescriptor ) func init() { file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_init() md_MsgAuthenticate = File_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto.Messages().ByName("MsgAuthenticate") fd_MsgAuthenticate_bundler = md_MsgAuthenticate.Fields().ByName("bundler") - fd_MsgAuthenticate_user_operation = md_MsgAuthenticate.Fields().ByName("user_operation") + fd_MsgAuthenticate_raw_tx = md_MsgAuthenticate.Fields().ByName("raw_tx") + fd_MsgAuthenticate_tx = md_MsgAuthenticate.Fields().ByName("tx") + fd_MsgAuthenticate_signer_index = md_MsgAuthenticate.Fields().ByName("signer_index") } var _ protoreflect.Message = (*fastReflection_MsgAuthenticate)(nil) @@ -98,9 +102,21 @@ func (x *fastReflection_MsgAuthenticate) Range(f func(protoreflect.FieldDescript return } } - if x.UserOperation != nil { - value := protoreflect.ValueOfMessage(x.UserOperation.ProtoReflect()) - if !f(fd_MsgAuthenticate_user_operation, value) { + if x.RawTx != nil { + value := protoreflect.ValueOfMessage(x.RawTx.ProtoReflect()) + if !f(fd_MsgAuthenticate_raw_tx, value) { + return + } + } + if x.Tx != nil { + value := protoreflect.ValueOfMessage(x.Tx.ProtoReflect()) + if !f(fd_MsgAuthenticate_tx, value) { + return + } + } + if x.SignerIndex != uint32(0) { + value := protoreflect.ValueOfUint32(x.SignerIndex) + if !f(fd_MsgAuthenticate_signer_index, value) { return } } @@ -121,8 +137,12 @@ func (x *fastReflection_MsgAuthenticate) Has(fd protoreflect.FieldDescriptor) bo switch fd.FullName() { case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.bundler": return x.Bundler != "" - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.user_operation": - return x.UserOperation != nil + case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.raw_tx": + return x.RawTx != nil + case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.tx": + return x.Tx != nil + case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.signer_index": + return x.SignerIndex != uint32(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate")) @@ -141,8 +161,12 @@ func (x *fastReflection_MsgAuthenticate) Clear(fd protoreflect.FieldDescriptor) switch fd.FullName() { case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.bundler": x.Bundler = "" - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.user_operation": - x.UserOperation = nil + case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.raw_tx": + x.RawTx = nil + case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.tx": + x.Tx = nil + case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.signer_index": + x.SignerIndex = uint32(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate")) @@ -162,9 +186,15 @@ func (x *fastReflection_MsgAuthenticate) Get(descriptor protoreflect.FieldDescri case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.bundler": value := x.Bundler return protoreflect.ValueOfString(value) - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.user_operation": - value := x.UserOperation + case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.raw_tx": + value := x.RawTx return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.tx": + value := x.Tx + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.signer_index": + value := x.SignerIndex + return protoreflect.ValueOfUint32(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate")) @@ -187,8 +217,12 @@ func (x *fastReflection_MsgAuthenticate) Set(fd protoreflect.FieldDescriptor, va switch fd.FullName() { case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.bundler": x.Bundler = value.Interface().(string) - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.user_operation": - x.UserOperation = value.Message().Interface().(*v1.UserOperation) + case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.raw_tx": + x.RawTx = value.Message().Interface().(*v1beta1.TxRaw) + case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.tx": + x.Tx = value.Message().Interface().(*v1beta1.Tx) + case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.signer_index": + x.SignerIndex = uint32(value.Uint()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate")) @@ -209,13 +243,20 @@ func (x *fastReflection_MsgAuthenticate) Set(fd protoreflect.FieldDescriptor, va // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgAuthenticate) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.user_operation": - if x.UserOperation == nil { - x.UserOperation = new(v1.UserOperation) + case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.raw_tx": + if x.RawTx == nil { + x.RawTx = new(v1beta1.TxRaw) } - return protoreflect.ValueOfMessage(x.UserOperation.ProtoReflect()) + return protoreflect.ValueOfMessage(x.RawTx.ProtoReflect()) + case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.tx": + if x.Tx == nil { + x.Tx = new(v1beta1.Tx) + } + return protoreflect.ValueOfMessage(x.Tx.ProtoReflect()) case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.bundler": panic(fmt.Errorf("field bundler of message cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate is not mutable")) + case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.signer_index": + panic(fmt.Errorf("field signer_index of message cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate")) @@ -231,9 +272,14 @@ func (x *fastReflection_MsgAuthenticate) NewField(fd protoreflect.FieldDescripto switch fd.FullName() { case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.bundler": return protoreflect.ValueOfString("") - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.user_operation": - m := new(v1.UserOperation) + case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.raw_tx": + m := new(v1beta1.TxRaw) return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.tx": + m := new(v1beta1.Tx) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.signer_index": + return protoreflect.ValueOfUint32(uint32(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate")) @@ -307,10 +353,17 @@ func (x *fastReflection_MsgAuthenticate) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.UserOperation != nil { - l = options.Size(x.UserOperation) + if x.RawTx != nil { + l = options.Size(x.RawTx) n += 1 + l + runtime.Sov(uint64(l)) } + if x.Tx != nil { + l = options.Size(x.Tx) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.SignerIndex != 0 { + n += 1 + runtime.Sov(uint64(x.SignerIndex)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -340,8 +393,27 @@ func (x *fastReflection_MsgAuthenticate) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.UserOperation != nil { - encoded, err := options.Marshal(x.UserOperation) + if x.SignerIndex != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.SignerIndex)) + i-- + dAtA[i] = 0x20 + } + if x.Tx != nil { + encoded, err := options.Marshal(x.Tx) + 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] = 0x1a + } + if x.RawTx != nil { + encoded, err := options.Marshal(x.RawTx) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -444,7 +516,7 @@ func (x *fastReflection_MsgAuthenticate) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UserOperation", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RawTx", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -471,13 +543,68 @@ func (x *fastReflection_MsgAuthenticate) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.UserOperation == nil { - x.UserOperation = &v1.UserOperation{} + if x.RawTx == nil { + x.RawTx = &v1beta1.TxRaw{} } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UserOperation); err != nil { + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RawTx); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Tx", 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.Tx == nil { + x.Tx = &v1beta1.Tx{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Tx); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SignerIndex", wireType) + } + x.SignerIndex = 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.SignerIndex |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -869,2110 +996,6 @@ func (x *fastReflection_MsgAuthenticateResponse) ProtoMethods() *protoiface.Meth } } -var _ protoreflect.List = (*_MsgPayBundler_2_list)(nil) - -type _MsgPayBundler_2_list struct { - list *[]*anypb.Any -} - -func (x *_MsgPayBundler_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgPayBundler_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgPayBundler_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_MsgPayBundler_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgPayBundler_2_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgPayBundler_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgPayBundler_2_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgPayBundler_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgPayBundler protoreflect.MessageDescriptor - fd_MsgPayBundler_bundler protoreflect.FieldDescriptor - fd_MsgPayBundler_bundler_payment_messages protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_init() - md_MsgPayBundler = File_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto.Messages().ByName("MsgPayBundler") - fd_MsgPayBundler_bundler = md_MsgPayBundler.Fields().ByName("bundler") - fd_MsgPayBundler_bundler_payment_messages = md_MsgPayBundler.Fields().ByName("bundler_payment_messages") -} - -var _ protoreflect.Message = (*fastReflection_MsgPayBundler)(nil) - -type fastReflection_MsgPayBundler MsgPayBundler - -func (x *MsgPayBundler) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgPayBundler)(x) -} - -func (x *MsgPayBundler) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_accounts_interfaces_account_abstraction_v1_interface_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_MsgPayBundler_messageType fastReflection_MsgPayBundler_messageType -var _ protoreflect.MessageType = fastReflection_MsgPayBundler_messageType{} - -type fastReflection_MsgPayBundler_messageType struct{} - -func (x fastReflection_MsgPayBundler_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgPayBundler)(nil) -} -func (x fastReflection_MsgPayBundler_messageType) New() protoreflect.Message { - return new(fastReflection_MsgPayBundler) -} -func (x fastReflection_MsgPayBundler_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgPayBundler -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgPayBundler) Descriptor() protoreflect.MessageDescriptor { - return md_MsgPayBundler -} - -// 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_MsgPayBundler) Type() protoreflect.MessageType { - return _fastReflection_MsgPayBundler_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgPayBundler) New() protoreflect.Message { - return new(fastReflection_MsgPayBundler) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgPayBundler) Interface() protoreflect.ProtoMessage { - return (*MsgPayBundler)(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_MsgPayBundler) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Bundler != "" { - value := protoreflect.ValueOfString(x.Bundler) - if !f(fd_MsgPayBundler_bundler, value) { - return - } - } - if len(x.BundlerPaymentMessages) != 0 { - value := protoreflect.ValueOfList(&_MsgPayBundler_2_list{list: &x.BundlerPaymentMessages}) - if !f(fd_MsgPayBundler_bundler_payment_messages, 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_MsgPayBundler) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler.bundler": - return x.Bundler != "" - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler.bundler_payment_messages": - return len(x.BundlerPaymentMessages) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler")) - } - panic(fmt.Errorf("message cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler 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_MsgPayBundler) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler.bundler": - x.Bundler = "" - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler.bundler_payment_messages": - x.BundlerPaymentMessages = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler")) - } - panic(fmt.Errorf("message cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler 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_MsgPayBundler) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler.bundler": - value := x.Bundler - return protoreflect.ValueOfString(value) - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler.bundler_payment_messages": - if len(x.BundlerPaymentMessages) == 0 { - return protoreflect.ValueOfList(&_MsgPayBundler_2_list{}) - } - listValue := &_MsgPayBundler_2_list{list: &x.BundlerPaymentMessages} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler")) - } - panic(fmt.Errorf("message cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler 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_MsgPayBundler) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler.bundler": - x.Bundler = value.Interface().(string) - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler.bundler_payment_messages": - lv := value.List() - clv := lv.(*_MsgPayBundler_2_list) - x.BundlerPaymentMessages = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler")) - } - panic(fmt.Errorf("message cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler 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_MsgPayBundler) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler.bundler_payment_messages": - if x.BundlerPaymentMessages == nil { - x.BundlerPaymentMessages = []*anypb.Any{} - } - value := &_MsgPayBundler_2_list{list: &x.BundlerPaymentMessages} - return protoreflect.ValueOfList(value) - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler.bundler": - panic(fmt.Errorf("field bundler of message cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler")) - } - panic(fmt.Errorf("message cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler 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_MsgPayBundler) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler.bundler": - return protoreflect.ValueOfString("") - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler.bundler_payment_messages": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_MsgPayBundler_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler")) - } - panic(fmt.Errorf("message cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler 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_MsgPayBundler) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler", 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_MsgPayBundler) 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_MsgPayBundler) 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_MsgPayBundler) 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_MsgPayBundler) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgPayBundler) - 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.Bundler) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.BundlerPaymentMessages) > 0 { - for _, e := range x.BundlerPaymentMessages { - 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().(*MsgPayBundler) - 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.BundlerPaymentMessages) > 0 { - for iNdEx := len(x.BundlerPaymentMessages) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.BundlerPaymentMessages[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] = 0x12 - } - } - if len(x.Bundler) > 0 { - i -= len(x.Bundler) - copy(dAtA[i:], x.Bundler) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bundler))) - 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().(*MsgPayBundler) - 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: MsgPayBundler: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgPayBundler: 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 Bundler", 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.Bundler = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BundlerPaymentMessages", 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.BundlerPaymentMessages = append(x.BundlerPaymentMessages, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BundlerPaymentMessages[len(x.BundlerPaymentMessages)-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 _ protoreflect.List = (*_MsgPayBundlerResponse_1_list)(nil) - -type _MsgPayBundlerResponse_1_list struct { - list *[]*anypb.Any -} - -func (x *_MsgPayBundlerResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgPayBundlerResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgPayBundlerResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_MsgPayBundlerResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgPayBundlerResponse_1_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgPayBundlerResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgPayBundlerResponse_1_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgPayBundlerResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgPayBundlerResponse protoreflect.MessageDescriptor - fd_MsgPayBundlerResponse_bundler_payment_messages_response protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_init() - md_MsgPayBundlerResponse = File_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto.Messages().ByName("MsgPayBundlerResponse") - fd_MsgPayBundlerResponse_bundler_payment_messages_response = md_MsgPayBundlerResponse.Fields().ByName("bundler_payment_messages_response") -} - -var _ protoreflect.Message = (*fastReflection_MsgPayBundlerResponse)(nil) - -type fastReflection_MsgPayBundlerResponse MsgPayBundlerResponse - -func (x *MsgPayBundlerResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgPayBundlerResponse)(x) -} - -func (x *MsgPayBundlerResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_accounts_interfaces_account_abstraction_v1_interface_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_MsgPayBundlerResponse_messageType fastReflection_MsgPayBundlerResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgPayBundlerResponse_messageType{} - -type fastReflection_MsgPayBundlerResponse_messageType struct{} - -func (x fastReflection_MsgPayBundlerResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgPayBundlerResponse)(nil) -} -func (x fastReflection_MsgPayBundlerResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgPayBundlerResponse) -} -func (x fastReflection_MsgPayBundlerResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgPayBundlerResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgPayBundlerResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgPayBundlerResponse -} - -// 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_MsgPayBundlerResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgPayBundlerResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgPayBundlerResponse) New() protoreflect.Message { - return new(fastReflection_MsgPayBundlerResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgPayBundlerResponse) Interface() protoreflect.ProtoMessage { - return (*MsgPayBundlerResponse)(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_MsgPayBundlerResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.BundlerPaymentMessagesResponse) != 0 { - value := protoreflect.ValueOfList(&_MsgPayBundlerResponse_1_list{list: &x.BundlerPaymentMessagesResponse}) - if !f(fd_MsgPayBundlerResponse_bundler_payment_messages_response, 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_MsgPayBundlerResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundlerResponse.bundler_payment_messages_response": - return len(x.BundlerPaymentMessagesResponse) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundlerResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundlerResponse 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_MsgPayBundlerResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundlerResponse.bundler_payment_messages_response": - x.BundlerPaymentMessagesResponse = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundlerResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundlerResponse 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_MsgPayBundlerResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundlerResponse.bundler_payment_messages_response": - if len(x.BundlerPaymentMessagesResponse) == 0 { - return protoreflect.ValueOfList(&_MsgPayBundlerResponse_1_list{}) - } - listValue := &_MsgPayBundlerResponse_1_list{list: &x.BundlerPaymentMessagesResponse} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundlerResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundlerResponse 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_MsgPayBundlerResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundlerResponse.bundler_payment_messages_response": - lv := value.List() - clv := lv.(*_MsgPayBundlerResponse_1_list) - x.BundlerPaymentMessagesResponse = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundlerResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundlerResponse 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_MsgPayBundlerResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundlerResponse.bundler_payment_messages_response": - if x.BundlerPaymentMessagesResponse == nil { - x.BundlerPaymentMessagesResponse = []*anypb.Any{} - } - value := &_MsgPayBundlerResponse_1_list{list: &x.BundlerPaymentMessagesResponse} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundlerResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundlerResponse 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_MsgPayBundlerResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundlerResponse.bundler_payment_messages_response": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_MsgPayBundlerResponse_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundlerResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundlerResponse 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_MsgPayBundlerResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundlerResponse", 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_MsgPayBundlerResponse) 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_MsgPayBundlerResponse) 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_MsgPayBundlerResponse) 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_MsgPayBundlerResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgPayBundlerResponse) - 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.BundlerPaymentMessagesResponse) > 0 { - for _, e := range x.BundlerPaymentMessagesResponse { - 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().(*MsgPayBundlerResponse) - 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.BundlerPaymentMessagesResponse) > 0 { - for iNdEx := len(x.BundlerPaymentMessagesResponse) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.BundlerPaymentMessagesResponse[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().(*MsgPayBundlerResponse) - 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: MsgPayBundlerResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgPayBundlerResponse: 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 BundlerPaymentMessagesResponse", 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.BundlerPaymentMessagesResponse = append(x.BundlerPaymentMessagesResponse, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BundlerPaymentMessagesResponse[len(x.BundlerPaymentMessagesResponse)-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 _ protoreflect.List = (*_MsgExecute_2_list)(nil) - -type _MsgExecute_2_list struct { - list *[]*anypb.Any -} - -func (x *_MsgExecute_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgExecute_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgExecute_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_MsgExecute_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgExecute_2_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgExecute_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgExecute_2_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgExecute_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgExecute protoreflect.MessageDescriptor - fd_MsgExecute_bundler protoreflect.FieldDescriptor - fd_MsgExecute_execution_messages protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_init() - md_MsgExecute = File_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto.Messages().ByName("MsgExecute") - fd_MsgExecute_bundler = md_MsgExecute.Fields().ByName("bundler") - fd_MsgExecute_execution_messages = md_MsgExecute.Fields().ByName("execution_messages") -} - -var _ protoreflect.Message = (*fastReflection_MsgExecute)(nil) - -type fastReflection_MsgExecute MsgExecute - -func (x *MsgExecute) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgExecute)(x) -} - -func (x *MsgExecute) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_accounts_interfaces_account_abstraction_v1_interface_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_MsgExecute_messageType fastReflection_MsgExecute_messageType -var _ protoreflect.MessageType = fastReflection_MsgExecute_messageType{} - -type fastReflection_MsgExecute_messageType struct{} - -func (x fastReflection_MsgExecute_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgExecute)(nil) -} -func (x fastReflection_MsgExecute_messageType) New() protoreflect.Message { - return new(fastReflection_MsgExecute) -} -func (x fastReflection_MsgExecute_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgExecute -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgExecute) Descriptor() protoreflect.MessageDescriptor { - return md_MsgExecute -} - -// 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_MsgExecute) Type() protoreflect.MessageType { - return _fastReflection_MsgExecute_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgExecute) New() protoreflect.Message { - return new(fastReflection_MsgExecute) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgExecute) Interface() protoreflect.ProtoMessage { - return (*MsgExecute)(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_MsgExecute) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Bundler != "" { - value := protoreflect.ValueOfString(x.Bundler) - if !f(fd_MsgExecute_bundler, value) { - return - } - } - if len(x.ExecutionMessages) != 0 { - value := protoreflect.ValueOfList(&_MsgExecute_2_list{list: &x.ExecutionMessages}) - if !f(fd_MsgExecute_execution_messages, 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_MsgExecute) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute.bundler": - return x.Bundler != "" - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute.execution_messages": - return len(x.ExecutionMessages) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute")) - } - panic(fmt.Errorf("message cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute 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_MsgExecute) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute.bundler": - x.Bundler = "" - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute.execution_messages": - x.ExecutionMessages = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute")) - } - panic(fmt.Errorf("message cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute 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_MsgExecute) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute.bundler": - value := x.Bundler - return protoreflect.ValueOfString(value) - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute.execution_messages": - if len(x.ExecutionMessages) == 0 { - return protoreflect.ValueOfList(&_MsgExecute_2_list{}) - } - listValue := &_MsgExecute_2_list{list: &x.ExecutionMessages} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute")) - } - panic(fmt.Errorf("message cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute 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_MsgExecute) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute.bundler": - x.Bundler = value.Interface().(string) - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute.execution_messages": - lv := value.List() - clv := lv.(*_MsgExecute_2_list) - x.ExecutionMessages = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute")) - } - panic(fmt.Errorf("message cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute 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_MsgExecute) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute.execution_messages": - if x.ExecutionMessages == nil { - x.ExecutionMessages = []*anypb.Any{} - } - value := &_MsgExecute_2_list{list: &x.ExecutionMessages} - return protoreflect.ValueOfList(value) - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute.bundler": - panic(fmt.Errorf("field bundler of message cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute")) - } - panic(fmt.Errorf("message cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute 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_MsgExecute) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute.bundler": - return protoreflect.ValueOfString("") - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute.execution_messages": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_MsgExecute_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute")) - } - panic(fmt.Errorf("message cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute 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_MsgExecute) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute", 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_MsgExecute) 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_MsgExecute) 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_MsgExecute) 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_MsgExecute) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgExecute) - 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.Bundler) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.ExecutionMessages) > 0 { - for _, e := range x.ExecutionMessages { - 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().(*MsgExecute) - 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.ExecutionMessages) > 0 { - for iNdEx := len(x.ExecutionMessages) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.ExecutionMessages[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] = 0x12 - } - } - if len(x.Bundler) > 0 { - i -= len(x.Bundler) - copy(dAtA[i:], x.Bundler) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bundler))) - 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().(*MsgExecute) - 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: MsgExecute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExecute: 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 Bundler", 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.Bundler = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExecutionMessages", 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.ExecutionMessages = append(x.ExecutionMessages, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ExecutionMessages[len(x.ExecutionMessages)-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 _ protoreflect.List = (*_MsgExecuteResponse_1_list)(nil) - -type _MsgExecuteResponse_1_list struct { - list *[]*anypb.Any -} - -func (x *_MsgExecuteResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgExecuteResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgExecuteResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_MsgExecuteResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgExecuteResponse_1_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgExecuteResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgExecuteResponse_1_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgExecuteResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgExecuteResponse protoreflect.MessageDescriptor - fd_MsgExecuteResponse_execution_messages_response protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_init() - md_MsgExecuteResponse = File_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto.Messages().ByName("MsgExecuteResponse") - fd_MsgExecuteResponse_execution_messages_response = md_MsgExecuteResponse.Fields().ByName("execution_messages_response") -} - -var _ protoreflect.Message = (*fastReflection_MsgExecuteResponse)(nil) - -type fastReflection_MsgExecuteResponse MsgExecuteResponse - -func (x *MsgExecuteResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgExecuteResponse)(x) -} - -func (x *MsgExecuteResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_accounts_interfaces_account_abstraction_v1_interface_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_MsgExecuteResponse_messageType fastReflection_MsgExecuteResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgExecuteResponse_messageType{} - -type fastReflection_MsgExecuteResponse_messageType struct{} - -func (x fastReflection_MsgExecuteResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgExecuteResponse)(nil) -} -func (x fastReflection_MsgExecuteResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgExecuteResponse) -} -func (x fastReflection_MsgExecuteResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgExecuteResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgExecuteResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgExecuteResponse -} - -// 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_MsgExecuteResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgExecuteResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgExecuteResponse) New() protoreflect.Message { - return new(fastReflection_MsgExecuteResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgExecuteResponse) Interface() protoreflect.ProtoMessage { - return (*MsgExecuteResponse)(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_MsgExecuteResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.ExecutionMessagesResponse) != 0 { - value := protoreflect.ValueOfList(&_MsgExecuteResponse_1_list{list: &x.ExecutionMessagesResponse}) - if !f(fd_MsgExecuteResponse_execution_messages_response, 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_MsgExecuteResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgExecuteResponse.execution_messages_response": - return len(x.ExecutionMessagesResponse) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgExecuteResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.interfaces.account_abstraction.v1.MsgExecuteResponse 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_MsgExecuteResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgExecuteResponse.execution_messages_response": - x.ExecutionMessagesResponse = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgExecuteResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.interfaces.account_abstraction.v1.MsgExecuteResponse 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_MsgExecuteResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgExecuteResponse.execution_messages_response": - if len(x.ExecutionMessagesResponse) == 0 { - return protoreflect.ValueOfList(&_MsgExecuteResponse_1_list{}) - } - listValue := &_MsgExecuteResponse_1_list{list: &x.ExecutionMessagesResponse} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgExecuteResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.interfaces.account_abstraction.v1.MsgExecuteResponse 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_MsgExecuteResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgExecuteResponse.execution_messages_response": - lv := value.List() - clv := lv.(*_MsgExecuteResponse_1_list) - x.ExecutionMessagesResponse = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgExecuteResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.interfaces.account_abstraction.v1.MsgExecuteResponse 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_MsgExecuteResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgExecuteResponse.execution_messages_response": - if x.ExecutionMessagesResponse == nil { - x.ExecutionMessagesResponse = []*anypb.Any{} - } - value := &_MsgExecuteResponse_1_list{list: &x.ExecutionMessagesResponse} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgExecuteResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.interfaces.account_abstraction.v1.MsgExecuteResponse 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_MsgExecuteResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.interfaces.account_abstraction.v1.MsgExecuteResponse.execution_messages_response": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_MsgExecuteResponse_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.interfaces.account_abstraction.v1.MsgExecuteResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.interfaces.account_abstraction.v1.MsgExecuteResponse 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_MsgExecuteResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.interfaces.account_abstraction.v1.MsgExecuteResponse", 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_MsgExecuteResponse) 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_MsgExecuteResponse) 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_MsgExecuteResponse) 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_MsgExecuteResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgExecuteResponse) - 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.ExecutionMessagesResponse) > 0 { - for _, e := range x.ExecutionMessagesResponse { - 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().(*MsgExecuteResponse) - 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.ExecutionMessagesResponse) > 0 { - for iNdEx := len(x.ExecutionMessagesResponse) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.ExecutionMessagesResponse[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().(*MsgExecuteResponse) - 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: MsgExecuteResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExecuteResponse: 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 ExecutionMessagesResponse", 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.ExecutionMessagesResponse = append(x.ExecutionMessagesResponse, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ExecutionMessagesResponse[len(x.ExecutionMessagesResponse)-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_QueryAuthenticationMethods protoreflect.MessageDescriptor ) @@ -2991,7 +1014,7 @@ func (x *QueryAuthenticationMethods) ProtoReflect() protoreflect.Message { } func (x *QueryAuthenticationMethods) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_msgTypes[6] + mi := &file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3395,7 +1418,7 @@ func (x *QueryAuthenticationMethodsResponse) ProtoReflect() protoreflect.Message } func (x *QueryAuthenticationMethodsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_msgTypes[7] + mi := &file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3823,7 +1846,7 @@ const ( ) // MsgAuthenticate is a message that an x/account account abstraction implementer -// must handle to authenticate a state transition. +// must handle to authenticate a transaction. Always ensure the caller is the Accounts module. type MsgAuthenticate struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3833,9 +1856,14 @@ type MsgAuthenticate struct { // NOTE: in case the operation was sent directly by the user, this field will reflect // the user address. Bundler string `protobuf:"bytes,1,opt,name=bundler,proto3" json:"bundler,omitempty"` - // user_operation is the operation that the user is trying to perform. - // it also contains authentication information. - UserOperation *v1.UserOperation `protobuf:"bytes,2,opt,name=user_operation,json=userOperation,proto3" json:"user_operation,omitempty"` + // raw_tx defines the raw version of the tx, this is useful to compute the signature quickly. + RawTx *v1beta1.TxRaw `protobuf:"bytes,2,opt,name=raw_tx,json=rawTx,proto3" json:"raw_tx,omitempty"` + // tx defines the decoded version of the tx, coming from raw_tx. + Tx *v1beta1.Tx `protobuf:"bytes,3,opt,name=tx,proto3" json:"tx,omitempty"` + // signer_index defines the index of the signer in the tx. + // Specifically this can be used to extract the signature at the correct + // index. + SignerIndex uint32 `protobuf:"varint,4,opt,name=signer_index,json=signerIndex,proto3" json:"signer_index,omitempty"` } func (x *MsgAuthenticate) Reset() { @@ -3865,13 +1893,27 @@ func (x *MsgAuthenticate) GetBundler() string { return "" } -func (x *MsgAuthenticate) GetUserOperation() *v1.UserOperation { +func (x *MsgAuthenticate) GetRawTx() *v1beta1.TxRaw { if x != nil { - return x.UserOperation + return x.RawTx } return nil } +func (x *MsgAuthenticate) GetTx() *v1beta1.Tx { + if x != nil { + return x.Tx + } + return nil +} + +func (x *MsgAuthenticate) GetSignerIndex() uint32 { + if x != nil { + return x.SignerIndex + } + return 0 +} + // MsgAuthenticateResponse is the response to MsgAuthenticate. // The authentication either fails or succeeds, this is why // there are no auxiliary fields to the response. @@ -3901,185 +1943,6 @@ func (*MsgAuthenticateResponse) Descriptor() ([]byte, []int) { return file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_rawDescGZIP(), []int{1} } -// MsgPayBundler is a message that an x/account account abstraction implementer -// can optionally implement in case it wants to further refine control over -// the bundler payment messages. -// The account must ensure the caller of this message is the x/accounts module itself. -type MsgPayBundler struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // bundler is the address of the bundler. - // NOTE: in case the operation was sent directly by the user, this field will - // reflect the user address. - Bundler string `protobuf:"bytes,1,opt,name=bundler,proto3" json:"bundler,omitempty"` - // bundler_payment_messages are the messages that the operation sender will execute. - // The account can modify the messages as it sees fit. - BundlerPaymentMessages []*anypb.Any `protobuf:"bytes,2,rep,name=bundler_payment_messages,json=bundlerPaymentMessages,proto3" json:"bundler_payment_messages,omitempty"` -} - -func (x *MsgPayBundler) Reset() { - *x = MsgPayBundler{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgPayBundler) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgPayBundler) ProtoMessage() {} - -// Deprecated: Use MsgPayBundler.ProtoReflect.Descriptor instead. -func (*MsgPayBundler) Descriptor() ([]byte, []int) { - return file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_rawDescGZIP(), []int{2} -} - -func (x *MsgPayBundler) GetBundler() string { - if x != nil { - return x.Bundler - } - return "" -} - -func (x *MsgPayBundler) GetBundlerPaymentMessages() []*anypb.Any { - if x != nil { - return x.BundlerPaymentMessages - } - return nil -} - -// MsgPayBundlerResponse is the response to MsgPayBundler. -type MsgPayBundlerResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // bundler_payment_messages_response are the messages that the bundler will pay for. - BundlerPaymentMessagesResponse []*anypb.Any `protobuf:"bytes,1,rep,name=bundler_payment_messages_response,json=bundlerPaymentMessagesResponse,proto3" json:"bundler_payment_messages_response,omitempty"` -} - -func (x *MsgPayBundlerResponse) Reset() { - *x = MsgPayBundlerResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgPayBundlerResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgPayBundlerResponse) ProtoMessage() {} - -// Deprecated: Use MsgPayBundlerResponse.ProtoReflect.Descriptor instead. -func (*MsgPayBundlerResponse) Descriptor() ([]byte, []int) { - return file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_rawDescGZIP(), []int{3} -} - -func (x *MsgPayBundlerResponse) GetBundlerPaymentMessagesResponse() []*anypb.Any { - if x != nil { - return x.BundlerPaymentMessagesResponse - } - return nil -} - -// MsgExecute is a message that an x/account account abstraction implementer -// can optionally implement in case it wants to further refine control over -// the execution messages. It can be used to extend the execution flow, possibly -// block certain messages, or modify them. -// The account must ensure the caller of this message is the x/accounts module itself. -type MsgExecute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // bundler is the address of the bundler. - // NOTE: in case the operation was sent directly by the user, this field will - // reflect the user address. - Bundler string `protobuf:"bytes,1,opt,name=bundler,proto3" json:"bundler,omitempty"` - // execution_messages are the messages that the operation sender will execute. - // The account can modify the messages as it sees fit. - ExecutionMessages []*anypb.Any `protobuf:"bytes,2,rep,name=execution_messages,json=executionMessages,proto3" json:"execution_messages,omitempty"` -} - -func (x *MsgExecute) Reset() { - *x = MsgExecute{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgExecute) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgExecute) ProtoMessage() {} - -// Deprecated: Use MsgExecute.ProtoReflect.Descriptor instead. -func (*MsgExecute) Descriptor() ([]byte, []int) { - return file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_rawDescGZIP(), []int{4} -} - -func (x *MsgExecute) GetBundler() string { - if x != nil { - return x.Bundler - } - return "" -} - -func (x *MsgExecute) GetExecutionMessages() []*anypb.Any { - if x != nil { - return x.ExecutionMessages - } - return nil -} - -// MsgExecuteResponse is the response to MsgExecute. -type MsgExecuteResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // execution_messages_response are the messages that the operation sender will execute. - ExecutionMessagesResponse []*anypb.Any `protobuf:"bytes,1,rep,name=execution_messages_response,json=executionMessagesResponse,proto3" json:"execution_messages_response,omitempty"` -} - -func (x *MsgExecuteResponse) Reset() { - *x = MsgExecuteResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgExecuteResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgExecuteResponse) ProtoMessage() {} - -// Deprecated: Use MsgExecuteResponse.ProtoReflect.Descriptor instead. -func (*MsgExecuteResponse) Descriptor() ([]byte, []int) { - return file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_rawDescGZIP(), []int{5} -} - -func (x *MsgExecuteResponse) GetExecutionMessagesResponse() []*anypb.Any { - if x != nil { - return x.ExecutionMessagesResponse - } - return nil -} - // QueryAuthenticationMethods is a query that an x/account account abstraction implementer // must handle to return the authentication methods that the account supports. type QueryAuthenticationMethods struct { @@ -4091,7 +1954,7 @@ type QueryAuthenticationMethods struct { func (x *QueryAuthenticationMethods) Reset() { *x = QueryAuthenticationMethods{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_msgTypes[6] + mi := &file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4105,7 +1968,7 @@ func (*QueryAuthenticationMethods) ProtoMessage() {} // Deprecated: Use QueryAuthenticationMethods.ProtoReflect.Descriptor instead. func (*QueryAuthenticationMethods) Descriptor() ([]byte, []int) { - return file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_rawDescGZIP(), []int{6} + return file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_rawDescGZIP(), []int{2} } // QueryAuthenticationMethodsResponse is the response to QueryAuthenticationMethods. @@ -4121,7 +1984,7 @@ type QueryAuthenticationMethodsResponse struct { func (x *QueryAuthenticationMethodsResponse) Reset() { *x = QueryAuthenticationMethodsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_msgTypes[7] + mi := &file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4135,7 +1998,7 @@ func (*QueryAuthenticationMethodsResponse) ProtoMessage() {} // Deprecated: Use QueryAuthenticationMethodsResponse.ProtoReflect.Descriptor instead. func (*QueryAuthenticationMethodsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_rawDescGZIP(), []int{7} + return file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_rawDescGZIP(), []int{3} } func (x *QueryAuthenticationMethodsResponse) GetAuthenticationMethods() []string { @@ -4157,80 +2020,53 @@ var file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_rawDe 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 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, 0x2c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x62, - 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x75, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, 0x48, 0x0a, 0x0e, - 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, + 0x6f, 0x1a, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa6, 0x01, + 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x06, 0x72, + 0x61, 0x77, 0x5f, 0x74, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x54, 0x78, 0x52, 0x61, 0x77, 0x52, 0x05, 0x72, 0x61, 0x77, 0x54, 0x78, 0x12, 0x25, 0x0a, 0x02, + 0x74, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x52, + 0x02, 0x74, 0x78, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x65, + 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x79, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x79, 0x42, 0x75, 0x6e, 0x64, 0x6c, - 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x18, - 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 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, 0x52, 0x16, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x50, 0x61, 0x79, - 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x78, 0x0a, 0x15, - 0x4d, 0x73, 0x67, 0x50, 0x61, 0x79, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x21, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, - 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x73, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x52, 0x1e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x50, - 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6b, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, 0x43, - 0x0a, 0x12, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 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, - 0x52, 0x11, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x73, 0x22, 0x6a, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x1b, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x5f, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x52, 0x19, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x1c, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x22, 0x5b, 0x0a, - 0x22, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x16, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x15, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x42, 0x86, 0x03, 0x0a, 0x35, 0x63, - 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x58, 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, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, - 0x63, 0x65, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x62, 0x73, 0x74, - 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x5f, 0x61, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x31, - 0xa2, 0x02, 0x04, 0x43, 0x41, 0x49, 0x41, 0xaa, 0x02, 0x30, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, - 0x61, 0x63, 0x65, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x62, 0x73, 0x74, - 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x30, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, - 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x3c, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x41, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x34, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x3a, - 0x3a, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x3a, 0x3a, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, + 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x22, + 0x5b, 0x0a, 0x22, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x16, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x15, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x42, 0x86, 0x03, 0x0a, + 0x35, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x2e, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x58, 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, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x66, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x62, + 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x76, 0x31, 0xa2, 0x02, 0x04, 0x43, 0x41, 0x49, 0x41, 0xaa, 0x02, 0x30, 0x43, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x62, + 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x30, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x41, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x3c, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x5c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x5c, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5c, + 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x34, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x3a, 0x3a, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x3a, 0x3a, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4245,30 +2081,23 @@ func file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_rawD return file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_rawDescData } -var file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_goTypes = []interface{}{ (*MsgAuthenticate)(nil), // 0: cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate (*MsgAuthenticateResponse)(nil), // 1: cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticateResponse - (*MsgPayBundler)(nil), // 2: cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler - (*MsgPayBundlerResponse)(nil), // 3: cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundlerResponse - (*MsgExecute)(nil), // 4: cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute - (*MsgExecuteResponse)(nil), // 5: cosmos.accounts.interfaces.account_abstraction.v1.MsgExecuteResponse - (*QueryAuthenticationMethods)(nil), // 6: cosmos.accounts.interfaces.account_abstraction.v1.QueryAuthenticationMethods - (*QueryAuthenticationMethodsResponse)(nil), // 7: cosmos.accounts.interfaces.account_abstraction.v1.QueryAuthenticationMethodsResponse - (*v1.UserOperation)(nil), // 8: cosmos.accounts.v1.UserOperation - (*anypb.Any)(nil), // 9: google.protobuf.Any + (*QueryAuthenticationMethods)(nil), // 2: cosmos.accounts.interfaces.account_abstraction.v1.QueryAuthenticationMethods + (*QueryAuthenticationMethodsResponse)(nil), // 3: cosmos.accounts.interfaces.account_abstraction.v1.QueryAuthenticationMethodsResponse + (*v1beta1.TxRaw)(nil), // 4: cosmos.tx.v1beta1.TxRaw + (*v1beta1.Tx)(nil), // 5: cosmos.tx.v1beta1.Tx } var file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_depIdxs = []int32{ - 8, // 0: cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.user_operation:type_name -> cosmos.accounts.v1.UserOperation - 9, // 1: cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler.bundler_payment_messages:type_name -> google.protobuf.Any - 9, // 2: cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundlerResponse.bundler_payment_messages_response:type_name -> google.protobuf.Any - 9, // 3: cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute.execution_messages:type_name -> google.protobuf.Any - 9, // 4: cosmos.accounts.interfaces.account_abstraction.v1.MsgExecuteResponse.execution_messages_response:type_name -> google.protobuf.Any - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 4, // 0: cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.raw_tx:type_name -> cosmos.tx.v1beta1.TxRaw + 5, // 1: cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate.tx:type_name -> cosmos.tx.v1beta1.Tx + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_init() } @@ -4302,54 +2131,6 @@ func file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_init } } file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgPayBundler); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgPayBundlerResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgExecute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgExecuteResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryAuthenticationMethods); i { case 0: return &v.state @@ -4361,7 +2142,7 @@ func file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_init return nil } } - file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryAuthenticationMethodsResponse); i { case 0: return &v.state @@ -4380,7 +2161,7 @@ func file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_init GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_accounts_interfaces_account_abstraction_v1_interface_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, diff --git a/api/cosmos/accounts/v1/account_abstraction.pulsar.go b/api/cosmos/accounts/v1/account_abstraction.pulsar.go deleted file mode 100644 index 451b7e9d23..0000000000 --- a/api/cosmos/accounts/v1/account_abstraction.pulsar.go +++ /dev/null @@ -1,2868 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package accountsv1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_UserOperation_5_list)(nil) - -type _UserOperation_5_list struct { - list *[]*anypb.Any -} - -func (x *_UserOperation_5_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_UserOperation_5_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_UserOperation_5_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_UserOperation_5_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_UserOperation_5_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_UserOperation_5_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_UserOperation_5_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_UserOperation_5_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_UserOperation_7_list)(nil) - -type _UserOperation_7_list struct { - list *[]*anypb.Any -} - -func (x *_UserOperation_7_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_UserOperation_7_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_UserOperation_7_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_UserOperation_7_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_UserOperation_7_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_UserOperation_7_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_UserOperation_7_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_UserOperation_7_list) IsValid() bool { - return x.list != nil -} - -var ( - md_UserOperation protoreflect.MessageDescriptor - fd_UserOperation_sender protoreflect.FieldDescriptor - fd_UserOperation_authentication_method protoreflect.FieldDescriptor - fd_UserOperation_authentication_data protoreflect.FieldDescriptor - fd_UserOperation_authentication_gas_limit protoreflect.FieldDescriptor - fd_UserOperation_bundler_payment_messages protoreflect.FieldDescriptor - fd_UserOperation_bundler_payment_gas_limit protoreflect.FieldDescriptor - fd_UserOperation_execution_messages protoreflect.FieldDescriptor - fd_UserOperation_execution_gas_limit protoreflect.FieldDescriptor - fd_UserOperation_tx_compat protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_accounts_v1_account_abstraction_proto_init() - md_UserOperation = File_cosmos_accounts_v1_account_abstraction_proto.Messages().ByName("UserOperation") - fd_UserOperation_sender = md_UserOperation.Fields().ByName("sender") - fd_UserOperation_authentication_method = md_UserOperation.Fields().ByName("authentication_method") - fd_UserOperation_authentication_data = md_UserOperation.Fields().ByName("authentication_data") - fd_UserOperation_authentication_gas_limit = md_UserOperation.Fields().ByName("authentication_gas_limit") - fd_UserOperation_bundler_payment_messages = md_UserOperation.Fields().ByName("bundler_payment_messages") - fd_UserOperation_bundler_payment_gas_limit = md_UserOperation.Fields().ByName("bundler_payment_gas_limit") - fd_UserOperation_execution_messages = md_UserOperation.Fields().ByName("execution_messages") - fd_UserOperation_execution_gas_limit = md_UserOperation.Fields().ByName("execution_gas_limit") - fd_UserOperation_tx_compat = md_UserOperation.Fields().ByName("tx_compat") -} - -var _ protoreflect.Message = (*fastReflection_UserOperation)(nil) - -type fastReflection_UserOperation UserOperation - -func (x *UserOperation) ProtoReflect() protoreflect.Message { - return (*fastReflection_UserOperation)(x) -} - -func (x *UserOperation) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_accounts_v1_account_abstraction_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_UserOperation_messageType fastReflection_UserOperation_messageType -var _ protoreflect.MessageType = fastReflection_UserOperation_messageType{} - -type fastReflection_UserOperation_messageType struct{} - -func (x fastReflection_UserOperation_messageType) Zero() protoreflect.Message { - return (*fastReflection_UserOperation)(nil) -} -func (x fastReflection_UserOperation_messageType) New() protoreflect.Message { - return new(fastReflection_UserOperation) -} -func (x fastReflection_UserOperation_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_UserOperation -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_UserOperation) Descriptor() protoreflect.MessageDescriptor { - return md_UserOperation -} - -// 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_UserOperation) Type() protoreflect.MessageType { - return _fastReflection_UserOperation_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_UserOperation) New() protoreflect.Message { - return new(fastReflection_UserOperation) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_UserOperation) Interface() protoreflect.ProtoMessage { - return (*UserOperation)(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_UserOperation) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Sender != "" { - value := protoreflect.ValueOfString(x.Sender) - if !f(fd_UserOperation_sender, value) { - return - } - } - if x.AuthenticationMethod != "" { - value := protoreflect.ValueOfString(x.AuthenticationMethod) - if !f(fd_UserOperation_authentication_method, value) { - return - } - } - if x.AuthenticationData != nil { - value := protoreflect.ValueOfMessage(x.AuthenticationData.ProtoReflect()) - if !f(fd_UserOperation_authentication_data, value) { - return - } - } - if x.AuthenticationGasLimit != uint64(0) { - value := protoreflect.ValueOfUint64(x.AuthenticationGasLimit) - if !f(fd_UserOperation_authentication_gas_limit, value) { - return - } - } - if len(x.BundlerPaymentMessages) != 0 { - value := protoreflect.ValueOfList(&_UserOperation_5_list{list: &x.BundlerPaymentMessages}) - if !f(fd_UserOperation_bundler_payment_messages, value) { - return - } - } - if x.BundlerPaymentGasLimit != uint64(0) { - value := protoreflect.ValueOfUint64(x.BundlerPaymentGasLimit) - if !f(fd_UserOperation_bundler_payment_gas_limit, value) { - return - } - } - if len(x.ExecutionMessages) != 0 { - value := protoreflect.ValueOfList(&_UserOperation_7_list{list: &x.ExecutionMessages}) - if !f(fd_UserOperation_execution_messages, value) { - return - } - } - if x.ExecutionGasLimit != uint64(0) { - value := protoreflect.ValueOfUint64(x.ExecutionGasLimit) - if !f(fd_UserOperation_execution_gas_limit, value) { - return - } - } - if x.TxCompat != nil { - value := protoreflect.ValueOfMessage(x.TxCompat.ProtoReflect()) - if !f(fd_UserOperation_tx_compat, 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_UserOperation) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.accounts.v1.UserOperation.sender": - return x.Sender != "" - case "cosmos.accounts.v1.UserOperation.authentication_method": - return x.AuthenticationMethod != "" - case "cosmos.accounts.v1.UserOperation.authentication_data": - return x.AuthenticationData != nil - case "cosmos.accounts.v1.UserOperation.authentication_gas_limit": - return x.AuthenticationGasLimit != uint64(0) - case "cosmos.accounts.v1.UserOperation.bundler_payment_messages": - return len(x.BundlerPaymentMessages) != 0 - case "cosmos.accounts.v1.UserOperation.bundler_payment_gas_limit": - return x.BundlerPaymentGasLimit != uint64(0) - case "cosmos.accounts.v1.UserOperation.execution_messages": - return len(x.ExecutionMessages) != 0 - case "cosmos.accounts.v1.UserOperation.execution_gas_limit": - return x.ExecutionGasLimit != uint64(0) - case "cosmos.accounts.v1.UserOperation.tx_compat": - return x.TxCompat != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.UserOperation")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.UserOperation 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_UserOperation) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.accounts.v1.UserOperation.sender": - x.Sender = "" - case "cosmos.accounts.v1.UserOperation.authentication_method": - x.AuthenticationMethod = "" - case "cosmos.accounts.v1.UserOperation.authentication_data": - x.AuthenticationData = nil - case "cosmos.accounts.v1.UserOperation.authentication_gas_limit": - x.AuthenticationGasLimit = uint64(0) - case "cosmos.accounts.v1.UserOperation.bundler_payment_messages": - x.BundlerPaymentMessages = nil - case "cosmos.accounts.v1.UserOperation.bundler_payment_gas_limit": - x.BundlerPaymentGasLimit = uint64(0) - case "cosmos.accounts.v1.UserOperation.execution_messages": - x.ExecutionMessages = nil - case "cosmos.accounts.v1.UserOperation.execution_gas_limit": - x.ExecutionGasLimit = uint64(0) - case "cosmos.accounts.v1.UserOperation.tx_compat": - x.TxCompat = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.UserOperation")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.UserOperation 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_UserOperation) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.accounts.v1.UserOperation.sender": - value := x.Sender - return protoreflect.ValueOfString(value) - case "cosmos.accounts.v1.UserOperation.authentication_method": - value := x.AuthenticationMethod - return protoreflect.ValueOfString(value) - case "cosmos.accounts.v1.UserOperation.authentication_data": - value := x.AuthenticationData - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.accounts.v1.UserOperation.authentication_gas_limit": - value := x.AuthenticationGasLimit - return protoreflect.ValueOfUint64(value) - case "cosmos.accounts.v1.UserOperation.bundler_payment_messages": - if len(x.BundlerPaymentMessages) == 0 { - return protoreflect.ValueOfList(&_UserOperation_5_list{}) - } - listValue := &_UserOperation_5_list{list: &x.BundlerPaymentMessages} - return protoreflect.ValueOfList(listValue) - case "cosmos.accounts.v1.UserOperation.bundler_payment_gas_limit": - value := x.BundlerPaymentGasLimit - return protoreflect.ValueOfUint64(value) - case "cosmos.accounts.v1.UserOperation.execution_messages": - if len(x.ExecutionMessages) == 0 { - return protoreflect.ValueOfList(&_UserOperation_7_list{}) - } - listValue := &_UserOperation_7_list{list: &x.ExecutionMessages} - return protoreflect.ValueOfList(listValue) - case "cosmos.accounts.v1.UserOperation.execution_gas_limit": - value := x.ExecutionGasLimit - return protoreflect.ValueOfUint64(value) - case "cosmos.accounts.v1.UserOperation.tx_compat": - value := x.TxCompat - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.UserOperation")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.UserOperation 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_UserOperation) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.accounts.v1.UserOperation.sender": - x.Sender = value.Interface().(string) - case "cosmos.accounts.v1.UserOperation.authentication_method": - x.AuthenticationMethod = value.Interface().(string) - case "cosmos.accounts.v1.UserOperation.authentication_data": - x.AuthenticationData = value.Message().Interface().(*anypb.Any) - case "cosmos.accounts.v1.UserOperation.authentication_gas_limit": - x.AuthenticationGasLimit = value.Uint() - case "cosmos.accounts.v1.UserOperation.bundler_payment_messages": - lv := value.List() - clv := lv.(*_UserOperation_5_list) - x.BundlerPaymentMessages = *clv.list - case "cosmos.accounts.v1.UserOperation.bundler_payment_gas_limit": - x.BundlerPaymentGasLimit = value.Uint() - case "cosmos.accounts.v1.UserOperation.execution_messages": - lv := value.List() - clv := lv.(*_UserOperation_7_list) - x.ExecutionMessages = *clv.list - case "cosmos.accounts.v1.UserOperation.execution_gas_limit": - x.ExecutionGasLimit = value.Uint() - case "cosmos.accounts.v1.UserOperation.tx_compat": - x.TxCompat = value.Message().Interface().(*TxCompat) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.UserOperation")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.UserOperation 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_UserOperation) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.v1.UserOperation.authentication_data": - if x.AuthenticationData == nil { - x.AuthenticationData = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.AuthenticationData.ProtoReflect()) - case "cosmos.accounts.v1.UserOperation.bundler_payment_messages": - if x.BundlerPaymentMessages == nil { - x.BundlerPaymentMessages = []*anypb.Any{} - } - value := &_UserOperation_5_list{list: &x.BundlerPaymentMessages} - return protoreflect.ValueOfList(value) - case "cosmos.accounts.v1.UserOperation.execution_messages": - if x.ExecutionMessages == nil { - x.ExecutionMessages = []*anypb.Any{} - } - value := &_UserOperation_7_list{list: &x.ExecutionMessages} - return protoreflect.ValueOfList(value) - case "cosmos.accounts.v1.UserOperation.tx_compat": - if x.TxCompat == nil { - x.TxCompat = new(TxCompat) - } - return protoreflect.ValueOfMessage(x.TxCompat.ProtoReflect()) - case "cosmos.accounts.v1.UserOperation.sender": - panic(fmt.Errorf("field sender of message cosmos.accounts.v1.UserOperation is not mutable")) - case "cosmos.accounts.v1.UserOperation.authentication_method": - panic(fmt.Errorf("field authentication_method of message cosmos.accounts.v1.UserOperation is not mutable")) - case "cosmos.accounts.v1.UserOperation.authentication_gas_limit": - panic(fmt.Errorf("field authentication_gas_limit of message cosmos.accounts.v1.UserOperation is not mutable")) - case "cosmos.accounts.v1.UserOperation.bundler_payment_gas_limit": - panic(fmt.Errorf("field bundler_payment_gas_limit of message cosmos.accounts.v1.UserOperation is not mutable")) - case "cosmos.accounts.v1.UserOperation.execution_gas_limit": - panic(fmt.Errorf("field execution_gas_limit of message cosmos.accounts.v1.UserOperation is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.UserOperation")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.UserOperation 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_UserOperation) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.v1.UserOperation.sender": - return protoreflect.ValueOfString("") - case "cosmos.accounts.v1.UserOperation.authentication_method": - return protoreflect.ValueOfString("") - case "cosmos.accounts.v1.UserOperation.authentication_data": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.accounts.v1.UserOperation.authentication_gas_limit": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.accounts.v1.UserOperation.bundler_payment_messages": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_UserOperation_5_list{list: &list}) - case "cosmos.accounts.v1.UserOperation.bundler_payment_gas_limit": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.accounts.v1.UserOperation.execution_messages": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_UserOperation_7_list{list: &list}) - case "cosmos.accounts.v1.UserOperation.execution_gas_limit": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.accounts.v1.UserOperation.tx_compat": - m := new(TxCompat) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.UserOperation")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.UserOperation 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_UserOperation) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.v1.UserOperation", 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_UserOperation) 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_UserOperation) 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_UserOperation) 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_UserOperation) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*UserOperation) - 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.Sender) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.AuthenticationMethod) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.AuthenticationData != nil { - l = options.Size(x.AuthenticationData) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.AuthenticationGasLimit != 0 { - n += 1 + runtime.Sov(uint64(x.AuthenticationGasLimit)) - } - if len(x.BundlerPaymentMessages) > 0 { - for _, e := range x.BundlerPaymentMessages { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.BundlerPaymentGasLimit != 0 { - n += 1 + runtime.Sov(uint64(x.BundlerPaymentGasLimit)) - } - if len(x.ExecutionMessages) > 0 { - for _, e := range x.ExecutionMessages { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.ExecutionGasLimit != 0 { - n += 1 + runtime.Sov(uint64(x.ExecutionGasLimit)) - } - if x.TxCompat != nil { - l = options.Size(x.TxCompat) - 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().(*UserOperation) - 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.TxCompat != nil { - encoded, err := options.Marshal(x.TxCompat) - 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] = 0x4a - } - if x.ExecutionGasLimit != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ExecutionGasLimit)) - i-- - dAtA[i] = 0x40 - } - if len(x.ExecutionMessages) > 0 { - for iNdEx := len(x.ExecutionMessages) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.ExecutionMessages[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] = 0x3a - } - } - if x.BundlerPaymentGasLimit != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.BundlerPaymentGasLimit)) - i-- - dAtA[i] = 0x30 - } - if len(x.BundlerPaymentMessages) > 0 { - for iNdEx := len(x.BundlerPaymentMessages) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.BundlerPaymentMessages[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] = 0x2a - } - } - if x.AuthenticationGasLimit != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.AuthenticationGasLimit)) - i-- - dAtA[i] = 0x20 - } - if x.AuthenticationData != nil { - encoded, err := options.Marshal(x.AuthenticationData) - 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] = 0x1a - } - if len(x.AuthenticationMethod) > 0 { - i -= len(x.AuthenticationMethod) - copy(dAtA[i:], x.AuthenticationMethod) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AuthenticationMethod))) - i-- - dAtA[i] = 0x12 - } - if len(x.Sender) > 0 { - i -= len(x.Sender) - copy(dAtA[i:], x.Sender) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) - 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().(*UserOperation) - 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: UserOperation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UserOperation: 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 Sender", 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.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AuthenticationMethod", 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.AuthenticationMethod = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AuthenticationData", 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.AuthenticationData == nil { - x.AuthenticationData = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AuthenticationData); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AuthenticationGasLimit", wireType) - } - x.AuthenticationGasLimit = 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.AuthenticationGasLimit |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BundlerPaymentMessages", 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.BundlerPaymentMessages = append(x.BundlerPaymentMessages, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BundlerPaymentMessages[len(x.BundlerPaymentMessages)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BundlerPaymentGasLimit", wireType) - } - x.BundlerPaymentGasLimit = 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.BundlerPaymentGasLimit |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExecutionMessages", 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.ExecutionMessages = append(x.ExecutionMessages, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ExecutionMessages[len(x.ExecutionMessages)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExecutionGasLimit", wireType) - } - x.ExecutionGasLimit = 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.ExecutionGasLimit |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TxCompat", 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.TxCompat == nil { - x.TxCompat = &TxCompat{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TxCompat); 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_TxCompat protoreflect.MessageDescriptor - fd_TxCompat_auth_info_bytes protoreflect.FieldDescriptor - fd_TxCompat_body_bytes protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_accounts_v1_account_abstraction_proto_init() - md_TxCompat = File_cosmos_accounts_v1_account_abstraction_proto.Messages().ByName("TxCompat") - fd_TxCompat_auth_info_bytes = md_TxCompat.Fields().ByName("auth_info_bytes") - fd_TxCompat_body_bytes = md_TxCompat.Fields().ByName("body_bytes") -} - -var _ protoreflect.Message = (*fastReflection_TxCompat)(nil) - -type fastReflection_TxCompat TxCompat - -func (x *TxCompat) ProtoReflect() protoreflect.Message { - return (*fastReflection_TxCompat)(x) -} - -func (x *TxCompat) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_accounts_v1_account_abstraction_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_TxCompat_messageType fastReflection_TxCompat_messageType -var _ protoreflect.MessageType = fastReflection_TxCompat_messageType{} - -type fastReflection_TxCompat_messageType struct{} - -func (x fastReflection_TxCompat_messageType) Zero() protoreflect.Message { - return (*fastReflection_TxCompat)(nil) -} -func (x fastReflection_TxCompat_messageType) New() protoreflect.Message { - return new(fastReflection_TxCompat) -} -func (x fastReflection_TxCompat_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TxCompat -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TxCompat) Descriptor() protoreflect.MessageDescriptor { - return md_TxCompat -} - -// 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_TxCompat) Type() protoreflect.MessageType { - return _fastReflection_TxCompat_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TxCompat) New() protoreflect.Message { - return new(fastReflection_TxCompat) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TxCompat) Interface() protoreflect.ProtoMessage { - return (*TxCompat)(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_TxCompat) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.AuthInfoBytes) != 0 { - value := protoreflect.ValueOfBytes(x.AuthInfoBytes) - if !f(fd_TxCompat_auth_info_bytes, value) { - return - } - } - if len(x.BodyBytes) != 0 { - value := protoreflect.ValueOfBytes(x.BodyBytes) - if !f(fd_TxCompat_body_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_TxCompat) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.accounts.v1.TxCompat.auth_info_bytes": - return len(x.AuthInfoBytes) != 0 - case "cosmos.accounts.v1.TxCompat.body_bytes": - return len(x.BodyBytes) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.TxCompat")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.TxCompat 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_TxCompat) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.accounts.v1.TxCompat.auth_info_bytes": - x.AuthInfoBytes = nil - case "cosmos.accounts.v1.TxCompat.body_bytes": - x.BodyBytes = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.TxCompat")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.TxCompat 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_TxCompat) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.accounts.v1.TxCompat.auth_info_bytes": - value := x.AuthInfoBytes - return protoreflect.ValueOfBytes(value) - case "cosmos.accounts.v1.TxCompat.body_bytes": - value := x.BodyBytes - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.TxCompat")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.TxCompat 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_TxCompat) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.accounts.v1.TxCompat.auth_info_bytes": - x.AuthInfoBytes = value.Bytes() - case "cosmos.accounts.v1.TxCompat.body_bytes": - x.BodyBytes = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.TxCompat")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.TxCompat 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_TxCompat) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.v1.TxCompat.auth_info_bytes": - panic(fmt.Errorf("field auth_info_bytes of message cosmos.accounts.v1.TxCompat is not mutable")) - case "cosmos.accounts.v1.TxCompat.body_bytes": - panic(fmt.Errorf("field body_bytes of message cosmos.accounts.v1.TxCompat is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.TxCompat")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.TxCompat 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_TxCompat) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.v1.TxCompat.auth_info_bytes": - return protoreflect.ValueOfBytes(nil) - case "cosmos.accounts.v1.TxCompat.body_bytes": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.TxCompat")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.TxCompat 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_TxCompat) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.v1.TxCompat", 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_TxCompat) 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_TxCompat) 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_TxCompat) 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_TxCompat) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TxCompat) - 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.AuthInfoBytes) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.BodyBytes) - 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().(*TxCompat) - 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.BodyBytes) > 0 { - i -= len(x.BodyBytes) - copy(dAtA[i:], x.BodyBytes) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BodyBytes))) - i-- - dAtA[i] = 0x12 - } - if len(x.AuthInfoBytes) > 0 { - i -= len(x.AuthInfoBytes) - copy(dAtA[i:], x.AuthInfoBytes) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AuthInfoBytes))) - 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().(*TxCompat) - 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: TxCompat: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TxCompat: 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 AuthInfoBytes", 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.AuthInfoBytes = append(x.AuthInfoBytes[:0], dAtA[iNdEx:postIndex]...) - if x.AuthInfoBytes == nil { - x.AuthInfoBytes = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BodyBytes", 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.BodyBytes = append(x.BodyBytes[:0], dAtA[iNdEx:postIndex]...) - if x.BodyBytes == nil { - x.BodyBytes = []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 _ protoreflect.List = (*_UserOperationResponse_3_list)(nil) - -type _UserOperationResponse_3_list struct { - list *[]*anypb.Any -} - -func (x *_UserOperationResponse_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_UserOperationResponse_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_UserOperationResponse_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_UserOperationResponse_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_UserOperationResponse_3_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_UserOperationResponse_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_UserOperationResponse_3_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_UserOperationResponse_3_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_UserOperationResponse_5_list)(nil) - -type _UserOperationResponse_5_list struct { - list *[]*anypb.Any -} - -func (x *_UserOperationResponse_5_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_UserOperationResponse_5_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_UserOperationResponse_5_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_UserOperationResponse_5_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_UserOperationResponse_5_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_UserOperationResponse_5_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_UserOperationResponse_5_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_UserOperationResponse_5_list) IsValid() bool { - return x.list != nil -} - -var ( - md_UserOperationResponse protoreflect.MessageDescriptor - fd_UserOperationResponse_authentication_gas_used protoreflect.FieldDescriptor - fd_UserOperationResponse_bundler_payment_gas_used protoreflect.FieldDescriptor - fd_UserOperationResponse_bundler_payment_responses protoreflect.FieldDescriptor - fd_UserOperationResponse_execution_gas_used protoreflect.FieldDescriptor - fd_UserOperationResponse_execution_responses protoreflect.FieldDescriptor - fd_UserOperationResponse_error protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_accounts_v1_account_abstraction_proto_init() - md_UserOperationResponse = File_cosmos_accounts_v1_account_abstraction_proto.Messages().ByName("UserOperationResponse") - fd_UserOperationResponse_authentication_gas_used = md_UserOperationResponse.Fields().ByName("authentication_gas_used") - fd_UserOperationResponse_bundler_payment_gas_used = md_UserOperationResponse.Fields().ByName("bundler_payment_gas_used") - fd_UserOperationResponse_bundler_payment_responses = md_UserOperationResponse.Fields().ByName("bundler_payment_responses") - fd_UserOperationResponse_execution_gas_used = md_UserOperationResponse.Fields().ByName("execution_gas_used") - fd_UserOperationResponse_execution_responses = md_UserOperationResponse.Fields().ByName("execution_responses") - fd_UserOperationResponse_error = md_UserOperationResponse.Fields().ByName("error") -} - -var _ protoreflect.Message = (*fastReflection_UserOperationResponse)(nil) - -type fastReflection_UserOperationResponse UserOperationResponse - -func (x *UserOperationResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_UserOperationResponse)(x) -} - -func (x *UserOperationResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_accounts_v1_account_abstraction_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_UserOperationResponse_messageType fastReflection_UserOperationResponse_messageType -var _ protoreflect.MessageType = fastReflection_UserOperationResponse_messageType{} - -type fastReflection_UserOperationResponse_messageType struct{} - -func (x fastReflection_UserOperationResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_UserOperationResponse)(nil) -} -func (x fastReflection_UserOperationResponse_messageType) New() protoreflect.Message { - return new(fastReflection_UserOperationResponse) -} -func (x fastReflection_UserOperationResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_UserOperationResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_UserOperationResponse) Descriptor() protoreflect.MessageDescriptor { - return md_UserOperationResponse -} - -// 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_UserOperationResponse) Type() protoreflect.MessageType { - return _fastReflection_UserOperationResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_UserOperationResponse) New() protoreflect.Message { - return new(fastReflection_UserOperationResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_UserOperationResponse) Interface() protoreflect.ProtoMessage { - return (*UserOperationResponse)(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_UserOperationResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.AuthenticationGasUsed != uint64(0) { - value := protoreflect.ValueOfUint64(x.AuthenticationGasUsed) - if !f(fd_UserOperationResponse_authentication_gas_used, value) { - return - } - } - if x.BundlerPaymentGasUsed != uint64(0) { - value := protoreflect.ValueOfUint64(x.BundlerPaymentGasUsed) - if !f(fd_UserOperationResponse_bundler_payment_gas_used, value) { - return - } - } - if len(x.BundlerPaymentResponses) != 0 { - value := protoreflect.ValueOfList(&_UserOperationResponse_3_list{list: &x.BundlerPaymentResponses}) - if !f(fd_UserOperationResponse_bundler_payment_responses, value) { - return - } - } - if x.ExecutionGasUsed != uint64(0) { - value := protoreflect.ValueOfUint64(x.ExecutionGasUsed) - if !f(fd_UserOperationResponse_execution_gas_used, value) { - return - } - } - if len(x.ExecutionResponses) != 0 { - value := protoreflect.ValueOfList(&_UserOperationResponse_5_list{list: &x.ExecutionResponses}) - if !f(fd_UserOperationResponse_execution_responses, value) { - return - } - } - if x.Error != "" { - value := protoreflect.ValueOfString(x.Error) - if !f(fd_UserOperationResponse_error, 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_UserOperationResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.accounts.v1.UserOperationResponse.authentication_gas_used": - return x.AuthenticationGasUsed != uint64(0) - case "cosmos.accounts.v1.UserOperationResponse.bundler_payment_gas_used": - return x.BundlerPaymentGasUsed != uint64(0) - case "cosmos.accounts.v1.UserOperationResponse.bundler_payment_responses": - return len(x.BundlerPaymentResponses) != 0 - case "cosmos.accounts.v1.UserOperationResponse.execution_gas_used": - return x.ExecutionGasUsed != uint64(0) - case "cosmos.accounts.v1.UserOperationResponse.execution_responses": - return len(x.ExecutionResponses) != 0 - case "cosmos.accounts.v1.UserOperationResponse.error": - return x.Error != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.UserOperationResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.UserOperationResponse 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_UserOperationResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.accounts.v1.UserOperationResponse.authentication_gas_used": - x.AuthenticationGasUsed = uint64(0) - case "cosmos.accounts.v1.UserOperationResponse.bundler_payment_gas_used": - x.BundlerPaymentGasUsed = uint64(0) - case "cosmos.accounts.v1.UserOperationResponse.bundler_payment_responses": - x.BundlerPaymentResponses = nil - case "cosmos.accounts.v1.UserOperationResponse.execution_gas_used": - x.ExecutionGasUsed = uint64(0) - case "cosmos.accounts.v1.UserOperationResponse.execution_responses": - x.ExecutionResponses = nil - case "cosmos.accounts.v1.UserOperationResponse.error": - x.Error = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.UserOperationResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.UserOperationResponse 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_UserOperationResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.accounts.v1.UserOperationResponse.authentication_gas_used": - value := x.AuthenticationGasUsed - return protoreflect.ValueOfUint64(value) - case "cosmos.accounts.v1.UserOperationResponse.bundler_payment_gas_used": - value := x.BundlerPaymentGasUsed - return protoreflect.ValueOfUint64(value) - case "cosmos.accounts.v1.UserOperationResponse.bundler_payment_responses": - if len(x.BundlerPaymentResponses) == 0 { - return protoreflect.ValueOfList(&_UserOperationResponse_3_list{}) - } - listValue := &_UserOperationResponse_3_list{list: &x.BundlerPaymentResponses} - return protoreflect.ValueOfList(listValue) - case "cosmos.accounts.v1.UserOperationResponse.execution_gas_used": - value := x.ExecutionGasUsed - return protoreflect.ValueOfUint64(value) - case "cosmos.accounts.v1.UserOperationResponse.execution_responses": - if len(x.ExecutionResponses) == 0 { - return protoreflect.ValueOfList(&_UserOperationResponse_5_list{}) - } - listValue := &_UserOperationResponse_5_list{list: &x.ExecutionResponses} - return protoreflect.ValueOfList(listValue) - case "cosmos.accounts.v1.UserOperationResponse.error": - value := x.Error - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.UserOperationResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.UserOperationResponse 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_UserOperationResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.accounts.v1.UserOperationResponse.authentication_gas_used": - x.AuthenticationGasUsed = value.Uint() - case "cosmos.accounts.v1.UserOperationResponse.bundler_payment_gas_used": - x.BundlerPaymentGasUsed = value.Uint() - case "cosmos.accounts.v1.UserOperationResponse.bundler_payment_responses": - lv := value.List() - clv := lv.(*_UserOperationResponse_3_list) - x.BundlerPaymentResponses = *clv.list - case "cosmos.accounts.v1.UserOperationResponse.execution_gas_used": - x.ExecutionGasUsed = value.Uint() - case "cosmos.accounts.v1.UserOperationResponse.execution_responses": - lv := value.List() - clv := lv.(*_UserOperationResponse_5_list) - x.ExecutionResponses = *clv.list - case "cosmos.accounts.v1.UserOperationResponse.error": - x.Error = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.UserOperationResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.UserOperationResponse 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_UserOperationResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.v1.UserOperationResponse.bundler_payment_responses": - if x.BundlerPaymentResponses == nil { - x.BundlerPaymentResponses = []*anypb.Any{} - } - value := &_UserOperationResponse_3_list{list: &x.BundlerPaymentResponses} - return protoreflect.ValueOfList(value) - case "cosmos.accounts.v1.UserOperationResponse.execution_responses": - if x.ExecutionResponses == nil { - x.ExecutionResponses = []*anypb.Any{} - } - value := &_UserOperationResponse_5_list{list: &x.ExecutionResponses} - return protoreflect.ValueOfList(value) - case "cosmos.accounts.v1.UserOperationResponse.authentication_gas_used": - panic(fmt.Errorf("field authentication_gas_used of message cosmos.accounts.v1.UserOperationResponse is not mutable")) - case "cosmos.accounts.v1.UserOperationResponse.bundler_payment_gas_used": - panic(fmt.Errorf("field bundler_payment_gas_used of message cosmos.accounts.v1.UserOperationResponse is not mutable")) - case "cosmos.accounts.v1.UserOperationResponse.execution_gas_used": - panic(fmt.Errorf("field execution_gas_used of message cosmos.accounts.v1.UserOperationResponse is not mutable")) - case "cosmos.accounts.v1.UserOperationResponse.error": - panic(fmt.Errorf("field error of message cosmos.accounts.v1.UserOperationResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.UserOperationResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.UserOperationResponse 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_UserOperationResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.v1.UserOperationResponse.authentication_gas_used": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.accounts.v1.UserOperationResponse.bundler_payment_gas_used": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.accounts.v1.UserOperationResponse.bundler_payment_responses": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_UserOperationResponse_3_list{list: &list}) - case "cosmos.accounts.v1.UserOperationResponse.execution_gas_used": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.accounts.v1.UserOperationResponse.execution_responses": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_UserOperationResponse_5_list{list: &list}) - case "cosmos.accounts.v1.UserOperationResponse.error": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.UserOperationResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.UserOperationResponse 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_UserOperationResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.v1.UserOperationResponse", 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_UserOperationResponse) 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_UserOperationResponse) 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_UserOperationResponse) 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_UserOperationResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*UserOperationResponse) - 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.AuthenticationGasUsed != 0 { - n += 1 + runtime.Sov(uint64(x.AuthenticationGasUsed)) - } - if x.BundlerPaymentGasUsed != 0 { - n += 1 + runtime.Sov(uint64(x.BundlerPaymentGasUsed)) - } - if len(x.BundlerPaymentResponses) > 0 { - for _, e := range x.BundlerPaymentResponses { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.ExecutionGasUsed != 0 { - n += 1 + runtime.Sov(uint64(x.ExecutionGasUsed)) - } - if len(x.ExecutionResponses) > 0 { - for _, e := range x.ExecutionResponses { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.Error) - 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().(*UserOperationResponse) - 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.Error) > 0 { - i -= len(x.Error) - copy(dAtA[i:], x.Error) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Error))) - i-- - dAtA[i] = 0x32 - } - if len(x.ExecutionResponses) > 0 { - for iNdEx := len(x.ExecutionResponses) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.ExecutionResponses[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] = 0x2a - } - } - if x.ExecutionGasUsed != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ExecutionGasUsed)) - i-- - dAtA[i] = 0x20 - } - if len(x.BundlerPaymentResponses) > 0 { - for iNdEx := len(x.BundlerPaymentResponses) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.BundlerPaymentResponses[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] = 0x1a - } - } - if x.BundlerPaymentGasUsed != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.BundlerPaymentGasUsed)) - i-- - dAtA[i] = 0x10 - } - if x.AuthenticationGasUsed != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.AuthenticationGasUsed)) - 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().(*UserOperationResponse) - 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: UserOperationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UserOperationResponse: 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 AuthenticationGasUsed", wireType) - } - x.AuthenticationGasUsed = 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.AuthenticationGasUsed |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BundlerPaymentGasUsed", wireType) - } - x.BundlerPaymentGasUsed = 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.BundlerPaymentGasUsed |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BundlerPaymentResponses", 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.BundlerPaymentResponses = append(x.BundlerPaymentResponses, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BundlerPaymentResponses[len(x.BundlerPaymentResponses)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExecutionGasUsed", wireType) - } - x.ExecutionGasUsed = 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.ExecutionGasUsed |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExecutionResponses", 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.ExecutionResponses = append(x.ExecutionResponses, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ExecutionResponses[len(x.ExecutionResponses)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Error", 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.Error = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/accounts/v1/account_abstraction.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) -) - -// UserOperation defines the type used to define a state transition that -// an account wants to make. -type UserOperation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // sender defines the account that is sending the UserOperation. - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - // authentication_method defines the authentication strategy the account wants to use. - // since accounts can have multiple authentication methods, this field is used to - // instruct the account on what auth method to use. - AuthenticationMethod string `protobuf:"bytes,2,opt,name=authentication_method,json=authenticationMethod,proto3" json:"authentication_method,omitempty"` - // authentication_data defines the authentication data associated with the authentication method. - // It is the account implementer duty to assess that the UserOperation is properly signed. - AuthenticationData *anypb.Any `protobuf:"bytes,3,opt,name=authentication_data,json=authenticationData,proto3" json:"authentication_data,omitempty"` - // authentication_gas_limit expresses the gas limit to be used for the authentication part of the - // UserOperation. - AuthenticationGasLimit uint64 `protobuf:"varint,4,opt,name=authentication_gas_limit,json=authenticationGasLimit,proto3" json:"authentication_gas_limit,omitempty"` - // bundler_payment_messages expresses a list of messages that the account - // executes to pay the bundler for submitting the UserOperation. - // It can be empty if the bundler does not need any form of payment, - // the handshake for submitting the UserOperation might have happened off-chain. - // Bundlers and accounts are free to use any form of payment, in fact the payment can - // either be empty or be expressed as: - // - NFT payment - // - IBC Token payment. - // - Payment through delegations. - BundlerPaymentMessages []*anypb.Any `protobuf:"bytes,5,rep,name=bundler_payment_messages,json=bundlerPaymentMessages,proto3" json:"bundler_payment_messages,omitempty"` - // bundler_payment_gas_limit defines the gas limit to be used for the bundler payment. - // This ensures that, since the bundler executes a list of UserOperations and there needs to - // be minimal trust between bundler and UserOperation sender, the sender cannot consume - // the whole bundle gas. - BundlerPaymentGasLimit uint64 `protobuf:"varint,6,opt,name=bundler_payment_gas_limit,json=bundlerPaymentGasLimit,proto3" json:"bundler_payment_gas_limit,omitempty"` - // execution_messages expresses a list of messages that the account wants to execute. - // This concretely is the intent of the transaction expressed as a UserOperation. - ExecutionMessages []*anypb.Any `protobuf:"bytes,7,rep,name=execution_messages,json=executionMessages,proto3" json:"execution_messages,omitempty"` - // execution_gas_limit defines the gas limit to be used for the execution of the UserOperation's - // execution messages. - ExecutionGasLimit uint64 `protobuf:"varint,8,opt,name=execution_gas_limit,json=executionGasLimit,proto3" json:"execution_gas_limit,omitempty"` - // tx_compat is populated only when the operation is composed from a raw tx. - // In fact if a TX comes and the sender of the TX is an abstracted account, - // we convert the TX into a user operation, and try to authenticate using the - // x/accounts authenticate method. If a bundler tries to send a UserOperation - // with a populated tx_compat, the operation will immediately yield a failure. - TxCompat *TxCompat `protobuf:"bytes,9,opt,name=tx_compat,json=txCompat,proto3" json:"tx_compat,omitempty"` -} - -func (x *UserOperation) Reset() { - *x = UserOperation{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_v1_account_abstraction_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UserOperation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserOperation) ProtoMessage() {} - -// Deprecated: Use UserOperation.ProtoReflect.Descriptor instead. -func (*UserOperation) Descriptor() ([]byte, []int) { - return file_cosmos_accounts_v1_account_abstraction_proto_rawDescGZIP(), []int{0} -} - -func (x *UserOperation) GetSender() string { - if x != nil { - return x.Sender - } - return "" -} - -func (x *UserOperation) GetAuthenticationMethod() string { - if x != nil { - return x.AuthenticationMethod - } - return "" -} - -func (x *UserOperation) GetAuthenticationData() *anypb.Any { - if x != nil { - return x.AuthenticationData - } - return nil -} - -func (x *UserOperation) GetAuthenticationGasLimit() uint64 { - if x != nil { - return x.AuthenticationGasLimit - } - return 0 -} - -func (x *UserOperation) GetBundlerPaymentMessages() []*anypb.Any { - if x != nil { - return x.BundlerPaymentMessages - } - return nil -} - -func (x *UserOperation) GetBundlerPaymentGasLimit() uint64 { - if x != nil { - return x.BundlerPaymentGasLimit - } - return 0 -} - -func (x *UserOperation) GetExecutionMessages() []*anypb.Any { - if x != nil { - return x.ExecutionMessages - } - return nil -} - -func (x *UserOperation) GetExecutionGasLimit() uint64 { - if x != nil { - return x.ExecutionGasLimit - } - return 0 -} - -func (x *UserOperation) GetTxCompat() *TxCompat { - if x != nil { - return x.TxCompat - } - return nil -} - -// TxCompat provides compatibility for x/accounts abstracted account with the cosmos-sdk's Txs. -// In fact TxCompat contains fields coming from the Tx in raw and decoded format. The Raw format -// is mainly needed for proper sig verification. -type TxCompat struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // auth_info_bytes contains the auth info bytes of the tx. - // Must not be modified. - AuthInfoBytes []byte `protobuf:"bytes,1,opt,name=auth_info_bytes,json=authInfoBytes,proto3" json:"auth_info_bytes,omitempty"` - // body_bytes contains the body bytes of the tx. - // must not be modified. - BodyBytes []byte `protobuf:"bytes,2,opt,name=body_bytes,json=bodyBytes,proto3" json:"body_bytes,omitempty"` -} - -func (x *TxCompat) Reset() { - *x = TxCompat{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_v1_account_abstraction_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TxCompat) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TxCompat) ProtoMessage() {} - -// Deprecated: Use TxCompat.ProtoReflect.Descriptor instead. -func (*TxCompat) Descriptor() ([]byte, []int) { - return file_cosmos_accounts_v1_account_abstraction_proto_rawDescGZIP(), []int{1} -} - -func (x *TxCompat) GetAuthInfoBytes() []byte { - if x != nil { - return x.AuthInfoBytes - } - return nil -} - -func (x *TxCompat) GetBodyBytes() []byte { - if x != nil { - return x.BodyBytes - } - return nil -} - -// UserOperationResponse defines the response of a UserOperation. -// If the operation fails the error field will be populated. -type UserOperationResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // authentication_gas_used defines the gas used for the authentication part of the UserOperation. - AuthenticationGasUsed uint64 `protobuf:"varint,1,opt,name=authentication_gas_used,json=authenticationGasUsed,proto3" json:"authentication_gas_used,omitempty"` - // bundler_payment_gas_used defines the gas used for the bundler payment part of the UserOperation. - BundlerPaymentGasUsed uint64 `protobuf:"varint,2,opt,name=bundler_payment_gas_used,json=bundlerPaymentGasUsed,proto3" json:"bundler_payment_gas_used,omitempty"` - // bundler_payment_responses defines the responses of the bundler payment messages. - // It can be empty if the bundler does not need any form of payment. - BundlerPaymentResponses []*anypb.Any `protobuf:"bytes,3,rep,name=bundler_payment_responses,json=bundlerPaymentResponses,proto3" json:"bundler_payment_responses,omitempty"` - // execution_gas_used defines the gas used for the execution part of the UserOperation. - ExecutionGasUsed uint64 `protobuf:"varint,4,opt,name=execution_gas_used,json=executionGasUsed,proto3" json:"execution_gas_used,omitempty"` - // execution_responses defines the responses of the execution messages. - ExecutionResponses []*anypb.Any `protobuf:"bytes,5,rep,name=execution_responses,json=executionResponses,proto3" json:"execution_responses,omitempty"` - // error defines the error that occurred during the execution of the UserOperation. - // If the error is not empty, the UserOperation failed. - // Other fields might be populated even if the error is not empty, for example - // if the operation fails after the authentication step, the authentication_gas_used - // field will be populated. - Error string `protobuf:"bytes,6,opt,name=error,proto3" json:"error,omitempty"` -} - -func (x *UserOperationResponse) Reset() { - *x = UserOperationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_v1_account_abstraction_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UserOperationResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserOperationResponse) ProtoMessage() {} - -// Deprecated: Use UserOperationResponse.ProtoReflect.Descriptor instead. -func (*UserOperationResponse) Descriptor() ([]byte, []int) { - return file_cosmos_accounts_v1_account_abstraction_proto_rawDescGZIP(), []int{2} -} - -func (x *UserOperationResponse) GetAuthenticationGasUsed() uint64 { - if x != nil { - return x.AuthenticationGasUsed - } - return 0 -} - -func (x *UserOperationResponse) GetBundlerPaymentGasUsed() uint64 { - if x != nil { - return x.BundlerPaymentGasUsed - } - return 0 -} - -func (x *UserOperationResponse) GetBundlerPaymentResponses() []*anypb.Any { - if x != nil { - return x.BundlerPaymentResponses - } - return nil -} - -func (x *UserOperationResponse) GetExecutionGasUsed() uint64 { - if x != nil { - return x.ExecutionGasUsed - } - return 0 -} - -func (x *UserOperationResponse) GetExecutionResponses() []*anypb.Any { - if x != nil { - return x.ExecutionResponses - } - return nil -} - -func (x *UserOperationResponse) GetError() string { - if x != nil { - return x.Error - } - return "" -} - -var File_cosmos_accounts_v1_account_abstraction_proto protoreflect.FileDescriptor - -var file_cosmos_accounts_v1_account_abstraction_proto_rawDesc = []byte{ - 0x0a, 0x2c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x62, 0x73, - 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, - 0x76, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x98, 0x04, - 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x15, 0x61, 0x75, 0x74, 0x68, 0x65, - 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x45, 0x0a, 0x13, - 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, - 0x12, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, - 0x61, 0x74, 0x61, 0x12, 0x38, 0x0a, 0x18, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x16, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x4e, 0x0a, - 0x18, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x05, 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, 0x52, 0x16, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x50, 0x61, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x39, 0x0a, - 0x19, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x16, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x43, 0x0a, 0x12, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x07, - 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, 0x52, 0x11, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x2e, 0x0a, - 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x39, 0x0a, - 0x09, 0x74, 0x78, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x52, 0x08, - 0x74, 0x78, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x22, 0x51, 0x0a, 0x08, 0x54, 0x78, 0x43, 0x6f, - 0x6d, 0x70, 0x61, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x69, 0x6e, 0x66, - 0x6f, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x61, - 0x75, 0x74, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, - 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x09, 0x62, 0x6f, 0x64, 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0xe5, 0x02, 0x0a, 0x15, - 0x55, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x37, 0x0a, - 0x18, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x15, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x47, - 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x50, 0x0a, 0x19, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, - 0x72, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x73, 0x18, 0x03, 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, 0x52, - 0x17, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x47, - 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x05, 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, 0x52, 0x12, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x14, 0x0a, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x42, 0xcb, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x17, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2e, 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, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, - 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_accounts_v1_account_abstraction_proto_rawDescOnce sync.Once - file_cosmos_accounts_v1_account_abstraction_proto_rawDescData = file_cosmos_accounts_v1_account_abstraction_proto_rawDesc -) - -func file_cosmos_accounts_v1_account_abstraction_proto_rawDescGZIP() []byte { - file_cosmos_accounts_v1_account_abstraction_proto_rawDescOnce.Do(func() { - file_cosmos_accounts_v1_account_abstraction_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_accounts_v1_account_abstraction_proto_rawDescData) - }) - return file_cosmos_accounts_v1_account_abstraction_proto_rawDescData -} - -var file_cosmos_accounts_v1_account_abstraction_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_cosmos_accounts_v1_account_abstraction_proto_goTypes = []interface{}{ - (*UserOperation)(nil), // 0: cosmos.accounts.v1.UserOperation - (*TxCompat)(nil), // 1: cosmos.accounts.v1.TxCompat - (*UserOperationResponse)(nil), // 2: cosmos.accounts.v1.UserOperationResponse - (*anypb.Any)(nil), // 3: google.protobuf.Any -} -var file_cosmos_accounts_v1_account_abstraction_proto_depIdxs = []int32{ - 3, // 0: cosmos.accounts.v1.UserOperation.authentication_data:type_name -> google.protobuf.Any - 3, // 1: cosmos.accounts.v1.UserOperation.bundler_payment_messages:type_name -> google.protobuf.Any - 3, // 2: cosmos.accounts.v1.UserOperation.execution_messages:type_name -> google.protobuf.Any - 1, // 3: cosmos.accounts.v1.UserOperation.tx_compat:type_name -> cosmos.accounts.v1.TxCompat - 3, // 4: cosmos.accounts.v1.UserOperationResponse.bundler_payment_responses:type_name -> google.protobuf.Any - 3, // 5: cosmos.accounts.v1.UserOperationResponse.execution_responses:type_name -> google.protobuf.Any - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_cosmos_accounts_v1_account_abstraction_proto_init() } -func file_cosmos_accounts_v1_account_abstraction_proto_init() { - if File_cosmos_accounts_v1_account_abstraction_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_accounts_v1_account_abstraction_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserOperation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_accounts_v1_account_abstraction_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TxCompat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_accounts_v1_account_abstraction_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserOperationResponse); 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_accounts_v1_account_abstraction_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_accounts_v1_account_abstraction_proto_goTypes, - DependencyIndexes: file_cosmos_accounts_v1_account_abstraction_proto_depIdxs, - MessageInfos: file_cosmos_accounts_v1_account_abstraction_proto_msgTypes, - }.Build() - File_cosmos_accounts_v1_account_abstraction_proto = out.File - file_cosmos_accounts_v1_account_abstraction_proto_rawDesc = nil - file_cosmos_accounts_v1_account_abstraction_proto_goTypes = nil - file_cosmos_accounts_v1_account_abstraction_proto_depIdxs = nil -} diff --git a/api/cosmos/accounts/v1/query.pulsar.go b/api/cosmos/accounts/v1/query.pulsar.go index 8bcaa173d3..e9288feea5 100644 --- a/api/cosmos/accounts/v1/query.pulsar.go +++ b/api/cosmos/accounts/v1/query.pulsar.go @@ -2100,7 +2100,7 @@ func (x *SchemaResponse_Handler) ProtoReflect() protoreflect.Message { } func (x *SchemaResponse_Handler) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_accounts_v1_query_proto_msgTypes[10] + mi := &file_cosmos_accounts_v1_query_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4226,940 +4226,6 @@ func (x *fastReflection_AccountNumberResponse) ProtoMethods() *protoiface.Method } } -var ( - md_SimulateUserOperationRequest protoreflect.MessageDescriptor - fd_SimulateUserOperationRequest_bundler protoreflect.FieldDescriptor - fd_SimulateUserOperationRequest_user_operation protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_accounts_v1_query_proto_init() - md_SimulateUserOperationRequest = File_cosmos_accounts_v1_query_proto.Messages().ByName("SimulateUserOperationRequest") - fd_SimulateUserOperationRequest_bundler = md_SimulateUserOperationRequest.Fields().ByName("bundler") - fd_SimulateUserOperationRequest_user_operation = md_SimulateUserOperationRequest.Fields().ByName("user_operation") -} - -var _ protoreflect.Message = (*fastReflection_SimulateUserOperationRequest)(nil) - -type fastReflection_SimulateUserOperationRequest SimulateUserOperationRequest - -func (x *SimulateUserOperationRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_SimulateUserOperationRequest)(x) -} - -func (x *SimulateUserOperationRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_accounts_v1_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_SimulateUserOperationRequest_messageType fastReflection_SimulateUserOperationRequest_messageType -var _ protoreflect.MessageType = fastReflection_SimulateUserOperationRequest_messageType{} - -type fastReflection_SimulateUserOperationRequest_messageType struct{} - -func (x fastReflection_SimulateUserOperationRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_SimulateUserOperationRequest)(nil) -} -func (x fastReflection_SimulateUserOperationRequest_messageType) New() protoreflect.Message { - return new(fastReflection_SimulateUserOperationRequest) -} -func (x fastReflection_SimulateUserOperationRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SimulateUserOperationRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SimulateUserOperationRequest) Descriptor() protoreflect.MessageDescriptor { - return md_SimulateUserOperationRequest -} - -// 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_SimulateUserOperationRequest) Type() protoreflect.MessageType { - return _fastReflection_SimulateUserOperationRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SimulateUserOperationRequest) New() protoreflect.Message { - return new(fastReflection_SimulateUserOperationRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SimulateUserOperationRequest) Interface() protoreflect.ProtoMessage { - return (*SimulateUserOperationRequest)(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_SimulateUserOperationRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Bundler != "" { - value := protoreflect.ValueOfString(x.Bundler) - if !f(fd_SimulateUserOperationRequest_bundler, value) { - return - } - } - if x.UserOperation != nil { - value := protoreflect.ValueOfMessage(x.UserOperation.ProtoReflect()) - if !f(fd_SimulateUserOperationRequest_user_operation, 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_SimulateUserOperationRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.accounts.v1.SimulateUserOperationRequest.bundler": - return x.Bundler != "" - case "cosmos.accounts.v1.SimulateUserOperationRequest.user_operation": - return x.UserOperation != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.SimulateUserOperationRequest")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.SimulateUserOperationRequest 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_SimulateUserOperationRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.accounts.v1.SimulateUserOperationRequest.bundler": - x.Bundler = "" - case "cosmos.accounts.v1.SimulateUserOperationRequest.user_operation": - x.UserOperation = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.SimulateUserOperationRequest")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.SimulateUserOperationRequest 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_SimulateUserOperationRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.accounts.v1.SimulateUserOperationRequest.bundler": - value := x.Bundler - return protoreflect.ValueOfString(value) - case "cosmos.accounts.v1.SimulateUserOperationRequest.user_operation": - value := x.UserOperation - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.SimulateUserOperationRequest")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.SimulateUserOperationRequest 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_SimulateUserOperationRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.accounts.v1.SimulateUserOperationRequest.bundler": - x.Bundler = value.Interface().(string) - case "cosmos.accounts.v1.SimulateUserOperationRequest.user_operation": - x.UserOperation = value.Message().Interface().(*UserOperation) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.SimulateUserOperationRequest")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.SimulateUserOperationRequest 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_SimulateUserOperationRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.v1.SimulateUserOperationRequest.user_operation": - if x.UserOperation == nil { - x.UserOperation = new(UserOperation) - } - return protoreflect.ValueOfMessage(x.UserOperation.ProtoReflect()) - case "cosmos.accounts.v1.SimulateUserOperationRequest.bundler": - panic(fmt.Errorf("field bundler of message cosmos.accounts.v1.SimulateUserOperationRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.SimulateUserOperationRequest")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.SimulateUserOperationRequest 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_SimulateUserOperationRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.v1.SimulateUserOperationRequest.bundler": - return protoreflect.ValueOfString("") - case "cosmos.accounts.v1.SimulateUserOperationRequest.user_operation": - m := new(UserOperation) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.SimulateUserOperationRequest")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.SimulateUserOperationRequest 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_SimulateUserOperationRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.v1.SimulateUserOperationRequest", 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_SimulateUserOperationRequest) 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_SimulateUserOperationRequest) 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_SimulateUserOperationRequest) 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_SimulateUserOperationRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SimulateUserOperationRequest) - 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.Bundler) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.UserOperation != nil { - l = options.Size(x.UserOperation) - 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().(*SimulateUserOperationRequest) - 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.UserOperation != nil { - encoded, err := options.Marshal(x.UserOperation) - 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.Bundler) > 0 { - i -= len(x.Bundler) - copy(dAtA[i:], x.Bundler) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bundler))) - 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().(*SimulateUserOperationRequest) - 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: SimulateUserOperationRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SimulateUserOperationRequest: 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 Bundler", 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.Bundler = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UserOperation", 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.UserOperation == nil { - x.UserOperation = &UserOperation{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UserOperation); 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_SimulateUserOperationResponse protoreflect.MessageDescriptor - fd_SimulateUserOperationResponse_user_operation_response protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_accounts_v1_query_proto_init() - md_SimulateUserOperationResponse = File_cosmos_accounts_v1_query_proto.Messages().ByName("SimulateUserOperationResponse") - fd_SimulateUserOperationResponse_user_operation_response = md_SimulateUserOperationResponse.Fields().ByName("user_operation_response") -} - -var _ protoreflect.Message = (*fastReflection_SimulateUserOperationResponse)(nil) - -type fastReflection_SimulateUserOperationResponse SimulateUserOperationResponse - -func (x *SimulateUserOperationResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_SimulateUserOperationResponse)(x) -} - -func (x *SimulateUserOperationResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_accounts_v1_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_SimulateUserOperationResponse_messageType fastReflection_SimulateUserOperationResponse_messageType -var _ protoreflect.MessageType = fastReflection_SimulateUserOperationResponse_messageType{} - -type fastReflection_SimulateUserOperationResponse_messageType struct{} - -func (x fastReflection_SimulateUserOperationResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_SimulateUserOperationResponse)(nil) -} -func (x fastReflection_SimulateUserOperationResponse_messageType) New() protoreflect.Message { - return new(fastReflection_SimulateUserOperationResponse) -} -func (x fastReflection_SimulateUserOperationResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SimulateUserOperationResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SimulateUserOperationResponse) Descriptor() protoreflect.MessageDescriptor { - return md_SimulateUserOperationResponse -} - -// 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_SimulateUserOperationResponse) Type() protoreflect.MessageType { - return _fastReflection_SimulateUserOperationResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SimulateUserOperationResponse) New() protoreflect.Message { - return new(fastReflection_SimulateUserOperationResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SimulateUserOperationResponse) Interface() protoreflect.ProtoMessage { - return (*SimulateUserOperationResponse)(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_SimulateUserOperationResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.UserOperationResponse != nil { - value := protoreflect.ValueOfMessage(x.UserOperationResponse.ProtoReflect()) - if !f(fd_SimulateUserOperationResponse_user_operation_response, 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_SimulateUserOperationResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.accounts.v1.SimulateUserOperationResponse.user_operation_response": - return x.UserOperationResponse != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.SimulateUserOperationResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.SimulateUserOperationResponse 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_SimulateUserOperationResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.accounts.v1.SimulateUserOperationResponse.user_operation_response": - x.UserOperationResponse = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.SimulateUserOperationResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.SimulateUserOperationResponse 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_SimulateUserOperationResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.accounts.v1.SimulateUserOperationResponse.user_operation_response": - value := x.UserOperationResponse - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.SimulateUserOperationResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.SimulateUserOperationResponse 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_SimulateUserOperationResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.accounts.v1.SimulateUserOperationResponse.user_operation_response": - x.UserOperationResponse = value.Message().Interface().(*UserOperationResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.SimulateUserOperationResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.SimulateUserOperationResponse 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_SimulateUserOperationResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.v1.SimulateUserOperationResponse.user_operation_response": - if x.UserOperationResponse == nil { - x.UserOperationResponse = new(UserOperationResponse) - } - return protoreflect.ValueOfMessage(x.UserOperationResponse.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.SimulateUserOperationResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.SimulateUserOperationResponse 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_SimulateUserOperationResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.v1.SimulateUserOperationResponse.user_operation_response": - m := new(UserOperationResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.SimulateUserOperationResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.SimulateUserOperationResponse 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_SimulateUserOperationResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.v1.SimulateUserOperationResponse", 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_SimulateUserOperationResponse) 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_SimulateUserOperationResponse) 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_SimulateUserOperationResponse) 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_SimulateUserOperationResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SimulateUserOperationResponse) - 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.UserOperationResponse != nil { - l = options.Size(x.UserOperationResponse) - 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().(*SimulateUserOperationResponse) - 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.UserOperationResponse != nil { - encoded, err := options.Marshal(x.UserOperationResponse) - 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().(*SimulateUserOperationResponse) - 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: SimulateUserOperationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SimulateUserOperationResponse: 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 UserOperationResponse", 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.UserOperationResponse == nil { - x.UserOperationResponse = &UserOperationResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UserOperationResponse); 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 @@ -5497,92 +4563,6 @@ func (x *AccountNumberResponse) GetNumber() uint64 { return 0 } -// SimulateUserOperationRequest is the query request used to simulate a -// UserOperation. -type SimulateUserOperationRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // bundler can be filled to simulate the address of the bundler. - Bundler string `protobuf:"bytes,1,opt,name=bundler,proto3" json:"bundler,omitempty"` - // user_operation defines the user operation that we want to simulate. - // Gas limit fields are ignored. - UserOperation *UserOperation `protobuf:"bytes,2,opt,name=user_operation,json=userOperation,proto3" json:"user_operation,omitempty"` -} - -func (x *SimulateUserOperationRequest) Reset() { - *x = SimulateUserOperationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_v1_query_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SimulateUserOperationRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SimulateUserOperationRequest) ProtoMessage() {} - -// Deprecated: Use SimulateUserOperationRequest.ProtoReflect.Descriptor instead. -func (*SimulateUserOperationRequest) Descriptor() ([]byte, []int) { - return file_cosmos_accounts_v1_query_proto_rawDescGZIP(), []int{8} -} - -func (x *SimulateUserOperationRequest) GetBundler() string { - if x != nil { - return x.Bundler - } - return "" -} - -func (x *SimulateUserOperationRequest) GetUserOperation() *UserOperation { - if x != nil { - return x.UserOperation - } - return nil -} - -// SimulateUserOperationResponse is the query response returned by the simulation. -// It will populate the gas limits fields. -type SimulateUserOperationResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // UserOperationResponse is the response of the simulation. - UserOperationResponse *UserOperationResponse `protobuf:"bytes,1,opt,name=user_operation_response,json=userOperationResponse,proto3" json:"user_operation_response,omitempty"` -} - -func (x *SimulateUserOperationResponse) Reset() { - *x = SimulateUserOperationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_v1_query_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SimulateUserOperationResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SimulateUserOperationResponse) ProtoMessage() {} - -// Deprecated: Use SimulateUserOperationResponse.ProtoReflect.Descriptor instead. -func (*SimulateUserOperationResponse) Descriptor() ([]byte, []int) { - return file_cosmos_accounts_v1_query_proto_rawDescGZIP(), []int{9} -} - -func (x *SimulateUserOperationResponse) GetUserOperationResponse() *UserOperationResponse { - if x != nil { - return x.UserOperationResponse - } - return nil -} - // Handler defines a schema descriptor for a handler. // Where request and response are names that can be used to lookup the // reflection descriptor. @@ -5600,7 +4580,7 @@ type SchemaResponse_Handler struct { func (x *SchemaResponse_Handler) Reset() { *x = SchemaResponse_Handler{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_v1_query_proto_msgTypes[10] + mi := &file_cosmos_accounts_v1_query_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5638,120 +4618,92 @@ var file_cosmos_accounts_v1_query_proto_rawDesc = []byte{ 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 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, - 0x2c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x62, 0x73, 0x74, - 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5d, 0x0a, - 0x13, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2e, 0x0a, 0x07, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x41, 0x6e, 0x79, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x48, 0x0a, 0x14, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 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, 0x52, 0x08, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x0a, 0x0d, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0xc8, 0x02, 0x0a, 0x0e, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, - 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x0a, - 0x69, 0x6e, 0x69, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x55, 0x0a, 0x10, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x65, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x5d, 0x0a, 0x13, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2e, + 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x48, + 0x0a, 0x14, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 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, 0x52, 0x08, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x0a, 0x0d, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0xc8, 0x02, 0x0a, + 0x0e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x4b, 0x0a, 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, - 0x52, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, - 0x73, 0x12, 0x51, 0x0a, 0x0e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, - 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x61, - 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x0d, 0x71, 0x75, 0x65, 0x72, 0x79, 0x48, 0x61, 0x6e, 0x64, - 0x6c, 0x65, 0x72, 0x73, 0x1a, 0x3f, 0x0a, 0x07, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, - 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x0a, 0x12, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x38, 0x0a, 0x13, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, - 0x30, 0x0a, 0x14, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x22, 0x2f, 0x0a, 0x15, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x22, 0x82, 0x01, 0x0a, 0x1c, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x55, - 0x73, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, 0x48, 0x0a, - 0x0e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x4f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x82, 0x01, 0x0a, 0x1d, 0x53, 0x69, 0x6d, 0x75, - 0x6c, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x17, 0x75, 0x73, 0x65, - 0x72, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x15, 0x75, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x89, 0x04, 0x0a, - 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x63, 0x0a, 0x0c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x06, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x60, - 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x2e, + 0x52, 0x0a, 0x69, 0x6e, 0x69, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x55, 0x0a, 0x10, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x6c, + 0x65, 0x72, 0x52, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, + 0x65, 0x72, 0x73, 0x12, 0x51, 0x0a, 0x0e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x68, 0x61, 0x6e, + 0x64, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x0d, 0x71, 0x75, 0x65, 0x72, 0x79, 0x48, 0x61, + 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x1a, 0x3f, 0x0a, 0x07, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, + 0x72, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x0a, 0x12, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x38, 0x0a, 0x13, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x22, 0x30, 0x0a, 0x14, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x22, 0x2f, 0x0a, 0x15, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x32, 0x89, 0x03, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x63, + 0x0a, 0x0c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x27, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x21, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x60, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x66, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7e, 0x0a, 0x15, 0x53, 0x69, 0x6d, 0x75, - 0x6c, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x55, - 0x73, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, - 0x65, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xbe, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x2e, 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, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x76, - 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x1e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x42, 0xbe, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2e, 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, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, + 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x43, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x43, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -5766,46 +4718,38 @@ func file_cosmos_accounts_v1_query_proto_rawDescGZIP() []byte { return file_cosmos_accounts_v1_query_proto_rawDescData } -var file_cosmos_accounts_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_cosmos_accounts_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_cosmos_accounts_v1_query_proto_goTypes = []interface{}{ - (*AccountQueryRequest)(nil), // 0: cosmos.accounts.v1.AccountQueryRequest - (*AccountQueryResponse)(nil), // 1: cosmos.accounts.v1.AccountQueryResponse - (*SchemaRequest)(nil), // 2: cosmos.accounts.v1.SchemaRequest - (*SchemaResponse)(nil), // 3: cosmos.accounts.v1.SchemaResponse - (*AccountTypeRequest)(nil), // 4: cosmos.accounts.v1.AccountTypeRequest - (*AccountTypeResponse)(nil), // 5: cosmos.accounts.v1.AccountTypeResponse - (*AccountNumberRequest)(nil), // 6: cosmos.accounts.v1.AccountNumberRequest - (*AccountNumberResponse)(nil), // 7: cosmos.accounts.v1.AccountNumberResponse - (*SimulateUserOperationRequest)(nil), // 8: cosmos.accounts.v1.SimulateUserOperationRequest - (*SimulateUserOperationResponse)(nil), // 9: cosmos.accounts.v1.SimulateUserOperationResponse - (*SchemaResponse_Handler)(nil), // 10: cosmos.accounts.v1.SchemaResponse.Handler - (*anypb.Any)(nil), // 11: google.protobuf.Any - (*UserOperation)(nil), // 12: cosmos.accounts.v1.UserOperation - (*UserOperationResponse)(nil), // 13: cosmos.accounts.v1.UserOperationResponse + (*AccountQueryRequest)(nil), // 0: cosmos.accounts.v1.AccountQueryRequest + (*AccountQueryResponse)(nil), // 1: cosmos.accounts.v1.AccountQueryResponse + (*SchemaRequest)(nil), // 2: cosmos.accounts.v1.SchemaRequest + (*SchemaResponse)(nil), // 3: cosmos.accounts.v1.SchemaResponse + (*AccountTypeRequest)(nil), // 4: cosmos.accounts.v1.AccountTypeRequest + (*AccountTypeResponse)(nil), // 5: cosmos.accounts.v1.AccountTypeResponse + (*AccountNumberRequest)(nil), // 6: cosmos.accounts.v1.AccountNumberRequest + (*AccountNumberResponse)(nil), // 7: cosmos.accounts.v1.AccountNumberResponse + (*SchemaResponse_Handler)(nil), // 8: cosmos.accounts.v1.SchemaResponse.Handler + (*anypb.Any)(nil), // 9: google.protobuf.Any } var file_cosmos_accounts_v1_query_proto_depIdxs = []int32{ - 11, // 0: cosmos.accounts.v1.AccountQueryRequest.request:type_name -> google.protobuf.Any - 11, // 1: cosmos.accounts.v1.AccountQueryResponse.response:type_name -> google.protobuf.Any - 10, // 2: cosmos.accounts.v1.SchemaResponse.init_schema:type_name -> cosmos.accounts.v1.SchemaResponse.Handler - 10, // 3: cosmos.accounts.v1.SchemaResponse.execute_handlers:type_name -> cosmos.accounts.v1.SchemaResponse.Handler - 10, // 4: cosmos.accounts.v1.SchemaResponse.query_handlers:type_name -> cosmos.accounts.v1.SchemaResponse.Handler - 12, // 5: cosmos.accounts.v1.SimulateUserOperationRequest.user_operation:type_name -> cosmos.accounts.v1.UserOperation - 13, // 6: cosmos.accounts.v1.SimulateUserOperationResponse.user_operation_response:type_name -> cosmos.accounts.v1.UserOperationResponse - 0, // 7: cosmos.accounts.v1.Query.AccountQuery:input_type -> cosmos.accounts.v1.AccountQueryRequest - 2, // 8: cosmos.accounts.v1.Query.Schema:input_type -> cosmos.accounts.v1.SchemaRequest - 4, // 9: cosmos.accounts.v1.Query.AccountType:input_type -> cosmos.accounts.v1.AccountTypeRequest - 6, // 10: cosmos.accounts.v1.Query.AccountNumber:input_type -> cosmos.accounts.v1.AccountNumberRequest - 8, // 11: cosmos.accounts.v1.Query.SimulateUserOperation:input_type -> cosmos.accounts.v1.SimulateUserOperationRequest - 1, // 12: cosmos.accounts.v1.Query.AccountQuery:output_type -> cosmos.accounts.v1.AccountQueryResponse - 3, // 13: cosmos.accounts.v1.Query.Schema:output_type -> cosmos.accounts.v1.SchemaResponse - 5, // 14: cosmos.accounts.v1.Query.AccountType:output_type -> cosmos.accounts.v1.AccountTypeResponse - 7, // 15: cosmos.accounts.v1.Query.AccountNumber:output_type -> cosmos.accounts.v1.AccountNumberResponse - 9, // 16: cosmos.accounts.v1.Query.SimulateUserOperation:output_type -> cosmos.accounts.v1.SimulateUserOperationResponse - 12, // [12:17] is the sub-list for method output_type - 7, // [7:12] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 9, // 0: cosmos.accounts.v1.AccountQueryRequest.request:type_name -> google.protobuf.Any + 9, // 1: cosmos.accounts.v1.AccountQueryResponse.response:type_name -> google.protobuf.Any + 8, // 2: cosmos.accounts.v1.SchemaResponse.init_schema:type_name -> cosmos.accounts.v1.SchemaResponse.Handler + 8, // 3: cosmos.accounts.v1.SchemaResponse.execute_handlers:type_name -> cosmos.accounts.v1.SchemaResponse.Handler + 8, // 4: cosmos.accounts.v1.SchemaResponse.query_handlers:type_name -> cosmos.accounts.v1.SchemaResponse.Handler + 0, // 5: cosmos.accounts.v1.Query.AccountQuery:input_type -> cosmos.accounts.v1.AccountQueryRequest + 2, // 6: cosmos.accounts.v1.Query.Schema:input_type -> cosmos.accounts.v1.SchemaRequest + 4, // 7: cosmos.accounts.v1.Query.AccountType:input_type -> cosmos.accounts.v1.AccountTypeRequest + 6, // 8: cosmos.accounts.v1.Query.AccountNumber:input_type -> cosmos.accounts.v1.AccountNumberRequest + 1, // 9: cosmos.accounts.v1.Query.AccountQuery:output_type -> cosmos.accounts.v1.AccountQueryResponse + 3, // 10: cosmos.accounts.v1.Query.Schema:output_type -> cosmos.accounts.v1.SchemaResponse + 5, // 11: cosmos.accounts.v1.Query.AccountType:output_type -> cosmos.accounts.v1.AccountTypeResponse + 7, // 12: cosmos.accounts.v1.Query.AccountNumber:output_type -> cosmos.accounts.v1.AccountNumberResponse + 9, // [9:13] is the sub-list for method output_type + 5, // [5:9] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_cosmos_accounts_v1_query_proto_init() } @@ -5813,7 +4757,6 @@ func file_cosmos_accounts_v1_query_proto_init() { if File_cosmos_accounts_v1_query_proto != nil { return } - file_cosmos_accounts_v1_account_abstraction_proto_init() if !protoimpl.UnsafeEnabled { file_cosmos_accounts_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AccountQueryRequest); i { @@ -5912,30 +4855,6 @@ func file_cosmos_accounts_v1_query_proto_init() { } } file_cosmos_accounts_v1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SimulateUserOperationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_accounts_v1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SimulateUserOperationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_accounts_v1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SchemaResponse_Handler); i { case 0: return &v.state @@ -5954,7 +4873,7 @@ func file_cosmos_accounts_v1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_accounts_v1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 11, + NumMessages: 9, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/accounts/v1/query_grpc.pb.go b/api/cosmos/accounts/v1/query_grpc.pb.go index 0f895be835..fd1a7acc1c 100644 --- a/api/cosmos/accounts/v1/query_grpc.pb.go +++ b/api/cosmos/accounts/v1/query_grpc.pb.go @@ -19,11 +19,10 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Query_AccountQuery_FullMethodName = "/cosmos.accounts.v1.Query/AccountQuery" - Query_Schema_FullMethodName = "/cosmos.accounts.v1.Query/Schema" - Query_AccountType_FullMethodName = "/cosmos.accounts.v1.Query/AccountType" - Query_AccountNumber_FullMethodName = "/cosmos.accounts.v1.Query/AccountNumber" - Query_SimulateUserOperation_FullMethodName = "/cosmos.accounts.v1.Query/SimulateUserOperation" + Query_AccountQuery_FullMethodName = "/cosmos.accounts.v1.Query/AccountQuery" + Query_Schema_FullMethodName = "/cosmos.accounts.v1.Query/Schema" + Query_AccountType_FullMethodName = "/cosmos.accounts.v1.Query/AccountType" + Query_AccountNumber_FullMethodName = "/cosmos.accounts.v1.Query/AccountNumber" ) // QueryClient is the client API for Query service. @@ -38,8 +37,6 @@ type QueryClient interface { AccountType(ctx context.Context, in *AccountTypeRequest, opts ...grpc.CallOption) (*AccountTypeResponse, error) // AccountNumber returns the account number given the account address. AccountNumber(ctx context.Context, in *AccountNumberRequest, opts ...grpc.CallOption) (*AccountNumberResponse, error) - // SimulateUserOperation simulates a user operation. - SimulateUserOperation(ctx context.Context, in *SimulateUserOperationRequest, opts ...grpc.CallOption) (*SimulateUserOperationResponse, error) } type queryClient struct { @@ -86,15 +83,6 @@ func (c *queryClient) AccountNumber(ctx context.Context, in *AccountNumberReques return out, nil } -func (c *queryClient) SimulateUserOperation(ctx context.Context, in *SimulateUserOperationRequest, opts ...grpc.CallOption) (*SimulateUserOperationResponse, error) { - out := new(SimulateUserOperationResponse) - err := c.cc.Invoke(ctx, Query_SimulateUserOperation_FullMethodName, 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 @@ -107,8 +95,6 @@ type QueryServer interface { AccountType(context.Context, *AccountTypeRequest) (*AccountTypeResponse, error) // AccountNumber returns the account number given the account address. AccountNumber(context.Context, *AccountNumberRequest) (*AccountNumberResponse, error) - // SimulateUserOperation simulates a user operation. - SimulateUserOperation(context.Context, *SimulateUserOperationRequest) (*SimulateUserOperationResponse, error) mustEmbedUnimplementedQueryServer() } @@ -128,9 +114,6 @@ func (UnimplementedQueryServer) AccountType(context.Context, *AccountTypeRequest func (UnimplementedQueryServer) AccountNumber(context.Context, *AccountNumberRequest) (*AccountNumberResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AccountNumber not implemented") } -func (UnimplementedQueryServer) SimulateUserOperation(context.Context, *SimulateUserOperationRequest) (*SimulateUserOperationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SimulateUserOperation not implemented") -} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. @@ -216,24 +199,6 @@ func _Query_AccountNumber_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } -func _Query_SimulateUserOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SimulateUserOperationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).SimulateUserOperation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_SimulateUserOperation_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).SimulateUserOperation(ctx, req.(*SimulateUserOperationRequest)) - } - 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) @@ -257,10 +222,6 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "AccountNumber", Handler: _Query_AccountNumber_Handler, }, - { - MethodName: "SimulateUserOperation", - Handler: _Query_SimulateUserOperation_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/accounts/v1/query.proto", diff --git a/api/cosmos/accounts/v1/tx.pulsar.go b/api/cosmos/accounts/v1/tx.pulsar.go index f91a9d4135..25343ae97e 100644 --- a/api/cosmos/accounts/v1/tx.pulsar.go +++ b/api/cosmos/accounts/v1/tx.pulsar.go @@ -4,6 +4,7 @@ package accountsv1 import ( v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" _ "cosmossdk.io/api/cosmos/msg/v1" + v1beta11 "cosmossdk.io/api/cosmos/tx/v1beta1" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" @@ -2355,7 +2356,7 @@ func (x *fastReflection_MsgExecuteResponse) ProtoMethods() *protoiface.Methods { var _ protoreflect.List = (*_MsgExecuteBundle_2_list)(nil) type _MsgExecuteBundle_2_list struct { - list *[]*UserOperation + list *[]*v1beta11.TxRaw } func (x *_MsgExecuteBundle_2_list) Len() int { @@ -2371,18 +2372,18 @@ func (x *_MsgExecuteBundle_2_list) Get(i int) protoreflect.Value { func (x *_MsgExecuteBundle_2_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*UserOperation) + concreteValue := valueUnwrapped.Interface().(*v1beta11.TxRaw) (*x.list)[i] = concreteValue } func (x *_MsgExecuteBundle_2_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*UserOperation) + concreteValue := valueUnwrapped.Interface().(*v1beta11.TxRaw) *x.list = append(*x.list, concreteValue) } func (x *_MsgExecuteBundle_2_list) AppendMutable() protoreflect.Value { - v := new(UserOperation) + v := new(v1beta11.TxRaw) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } @@ -2395,7 +2396,7 @@ func (x *_MsgExecuteBundle_2_list) Truncate(n int) { } func (x *_MsgExecuteBundle_2_list) NewElement() protoreflect.Value { - v := new(UserOperation) + v := new(v1beta11.TxRaw) return protoreflect.ValueOfMessage(v.ProtoReflect()) } @@ -2404,16 +2405,16 @@ func (x *_MsgExecuteBundle_2_list) IsValid() bool { } var ( - md_MsgExecuteBundle protoreflect.MessageDescriptor - fd_MsgExecuteBundle_bundler protoreflect.FieldDescriptor - fd_MsgExecuteBundle_operations protoreflect.FieldDescriptor + md_MsgExecuteBundle protoreflect.MessageDescriptor + fd_MsgExecuteBundle_bundler protoreflect.FieldDescriptor + fd_MsgExecuteBundle_txs protoreflect.FieldDescriptor ) func init() { file_cosmos_accounts_v1_tx_proto_init() md_MsgExecuteBundle = File_cosmos_accounts_v1_tx_proto.Messages().ByName("MsgExecuteBundle") fd_MsgExecuteBundle_bundler = md_MsgExecuteBundle.Fields().ByName("bundler") - fd_MsgExecuteBundle_operations = md_MsgExecuteBundle.Fields().ByName("operations") + fd_MsgExecuteBundle_txs = md_MsgExecuteBundle.Fields().ByName("txs") } var _ protoreflect.Message = (*fastReflection_MsgExecuteBundle)(nil) @@ -2487,9 +2488,9 @@ func (x *fastReflection_MsgExecuteBundle) Range(f func(protoreflect.FieldDescrip return } } - if len(x.Operations) != 0 { - value := protoreflect.ValueOfList(&_MsgExecuteBundle_2_list{list: &x.Operations}) - if !f(fd_MsgExecuteBundle_operations, value) { + if len(x.Txs) != 0 { + value := protoreflect.ValueOfList(&_MsgExecuteBundle_2_list{list: &x.Txs}) + if !f(fd_MsgExecuteBundle_txs, value) { return } } @@ -2510,8 +2511,8 @@ func (x *fastReflection_MsgExecuteBundle) Has(fd protoreflect.FieldDescriptor) b switch fd.FullName() { case "cosmos.accounts.v1.MsgExecuteBundle.bundler": return x.Bundler != "" - case "cosmos.accounts.v1.MsgExecuteBundle.operations": - return len(x.Operations) != 0 + case "cosmos.accounts.v1.MsgExecuteBundle.txs": + return len(x.Txs) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteBundle")) @@ -2530,8 +2531,8 @@ func (x *fastReflection_MsgExecuteBundle) Clear(fd protoreflect.FieldDescriptor) switch fd.FullName() { case "cosmos.accounts.v1.MsgExecuteBundle.bundler": x.Bundler = "" - case "cosmos.accounts.v1.MsgExecuteBundle.operations": - x.Operations = nil + case "cosmos.accounts.v1.MsgExecuteBundle.txs": + x.Txs = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteBundle")) @@ -2551,11 +2552,11 @@ func (x *fastReflection_MsgExecuteBundle) Get(descriptor protoreflect.FieldDescr case "cosmos.accounts.v1.MsgExecuteBundle.bundler": value := x.Bundler return protoreflect.ValueOfString(value) - case "cosmos.accounts.v1.MsgExecuteBundle.operations": - if len(x.Operations) == 0 { + case "cosmos.accounts.v1.MsgExecuteBundle.txs": + if len(x.Txs) == 0 { return protoreflect.ValueOfList(&_MsgExecuteBundle_2_list{}) } - listValue := &_MsgExecuteBundle_2_list{list: &x.Operations} + listValue := &_MsgExecuteBundle_2_list{list: &x.Txs} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { @@ -2579,10 +2580,10 @@ func (x *fastReflection_MsgExecuteBundle) Set(fd protoreflect.FieldDescriptor, v switch fd.FullName() { case "cosmos.accounts.v1.MsgExecuteBundle.bundler": x.Bundler = value.Interface().(string) - case "cosmos.accounts.v1.MsgExecuteBundle.operations": + case "cosmos.accounts.v1.MsgExecuteBundle.txs": lv := value.List() clv := lv.(*_MsgExecuteBundle_2_list) - x.Operations = *clv.list + x.Txs = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteBundle")) @@ -2603,11 +2604,11 @@ func (x *fastReflection_MsgExecuteBundle) Set(fd protoreflect.FieldDescriptor, v // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgExecuteBundle) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.accounts.v1.MsgExecuteBundle.operations": - if x.Operations == nil { - x.Operations = []*UserOperation{} + case "cosmos.accounts.v1.MsgExecuteBundle.txs": + if x.Txs == nil { + x.Txs = []*v1beta11.TxRaw{} } - value := &_MsgExecuteBundle_2_list{list: &x.Operations} + value := &_MsgExecuteBundle_2_list{list: &x.Txs} return protoreflect.ValueOfList(value) case "cosmos.accounts.v1.MsgExecuteBundle.bundler": panic(fmt.Errorf("field bundler of message cosmos.accounts.v1.MsgExecuteBundle is not mutable")) @@ -2626,8 +2627,8 @@ func (x *fastReflection_MsgExecuteBundle) NewField(fd protoreflect.FieldDescript switch fd.FullName() { case "cosmos.accounts.v1.MsgExecuteBundle.bundler": return protoreflect.ValueOfString("") - case "cosmos.accounts.v1.MsgExecuteBundle.operations": - list := []*UserOperation{} + case "cosmos.accounts.v1.MsgExecuteBundle.txs": + list := []*v1beta11.TxRaw{} return protoreflect.ValueOfList(&_MsgExecuteBundle_2_list{list: &list}) default: if fd.IsExtension() { @@ -2702,8 +2703,8 @@ func (x *fastReflection_MsgExecuteBundle) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if len(x.Operations) > 0 { - for _, e := range x.Operations { + if len(x.Txs) > 0 { + for _, e := range x.Txs { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } @@ -2737,9 +2738,9 @@ func (x *fastReflection_MsgExecuteBundle) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Operations) > 0 { - for iNdEx := len(x.Operations) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Operations[iNdEx]) + if len(x.Txs) > 0 { + for iNdEx := len(x.Txs) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Txs[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2843,7 +2844,7 @@ func (x *fastReflection_MsgExecuteBundle) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Operations", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2870,8 +2871,8 @@ func (x *fastReflection_MsgExecuteBundle) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Operations = append(x.Operations, &UserOperation{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Operations[len(x.Operations)-1]); err != nil { + x.Txs = append(x.Txs, &v1beta11.TxRaw{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Txs[len(x.Txs)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -2910,10 +2911,509 @@ func (x *fastReflection_MsgExecuteBundle) ProtoMethods() *protoiface.Methods { } } +var ( + md_BundledTxResponse protoreflect.MessageDescriptor + fd_BundledTxResponse_exec_responses protoreflect.FieldDescriptor + fd_BundledTxResponse_error protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_v1_tx_proto_init() + md_BundledTxResponse = File_cosmos_accounts_v1_tx_proto.Messages().ByName("BundledTxResponse") + fd_BundledTxResponse_exec_responses = md_BundledTxResponse.Fields().ByName("exec_responses") + fd_BundledTxResponse_error = md_BundledTxResponse.Fields().ByName("error") +} + +var _ protoreflect.Message = (*fastReflection_BundledTxResponse)(nil) + +type fastReflection_BundledTxResponse BundledTxResponse + +func (x *BundledTxResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_BundledTxResponse)(x) +} + +func (x *BundledTxResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_v1_tx_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_BundledTxResponse_messageType fastReflection_BundledTxResponse_messageType +var _ protoreflect.MessageType = fastReflection_BundledTxResponse_messageType{} + +type fastReflection_BundledTxResponse_messageType struct{} + +func (x fastReflection_BundledTxResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_BundledTxResponse)(nil) +} +func (x fastReflection_BundledTxResponse_messageType) New() protoreflect.Message { + return new(fastReflection_BundledTxResponse) +} +func (x fastReflection_BundledTxResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_BundledTxResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_BundledTxResponse) Descriptor() protoreflect.MessageDescriptor { + return md_BundledTxResponse +} + +// 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_BundledTxResponse) Type() protoreflect.MessageType { + return _fastReflection_BundledTxResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_BundledTxResponse) New() protoreflect.Message { + return new(fastReflection_BundledTxResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_BundledTxResponse) Interface() protoreflect.ProtoMessage { + return (*BundledTxResponse)(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_BundledTxResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ExecResponses != nil { + value := protoreflect.ValueOfMessage(x.ExecResponses.ProtoReflect()) + if !f(fd_BundledTxResponse_exec_responses, value) { + return + } + } + if x.Error != "" { + value := protoreflect.ValueOfString(x.Error) + if !f(fd_BundledTxResponse_error, 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_BundledTxResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.v1.BundledTxResponse.exec_responses": + return x.ExecResponses != nil + case "cosmos.accounts.v1.BundledTxResponse.error": + return x.Error != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.BundledTxResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.BundledTxResponse 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_BundledTxResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.v1.BundledTxResponse.exec_responses": + x.ExecResponses = nil + case "cosmos.accounts.v1.BundledTxResponse.error": + x.Error = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.BundledTxResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.BundledTxResponse 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_BundledTxResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.v1.BundledTxResponse.exec_responses": + value := x.ExecResponses + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.accounts.v1.BundledTxResponse.error": + value := x.Error + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.BundledTxResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.BundledTxResponse 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_BundledTxResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.v1.BundledTxResponse.exec_responses": + x.ExecResponses = value.Message().Interface().(*anypb.Any) + case "cosmos.accounts.v1.BundledTxResponse.error": + x.Error = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.BundledTxResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.BundledTxResponse 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_BundledTxResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.v1.BundledTxResponse.exec_responses": + if x.ExecResponses == nil { + x.ExecResponses = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.ExecResponses.ProtoReflect()) + case "cosmos.accounts.v1.BundledTxResponse.error": + panic(fmt.Errorf("field error of message cosmos.accounts.v1.BundledTxResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.BundledTxResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.BundledTxResponse 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_BundledTxResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.v1.BundledTxResponse.exec_responses": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.accounts.v1.BundledTxResponse.error": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.BundledTxResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.BundledTxResponse 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_BundledTxResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.v1.BundledTxResponse", 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_BundledTxResponse) 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_BundledTxResponse) 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_BundledTxResponse) 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_BundledTxResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*BundledTxResponse) + 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.ExecResponses != nil { + l = options.Size(x.ExecResponses) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Error) + 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().(*BundledTxResponse) + 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.Error) > 0 { + i -= len(x.Error) + copy(dAtA[i:], x.Error) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Error))) + i-- + dAtA[i] = 0x12 + } + if x.ExecResponses != nil { + encoded, err := options.Marshal(x.ExecResponses) + 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().(*BundledTxResponse) + 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: BundledTxResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BundledTxResponse: 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 ExecResponses", 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.ExecResponses == nil { + x.ExecResponses = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ExecResponses); 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 Error", 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.Error = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + var _ protoreflect.List = (*_MsgExecuteBundleResponse_1_list)(nil) type _MsgExecuteBundleResponse_1_list struct { - list *[]*UserOperationResponse + list *[]*BundledTxResponse } func (x *_MsgExecuteBundleResponse_1_list) Len() int { @@ -2929,18 +3429,18 @@ func (x *_MsgExecuteBundleResponse_1_list) Get(i int) protoreflect.Value { func (x *_MsgExecuteBundleResponse_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*UserOperationResponse) + concreteValue := valueUnwrapped.Interface().(*BundledTxResponse) (*x.list)[i] = concreteValue } func (x *_MsgExecuteBundleResponse_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*UserOperationResponse) + concreteValue := valueUnwrapped.Interface().(*BundledTxResponse) *x.list = append(*x.list, concreteValue) } func (x *_MsgExecuteBundleResponse_1_list) AppendMutable() protoreflect.Value { - v := new(UserOperationResponse) + v := new(BundledTxResponse) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } @@ -2953,7 +3453,7 @@ func (x *_MsgExecuteBundleResponse_1_list) Truncate(n int) { } func (x *_MsgExecuteBundleResponse_1_list) NewElement() protoreflect.Value { - v := new(UserOperationResponse) + v := new(BundledTxResponse) return protoreflect.ValueOfMessage(v.ProtoReflect()) } @@ -2981,7 +3481,7 @@ func (x *MsgExecuteBundleResponse) ProtoReflect() protoreflect.Message { } func (x *MsgExecuteBundleResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[5] + mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3146,7 +3646,7 @@ func (x *fastReflection_MsgExecuteBundleResponse) Mutable(fd protoreflect.FieldD switch fd.FullName() { case "cosmos.accounts.v1.MsgExecuteBundleResponse.responses": if x.Responses == nil { - x.Responses = []*UserOperationResponse{} + x.Responses = []*BundledTxResponse{} } value := &_MsgExecuteBundleResponse_1_list{list: &x.Responses} return protoreflect.ValueOfList(value) @@ -3164,7 +3664,7 @@ func (x *fastReflection_MsgExecuteBundleResponse) Mutable(fd protoreflect.FieldD func (x *fastReflection_MsgExecuteBundleResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "cosmos.accounts.v1.MsgExecuteBundleResponse.responses": - list := []*UserOperationResponse{} + list := []*BundledTxResponse{} return protoreflect.ValueOfList(&_MsgExecuteBundleResponse_1_list{list: &list}) default: if fd.IsExtension() { @@ -3364,7 +3864,7 @@ func (x *fastReflection_MsgExecuteBundleResponse) ProtoMethods() *protoiface.Met if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Responses = append(x.Responses, &UserOperationResponse{}) + x.Responses = append(x.Responses, &BundledTxResponse{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Responses[len(x.Responses)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } @@ -3639,8 +4139,8 @@ type MsgExecuteBundle struct { // bundler defines the entity going through the standard TX flow // to execute one or multiple UserOperations on behalf of others. Bundler string `protobuf:"bytes,1,opt,name=bundler,proto3" json:"bundler,omitempty"` - // operations is the list of operations to be executed. - Operations []*UserOperation `protobuf:"bytes,2,rep,name=operations,proto3" json:"operations,omitempty"` + // txs defines the txs to execute on behalf of other users. + Txs []*v1beta11.TxRaw `protobuf:"bytes,2,rep,name=txs,proto3" json:"txs,omitempty"` } func (x *MsgExecuteBundle) Reset() { @@ -3670,13 +4170,57 @@ func (x *MsgExecuteBundle) GetBundler() string { return "" } -func (x *MsgExecuteBundle) GetOperations() []*UserOperation { +func (x *MsgExecuteBundle) GetTxs() []*v1beta11.TxRaw { if x != nil { - return x.Operations + return x.Txs } return nil } +// BundledTxResponse defines the response of a bundled tx. +type BundledTxResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ExecResponses *anypb.Any `protobuf:"bytes,1,opt,name=exec_responses,json=execResponses,proto3" json:"exec_responses,omitempty"` + Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *BundledTxResponse) Reset() { + *x = BundledTxResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BundledTxResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BundledTxResponse) ProtoMessage() {} + +// Deprecated: Use BundledTxResponse.ProtoReflect.Descriptor instead. +func (*BundledTxResponse) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_v1_tx_proto_rawDescGZIP(), []int{5} +} + +func (x *BundledTxResponse) GetExecResponses() *anypb.Any { + if x != nil { + return x.ExecResponses + } + return nil +} + +func (x *BundledTxResponse) GetError() string { + if x != nil { + return x.Error + } + return "" +} + // MsgExecuteBundleResponse defines the ExecuteBundle response type for the Msg/ExecuteBundle RPC method. type MsgExecuteBundleResponse struct { state protoimpl.MessageState @@ -3684,13 +4228,13 @@ type MsgExecuteBundleResponse struct { unknownFields protoimpl.UnknownFields // responses is the list of responses returned by the account implementations. - Responses []*UserOperationResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` + Responses []*BundledTxResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` } func (x *MsgExecuteBundleResponse) Reset() { *x = MsgExecuteBundleResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[5] + mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3704,10 +4248,10 @@ func (*MsgExecuteBundleResponse) ProtoMessage() {} // Deprecated: Use MsgExecuteBundleResponse.ProtoReflect.Descriptor instead. func (*MsgExecuteBundleResponse) Descriptor() ([]byte, []int) { - return file_cosmos_accounts_v1_tx_proto_rawDescGZIP(), []int{5} + return file_cosmos_accounts_v1_tx_proto_rawDescGZIP(), []int{6} } -func (x *MsgExecuteBundleResponse) GetResponses() []*UserOperationResponse { +func (x *MsgExecuteBundleResponse) GetResponses() []*BundledTxResponse { if x != nil { return x.Responses } @@ -3723,96 +4267,100 @@ var file_cosmos_accounts_v1_tx_proto_rawDesc = []byte{ 0x31, 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, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x5f, 0x61, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 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, 0x22, 0xe4, 0x01, 0x0a, 0x07, 0x4d, 0x73, - 0x67, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, - 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x2e, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x12, 0x61, 0x0a, 0x05, 0x66, 0x75, 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, - 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x05, 0x66, 0x75, - 0x6e, 0x64, 0x73, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x22, 0x6c, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x08, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xdc, - 0x01, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2e, 0x0a, - 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x61, 0x0a, - 0x05, 0x66, 0x75, 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, - 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x05, 0x66, 0x75, 0x6e, 0x64, 0x73, - 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x46, 0x0a, - 0x12, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x52, 0x08, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7d, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x75, 0x6e, - 0x64, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x75, 0x6e, 0x64, - 0x6c, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, - 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x62, 0x75, 0x6e, - 0x64, 0x6c, 0x65, 0x72, 0x22, 0x63, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x47, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x32, 0x8e, 0x02, 0x0a, 0x03, 0x4d, 0x73, - 0x67, 0x12, 0x48, 0x0a, 0x04, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, - 0x6e, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x07, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, - 0x0a, 0x0d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, - 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x42, - 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xbb, 0x01, 0x0a, 0x16, 0x63, - 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x2e, 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, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x43, 0x6f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, + 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 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, 0x22, 0xe4, 0x01, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x49, + 0x6e, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2e, + 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x61, + 0x0a, 0x05, 0x66, 0x75, 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, + 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x05, 0x66, 0x75, 0x6e, 0x64, + 0x73, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x6c, + 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, + 0x6e, 0x79, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xdc, 0x01, 0x0a, + 0x0a, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2e, 0x0a, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, + 0x6e, 0x79, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x61, 0x0a, 0x05, 0x66, + 0x75, 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x05, 0x66, 0x75, 0x6e, 0x64, 0x73, 0x3a, 0x0b, + 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x46, 0x0a, 0x12, 0x4d, + 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x66, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, + 0x72, 0x12, 0x2a, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x54, 0x78, 0x52, 0x61, 0x77, 0x52, 0x03, 0x74, 0x78, 0x73, 0x3a, 0x0c, 0x82, + 0xe7, 0xb0, 0x2a, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x22, 0x66, 0x0a, 0x11, 0x42, + 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x64, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x3b, 0x0a, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x73, 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, 0x52, 0x0d, + 0x65, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x14, 0x0a, + 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x22, 0x5f, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x43, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x64, 0x54, + 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x73, 0x32, 0x8e, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x48, 0x0a, 0x04, + 0x49, 0x6e, 0x69, 0x74, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, + 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x07, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x0d, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, + 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, + 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, + 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xbb, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, + 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2e, 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, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, + 0x3b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, + 0x58, 0xaa, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x56, 0x31, - 0xe2, 0x02, 0x1e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3827,39 +4375,40 @@ func file_cosmos_accounts_v1_tx_proto_rawDescGZIP() []byte { return file_cosmos_accounts_v1_tx_proto_rawDescData } -var file_cosmos_accounts_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_cosmos_accounts_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_cosmos_accounts_v1_tx_proto_goTypes = []interface{}{ (*MsgInit)(nil), // 0: cosmos.accounts.v1.MsgInit (*MsgInitResponse)(nil), // 1: cosmos.accounts.v1.MsgInitResponse (*MsgExecute)(nil), // 2: cosmos.accounts.v1.MsgExecute (*MsgExecuteResponse)(nil), // 3: cosmos.accounts.v1.MsgExecuteResponse (*MsgExecuteBundle)(nil), // 4: cosmos.accounts.v1.MsgExecuteBundle - (*MsgExecuteBundleResponse)(nil), // 5: cosmos.accounts.v1.MsgExecuteBundleResponse - (*anypb.Any)(nil), // 6: google.protobuf.Any - (*v1beta1.Coin)(nil), // 7: cosmos.base.v1beta1.Coin - (*UserOperation)(nil), // 8: cosmos.accounts.v1.UserOperation - (*UserOperationResponse)(nil), // 9: cosmos.accounts.v1.UserOperationResponse + (*BundledTxResponse)(nil), // 5: cosmos.accounts.v1.BundledTxResponse + (*MsgExecuteBundleResponse)(nil), // 6: cosmos.accounts.v1.MsgExecuteBundleResponse + (*anypb.Any)(nil), // 7: google.protobuf.Any + (*v1beta1.Coin)(nil), // 8: cosmos.base.v1beta1.Coin + (*v1beta11.TxRaw)(nil), // 9: cosmos.tx.v1beta1.TxRaw } var file_cosmos_accounts_v1_tx_proto_depIdxs = []int32{ - 6, // 0: cosmos.accounts.v1.MsgInit.message:type_name -> google.protobuf.Any - 7, // 1: cosmos.accounts.v1.MsgInit.funds:type_name -> cosmos.base.v1beta1.Coin - 6, // 2: cosmos.accounts.v1.MsgInitResponse.response:type_name -> google.protobuf.Any - 6, // 3: cosmos.accounts.v1.MsgExecute.message:type_name -> google.protobuf.Any - 7, // 4: cosmos.accounts.v1.MsgExecute.funds:type_name -> cosmos.base.v1beta1.Coin - 6, // 5: cosmos.accounts.v1.MsgExecuteResponse.response:type_name -> google.protobuf.Any - 8, // 6: cosmos.accounts.v1.MsgExecuteBundle.operations:type_name -> cosmos.accounts.v1.UserOperation - 9, // 7: cosmos.accounts.v1.MsgExecuteBundleResponse.responses:type_name -> cosmos.accounts.v1.UserOperationResponse - 0, // 8: cosmos.accounts.v1.Msg.Init:input_type -> cosmos.accounts.v1.MsgInit - 2, // 9: cosmos.accounts.v1.Msg.Execute:input_type -> cosmos.accounts.v1.MsgExecute - 4, // 10: cosmos.accounts.v1.Msg.ExecuteBundle:input_type -> cosmos.accounts.v1.MsgExecuteBundle - 1, // 11: cosmos.accounts.v1.Msg.Init:output_type -> cosmos.accounts.v1.MsgInitResponse - 3, // 12: cosmos.accounts.v1.Msg.Execute:output_type -> cosmos.accounts.v1.MsgExecuteResponse - 5, // 13: cosmos.accounts.v1.Msg.ExecuteBundle:output_type -> cosmos.accounts.v1.MsgExecuteBundleResponse - 11, // [11:14] is the sub-list for method output_type - 8, // [8:11] 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 + 7, // 0: cosmos.accounts.v1.MsgInit.message:type_name -> google.protobuf.Any + 8, // 1: cosmos.accounts.v1.MsgInit.funds:type_name -> cosmos.base.v1beta1.Coin + 7, // 2: cosmos.accounts.v1.MsgInitResponse.response:type_name -> google.protobuf.Any + 7, // 3: cosmos.accounts.v1.MsgExecute.message:type_name -> google.protobuf.Any + 8, // 4: cosmos.accounts.v1.MsgExecute.funds:type_name -> cosmos.base.v1beta1.Coin + 7, // 5: cosmos.accounts.v1.MsgExecuteResponse.response:type_name -> google.protobuf.Any + 9, // 6: cosmos.accounts.v1.MsgExecuteBundle.txs:type_name -> cosmos.tx.v1beta1.TxRaw + 7, // 7: cosmos.accounts.v1.BundledTxResponse.exec_responses:type_name -> google.protobuf.Any + 5, // 8: cosmos.accounts.v1.MsgExecuteBundleResponse.responses:type_name -> cosmos.accounts.v1.BundledTxResponse + 0, // 9: cosmos.accounts.v1.Msg.Init:input_type -> cosmos.accounts.v1.MsgInit + 2, // 10: cosmos.accounts.v1.Msg.Execute:input_type -> cosmos.accounts.v1.MsgExecute + 4, // 11: cosmos.accounts.v1.Msg.ExecuteBundle:input_type -> cosmos.accounts.v1.MsgExecuteBundle + 1, // 12: cosmos.accounts.v1.Msg.Init:output_type -> cosmos.accounts.v1.MsgInitResponse + 3, // 13: cosmos.accounts.v1.Msg.Execute:output_type -> cosmos.accounts.v1.MsgExecuteResponse + 6, // 14: cosmos.accounts.v1.Msg.ExecuteBundle:output_type -> cosmos.accounts.v1.MsgExecuteBundleResponse + 12, // [12:15] is the sub-list for method output_type + 9, // [9:12] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_cosmos_accounts_v1_tx_proto_init() } @@ -3867,7 +4416,6 @@ func file_cosmos_accounts_v1_tx_proto_init() { if File_cosmos_accounts_v1_tx_proto != nil { return } - file_cosmos_accounts_v1_account_abstraction_proto_init() if !protoimpl.UnsafeEnabled { file_cosmos_accounts_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgInit); i { @@ -3930,6 +4478,18 @@ func file_cosmos_accounts_v1_tx_proto_init() { } } file_cosmos_accounts_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BundledTxResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_v1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgExecuteBundleResponse); i { case 0: return &v.state @@ -3948,7 +4508,7 @@ func file_cosmos_accounts_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_accounts_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 7, NumExtensions: 0, NumServices: 1, }, diff --git a/client/v2/go.mod b/client/v2/go.mod index 9586d57d2b..b7faaae562 100644 --- a/client/v2/go.mod +++ b/client/v2/go.mod @@ -164,6 +164,8 @@ require ( pgregory.net/rapid v1.1.0 // indirect ) +require cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 // indirect + require github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect replace github.com/cosmos/cosmos-sdk => ./../../ @@ -171,6 +173,7 @@ replace github.com/cosmos/cosmos-sdk => ./../../ replace ( cosmossdk.io/core => ./../../core cosmossdk.io/depinject => ./../../depinject + cosmossdk.io/x/accounts => ./../../x/accounts cosmossdk.io/x/auth => ./../../x/auth cosmossdk.io/x/bank => ./../../x/bank cosmossdk.io/x/distribution => ./../../x/distribution diff --git a/contrib/images/simd-env/Dockerfile b/contrib/images/simd-env/Dockerfile index 32f112935a..a4c95aa705 100644 --- a/contrib/images/simd-env/Dockerfile +++ b/contrib/images/simd-env/Dockerfile @@ -20,6 +20,7 @@ COPY x/auth/go.mod x/auth/go.sum /work/x/auth/ COPY x/authz/go.mod x/authz/go.sum /work/x/authz/ COPY x/bank/go.mod x/bank/go.sum /work/x/bank/ COPY x/mint/go.mod x/mint/go.sum /work/x/mint/ +COPY x/accounts/go.mod x/accounts/go.sum /work/x/accounts/ RUN go mod download COPY ./ /work diff --git a/go.mod b/go.mod index ea5acd16de..a588463539 100644 --- a/go.mod +++ b/go.mod @@ -66,6 +66,7 @@ require ( ) require ( + cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/DataDog/datadog-go v4.8.3+incompatible // indirect @@ -180,6 +181,7 @@ replace ( cosmossdk.io/api => ./api cosmossdk.io/core => ./core cosmossdk.io/depinject => ./depinject + cosmossdk.io/x/accounts => ./x/accounts cosmossdk.io/x/auth => ./x/auth cosmossdk.io/x/bank => ./x/bank cosmossdk.io/x/staking => ./x/staking diff --git a/proto/cosmos/accounts/defaults/base/v1/base.proto b/proto/cosmos/accounts/defaults/base/v1/base.proto new file mode 100644 index 0000000000..0919c62bbd --- /dev/null +++ b/proto/cosmos/accounts/defaults/base/v1/base.proto @@ -0,0 +1,34 @@ +syntax = "proto3"; + +package cosmos.accounts.defaults.base.v1; + +option go_package = "cosmossdk.io/x/accounts/defaults/base/v1"; + +// MsgInit is used to initialize a base account. +message MsgInit { + // pub_key defines the secp256k1 pubkey for the account. + bytes pub_key = 1; +} + +// MsgInitResponse is the response returned after base account initialization. +// This is empty. +message MsgInitResponse {} + +// MsgSwapPubKey is used to change the pubkey for the account. +message MsgSwapPubKey { + // new_pub_key defines the secp256k1 pubkey to swap the account to. + bytes new_pub_key = 1; +} + +// MsgSwapPubKeyResponse is the response for the MsgSwapPubKey message. +// This is empty. +message MsgSwapPubKeyResponse {} + +// QuerySequence is the request for the account sequence. +message QuerySequence {} + +// QuerySequenceResponse returns the sequence of the account. +message QuerySequenceResponse { + // sequence is the current sequence of the account. + uint64 sequence = 1; +} diff --git a/proto/cosmos/accounts/interfaces/account_abstraction/v1/interface.proto b/proto/cosmos/accounts/interfaces/account_abstraction/v1/interface.proto index 20203e13af..76663cc0be 100644 --- a/proto/cosmos/accounts/interfaces/account_abstraction/v1/interface.proto +++ b/proto/cosmos/accounts/interfaces/account_abstraction/v1/interface.proto @@ -3,20 +3,25 @@ syntax = "proto3"; package cosmos.accounts.interfaces.account_abstraction.v1; import "google/protobuf/any.proto"; -import "cosmos/accounts/v1/account_abstraction.proto"; +import "cosmos/tx/v1beta1/tx.proto"; option go_package = "cosmossdk.io/x/accounts/interfaces/account_abstraction/v1"; // MsgAuthenticate is a message that an x/account account abstraction implementer -// must handle to authenticate a state transition. +// must handle to authenticate a transaction. Always ensure the caller is the Accounts module. message MsgAuthenticate { // bundler defines the address of the bundler that sent the operation. // NOTE: in case the operation was sent directly by the user, this field will reflect // the user address. string bundler = 1; - // user_operation is the operation that the user is trying to perform. - // it also contains authentication information. - cosmos.accounts.v1.UserOperation user_operation = 2; + // raw_tx defines the raw version of the tx, this is useful to compute the signature quickly. + cosmos.tx.v1beta1.TxRaw raw_tx = 2; + // tx defines the decoded version of the tx, coming from raw_tx. + cosmos.tx.v1beta1.Tx tx = 3; + // signer_index defines the index of the signer in the tx. + // Specifically this can be used to extract the signature at the correct + // index. + uint32 signer_index = 4; } // MsgAuthenticateResponse is the response to MsgAuthenticate. @@ -24,47 +29,6 @@ message MsgAuthenticate { // there are no auxiliary fields to the response. message MsgAuthenticateResponse {} -// MsgPayBundler is a message that an x/account account abstraction implementer -// can optionally implement in case it wants to further refine control over -// the bundler payment messages. -// The account must ensure the caller of this message is the x/accounts module itself. -message MsgPayBundler { - // bundler is the address of the bundler. - // NOTE: in case the operation was sent directly by the user, this field will - // reflect the user address. - string bundler = 1; - // bundler_payment_messages are the messages that the operation sender will execute. - // The account can modify the messages as it sees fit. - repeated google.protobuf.Any bundler_payment_messages = 2; -} - -// MsgPayBundlerResponse is the response to MsgPayBundler. -message MsgPayBundlerResponse { - // bundler_payment_messages_response are the messages that the bundler will pay for. - repeated google.protobuf.Any bundler_payment_messages_response = 1; -} - -// MsgExecute is a message that an x/account account abstraction implementer -// can optionally implement in case it wants to further refine control over -// the execution messages. It can be used to extend the execution flow, possibly -// block certain messages, or modify them. -// The account must ensure the caller of this message is the x/accounts module itself. -message MsgExecute { - // bundler is the address of the bundler. - // NOTE: in case the operation was sent directly by the user, this field will - // reflect the user address. - string bundler = 1; - // execution_messages are the messages that the operation sender will execute. - // The account can modify the messages as it sees fit. - repeated google.protobuf.Any execution_messages = 2; -} - -// MsgExecuteResponse is the response to MsgExecute. -message MsgExecuteResponse { - // execution_messages_response are the messages that the operation sender will execute. - repeated google.protobuf.Any execution_messages_response = 1; -} - // QueryAuthenticationMethods is a query that an x/account account abstraction implementer // must handle to return the authentication methods that the account supports. message QueryAuthenticationMethods {} diff --git a/proto/cosmos/accounts/v1/account_abstraction.proto b/proto/cosmos/accounts/v1/account_abstraction.proto deleted file mode 100644 index 8d279dad78..0000000000 --- a/proto/cosmos/accounts/v1/account_abstraction.proto +++ /dev/null @@ -1,86 +0,0 @@ -syntax = "proto3"; - -package cosmos.accounts.v1; - -option go_package = "cosmossdk.io/x/accounts/v1"; - -import "google/protobuf/any.proto"; - -// UserOperation defines the type used to define a state transition that -// an account wants to make. -message UserOperation { - // sender defines the account that is sending the UserOperation. - string sender = 1; - // authentication_method defines the authentication strategy the account wants to use. - // since accounts can have multiple authentication methods, this field is used to - // instruct the account on what auth method to use. - string authentication_method = 2; - // authentication_data defines the authentication data associated with the authentication method. - // It is the account implementer duty to assess that the UserOperation is properly signed. - google.protobuf.Any authentication_data = 3; - // authentication_gas_limit expresses the gas limit to be used for the authentication part of the - // UserOperation. - uint64 authentication_gas_limit = 4; - // bundler_payment_messages expresses a list of messages that the account - // executes to pay the bundler for submitting the UserOperation. - // It can be empty if the bundler does not need any form of payment, - // the handshake for submitting the UserOperation might have happened off-chain. - // Bundlers and accounts are free to use any form of payment, in fact the payment can - // either be empty or be expressed as: - // - NFT payment - // - IBC Token payment. - // - Payment through delegations. - repeated google.protobuf.Any bundler_payment_messages = 5; - // bundler_payment_gas_limit defines the gas limit to be used for the bundler payment. - // This ensures that, since the bundler executes a list of UserOperations and there needs to - // be minimal trust between bundler and UserOperation sender, the sender cannot consume - // the whole bundle gas. - uint64 bundler_payment_gas_limit = 6; - // execution_messages expresses a list of messages that the account wants to execute. - // This concretely is the intent of the transaction expressed as a UserOperation. - repeated google.protobuf.Any execution_messages = 7; - // execution_gas_limit defines the gas limit to be used for the execution of the UserOperation's - // execution messages. - uint64 execution_gas_limit = 8; - - // tx_compat is populated only when the operation is composed from a raw tx. - // In fact if a TX comes and the sender of the TX is an abstracted account, - // we convert the TX into a user operation, and try to authenticate using the - // x/accounts authenticate method. If a bundler tries to send a UserOperation - // with a populated tx_compat, the operation will immediately yield a failure. - TxCompat tx_compat = 9; -} - -// TxCompat provides compatibility for x/accounts abstracted account with the cosmos-sdk's Txs. -// In fact TxCompat contains fields coming from the Tx in raw and decoded format. The Raw format -// is mainly needed for proper sig verification. -message TxCompat { - // auth_info_bytes contains the auth info bytes of the tx. - // Must not be modified. - bytes auth_info_bytes = 1; - // body_bytes contains the body bytes of the tx. - // must not be modified. - bytes body_bytes = 2; -} - -// UserOperationResponse defines the response of a UserOperation. -// If the operation fails the error field will be populated. -message UserOperationResponse { - // authentication_gas_used defines the gas used for the authentication part of the UserOperation. - uint64 authentication_gas_used = 1; - // bundler_payment_gas_used defines the gas used for the bundler payment part of the UserOperation. - uint64 bundler_payment_gas_used = 2; - // bundler_payment_responses defines the responses of the bundler payment messages. - // It can be empty if the bundler does not need any form of payment. - repeated google.protobuf.Any bundler_payment_responses = 3; - // execution_gas_used defines the gas used for the execution part of the UserOperation. - uint64 execution_gas_used = 4; - // execution_responses defines the responses of the execution messages. - repeated google.protobuf.Any execution_responses = 5; - // error defines the error that occurred during the execution of the UserOperation. - // If the error is not empty, the UserOperation failed. - // Other fields might be populated even if the error is not empty, for example - // if the operation fails after the authentication step, the authentication_gas_used - // field will be populated. - string error = 6; -} \ No newline at end of file diff --git a/proto/cosmos/accounts/v1/query.proto b/proto/cosmos/accounts/v1/query.proto index 297b3a95b6..e0e5564e09 100644 --- a/proto/cosmos/accounts/v1/query.proto +++ b/proto/cosmos/accounts/v1/query.proto @@ -5,7 +5,6 @@ package cosmos.accounts.v1; option go_package = "cosmossdk.io/x/accounts/v1"; import "google/protobuf/any.proto"; -import "cosmos/accounts/v1/account_abstraction.proto"; // Query defines the Query service for the x/accounts module. service Query { @@ -17,8 +16,6 @@ service Query { rpc AccountType(AccountTypeRequest) returns (AccountTypeResponse) {}; // AccountNumber returns the account number given the account address. rpc AccountNumber(AccountNumberRequest) returns (AccountNumberResponse) {}; - // SimulateUserOperation simulates a user operation. - rpc SimulateUserOperation(SimulateUserOperationRequest) returns (SimulateUserOperationResponse) {}; } // AccountQueryRequest is the request type for the Query/AccountQuery RPC @@ -84,20 +81,3 @@ message AccountNumberResponse { // number is the account number of the provided address. uint64 number = 1; } - -// SimulateUserOperationRequest is the query request used to simulate a -// UserOperation. -message SimulateUserOperationRequest { - // bundler can be filled to simulate the address of the bundler. - string bundler = 1; - // user_operation defines the user operation that we want to simulate. - // Gas limit fields are ignored. - UserOperation user_operation = 2; -} - -// SimulateUserOperationResponse is the query response returned by the simulation. -// It will populate the gas limits fields. -message SimulateUserOperationResponse { - // UserOperationResponse is the response of the simulation. - UserOperationResponse user_operation_response = 1; -} \ No newline at end of file diff --git a/proto/cosmos/accounts/v1/tx.proto b/proto/cosmos/accounts/v1/tx.proto index 824fe7cbb4..1bf502fcbf 100644 --- a/proto/cosmos/accounts/v1/tx.proto +++ b/proto/cosmos/accounts/v1/tx.proto @@ -6,8 +6,8 @@ option go_package = "cosmossdk.io/x/accounts/v1"; import "google/protobuf/any.proto"; import "cosmos/msg/v1/msg.proto"; -import "cosmos/accounts/v1/account_abstraction.proto"; import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/tx/v1beta1/tx.proto"; import "gogoproto/gogo.proto"; // Msg defines the Msg service for the x/accounts module. @@ -78,12 +78,18 @@ message MsgExecuteBundle { // bundler defines the entity going through the standard TX flow // to execute one or multiple UserOperations on behalf of others. string bundler = 1; - // operations is the list of operations to be executed. - repeated UserOperation operations = 2; + // txs defines the txs to execute on behalf of other users. + repeated cosmos.tx.v1beta1.TxRaw txs = 2; +} + +// BundledTxResponse defines the response of a bundled tx. +message BundledTxResponse { + google.protobuf.Any exec_responses = 1; + string error = 2; } // MsgExecuteBundleResponse defines the ExecuteBundle response type for the Msg/ExecuteBundle RPC method. message MsgExecuteBundleResponse { // responses is the list of responses returned by the account implementations. - repeated UserOperationResponse responses = 1; + repeated BundledTxResponse responses = 1; } diff --git a/simapp/ante.go b/simapp/ante.go index 34b6df7c48..8fde65c79a 100644 --- a/simapp/ante.go +++ b/simapp/ante.go @@ -44,7 +44,7 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper), ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, options.TxFeeChecker), ante.NewValidateSigCountDecorator(options.AccountKeeper), - ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler, options.SigGasConsumer), + ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler, options.SigGasConsumer, options.AccountAbstractionKeeper), } return sdk.ChainAnteDecorators(anteDecorators...), nil diff --git a/simapp/app.go b/simapp/app.go index cf80d1049c..d0c70fce21 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -22,6 +22,7 @@ import ( storetypes "cosmossdk.io/store/types" "cosmossdk.io/x/accounts" "cosmossdk.io/x/accounts/accountstd" + baseaccount "cosmossdk.io/x/accounts/defaults/base" "cosmossdk.io/x/accounts/testing/account_abstraction" "cosmossdk.io/x/accounts/testing/counter" "cosmossdk.io/x/auth" @@ -297,9 +298,11 @@ func NewSimApp( app.MsgServiceRouter(), app.GRPCQueryRouter(), appCodec.InterfaceRegistry(), + // TESTING: do not add accountstd.AddAccount("counter", counter.NewAccount), accountstd.AddAccount("aa_minimal", account_abstraction.NewMinimalAbstractedAccount), - accountstd.AddAccount("aa_full", account_abstraction.NewFullAbstractedAccount), + // PRODUCTION: add + baseaccount.NewAccount("base", txConfig.SignModeHandler()), ) if err != nil { panic(err) @@ -598,11 +601,12 @@ func (app *SimApp) setAnteHandler(txConfig client.TxConfig) { anteHandler, err := NewAnteHandler( HandlerOptions{ ante.HandlerOptions{ - AccountKeeper: app.AuthKeeper, - BankKeeper: app.BankKeeper, - SignModeHandler: txConfig.SignModeHandler(), - FeegrantKeeper: app.FeeGrantKeeper, - SigGasConsumer: ante.DefaultSigVerificationGasConsumer, + AccountAbstractionKeeper: app.AccountsKeeper, + AccountKeeper: app.AuthKeeper, + BankKeeper: app.BankKeeper, + SignModeHandler: txConfig.SignModeHandler(), + FeegrantKeeper: app.FeeGrantKeeper, + SigGasConsumer: ante.DefaultSigVerificationGasConsumer, }, &app.CircuitKeeper, app.UnorderedTxManager, diff --git a/tests/e2e/accounts/account_abstraction_test.go b/tests/e2e/accounts/account_abstraction_test.go index cc7c66aa70..a7d5f98d67 100644 --- a/tests/e2e/accounts/account_abstraction_test.go +++ b/tests/e2e/accounts/account_abstraction_test.go @@ -7,13 +7,6 @@ import ( "testing" "cosmossdk.io/simapp" - "cosmossdk.io/x/accounts" - rotationv1 "cosmossdk.io/x/accounts/testing/rotation/v1" - accountsv1 "cosmossdk.io/x/accounts/v1" - "cosmossdk.io/x/bank/testutil" - banktypes "cosmossdk.io/x/bank/types" - "cosmossdk.io/x/nft" - stakingtypes "cosmossdk.io/x/staking/types" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types" @@ -28,6 +21,7 @@ var ( aliceAddr = secp256k1.GenPrivKey().PubKey().Address() ) +/* func TestAccountAbstraction(t *testing.T) { app := setupApp(t) ak := app.AccountsKeeper @@ -59,316 +53,23 @@ func TestAccountAbstraction(t *testing.T) { aliceAddrStr, err := app.AuthKeeper.AddressCodec().BytesToString(aliceAddr) require.NoError(t, err) - t.Run("fail - tx compat in bundle is not allowed", func(t *testing.T) { - resp := ak.ExecuteUserOperation(ctx, bundlerAddrStr, &accountsv1.UserOperation{ - Sender: aaAddrStr, - AuthenticationMethod: "secp256k1", - AuthenticationData: mockSignature, - ExecutionMessages: intoAny(t, &banktypes.MsgSend{ - FromAddress: aaAddrStr, - ToAddress: bundlerAddrStr, - Amount: coins(t, "1stake"), // the sender is the AA, so it has the coins and wants to pay the bundler for the gas - }), - TxCompat: &accountsv1.TxCompat{}, - }) - require.Contains(t, resp.Error, accounts.ErrDisallowedTxCompatInBundle.Error()) - }) + t.Run("ok - pay bundler not implemented", func(t *testing.T) {}) + t.Run("pay bundle impersonation", func(t *testing.T) {}) + t.Run("auth failure", func(t *testing.T) {}) + t.Run("pay bundle failure", func(t *testing.T) {}) + t.Run("exec message failure", func(t *testing.T) {}) - t.Run("ok - pay bundler and exec not implemented", func(t *testing.T) { - // we simulate executing an user operation in an abstracted account - // which only implements the authentication. - resp := ak.ExecuteUserOperation(ctx, bundlerAddrStr, &accountsv1.UserOperation{ - Sender: aaAddrStr, - AuthenticationMethod: "secp256k1", - AuthenticationData: mockSignature, - AuthenticationGasLimit: 10000, - BundlerPaymentMessages: intoAny(t, &banktypes.MsgSend{ - FromAddress: aaAddrStr, - ToAddress: bundlerAddrStr, - Amount: coins(t, "1stake"), // the sender is the AA, so it has the coins and wants to pay the bundler for the gas - }), - BundlerPaymentGasLimit: 50000, - ExecutionMessages: intoAny(t, &banktypes.MsgSend{ - FromAddress: aaAddrStr, - ToAddress: aliceAddrStr, - Amount: coins(t, "2000stake"), // as the real action the sender wants to send coins to alice - }), - ExecutionGasLimit: 38000, - }) - require.Empty(t, resp.Error) // no error - require.Len(t, resp.BundlerPaymentResponses, 1) - require.Len(t, resp.ExecutionResponses, 1) - require.NotZero(t, resp.ExecutionGasUsed) - require.NotZero(t, resp.BundlerPaymentGasUsed) - require.NotZero(t, resp.AuthenticationGasUsed) - // assert there were state changes - balanceIs(t, ctx, app, bundlerAddr.Bytes(), "1stake") // pay bundler state change - balanceIs(t, ctx, app, aliceAddr.Bytes(), "2000stake") // execute messages state change. - }) - t.Run("pay bundle impersonation", func(t *testing.T) { - // we simulate the execution of an abstracted account - // which only implements authentication and tries in the pay - // bundler messages the account tries to impersonate another one. - resp := ak.ExecuteUserOperation(ctx, bundlerAddrStr, &accountsv1.UserOperation{ - Sender: aaAddrStr, - AuthenticationMethod: "secp256k1", - AuthenticationData: mockSignature, - AuthenticationGasLimit: 10000, - BundlerPaymentMessages: intoAny(t, &banktypes.MsgSend{ - FromAddress: bundlerAddrStr, // abstracted account tries to send money from bundler to itself. - ToAddress: aaAddrStr, - Amount: coins(t, "1stake"), - }), - BundlerPaymentGasLimit: 50000, - ExecutionMessages: intoAny(t, &banktypes.MsgSend{ - FromAddress: aaAddrStr, - ToAddress: aliceAddrStr, - Amount: coins(t, "2000stake"), // as the real action the sender wants to send coins to alice - }), - ExecutionGasLimit: 36000, - }) - require.Contains(t, resp.Error, accounts.ErrUnauthorized.Error()) // error is unauthorized - require.Empty(t, resp.BundlerPaymentResponses) // no bundler payment responses, since the atomic exec failed - require.Empty(t, resp.ExecutionResponses) // no execution responses, since the atomic exec failed - require.Zero(t, resp.ExecutionGasUsed) // no execution gas used, since the atomic exec failed - require.NotZero(t, resp.BundlerPaymentGasUsed) // bundler payment gas used, even if the atomic exec failed - }) - t.Run("exec message impersonation", func(t *testing.T) { - // we simulate a case in which the abstracted account tries to impersonate - // someone else in the execution of messages. - resp := ak.ExecuteUserOperation(ctx, bundlerAddrStr, &accountsv1.UserOperation{ - Sender: aaAddrStr, - AuthenticationMethod: "secp256k1", - AuthenticationData: mockSignature, - AuthenticationGasLimit: 10000, - BundlerPaymentMessages: intoAny(t, &banktypes.MsgSend{ - FromAddress: aaAddrStr, - ToAddress: bundlerAddrStr, - Amount: coins(t, "1stake"), - }), - BundlerPaymentGasLimit: 50000, - ExecutionMessages: intoAny(t, &banktypes.MsgSend{ - FromAddress: aliceAddrStr, // abstracted account attempts to send money from alice to itself - ToAddress: aaAddrStr, - Amount: coins(t, "2000stake"), - }), - ExecutionGasLimit: 36000, - }) - require.Contains(t, resp.Error, accounts.ErrUnauthorized.Error()) // error is unauthorized - require.NotEmpty(t, resp.BundlerPaymentResponses) // bundler payment responses, since the bundler payment succeeded - require.Empty(t, resp.ExecutionResponses) // no execution responses, since the atomic exec failed - require.NotZero(t, resp.ExecutionGasUsed) // execution gas used, even if the atomic exec failed - require.NotZero(t, resp.BundlerPaymentGasUsed) // bundler payment gas used, even if the atomic exec failed - }) - t.Run("auth failure", func(t *testing.T) { - // if auth fails nothing more should be attempted, the authentication - // should have spent gas and the error should be returned. - // we simulate a case in which the abstracted account tries to impersonate - // someone else in the execution of messages. - resp := ak.ExecuteUserOperation(ctx, bundlerAddrStr, &accountsv1.UserOperation{ - Sender: aaAddrStr, - AuthenticationMethod: "invalid", - AuthenticationData: mockSignature, - AuthenticationGasLimit: 10000, - BundlerPaymentMessages: intoAny(t, &banktypes.MsgSend{ - FromAddress: aaAddrStr, - ToAddress: bundlerAddrStr, - Amount: coins(t, "1stake"), - }), - BundlerPaymentGasLimit: 50000, - ExecutionMessages: intoAny(t, &banktypes.MsgSend{ - FromAddress: aliceAddrStr, // abstracted account attempts to send money from alice to itself - ToAddress: aaAddrStr, - Amount: coins(t, "2000stake"), - }), - ExecutionGasLimit: 36000, - }) - require.Contains(t, resp.Error, accounts.ErrAuthentication.Error()) // error is authentication - require.Empty(t, resp.BundlerPaymentResponses) // no bundler payment responses, since the atomic exec failed - require.Empty(t, resp.ExecutionResponses) // no execution responses, since the atomic exec failed - require.Zero(t, resp.ExecutionGasUsed) // no execution gas used, since the atomic exec failed - require.Zero(t, resp.BundlerPaymentGasUsed) // no bundler payment gas used, since the atomic exec failed - require.NotZero(t, resp.AuthenticationGasUsed) // authentication gas used, even if the atomic exec failed - }) - t.Run("pay bundle failure", func(t *testing.T) { - // pay bundler fails, nothing more should be attempted, the authentication - // succeeded. We expect gas used in auth and pay bundler step. - // we simulate a case in which the abstracted account tries to impersonate - // someone else in the execution of messages. - resp := ak.ExecuteUserOperation(ctx, bundlerAddrStr, &accountsv1.UserOperation{ - Sender: aaAddrStr, - AuthenticationMethod: "secp256k1", - AuthenticationData: mockSignature, - AuthenticationGasLimit: 10000, - BundlerPaymentMessages: intoAny(t, &banktypes.MsgSend{ - FromAddress: aaAddrStr, - ToAddress: bundlerAddrStr, - Amount: coins(t, "1atom"), // abstracted account does not have enough money to pay the bundler, since it does not hold atom - }), - BundlerPaymentGasLimit: 50000, - ExecutionMessages: intoAny(t, &banktypes.MsgSend{ - FromAddress: aliceAddrStr, // abstracted account attempts to send money from alice to itself - ToAddress: aaAddrStr, - Amount: coins(t, "2000stake"), - }), - ExecutionGasLimit: 36000, - }) - require.Contains(t, resp.Error, accounts.ErrBundlerPayment.Error()) // error is bundler payment - require.Empty(t, resp.BundlerPaymentResponses) // no bundler payment responses, since the atomic exec failed - require.Empty(t, resp.ExecutionResponses) // no execution responses, since the atomic exec failed - require.Zero(t, resp.ExecutionGasUsed) // no execution gas used, since the atomic exec failed - require.NotZero(t, resp.BundlerPaymentGasUsed) // bundler payment gas used, even if the atomic exec failed - require.NotZero(t, resp.AuthenticationGasUsed) // authentication gas used, even if the atomic exec failed - }) - t.Run("exec message failure", func(t *testing.T) { - // execution message fails, nothing more should be attempted, the authentication - // and pay bundler succeeded. We expect gas used in auth, pay bundler and - // execution step. - resp := ak.ExecuteUserOperation(ctx, bundlerAddrStr, &accountsv1.UserOperation{ - Sender: aaAddrStr, - AuthenticationMethod: "secp256k1", - AuthenticationData: mockSignature, - AuthenticationGasLimit: 10000, - BundlerPaymentMessages: intoAny(t, &banktypes.MsgSend{ - FromAddress: aaAddrStr, - ToAddress: bundlerAddrStr, - Amount: coins(t, "1stake"), - }), - BundlerPaymentGasLimit: 50000, - ExecutionMessages: intoAny(t, &banktypes.MsgSend{ - FromAddress: aaAddrStr, - ToAddress: aliceAddrStr, - Amount: coins(t, "2000atom"), // abstracted account does not have enough money to pay alice, since it does not hold atom - }), - ExecutionGasLimit: 36000, - }) - require.Contains(t, resp.Error, accounts.ErrExecution.Error()) // error is execution - require.Len(t, resp.BundlerPaymentResponses, 1) // bundler payment response, since the pay bundler succeeded - require.Empty(t, resp.ExecutionResponses) // no execution responses, since the atomic exec failed - require.NotZero(t, resp.ExecutionGasUsed) // execution gas used, even if the atomic exec failed - require.NotZero(t, resp.BundlerPaymentGasUsed) // bundler payment gas used, even if the atomic exec failed - require.NotZero(t, resp.AuthenticationGasUsed) // authentication gas used, even if the atomic exec failed - }) + t.Run("implements bundler payment - fail ", func(t *testing.T) {}) - t.Run("implements bundler payment - fail ", func(t *testing.T) { - // we assert that if an aa implements the bundler payment interface, then - // that is called. - resp := ak.ExecuteUserOperation(ctx, bundlerAddrStr, &accountsv1.UserOperation{ - Sender: aaFullAddrStr, - AuthenticationMethod: "secp256k1", - AuthenticationData: mockSignature, - AuthenticationGasLimit: 10000, - BundlerPaymentMessages: intoAny(t, &banktypes.MsgSend{ - FromAddress: aaFullAddrStr, - ToAddress: bundlerAddrStr, - Amount: coins(t, "1stake"), // we expect this to fail since the account is implement in such a way not to allow bank sends. - }), - BundlerPaymentGasLimit: 50000, - ExecutionMessages: intoAny(t, &banktypes.MsgSend{ - FromAddress: aaFullAddrStr, - ToAddress: aliceAddrStr, - Amount: coins(t, "2000stake"), - }), - ExecutionGasLimit: 36000, - }) - // in order to assert the call we expect an error to be returned. - require.Contains(t, resp.Error, accounts.ErrBundlerPayment.Error()) // error is bundler payment - require.Contains(t, resp.Error, "this account does not allow bank send messages") // error is bundler payment - }) + t.Run("implements execution - fail", func(t *testing.T) {}) - t.Run("implements execution - fail", func(t *testing.T) { - resp := ak.ExecuteUserOperation(ctx, bundlerAddrStr, &accountsv1.UserOperation{ - Sender: aaFullAddrStr, - AuthenticationMethod: "secp256k1", - AuthenticationData: mockSignature, - AuthenticationGasLimit: 10000, - BundlerPaymentMessages: nil, - BundlerPaymentGasLimit: 50000, - ExecutionMessages: intoAny(t, &stakingtypes.MsgDelegate{ - DelegatorAddress: aaFullAddrStr, - ValidatorAddress: "some-validator", - Amount: coins(t, "2000stake")[0], - }), - ExecutionGasLimit: 36000, - }) - // in order to assert the call we expect an error to be returned. - require.Contains(t, resp.Error, accounts.ErrExecution.Error()) // error is in execution - require.Contains(t, resp.Error, "this account does not allow delegation messages") - }) + t.Run("implements bundler payment and execution - success", func(t *testing.T) {}) - t.Run("implements bundler payment and execution - success", func(t *testing.T) { - // we simulate the abstracted account pays the bundler using an NFT. - require.NoError(t, app.NFTKeeper.SaveClass(ctx, nft.Class{ - Id: "omega-rare", - })) - require.NoError(t, app.NFTKeeper.Mint(ctx, nft.NFT{ - ClassId: "omega-rare", - Id: "the-most-rare", - }, aaFullAddr)) + t.Run("Simulate - OK", func(t *testing.T) {}) - resp := ak.ExecuteUserOperation(ctx, bundlerAddrStr, &accountsv1.UserOperation{ - Sender: aaFullAddrStr, - AuthenticationMethod: "secp256k1", - AuthenticationData: mockSignature, - AuthenticationGasLimit: 10000, - BundlerPaymentMessages: intoAny(t, &nft.MsgSend{ - ClassId: "omega-rare", - Id: "the-most-rare", - Sender: aaFullAddrStr, - Receiver: bundlerAddrStr, - }), - BundlerPaymentGasLimit: 50000, - ExecutionMessages: intoAny(t, &banktypes.MsgSend{ - FromAddress: aaFullAddrStr, - ToAddress: aliceAddrStr, - Amount: coins(t, "2000stake"), - }), - ExecutionGasLimit: 38000, - }) - require.Empty(t, resp.Error) // no error - }) - - t.Run("Simulate - OK", func(t *testing.T) { - queryServer := accounts.NewQueryServer(ak) - - // gas in unspecified - op := &accountsv1.UserOperation{ - Sender: aaAddrStr, - AuthenticationMethod: "secp256k1", - AuthenticationData: mockSignature, - BundlerPaymentMessages: intoAny(t, &banktypes.MsgSend{ - FromAddress: aaAddrStr, - ToAddress: bundlerAddrStr, - Amount: coins(t, "1stake"), - }), - ExecutionMessages: intoAny(t, &banktypes.MsgSend{ - FromAddress: aaAddrStr, - ToAddress: aliceAddrStr, - Amount: coins(t, "2000stake"), - }), - } - queryResp, err := queryServer.SimulateUserOperation(ctx, &accountsv1.SimulateUserOperationRequest{ - Bundler: bundlerAddrStr, - UserOperation: op, - }) - require.NoError(t, err) - - resp := queryResp.UserOperationResponse - require.Empty(t, resp.Error) // no error - require.Len(t, resp.BundlerPaymentResponses, 1) - require.Len(t, resp.ExecutionResponses, 1) - // assess gas is filled - require.NotZero(t, resp.ExecutionGasUsed) - require.NotZero(t, resp.BundlerPaymentGasUsed) - require.NotZero(t, resp.AuthenticationGasUsed) - }) - - t.Run("Simulate - Fail empty user operation", func(t *testing.T) { - queryServer := accounts.NewQueryServer(ak) - _, err := queryServer.SimulateUserOperation(ctx, &accountsv1.SimulateUserOperationRequest{}) - require.Error(t, err) - }) + t.Run("Simulate - Fail empty user operation", func(t *testing.T) {}) } +*/ func intoAny(t *testing.T, msgs ...gogoproto.Message) (anys []*codectypes.Any) { t.Helper() diff --git a/tests/e2e/accounts/base_account_test.go b/tests/e2e/accounts/base_account_test.go new file mode 100644 index 0000000000..60292a3c52 --- /dev/null +++ b/tests/e2e/accounts/base_account_test.go @@ -0,0 +1,84 @@ +//go:build app_v1 + +package accounts + +import ( + "math/rand" + "testing" + + "cosmossdk.io/simapp" + baseaccountv1 "cosmossdk.io/x/accounts/defaults/base/v1" + "cosmossdk.io/x/bank/testutil" + banktypes "cosmossdk.io/x/bank/types" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/cosmos/cosmos-sdk/testutil/sims" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" +) + +func TestBaseAccount(t *testing.T) { + app := setupApp(t) + ak := app.AccountsKeeper + ctx := sdk.NewContext(app.CommitMultiStore(), false, app.Logger()) + + _, baseAccountAddr, err := ak.Init(ctx, "base", accCreator, &baseaccountv1.MsgInit{ + PubKey: privKey.PubKey().Bytes(), + }, nil) + require.NoError(t, err) + + // fund base account! this will also cause an auth base account to be created + // by the bank module. + // TODO: fixed by letting x/auth rely on x/accounts for acc existence checks. + fundAccount(t, app, ctx, baseAccountAddr, "1000000stake") + + // now we make the account send a tx, public key not present. + // so we know it will default to x/accounts calling. + msg := &banktypes.MsgSend{ + FromAddress: bechify(t, app, baseAccountAddr), + ToAddress: bechify(t, app, []byte("random-addr")), + Amount: coins(t, "100stake"), + } + sendTx(t, ctx, app, baseAccountAddr, msg) +} + +func sendTx(t *testing.T, ctx sdk.Context, app *simapp.SimApp, sender []byte, msg sdk.Msg) { + tx := sign(t, ctx, app, sender, privKey, msg) + res, _, err := app.SimDeliver(app.TxEncode, tx) + require.NoError(t, err) + t.Log(res) +} + +func sign(t *testing.T, ctx sdk.Context, app *simapp.SimApp, from sdk.AccAddress, privKey cryptotypes.PrivKey, msg sdk.Msg) sdk.Tx { + r := rand.New(rand.NewSource(0)) + + accNum, err := app.AccountsKeeper.AccountByNumber.Get(ctx, from) + require.NoError(t, err) + accSeq, err := app.AccountsKeeper.Query(ctx, from, &baseaccountv1.QuerySequence{}) + require.NoError(t, err) + + tx, err := sims.GenSignedMockTx( + r, + app.TxConfig(), + []sdk.Msg{msg}, + coins(t, "100stake"), + 1_000_000, + app.ChainID(), + []uint64{accNum}, + []uint64{accSeq.(*baseaccountv1.QuerySequenceResponse).Sequence}, + privKey, + ) + + require.NoError(t, err) + return tx +} + +func bechify(t *testing.T, app *simapp.SimApp, addr []byte) string { + bech32, err := app.AuthKeeper.AddressCodec().BytesToString(addr) + require.NoError(t, err) + return bech32 +} + +func fundAccount(t *testing.T, app *simapp.SimApp, ctx sdk.Context, addr sdk.AccAddress, amt string) { + require.NoError(t, testutil.FundAccount(ctx, app.BankKeeper, addr, coins(t, amt))) + +} diff --git a/x/accounts/accountstd/exports.go b/x/accounts/accountstd/exports.go index 2635351e3c..ea181db0a6 100644 --- a/x/accounts/accountstd/exports.go +++ b/x/accounts/accountstd/exports.go @@ -73,6 +73,14 @@ func Sender(ctx context.Context) []byte { return implementation.Sender(ctx) } +// HasSender checks if the execution context was sent from the provided sender +func HasSender(ctx context.Context, wantSender []byte) bool { + return bytes.Equal(Sender(ctx), wantSender) +} + +// SenderIsSelf checks if the sender of the request is the account itself. +func SenderIsSelf(ctx context.Context) bool { return HasSender(ctx, Whoami(ctx)) } + // SenderIsAccountsModule returns true if the sender of the execution request is the accounts module. func SenderIsAccountsModule(ctx context.Context) bool { return bytes.Equal(Sender(ctx), accountsModuleAddress) diff --git a/x/accounts/coin_transfer.go b/x/accounts/coin_transfer.go index 9d200adba2..3f0c852bb3 100644 --- a/x/accounts/coin_transfer.go +++ b/x/accounts/coin_transfer.go @@ -11,6 +11,16 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) +// coinsTransferMsgFunc defines a function that creates a message to send coins from one +// address to the other, and also a message that parses such response. +// This in most cases will be implemented as a bank.MsgSend creator, but we keep x/accounts independent of bank. +type coinsTransferMsgFunc = func(from, to []byte, coins sdk.Coins) (implementation.ProtoMsg, implementation.ProtoMsg, error) + +type gogoProtoPlusV2 interface { + proto.Message + implementation.ProtoMsg +} + // protoV2GogoWrapper is a wrapper of a protov2 message into a gogo message. // this is exceptionally allowed to enable accounts to be decoupled from // the SDK, since x/accounts can support only protov1 in its APIs. diff --git a/x/accounts/defaults/base/account.go b/x/accounts/defaults/base/account.go new file mode 100644 index 0000000000..8f16a64fa8 --- /dev/null +++ b/x/accounts/defaults/base/account.go @@ -0,0 +1,216 @@ +package base + +import ( + "context" + "fmt" + + dcrd_secp256k1 "github.com/decred/dcrd/dcrec/secp256k1/v4" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/anypb" + + signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1" + txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" + "cosmossdk.io/collections" + "cosmossdk.io/core/address" + "cosmossdk.io/core/header" + "cosmossdk.io/x/accounts/accountstd" + v1 "cosmossdk.io/x/accounts/defaults/base/v1" + aa_interface_v1 "cosmossdk.io/x/accounts/interfaces/account_abstraction/v1" + accountsv1 "cosmossdk.io/x/accounts/v1" + "cosmossdk.io/x/tx/signing" + + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + "github.com/cosmos/cosmos-sdk/types/tx" +) + +var ( + PubKeyPrefix = collections.NewPrefix(0) + SequencePrefix = collections.NewPrefix(1) +) + +func NewAccount(name string, handlerMap *signing.HandlerMap) accountstd.AccountCreatorFunc { + return func(deps accountstd.Dependencies) (string, accountstd.Interface, error) { + return name, Account{ + PubKey: collections.NewItem(deps.SchemaBuilder, PubKeyPrefix, "pub_key", codec.CollValue[secp256k1.PubKey](deps.LegacyStateCodec)), + Sequence: collections.NewSequence(deps.SchemaBuilder, SequencePrefix, "sequence"), + addrCodec: deps.AddressCodec, + hs: deps.HeaderService, + signingHandlers: handlerMap, + }, nil + } +} + +// Account implements a base account. +type Account struct { + PubKey collections.Item[secp256k1.PubKey] + Sequence collections.Sequence + + addrCodec address.Codec + hs header.Service + + signingHandlers *signing.HandlerMap +} + +func (a Account) Init(ctx context.Context, msg *v1.MsgInit) (*v1.MsgInitResponse, error) { + return &v1.MsgInitResponse{}, a.verifyAndSetPubKey(ctx, msg.PubKey) +} + +func (a Account) SwapPubKey(ctx context.Context, msg *v1.MsgSwapPubKey) (*v1.MsgSwapPubKeyResponse, error) { + if !accountstd.SenderIsSelf(ctx) { + return nil, fmt.Errorf("unauthorized") + } + + return &v1.MsgSwapPubKeyResponse{}, a.verifyAndSetPubKey(ctx, msg.NewPubKey) +} + +func (a Account) verifyAndSetPubKey(ctx context.Context, key []byte) error { + _, err := dcrd_secp256k1.ParsePubKey(key) + if err != nil { + return err + } + return a.PubKey.Set(ctx, secp256k1.PubKey{Key: key}) +} + +// Authenticate implements the authentication flow of an abstracted base account. +func (a Account) Authenticate(ctx context.Context, msg *aa_interface_v1.MsgAuthenticate) (*aa_interface_v1.MsgAuthenticateResponse, error) { + if !accountstd.SenderIsAccountsModule(ctx) { + return nil, fmt.Errorf("unauthorized: only accounts module is allowed to call this") + } + + pubKey, signerData, err := a.computeSignerData(ctx) + if err != nil { + return nil, err + } + + txData, err := a.getTxData(msg) + if err != nil { + return nil, err + } + + gotSeq := msg.Tx.AuthInfo.SignerInfos[msg.SignerIndex].Sequence + if gotSeq != signerData.Sequence { + return nil, fmt.Errorf("unexpected sequence number, wanted: %d, got: %d", signerData.Sequence, gotSeq) + } + + signMode, err := parseSignMode(msg.Tx.AuthInfo.SignerInfos[msg.SignerIndex].ModeInfo) + if err != nil { + return nil, fmt.Errorf("unable to parse sign mode: %w", err) + } + + signature := msg.Tx.Signatures[msg.SignerIndex] + + signBytes, err := a.signingHandlers.GetSignBytes(ctx, signMode, signerData, txData) + if err != nil { + return nil, err + } + + if !pubKey.VerifySignature(signBytes, signature) { + return nil, fmt.Errorf("signature verification failed") + } + + return &aa_interface_v1.MsgAuthenticateResponse{}, nil +} + +func parseSignMode(info *tx.ModeInfo) (signingv1beta1.SignMode, error) { + single, ok := info.Sum.(*tx.ModeInfo_Single_) + if !ok { + return 0, fmt.Errorf("only sign mode single accepted got: %v", info.Sum) + } + return signingv1beta1.SignMode(single.Single.Mode), nil +} + +// computeSignerData will populate signer data and also increase the sequence. +func (a Account) computeSignerData(ctx context.Context) (secp256k1.PubKey, signing.SignerData, error) { + addrStr, err := a.addrCodec.BytesToString(accountstd.Whoami(ctx)) + if err != nil { + return secp256k1.PubKey{}, signing.SignerData{}, err + } + chainID := a.hs.GetHeaderInfo(ctx).ChainID + + wantSequence, err := a.Sequence.Next(ctx) + if err != nil { + return secp256k1.PubKey{}, signing.SignerData{}, err + } + + pk, err := a.PubKey.Get(ctx) + if err != nil { + return secp256k1.PubKey{}, signing.SignerData{}, err + } + + pkAny, err := codectypes.NewAnyWithValue(&pk) + if err != nil { + return secp256k1.PubKey{}, signing.SignerData{}, err + } + + accNum, err := a.getNumber(ctx, addrStr) + if err != nil { + return secp256k1.PubKey{}, signing.SignerData{}, err + } + + return pk, signing.SignerData{ + Address: addrStr, + ChainID: chainID, + AccountNumber: accNum, + Sequence: wantSequence, + PubKey: &anypb.Any{ + TypeUrl: pkAny.TypeUrl, + Value: pkAny.Value, + }, + }, nil +} + +func (a Account) getNumber(ctx context.Context, addrStr string) (uint64, error) { + accNum, err := accountstd.QueryModule[accountsv1.AccountNumberResponse](ctx, &accountsv1.AccountNumberRequest{Address: addrStr}) + if err != nil { + return 0, err + } + + return accNum.Number, nil +} + +func (a Account) getTxData(msg *aa_interface_v1.MsgAuthenticate) (signing.TxData, error) { + // TODO: add a faster way to do this, we can avoid unmarshalling but we need + // to write a function that converts this into the protov2 counterparty. + txBody := new(txv1beta1.TxBody) + err := proto.Unmarshal(msg.RawTx.BodyBytes, txBody) + if err != nil { + return signing.TxData{}, err + } + + authInfo := new(txv1beta1.AuthInfo) + err = proto.Unmarshal(msg.RawTx.AuthInfoBytes, authInfo) + if err != nil { + return signing.TxData{}, err + } + + return signing.TxData{ + Body: txBody, + AuthInfo: authInfo, + BodyBytes: msg.RawTx.BodyBytes, + AuthInfoBytes: msg.RawTx.AuthInfoBytes, + BodyHasUnknownNonCriticals: false, // NOTE: amino signing must be disabled. + }, nil +} + +func (a Account) QuerySequence(ctx context.Context, _ *v1.QuerySequence) (*v1.QuerySequenceResponse, error) { + seq, err := a.Sequence.Peek(ctx) + if err != nil { + return nil, err + } + return &v1.QuerySequenceResponse{Sequence: seq}, nil +} + +func (a Account) RegisterInitHandler(builder *accountstd.InitBuilder) { + accountstd.RegisterInitHandler(builder, a.Init) +} + +func (a Account) RegisterExecuteHandlers(builder *accountstd.ExecuteBuilder) { + accountstd.RegisterExecuteHandler(builder, a.SwapPubKey) + accountstd.RegisterExecuteHandler(builder, a.Authenticate) // account abstraction +} + +func (a Account) RegisterQueryHandlers(builder *accountstd.QueryBuilder) { + accountstd.RegisterQueryHandler(builder, a.QuerySequence) +} diff --git a/x/accounts/defaults/base/v1/base.pb.go b/x/accounts/defaults/base/v1/base.pb.go new file mode 100644 index 0000000000..4affa55d70 --- /dev/null +++ b/x/accounts/defaults/base/v1/base.pb.go @@ -0,0 +1,1018 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/accounts/defaults/base/v1/base.proto + +package v1 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgInit is used to initialize a base account. +type MsgInit struct { + // pub_key defines the secp256k1 pubkey for the account. + PubKey []byte `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` +} + +func (m *MsgInit) Reset() { *m = MsgInit{} } +func (m *MsgInit) String() string { return proto.CompactTextString(m) } +func (*MsgInit) ProtoMessage() {} +func (*MsgInit) Descriptor() ([]byte, []int) { + return fileDescriptor_7c860870b5ed6dc2, []int{0} +} +func (m *MsgInit) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgInit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgInit.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 *MsgInit) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgInit.Merge(m, src) +} +func (m *MsgInit) XXX_Size() int { + return m.Size() +} +func (m *MsgInit) XXX_DiscardUnknown() { + xxx_messageInfo_MsgInit.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgInit proto.InternalMessageInfo + +func (m *MsgInit) GetPubKey() []byte { + if m != nil { + return m.PubKey + } + return nil +} + +// MsgInitResponse is the response returned after base account initialization. +// This is empty. +type MsgInitResponse struct { +} + +func (m *MsgInitResponse) Reset() { *m = MsgInitResponse{} } +func (m *MsgInitResponse) String() string { return proto.CompactTextString(m) } +func (*MsgInitResponse) ProtoMessage() {} +func (*MsgInitResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c860870b5ed6dc2, []int{1} +} +func (m *MsgInitResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgInitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgInitResponse.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 *MsgInitResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgInitResponse.Merge(m, src) +} +func (m *MsgInitResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgInitResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgInitResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgInitResponse proto.InternalMessageInfo + +// MsgSwapPubKey is used to change the pubkey for the account. +type MsgSwapPubKey struct { + // new_pub_key defines the secp256k1 pubkey to swap the account to. + NewPubKey []byte `protobuf:"bytes,1,opt,name=new_pub_key,json=newPubKey,proto3" json:"new_pub_key,omitempty"` +} + +func (m *MsgSwapPubKey) Reset() { *m = MsgSwapPubKey{} } +func (m *MsgSwapPubKey) String() string { return proto.CompactTextString(m) } +func (*MsgSwapPubKey) ProtoMessage() {} +func (*MsgSwapPubKey) Descriptor() ([]byte, []int) { + return fileDescriptor_7c860870b5ed6dc2, []int{2} +} +func (m *MsgSwapPubKey) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSwapPubKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSwapPubKey.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 *MsgSwapPubKey) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSwapPubKey.Merge(m, src) +} +func (m *MsgSwapPubKey) XXX_Size() int { + return m.Size() +} +func (m *MsgSwapPubKey) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSwapPubKey.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSwapPubKey proto.InternalMessageInfo + +func (m *MsgSwapPubKey) GetNewPubKey() []byte { + if m != nil { + return m.NewPubKey + } + return nil +} + +// MsgSwapPubKeyResponse is the response for the MsgSwapPubKey message. +// This is empty. +type MsgSwapPubKeyResponse struct { +} + +func (m *MsgSwapPubKeyResponse) Reset() { *m = MsgSwapPubKeyResponse{} } +func (m *MsgSwapPubKeyResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSwapPubKeyResponse) ProtoMessage() {} +func (*MsgSwapPubKeyResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c860870b5ed6dc2, []int{3} +} +func (m *MsgSwapPubKeyResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSwapPubKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSwapPubKeyResponse.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 *MsgSwapPubKeyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSwapPubKeyResponse.Merge(m, src) +} +func (m *MsgSwapPubKeyResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSwapPubKeyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSwapPubKeyResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSwapPubKeyResponse proto.InternalMessageInfo + +// QuerySequence is the request for the account sequence. +type QuerySequence struct { +} + +func (m *QuerySequence) Reset() { *m = QuerySequence{} } +func (m *QuerySequence) String() string { return proto.CompactTextString(m) } +func (*QuerySequence) ProtoMessage() {} +func (*QuerySequence) Descriptor() ([]byte, []int) { + return fileDescriptor_7c860870b5ed6dc2, []int{4} +} +func (m *QuerySequence) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySequence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySequence.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 *QuerySequence) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySequence.Merge(m, src) +} +func (m *QuerySequence) XXX_Size() int { + return m.Size() +} +func (m *QuerySequence) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySequence.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySequence proto.InternalMessageInfo + +// QuerySequenceResponse returns the sequence of the account. +type QuerySequenceResponse struct { + // sequence is the current sequence of the account. + Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"` +} + +func (m *QuerySequenceResponse) Reset() { *m = QuerySequenceResponse{} } +func (m *QuerySequenceResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySequenceResponse) ProtoMessage() {} +func (*QuerySequenceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c860870b5ed6dc2, []int{5} +} +func (m *QuerySequenceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySequenceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySequenceResponse.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 *QuerySequenceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySequenceResponse.Merge(m, src) +} +func (m *QuerySequenceResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySequenceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySequenceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySequenceResponse proto.InternalMessageInfo + +func (m *QuerySequenceResponse) GetSequence() uint64 { + if m != nil { + return m.Sequence + } + return 0 +} + +func init() { + proto.RegisterType((*MsgInit)(nil), "cosmos.accounts.defaults.base.v1.MsgInit") + proto.RegisterType((*MsgInitResponse)(nil), "cosmos.accounts.defaults.base.v1.MsgInitResponse") + proto.RegisterType((*MsgSwapPubKey)(nil), "cosmos.accounts.defaults.base.v1.MsgSwapPubKey") + proto.RegisterType((*MsgSwapPubKeyResponse)(nil), "cosmos.accounts.defaults.base.v1.MsgSwapPubKeyResponse") + proto.RegisterType((*QuerySequence)(nil), "cosmos.accounts.defaults.base.v1.QuerySequence") + proto.RegisterType((*QuerySequenceResponse)(nil), "cosmos.accounts.defaults.base.v1.QuerySequenceResponse") +} + +func init() { + proto.RegisterFile("cosmos/accounts/defaults/base/v1/base.proto", fileDescriptor_7c860870b5ed6dc2) +} + +var fileDescriptor_7c860870b5ed6dc2 = []byte{ + // 254 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x4e, 0xce, 0x2f, 0xce, + 0xcd, 0x2f, 0xd6, 0x4f, 0x4c, 0x4e, 0xce, 0x2f, 0xcd, 0x2b, 0x29, 0xd6, 0x4f, 0x49, 0x4d, 0x4b, + 0x2c, 0xcd, 0x29, 0x29, 0xd6, 0x4f, 0x4a, 0x2c, 0x4e, 0xd5, 0x2f, 0x33, 0x04, 0xd3, 0x7a, 0x05, + 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x0a, 0x10, 0xc5, 0x7a, 0x30, 0xc5, 0x7a, 0x30, 0xc5, 0x7a, 0x60, + 0x45, 0x65, 0x86, 0x4a, 0x4a, 0x5c, 0xec, 0xbe, 0xc5, 0xe9, 0x9e, 0x79, 0x99, 0x25, 0x42, 0xe2, + 0x5c, 0xec, 0x05, 0xa5, 0x49, 0xf1, 0xd9, 0xa9, 0x95, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x3c, 0x41, + 0x6c, 0x05, 0xa5, 0x49, 0xde, 0xa9, 0x95, 0x4a, 0x82, 0x5c, 0xfc, 0x50, 0x35, 0x41, 0xa9, 0xc5, + 0x05, 0xf9, 0x79, 0xc5, 0xa9, 0x4a, 0xfa, 0x5c, 0xbc, 0xbe, 0xc5, 0xe9, 0xc1, 0xe5, 0x89, 0x05, + 0x01, 0x60, 0x35, 0x42, 0x72, 0x5c, 0xdc, 0x79, 0xa9, 0xe5, 0xf1, 0xa8, 0x06, 0x70, 0xe6, 0xa5, + 0x96, 0x43, 0xe4, 0x95, 0xc4, 0xb9, 0x44, 0x51, 0x34, 0xc0, 0x4d, 0xe2, 0xe7, 0xe2, 0x0d, 0x2c, + 0x4d, 0x2d, 0xaa, 0x0c, 0x4e, 0x2d, 0x2c, 0x4d, 0xcd, 0x4b, 0x4e, 0x55, 0x32, 0xe6, 0x12, 0x45, + 0x11, 0x80, 0xa9, 0x14, 0x92, 0xe2, 0xe2, 0x28, 0x86, 0x8a, 0x81, 0xcd, 0x67, 0x09, 0x82, 0xf3, + 0x9d, 0x9c, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, + 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, 0x03, 0x12, 0x04, + 0xc5, 0x29, 0xd9, 0x7a, 0x99, 0xf9, 0xfa, 0x15, 0xb8, 0xc3, 0x2d, 0x89, 0x0d, 0x1c, 0x66, 0xc6, + 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x99, 0x31, 0x20, 0x4a, 0x62, 0x01, 0x00, 0x00, +} + +func (m *MsgInit) 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 *MsgInit) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgInit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PubKey) > 0 { + i -= len(m.PubKey) + copy(dAtA[i:], m.PubKey) + i = encodeVarintBase(dAtA, i, uint64(len(m.PubKey))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgInitResponse) 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 *MsgInitResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgInitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgSwapPubKey) 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 *MsgSwapPubKey) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSwapPubKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NewPubKey) > 0 { + i -= len(m.NewPubKey) + copy(dAtA[i:], m.NewPubKey) + i = encodeVarintBase(dAtA, i, uint64(len(m.NewPubKey))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSwapPubKeyResponse) 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 *MsgSwapPubKeyResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSwapPubKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QuerySequence) 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 *QuerySequence) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySequence) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QuerySequenceResponse) 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 *QuerySequenceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySequenceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Sequence != 0 { + i = encodeVarintBase(dAtA, i, uint64(m.Sequence)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintBase(dAtA []byte, offset int, v uint64) int { + offset -= sovBase(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgInit) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PubKey) + if l > 0 { + n += 1 + l + sovBase(uint64(l)) + } + return n +} + +func (m *MsgInitResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgSwapPubKey) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.NewPubKey) + if l > 0 { + n += 1 + l + sovBase(uint64(l)) + } + return n +} + +func (m *MsgSwapPubKeyResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QuerySequence) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QuerySequenceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Sequence != 0 { + n += 1 + sovBase(uint64(m.Sequence)) + } + return n +} + +func sovBase(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozBase(x uint64) (n int) { + return sovBase(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgInit) 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 ErrIntOverflowBase + } + 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: MsgInit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgInit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PubKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBase + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthBase + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthBase + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PubKey = append(m.PubKey[:0], dAtA[iNdEx:postIndex]...) + if m.PubKey == nil { + m.PubKey = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipBase(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBase + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgInitResponse) 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 ErrIntOverflowBase + } + 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: MsgInitResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgInitResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipBase(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBase + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSwapPubKey) 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 ErrIntOverflowBase + } + 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: MsgSwapPubKey: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSwapPubKey: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewPubKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBase + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthBase + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthBase + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NewPubKey = append(m.NewPubKey[:0], dAtA[iNdEx:postIndex]...) + if m.NewPubKey == nil { + m.NewPubKey = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipBase(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBase + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSwapPubKeyResponse) 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 ErrIntOverflowBase + } + 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: MsgSwapPubKeyResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSwapPubKeyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipBase(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBase + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySequence) 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 ErrIntOverflowBase + } + 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: QuerySequence: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySequence: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipBase(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBase + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySequenceResponse) 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 ErrIntOverflowBase + } + 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: QuerySequenceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySequenceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + m.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBase + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipBase(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBase + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipBase(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowBase + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowBase + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowBase + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthBase + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupBase + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthBase + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthBase = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowBase = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupBase = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/accounts/go.mod b/x/accounts/go.mod index 4fe06dcde5..38decc33c3 100644 --- a/x/accounts/go.mod +++ b/x/accounts/go.mod @@ -7,8 +7,10 @@ require ( cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.1-0.20231114100755-569e3ff6a0d7 cosmossdk.io/depinject v1.0.0-alpha.4 + cosmossdk.io/x/tx v0.13.0 github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/gogoproto v1.4.11 + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.8.4 @@ -23,7 +25,6 @@ require ( cosmossdk.io/math v1.2.0 // indirect cosmossdk.io/store v1.0.2 // indirect cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 // indirect - cosmossdk.io/x/tx v0.13.0 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect @@ -53,7 +54,6 @@ require ( github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/danieljoos/wincred v1.2.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect diff --git a/x/accounts/interfaces/account_abstraction/v1/interface.pb.go b/x/accounts/interfaces/account_abstraction/v1/interface.pb.go index ee4fb356ee..b37b2378b2 100644 --- a/x/accounts/interfaces/account_abstraction/v1/interface.pb.go +++ b/x/accounts/interfaces/account_abstraction/v1/interface.pb.go @@ -4,9 +4,9 @@ package v1 import ( - v1 "cosmossdk.io/x/accounts/v1" fmt "fmt" - types "github.com/cosmos/cosmos-sdk/codec/types" + _ "github.com/cosmos/cosmos-sdk/codec/types" + tx "github.com/cosmos/cosmos-sdk/types/tx" proto "github.com/cosmos/gogoproto/proto" io "io" math "math" @@ -25,15 +25,20 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // MsgAuthenticate is a message that an x/account account abstraction implementer -// must handle to authenticate a state transition. +// must handle to authenticate a transaction. Always ensure the caller is the Accounts module. type MsgAuthenticate struct { // bundler defines the address of the bundler that sent the operation. // NOTE: in case the operation was sent directly by the user, this field will reflect // the user address. Bundler string `protobuf:"bytes,1,opt,name=bundler,proto3" json:"bundler,omitempty"` - // user_operation is the operation that the user is trying to perform. - // it also contains authentication information. - UserOperation *v1.UserOperation `protobuf:"bytes,2,opt,name=user_operation,json=userOperation,proto3" json:"user_operation,omitempty"` + // raw_tx defines the raw version of the tx, this is useful to compute the signature quickly. + RawTx *tx.TxRaw `protobuf:"bytes,2,opt,name=raw_tx,json=rawTx,proto3" json:"raw_tx,omitempty"` + // tx defines the decoded version of the tx, coming from raw_tx. + Tx *tx.Tx `protobuf:"bytes,3,opt,name=tx,proto3" json:"tx,omitempty"` + // signer_index defines the index of the signer in the tx. + // Specifically this can be used to extract the signature at the correct + // index. + SignerIndex uint32 `protobuf:"varint,4,opt,name=signer_index,json=signerIndex,proto3" json:"signer_index,omitempty"` } func (m *MsgAuthenticate) Reset() { *m = MsgAuthenticate{} } @@ -76,13 +81,27 @@ func (m *MsgAuthenticate) GetBundler() string { return "" } -func (m *MsgAuthenticate) GetUserOperation() *v1.UserOperation { +func (m *MsgAuthenticate) GetRawTx() *tx.TxRaw { if m != nil { - return m.UserOperation + return m.RawTx } return nil } +func (m *MsgAuthenticate) GetTx() *tx.Tx { + if m != nil { + return m.Tx + } + return nil +} + +func (m *MsgAuthenticate) GetSignerIndex() uint32 { + if m != nil { + return m.SignerIndex + } + return 0 +} + // MsgAuthenticateResponse is the response to MsgAuthenticate. // The authentication either fails or succeeds, this is why // there are no auxiliary fields to the response. @@ -122,221 +141,6 @@ func (m *MsgAuthenticateResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgAuthenticateResponse proto.InternalMessageInfo -// MsgPayBundler is a message that an x/account account abstraction implementer -// can optionally implement in case it wants to further refine control over -// the bundler payment messages. -// The account must ensure the caller of this message is the x/accounts module itself. -type MsgPayBundler struct { - // bundler is the address of the bundler. - // NOTE: in case the operation was sent directly by the user, this field will - // reflect the user address. - Bundler string `protobuf:"bytes,1,opt,name=bundler,proto3" json:"bundler,omitempty"` - // bundler_payment_messages are the messages that the operation sender will execute. - // The account can modify the messages as it sees fit. - BundlerPaymentMessages []*types.Any `protobuf:"bytes,2,rep,name=bundler_payment_messages,json=bundlerPaymentMessages,proto3" json:"bundler_payment_messages,omitempty"` -} - -func (m *MsgPayBundler) Reset() { *m = MsgPayBundler{} } -func (m *MsgPayBundler) String() string { return proto.CompactTextString(m) } -func (*MsgPayBundler) ProtoMessage() {} -func (*MsgPayBundler) Descriptor() ([]byte, []int) { - return fileDescriptor_56b360422260e9d1, []int{2} -} -func (m *MsgPayBundler) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgPayBundler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgPayBundler.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 *MsgPayBundler) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgPayBundler.Merge(m, src) -} -func (m *MsgPayBundler) XXX_Size() int { - return m.Size() -} -func (m *MsgPayBundler) XXX_DiscardUnknown() { - xxx_messageInfo_MsgPayBundler.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgPayBundler proto.InternalMessageInfo - -func (m *MsgPayBundler) GetBundler() string { - if m != nil { - return m.Bundler - } - return "" -} - -func (m *MsgPayBundler) GetBundlerPaymentMessages() []*types.Any { - if m != nil { - return m.BundlerPaymentMessages - } - return nil -} - -// MsgPayBundlerResponse is the response to MsgPayBundler. -type MsgPayBundlerResponse struct { - // bundler_payment_messages_response are the messages that the bundler will pay for. - BundlerPaymentMessagesResponse []*types.Any `protobuf:"bytes,1,rep,name=bundler_payment_messages_response,json=bundlerPaymentMessagesResponse,proto3" json:"bundler_payment_messages_response,omitempty"` -} - -func (m *MsgPayBundlerResponse) Reset() { *m = MsgPayBundlerResponse{} } -func (m *MsgPayBundlerResponse) String() string { return proto.CompactTextString(m) } -func (*MsgPayBundlerResponse) ProtoMessage() {} -func (*MsgPayBundlerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_56b360422260e9d1, []int{3} -} -func (m *MsgPayBundlerResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgPayBundlerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgPayBundlerResponse.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 *MsgPayBundlerResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgPayBundlerResponse.Merge(m, src) -} -func (m *MsgPayBundlerResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgPayBundlerResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgPayBundlerResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgPayBundlerResponse proto.InternalMessageInfo - -func (m *MsgPayBundlerResponse) GetBundlerPaymentMessagesResponse() []*types.Any { - if m != nil { - return m.BundlerPaymentMessagesResponse - } - return nil -} - -// MsgExecute is a message that an x/account account abstraction implementer -// can optionally implement in case it wants to further refine control over -// the execution messages. It can be used to extend the execution flow, possibly -// block certain messages, or modify them. -// The account must ensure the caller of this message is the x/accounts module itself. -type MsgExecute struct { - // bundler is the address of the bundler. - // NOTE: in case the operation was sent directly by the user, this field will - // reflect the user address. - Bundler string `protobuf:"bytes,1,opt,name=bundler,proto3" json:"bundler,omitempty"` - // execution_messages are the messages that the operation sender will execute. - // The account can modify the messages as it sees fit. - ExecutionMessages []*types.Any `protobuf:"bytes,2,rep,name=execution_messages,json=executionMessages,proto3" json:"execution_messages,omitempty"` -} - -func (m *MsgExecute) Reset() { *m = MsgExecute{} } -func (m *MsgExecute) String() string { return proto.CompactTextString(m) } -func (*MsgExecute) ProtoMessage() {} -func (*MsgExecute) Descriptor() ([]byte, []int) { - return fileDescriptor_56b360422260e9d1, []int{4} -} -func (m *MsgExecute) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgExecute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgExecute.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 *MsgExecute) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgExecute.Merge(m, src) -} -func (m *MsgExecute) XXX_Size() int { - return m.Size() -} -func (m *MsgExecute) XXX_DiscardUnknown() { - xxx_messageInfo_MsgExecute.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgExecute proto.InternalMessageInfo - -func (m *MsgExecute) GetBundler() string { - if m != nil { - return m.Bundler - } - return "" -} - -func (m *MsgExecute) GetExecutionMessages() []*types.Any { - if m != nil { - return m.ExecutionMessages - } - return nil -} - -// MsgExecuteResponse is the response to MsgExecute. -type MsgExecuteResponse struct { - // execution_messages_response are the messages that the operation sender will execute. - ExecutionMessagesResponse []*types.Any `protobuf:"bytes,1,rep,name=execution_messages_response,json=executionMessagesResponse,proto3" json:"execution_messages_response,omitempty"` -} - -func (m *MsgExecuteResponse) Reset() { *m = MsgExecuteResponse{} } -func (m *MsgExecuteResponse) String() string { return proto.CompactTextString(m) } -func (*MsgExecuteResponse) ProtoMessage() {} -func (*MsgExecuteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_56b360422260e9d1, []int{5} -} -func (m *MsgExecuteResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgExecuteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgExecuteResponse.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 *MsgExecuteResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgExecuteResponse.Merge(m, src) -} -func (m *MsgExecuteResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgExecuteResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgExecuteResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgExecuteResponse proto.InternalMessageInfo - -func (m *MsgExecuteResponse) GetExecutionMessagesResponse() []*types.Any { - if m != nil { - return m.ExecutionMessagesResponse - } - return nil -} - // QueryAuthenticationMethods is a query that an x/account account abstraction implementer // must handle to return the authentication methods that the account supports. type QueryAuthenticationMethods struct { @@ -346,7 +150,7 @@ func (m *QueryAuthenticationMethods) Reset() { *m = QueryAuthenticationM func (m *QueryAuthenticationMethods) String() string { return proto.CompactTextString(m) } func (*QueryAuthenticationMethods) ProtoMessage() {} func (*QueryAuthenticationMethods) Descriptor() ([]byte, []int) { - return fileDescriptor_56b360422260e9d1, []int{6} + return fileDescriptor_56b360422260e9d1, []int{2} } func (m *QueryAuthenticationMethods) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -385,7 +189,7 @@ func (m *QueryAuthenticationMethodsResponse) Reset() { *m = QueryAuthent func (m *QueryAuthenticationMethodsResponse) String() string { return proto.CompactTextString(m) } func (*QueryAuthenticationMethodsResponse) ProtoMessage() {} func (*QueryAuthenticationMethodsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_56b360422260e9d1, []int{7} + return fileDescriptor_56b360422260e9d1, []int{3} } func (m *QueryAuthenticationMethodsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -424,10 +228,6 @@ func (m *QueryAuthenticationMethodsResponse) GetAuthenticationMethods() []string func init() { proto.RegisterType((*MsgAuthenticate)(nil), "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticate") proto.RegisterType((*MsgAuthenticateResponse)(nil), "cosmos.accounts.interfaces.account_abstraction.v1.MsgAuthenticateResponse") - proto.RegisterType((*MsgPayBundler)(nil), "cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundler") - proto.RegisterType((*MsgPayBundlerResponse)(nil), "cosmos.accounts.interfaces.account_abstraction.v1.MsgPayBundlerResponse") - proto.RegisterType((*MsgExecute)(nil), "cosmos.accounts.interfaces.account_abstraction.v1.MsgExecute") - proto.RegisterType((*MsgExecuteResponse)(nil), "cosmos.accounts.interfaces.account_abstraction.v1.MsgExecuteResponse") proto.RegisterType((*QueryAuthenticationMethods)(nil), "cosmos.accounts.interfaces.account_abstraction.v1.QueryAuthenticationMethods") proto.RegisterType((*QueryAuthenticationMethodsResponse)(nil), "cosmos.accounts.interfaces.account_abstraction.v1.QueryAuthenticationMethodsResponse") } @@ -437,35 +237,30 @@ func init() { } var fileDescriptor_56b360422260e9d1 = []byte{ - // 438 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x3d, 0x6f, 0xd3, 0x40, - 0x18, 0xc7, 0xe3, 0x22, 0x81, 0xfa, 0x54, 0x05, 0x61, 0xd1, 0xe2, 0x04, 0x64, 0xa5, 0x9e, 0x32, - 0xa0, 0xb3, 0x5c, 0xc4, 0xc0, 0x98, 0x22, 0x24, 0x96, 0x40, 0x31, 0xb0, 0xc0, 0x60, 0x5d, 0x9c, - 0xa7, 0xae, 0x69, 0x73, 0x17, 0xdd, 0x73, 0x67, 0xc5, 0xdf, 0x82, 0x8f, 0xc5, 0xd8, 0x91, 0x11, - 0x25, 0x5f, 0x04, 0xe1, 0xb7, 0xb4, 0xa9, 0x53, 0xa5, 0x9b, 0xcf, 0xfe, 0x3d, 0xff, 0x97, 0x3b, - 0x1f, 0x0c, 0x63, 0x49, 0x53, 0x49, 0x3e, 0x8f, 0x63, 0x69, 0x84, 0x26, 0x3f, 0x15, 0x1a, 0xd5, - 0x19, 0x8f, 0xb1, 0x79, 0x17, 0xf1, 0x31, 0x69, 0xc5, 0x63, 0x9d, 0x4a, 0xe1, 0x67, 0xc1, 0x8a, - 0x60, 0x33, 0x25, 0xb5, 0xb4, 0x83, 0x52, 0x82, 0xd5, 0x12, 0x6c, 0x25, 0xc1, 0x5a, 0x24, 0x58, - 0x16, 0xf4, 0xba, 0x89, 0x94, 0xc9, 0x25, 0xfa, 0x85, 0xc0, 0xd8, 0x9c, 0xf9, 0x5c, 0xe4, 0xa5, - 0x5a, 0xef, 0xd5, 0x7a, 0xa0, 0x2c, 0x68, 0x0b, 0x52, 0xd2, 0x9e, 0x81, 0x27, 0x23, 0x4a, 0x86, - 0x46, 0x9f, 0xa3, 0xd0, 0x69, 0xcc, 0x35, 0xda, 0x0e, 0x3c, 0x1a, 0x1b, 0x31, 0xb9, 0x44, 0xe5, - 0x58, 0x7d, 0x6b, 0xb0, 0x1b, 0xd6, 0x4b, 0xfb, 0x03, 0x3c, 0x36, 0x84, 0x2a, 0x92, 0x33, 0x54, - 0xfc, 0xbf, 0x88, 0xb3, 0xd3, 0xb7, 0x06, 0x7b, 0xc7, 0x47, 0x6c, 0xbd, 0x41, 0x16, 0xb0, 0x6f, - 0x84, 0xea, 0x53, 0x0d, 0x86, 0xfb, 0xe6, 0xfa, 0xd2, 0xeb, 0xc2, 0xf3, 0x35, 0xdb, 0x10, 0x69, - 0x26, 0x05, 0xa1, 0x97, 0xc3, 0xfe, 0x88, 0x92, 0x53, 0x9e, 0x9f, 0x54, 0xae, 0x9b, 0xf3, 0x7c, - 0x04, 0xa7, 0x7a, 0x8c, 0x66, 0x3c, 0x9f, 0xa2, 0xd0, 0xd1, 0x14, 0x89, 0x78, 0x82, 0xe4, 0xec, - 0xf4, 0x1f, 0x0c, 0xf6, 0x8e, 0x9f, 0xb1, 0x72, 0xa3, 0x58, 0xbd, 0x51, 0x6c, 0x28, 0xf2, 0xf0, - 0xb0, 0x9a, 0x3a, 0x2d, 0x87, 0x46, 0xd5, 0x8c, 0x37, 0x87, 0x83, 0x1b, 0xd6, 0x75, 0x26, 0x3b, - 0x82, 0xa3, 0x4d, 0x46, 0x91, 0xaa, 0x20, 0xc7, 0xba, 0xc3, 0xd1, 0x6d, 0x77, 0x6c, 0x4a, 0x5f, - 0x00, 0x8c, 0x28, 0x79, 0x3f, 0xc7, 0xd8, 0xdc, 0x79, 0x02, 0xef, 0xc0, 0xc6, 0x02, 0x4a, 0xa5, - 0xd8, 0xae, 0xeb, 0xd3, 0x86, 0x6f, 0x6a, 0xfe, 0x04, 0x7b, 0x65, 0xd6, 0x74, 0xfc, 0x0a, 0x2f, - 0x6e, 0x4b, 0x6f, 0xd7, 0xae, 0x7b, 0xcb, 0xa3, 0x29, 0xf6, 0x12, 0x7a, 0x9f, 0x0d, 0xaa, 0xfc, - 0xda, 0x51, 0x17, 0x98, 0x3e, 0x97, 0x13, 0xf2, 0x7e, 0x80, 0xb7, 0xf9, 0x6b, 0x93, 0xec, 0x0d, - 0x1c, 0xf2, 0x1b, 0x40, 0x34, 0x2d, 0x89, 0x22, 0xd4, 0x6e, 0x78, 0xc0, 0xdb, 0xc6, 0x4f, 0xbe, - 0xfc, 0x5e, 0xb8, 0xd6, 0xd5, 0xc2, 0xb5, 0xfe, 0x2e, 0x5c, 0xeb, 0xd7, 0xd2, 0xed, 0x5c, 0x2d, - 0xdd, 0xce, 0x9f, 0xa5, 0xdb, 0xf9, 0xfe, 0xb6, 0xfc, 0x5d, 0x69, 0x72, 0xc1, 0x52, 0xe9, 0xcf, - 0xef, 0x71, 0x77, 0xc7, 0x0f, 0x8b, 0xe2, 0xaf, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x78, 0x97, - 0xe4, 0x0c, 0xf7, 0x03, 0x00, 0x00, + // 357 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xb1, 0x6e, 0xe2, 0x30, + 0x1c, 0xc6, 0x31, 0xdc, 0x71, 0xc2, 0xdc, 0xe9, 0xa4, 0x48, 0xdc, 0x85, 0xe8, 0x14, 0xe5, 0x22, + 0x55, 0xca, 0x64, 0x2b, 0xad, 0x3a, 0x74, 0xa4, 0x5b, 0x07, 0x86, 0xa6, 0x4c, 0xed, 0x10, 0x39, + 0x89, 0x09, 0x51, 0xc1, 0x46, 0xf6, 0x3f, 0x60, 0xde, 0xa2, 0x4f, 0xd1, 0x67, 0xe9, 0xc8, 0xd8, + 0xb1, 0x82, 0x17, 0xa9, 0x4a, 0xa0, 0xb4, 0x15, 0x1d, 0x3a, 0xe6, 0xfb, 0x7e, 0xf9, 0xe9, 0xb3, + 0x6c, 0xdc, 0x4b, 0xa5, 0x9e, 0x48, 0x4d, 0x59, 0x9a, 0xca, 0x52, 0x80, 0xa6, 0x85, 0x00, 0xae, + 0x86, 0x2c, 0xe5, 0xaf, 0x59, 0xcc, 0x12, 0x0d, 0x8a, 0xa5, 0x50, 0x48, 0x41, 0x67, 0xe1, 0x9e, + 0x20, 0x53, 0x25, 0x41, 0x5a, 0x61, 0xa5, 0x20, 0x3b, 0x05, 0xd9, 0x2b, 0xc8, 0x01, 0x05, 0x99, + 0x85, 0x4e, 0x37, 0x97, 0x32, 0x1f, 0x73, 0xba, 0x11, 0x24, 0xe5, 0x90, 0x32, 0xb1, 0xa8, 0x6c, + 0x8e, 0xb3, 0x1d, 0x04, 0x86, 0xce, 0xc2, 0x84, 0x03, 0x0b, 0x29, 0x98, 0xaa, 0xf3, 0xef, 0x11, + 0xfe, 0xdd, 0xd7, 0x79, 0xaf, 0x84, 0x11, 0x17, 0x50, 0xa4, 0x0c, 0xb8, 0x65, 0xe3, 0x1f, 0x49, + 0x29, 0xb2, 0x31, 0x57, 0x36, 0xf2, 0x50, 0xd0, 0x8a, 0x76, 0x9f, 0x16, 0xc5, 0x4d, 0xc5, 0xe6, + 0x31, 0x18, 0xbb, 0xee, 0xa1, 0xa0, 0x7d, 0x6c, 0x93, 0xed, 0x50, 0x30, 0x64, 0xab, 0x26, 0x03, + 0x13, 0xb1, 0x79, 0xf4, 0x5d, 0xb1, 0xf9, 0xc0, 0x58, 0x47, 0xb8, 0x0e, 0xc6, 0x6e, 0x6c, 0xe0, + 0xce, 0x61, 0xb8, 0x0e, 0xc6, 0xfa, 0x8f, 0x7f, 0xea, 0x22, 0x17, 0x5c, 0xc5, 0x85, 0xc8, 0xb8, + 0xb1, 0xbf, 0x79, 0x28, 0xf8, 0x15, 0xb5, 0xab, 0xec, 0xe2, 0x25, 0xf2, 0xbb, 0xf8, 0xef, 0x87, + 0x9d, 0x11, 0xd7, 0x53, 0x29, 0x34, 0xf7, 0xff, 0x61, 0xe7, 0xb2, 0xe4, 0x6a, 0xf1, 0xa6, 0x2c, + 0xa4, 0xe8, 0x73, 0x18, 0xc9, 0x4c, 0xfb, 0x37, 0xd8, 0xff, 0xbc, 0xdd, 0x39, 0xac, 0x53, 0xfc, + 0x87, 0xbd, 0x03, 0xe2, 0x49, 0x45, 0xd8, 0xc8, 0x6b, 0x04, 0xad, 0xa8, 0xc3, 0x0e, 0xfd, 0x7e, + 0x7e, 0xf5, 0xb0, 0x72, 0xd1, 0x72, 0xe5, 0xa2, 0xa7, 0x95, 0x8b, 0xee, 0xd6, 0x6e, 0x6d, 0xb9, + 0x76, 0x6b, 0x8f, 0x6b, 0xb7, 0x76, 0x7d, 0x56, 0x1d, 0x56, 0x67, 0xb7, 0xa4, 0x90, 0xd4, 0x7c, + 0xe1, 0x35, 0x24, 0xcd, 0xcd, 0xd5, 0x9c, 0x3c, 0x07, 0x00, 0x00, 0xff, 0xff, 0x9a, 0x1c, 0xbd, + 0x8a, 0x49, 0x02, 0x00, 0x00, } func (m *MsgAuthenticate) Marshal() (dAtA []byte, err error) { @@ -488,9 +283,26 @@ func (m *MsgAuthenticate) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.UserOperation != nil { + if m.SignerIndex != 0 { + i = encodeVarintInterface(dAtA, i, uint64(m.SignerIndex)) + i-- + dAtA[i] = 0x20 + } + if m.Tx != nil { { - size, err := m.UserOperation.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Tx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintInterface(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.RawTx != nil { + { + size, err := m.RawTx.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -533,168 +345,6 @@ func (m *MsgAuthenticateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgPayBundler) 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 *MsgPayBundler) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgPayBundler) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.BundlerPaymentMessages) > 0 { - for iNdEx := len(m.BundlerPaymentMessages) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.BundlerPaymentMessages[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintInterface(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Bundler) > 0 { - i -= len(m.Bundler) - copy(dAtA[i:], m.Bundler) - i = encodeVarintInterface(dAtA, i, uint64(len(m.Bundler))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgPayBundlerResponse) 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 *MsgPayBundlerResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgPayBundlerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.BundlerPaymentMessagesResponse) > 0 { - for iNdEx := len(m.BundlerPaymentMessagesResponse) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.BundlerPaymentMessagesResponse[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintInterface(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *MsgExecute) 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 *MsgExecute) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgExecute) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ExecutionMessages) > 0 { - for iNdEx := len(m.ExecutionMessages) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ExecutionMessages[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintInterface(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Bundler) > 0 { - i -= len(m.Bundler) - copy(dAtA[i:], m.Bundler) - i = encodeVarintInterface(dAtA, i, uint64(len(m.Bundler))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgExecuteResponse) 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 *MsgExecuteResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgExecuteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ExecutionMessagesResponse) > 0 { - for iNdEx := len(m.ExecutionMessagesResponse) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ExecutionMessagesResponse[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintInterface(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - func (m *QueryAuthenticationMethods) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -771,10 +421,17 @@ func (m *MsgAuthenticate) Size() (n int) { if l > 0 { n += 1 + l + sovInterface(uint64(l)) } - if m.UserOperation != nil { - l = m.UserOperation.Size() + if m.RawTx != nil { + l = m.RawTx.Size() n += 1 + l + sovInterface(uint64(l)) } + if m.Tx != nil { + l = m.Tx.Size() + n += 1 + l + sovInterface(uint64(l)) + } + if m.SignerIndex != 0 { + n += 1 + sovInterface(uint64(m.SignerIndex)) + } return n } @@ -787,74 +444,6 @@ func (m *MsgAuthenticateResponse) Size() (n int) { return n } -func (m *MsgPayBundler) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Bundler) - if l > 0 { - n += 1 + l + sovInterface(uint64(l)) - } - if len(m.BundlerPaymentMessages) > 0 { - for _, e := range m.BundlerPaymentMessages { - l = e.Size() - n += 1 + l + sovInterface(uint64(l)) - } - } - return n -} - -func (m *MsgPayBundlerResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.BundlerPaymentMessagesResponse) > 0 { - for _, e := range m.BundlerPaymentMessagesResponse { - l = e.Size() - n += 1 + l + sovInterface(uint64(l)) - } - } - return n -} - -func (m *MsgExecute) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Bundler) - if l > 0 { - n += 1 + l + sovInterface(uint64(l)) - } - if len(m.ExecutionMessages) > 0 { - for _, e := range m.ExecutionMessages { - l = e.Size() - n += 1 + l + sovInterface(uint64(l)) - } - } - return n -} - -func (m *MsgExecuteResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ExecutionMessagesResponse) > 0 { - for _, e := range m.ExecutionMessagesResponse { - l = e.Size() - n += 1 + l + sovInterface(uint64(l)) - } - } - return n -} - func (m *QueryAuthenticationMethods) Size() (n int) { if m == nil { return 0 @@ -948,7 +537,7 @@ func (m *MsgAuthenticate) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserOperation", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RawTx", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -975,13 +564,68 @@ func (m *MsgAuthenticate) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.UserOperation == nil { - m.UserOperation = &v1.UserOperation{} + if m.RawTx == nil { + m.RawTx = &tx.TxRaw{} } - if err := m.UserOperation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.RawTx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInterface + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthInterface + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthInterface + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Tx == nil { + m.Tx = &tx.Tx{} + } + if err := m.Tx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SignerIndex", wireType) + } + m.SignerIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInterface + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SignerIndex |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipInterface(dAtA[iNdEx:]) @@ -1053,406 +697,6 @@ func (m *MsgAuthenticateResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgPayBundler) 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 ErrIntOverflowInterface - } - 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: MsgPayBundler: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgPayBundler: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bundler", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInterface - } - 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 ErrInvalidLengthInterface - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthInterface - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Bundler = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BundlerPaymentMessages", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInterface - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthInterface - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthInterface - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BundlerPaymentMessages = append(m.BundlerPaymentMessages, &types.Any{}) - if err := m.BundlerPaymentMessages[len(m.BundlerPaymentMessages)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipInterface(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthInterface - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgPayBundlerResponse) 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 ErrIntOverflowInterface - } - 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: MsgPayBundlerResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgPayBundlerResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BundlerPaymentMessagesResponse", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInterface - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthInterface - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthInterface - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BundlerPaymentMessagesResponse = append(m.BundlerPaymentMessagesResponse, &types.Any{}) - if err := m.BundlerPaymentMessagesResponse[len(m.BundlerPaymentMessagesResponse)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipInterface(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthInterface - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgExecute) 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 ErrIntOverflowInterface - } - 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: MsgExecute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgExecute: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bundler", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInterface - } - 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 ErrInvalidLengthInterface - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthInterface - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Bundler = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutionMessages", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInterface - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthInterface - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthInterface - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExecutionMessages = append(m.ExecutionMessages, &types.Any{}) - if err := m.ExecutionMessages[len(m.ExecutionMessages)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipInterface(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthInterface - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgExecuteResponse) 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 ErrIntOverflowInterface - } - 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: MsgExecuteResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgExecuteResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutionMessagesResponse", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInterface - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthInterface - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthInterface - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExecutionMessagesResponse = append(m.ExecutionMessagesResponse, &types.Any{}) - if err := m.ExecutionMessagesResponse[len(m.ExecutionMessagesResponse)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipInterface(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthInterface - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *QueryAuthenticationMethods) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/accounts/keeper.go b/x/accounts/keeper.go index 89ef637f80..99b1a0c83c 100644 --- a/x/accounts/keeper.go +++ b/x/accounts/keeper.go @@ -40,11 +40,6 @@ var ( AccountByNumber = collections.NewPrefix(2) ) -// coinsTransferMsgFunc defines a function that creates a message to send coins from one -// address to the other, and also a message that parses such response. -// This in most cases will be implemented as a bank.MsgSend creator, but we keep x/accounts independent of bank. -type coinsTransferMsgFunc = func(from, to []byte, coins sdk.Coins) (implementation.ProtoMsg, implementation.ProtoMsg, error) - // QueryRouter represents a router which can be used to route queries to the correct module. // It returns the handler given the message name, if multiple handlers are returned, then // it is up to the caller to choose which one to call. @@ -150,44 +145,75 @@ func (k Keeper) Init( initRequest implementation.ProtoMsg, funds sdk.Coins, ) (implementation.ProtoMsg, []byte, error) { - impl, err := k.getImplementation(accountType) - if err != nil { - return nil, nil, err - } - // get the next account number num, err := k.AccountNumber.Next(ctx) if err != nil { return nil, nil, err } - - // make a new account address + // create address accountAddr, err := k.makeAddress(num) if err != nil { return nil, nil, err } - - // send funds, if provided - err = k.maybeSendFunds(ctx, creator, accountAddr, funds) - if err != nil { - return nil, nil, fmt.Errorf("unable to transfer funds: %w", err) - } - // make the context and init the account - ctx = k.makeAccountContext(ctx, num, accountAddr, creator, funds, false) - resp, err := impl.Init(ctx, initRequest) + initResp, err := k.init(ctx, accountType, creator, num, accountAddr, initRequest, funds) if err != nil { return nil, nil, err } + return initResp, accountAddr, nil +} + +// init initializes the account, given the type, the creator the newly created account number, its address and the +// initialization message. +func (k Keeper) init( + ctx context.Context, + accountType string, + creator []byte, + accountNum uint64, + accountAddr []byte, + initRequest implementation.ProtoMsg, + funds sdk.Coins, +) (implementation.ProtoMsg, error) { + impl, ok := k.accounts[accountType] + if !ok { + return nil, fmt.Errorf("%w: not found %s", errAccountTypeNotFound, accountType) + } + + // send funds, if provided + err := k.maybeSendFunds(ctx, creator, accountAddr, funds) + if err != nil { + return nil, fmt.Errorf("unable to transfer funds: %w", err) + } + // make the context and init the account + ctx = k.makeAccountContext(ctx, accountNum, accountAddr, creator, funds, false) + resp, err := impl.Init(ctx, initRequest) + if err != nil { + return nil, err + } // map account address to account type if err := k.AccountsByType.Set(ctx, accountAddr, accountType); err != nil { - return nil, nil, err + return nil, err } // map account number to account address - if err := k.AccountByNumber.Set(ctx, accountAddr, num); err != nil { - return nil, nil, err + if err := k.AccountByNumber.Set(ctx, accountAddr, accountNum); err != nil { + return nil, err } - return resp, accountAddr, nil + return resp, nil +} + +// MigrateLegacyAccount is used to migrate a legacy account to x/accounts. +// Concretely speaking this works like Init, but with a custom account number provided, +// Where the creator is the account itself. This can be used by the x/auth module to +// gradually migrate base accounts to x/accounts. +// NOTE: this assumes the calling module checks for account overrides. +func (k Keeper) MigrateLegacyAccount( + ctx context.Context, + addr []byte, // The current address of the account + accNum uint64, // The current account number + accType string, // The account type to migrate to + msg implementation.ProtoMsg, // The init msg of the account type we're migrating to +) (implementation.ProtoMsg, error) { + return k.init(ctx, accType, addr, accNum, addr, msg, nil) } // Execute executes a state transition on the given account. @@ -198,14 +224,8 @@ func (k Keeper) Execute( execRequest implementation.ProtoMsg, funds sdk.Coins, ) (implementation.ProtoMsg, error) { - // get account type - accountType, err := k.AccountsByType.Get(ctx, accountAddr) - if err != nil { - return nil, err - } - // get account implementation - impl, err := k.getImplementation(accountType) + impl, err := k.getImplementation(ctx, accountAddr) if err != nil { // this means the account was initialized with an implementation // that the chain does not know about, in theory should never happen, @@ -235,14 +255,8 @@ func (k Keeper) Query( accountAddr []byte, queryRequest implementation.ProtoMsg, ) (implementation.ProtoMsg, error) { - // get account type - accountType, err := k.AccountsByType.Get(ctx, accountAddr) - if err != nil { - return nil, err - } - // get account implementation - impl, err := k.getImplementation(accountType) + impl, err := k.getImplementation(ctx, accountAddr) if err != nil { // this means the account was initialized with an implementation // that the chain does not know about, in theory should never happen, @@ -260,7 +274,11 @@ func (k Keeper) Query( return impl.Query(ctx, queryRequest) } -func (k Keeper) getImplementation(accountType string) (implementation.Implementation, error) { +func (k Keeper) getImplementation(ctx context.Context, addr []byte) (implementation.Implementation, error) { + accountType, err := k.AccountsByType.Get(ctx, addr) + if err != nil { + return implementation.Implementation{}, err + } impl, ok := k.accounts[accountType] if !ok { return implementation.Implementation{}, fmt.Errorf("%w: %s", errAccountTypeNotFound, accountType) @@ -312,6 +330,7 @@ func (k Keeper) makeAccountContext(ctx context.Context, accountNumber uint64, ac // sendAnyMessages it a helper function that executes untyped codectypes.Any messages // The messages must all belong to a module. +// nolint: unused // TODO: remove nolint when we bring back bundler payments func (k Keeper) sendAnyMessages(ctx context.Context, sender []byte, anyMessages []*implementation.Any) ([]*implementation.Any, error) { anyResponses := make([]*implementation.Any, len(anyMessages)) for i := range anyMessages { @@ -408,11 +427,6 @@ func (k Keeper) maybeSendFunds(ctx context.Context, from, to []byte, amt sdk.Coi return nil } -type gogoProtoPlusV2 interface { - proto.Message - implementation.ProtoMsg -} - const msgInterfaceName = "cosmos.accounts.v1.MsgInterface" // creates a new interface type which is an alias of the proto message interface to avoid conflicts with sdk.Msg diff --git a/x/accounts/keeper_account_abstraction.go b/x/accounts/keeper_account_abstraction.go index 3820baa3e9..377117db0f 100644 --- a/x/accounts/keeper_account_abstraction.go +++ b/x/accounts/keeper_account_abstraction.go @@ -5,9 +5,10 @@ import ( "errors" "fmt" - account_abstractionv1 "cosmossdk.io/x/accounts/interfaces/account_abstraction/v1" - "cosmossdk.io/x/accounts/internal/implementation" - v1 "cosmossdk.io/x/accounts/v1" + "cosmossdk.io/collections" + aa_interface_v1 "cosmossdk.io/x/accounts/interfaces/account_abstraction/v1" + + "github.com/cosmos/cosmos-sdk/types/address" ) var ( @@ -17,228 +18,29 @@ var ( ErrBundlerPayment = errors.New("bundler payment failed") // ErrExecution is returned when the execution fails. ErrExecution = errors.New("execution failed") - // ErrDisallowedTxCompatInBundle is returned when the tx compat - // is populated in a bundle. - ErrDisallowedTxCompatInBundle = errors.New("tx compat field populated in bundle") ) -// ExecuteUserOperation handles the execution of an abstracted account UserOperation. -func (k Keeper) ExecuteUserOperation( - ctx context.Context, - bundler string, - op *v1.UserOperation, -) *v1.UserOperationResponse { - // TxCompat field must not be allowed in a UserOperation sent from a bundle. - // Only the runtime can populate this field when an abstracted account sends - // a tx (not from a bundle) and this is converted into a UserOperation. - if op.TxCompat != nil { - return &v1.UserOperationResponse{Error: ErrDisallowedTxCompatInBundle.Error()} - } - - resp := &v1.UserOperationResponse{} - - // authenticate - authGas, err := k.Authenticate(ctx, bundler, op) - resp.AuthenticationGasUsed = authGas - if err != nil { - resp.Error = err.Error() - return resp - } - resp.AuthenticationGasUsed = authGas - - // pay bundler - bundlerPayGas, bundlerPayResp, err := k.PayBundler(ctx, bundler, op) - resp.BundlerPaymentGasUsed = bundlerPayGas - if err != nil { - resp.Error = err.Error() - return resp - } - resp.BundlerPaymentResponses = bundlerPayResp - - // execute messages, the real operation intent - executeGas, executeResp, err := k.OpExecuteMessages(ctx, bundler, op) - resp.ExecutionGasUsed = executeGas - if err != nil { - resp.Error = err.Error() - return resp - } - resp.ExecutionResponses = executeResp - - // done! - return resp -} - -// Authenticate handles the authentication flow of an abstracted account. -// Authentication happens in an isolated context with the authentication gas limit. -// If the authentication is successful, then the state is committed. -func (k Keeper) Authenticate( - ctx context.Context, - bundler string, - op *v1.UserOperation, -) (gasUsed uint64, err error) { - // authenticate - gasUsed, err = k.branchExecutor.ExecuteWithGasLimit(ctx, op.AuthenticationGasLimit, func(ctx context.Context) error { - return k.authenticate(ctx, bundler, op) - }) - if err != nil { - return gasUsed, fmt.Errorf("%v: %w", ErrAuthentication, err) - } - return gasUsed, nil -} - -// authenticate handles the authentication flow of an abstracted account. -func (k Keeper) authenticate( - ctx context.Context, - bundler string, - op *v1.UserOperation, -) error { - senderAddr, err := k.addressCodec.StringToBytes(op.Sender) - if err != nil { - return err - } - // create an isolated context in which we execute authentication - // without affecting the parent context and with the authentication gas limit. - _, err = k.Execute(ctx, senderAddr, ModuleAccountAddress, &account_abstractionv1.MsgAuthenticate{ - Bundler: bundler, - UserOperation: op, - }, nil) - return err -} - -// OpExecuteMessages handles the execution of the messages in a given v1.UserOperation. -// It executes in an isolated branch, in an atomic way, if all the messages pass then -// the execution is deemed successful and the state is committed. -// An account abstraction implementer can choose to handle execution messages or not, -// if it does not expose the execution messages method, then this method will simply -// execute the provided messages on behalf of the sender and return. -func (k Keeper) OpExecuteMessages( - ctx context.Context, - bundler string, - op *v1.UserOperation, -) (gasUsed uint64, responses []*implementation.Any, err error) { - // execute messages, the real operation intent - gasUsed, err = k.branchExecutor.ExecuteWithGasLimit(ctx, op.ExecutionGasLimit, func(ctx context.Context) error { - responses, err = k.opExecuteMessages(ctx, bundler, op) - return err - }) - if err != nil { - return gasUsed, nil, fmt.Errorf("%v: %w", ErrExecution, err) - } - return gasUsed, responses, nil -} - -func (k Keeper) opExecuteMessages( - ctx context.Context, - bundler string, - op *v1.UserOperation, -) (messagesResponse []*implementation.Any, err error) { - senderAddr, err := k.addressCodec.StringToBytes(op.Sender) - if err != nil { - return nil, err - } - resp, err := k.Execute(ctx, senderAddr, ModuleAccountAddress, &account_abstractionv1.MsgExecute{ - Bundler: bundler, - ExecutionMessages: op.ExecutionMessages, - }, nil) - // here is where we check if the account handles execution messages - // if it does not, then we simply execute the provided messages on behalf of the sender +// IsAbstractedAccount returns if the provided address is an abstracted account or not. +func (k Keeper) IsAbstractedAccount(ctx context.Context, addr []byte) (bool, error) { + accType, err := k.AccountsByType.Get(ctx, addr) switch { - case err == nil: - // all is ok, so parse responses. - executeResp, err := parseExecuteResponse(resp) - return executeResp, err - case implementation.IsRoutingError(err): - // if it is a routing error, it means the account does not handle execution messages, - // in this case we attempt to execute the provided messages on behalf of the op sender. - return k.sendAnyMessages(ctx, senderAddr, op.ExecutionMessages) - default: - // some other error - return nil, err + case errors.Is(err, collections.ErrNotFound): + return false, nil + case err != nil: + return false, err } -} -// PayBundler handles the payment of the bundler in a given v1.UserOperation. -// Must be called after Authenticate. -// It gets executed in an isolated context with the bundler payment gas limit. -// If the payment is successful, then the state is committed. -// Since for an abstracted account the bundler payment method is optional, -// if the account does not handle bundler payment messages, then this method -// will simply execute the provided messages on behalf of the sender and return. -func (k Keeper) PayBundler( - ctx context.Context, - bundler string, - op *v1.UserOperation, -) (gasUsed uint64, responses []*implementation.Any, err error) { - // pay bundler - gasUsed, err = k.branchExecutor.ExecuteWithGasLimit(ctx, op.BundlerPaymentGasLimit, func(ctx context.Context) error { - responses, err = k.payBundler(ctx, bundler, op) - return err - }) - if err != nil { - return gasUsed, nil, fmt.Errorf("%v: %w", ErrBundlerPayment, err) - } - return gasUsed, responses, nil -} - -func (k Keeper) payBundler( - ctx context.Context, - bundler string, - op *v1.UserOperation, -) (paymentResponses []*implementation.Any, err error) { - // if messages are empty, then there is nothing to do - if len(op.BundlerPaymentMessages) == 0 { - return nil, nil - } - // pay bundler - senderAddr, err := k.addressCodec.StringToBytes(op.Sender) - if err != nil { - return nil, err - } - resp, err := k.Execute(ctx, senderAddr, ModuleAccountAddress, &account_abstractionv1.MsgPayBundler{ - Bundler: bundler, - BundlerPaymentMessages: op.BundlerPaymentMessages, - }, nil) - // here is where we check if the account handles bundler payment messages - // if it does not, then we simply execute the provided messages on behalf of the sender - switch { - case err == nil: - // if no error, execution went fine, so parse responses. - payBundlerResp, err := parsePayBundlerResponse(resp) - return payBundlerResp, err - case implementation.IsRoutingError(err): - // if we get a routing message error it means the account does not handle bundler payment messages, - // in this case we attempt to execute the provided messages on behalf of the op sender. - return k.sendAnyMessages(ctx, senderAddr, op.BundlerPaymentMessages) - default: - // some other execution error. - return nil, err - } -} - -// parsePayBundlerResponse parses the bundler response as any into a slice of -// responses on payment messages. -func parsePayBundlerResponse(resp any) ([]*implementation.Any, error) { - payBundlerResp, ok := resp.(*account_abstractionv1.MsgPayBundlerResponse) - // this means the account does not properly implement account abstraction. - if payBundlerResp == nil { - return nil, fmt.Errorf("account does not implement account abstraction correctly: wanted %T, got nil", &account_abstractionv1.MsgPayBundlerResponse{}) - } + impl, ok := k.accounts[accType] if !ok { - return nil, fmt.Errorf("account does not implement account abstraction correctly: wanted %T, got %T", &account_abstractionv1.MsgPayBundlerResponse{}, resp) + return false, fmt.Errorf("%w: %s", errAccountTypeNotFound, accType) } - return payBundlerResp.BundlerPaymentMessagesResponse, nil + return impl.HasExec(&aa_interface_v1.MsgAuthenticate{}), nil } -// parseExecuteResponse parses the execute response as any into a slice of -// responses on execution messages. -func parseExecuteResponse(resp any) ([]*implementation.Any, error) { - executeResp, ok := resp.(*account_abstractionv1.MsgExecuteResponse) - // this means the account does not properly implement account abstraction. - if executeResp == nil { - return nil, fmt.Errorf("account does not implement account abstraction correctly: wanted %T, got nil", &account_abstractionv1.MsgExecuteResponse{}) +func (k Keeper) AuthenticateAccount(ctx context.Context, addr []byte, msg *aa_interface_v1.MsgAuthenticate) error { + _, err := k.Execute(ctx, addr, address.Module("accounts"), msg, nil) + if err != nil { + return fmt.Errorf("%w: %w", ErrAuthentication, err) } - if !ok { - return nil, fmt.Errorf("account does not implement account abstraction correctly: wanted %T, got %T", &account_abstractionv1.MsgExecuteResponse{}, resp) - } - return executeResp.ExecutionMessagesResponse, nil + return nil } diff --git a/x/accounts/msg_server.go b/x/accounts/msg_server.go index 3d85db30e1..03abc2d853 100644 --- a/x/accounts/msg_server.go +++ b/x/accounts/msg_server.go @@ -96,15 +96,5 @@ func (m msgServer) Execute(ctx context.Context, execute *v1.MsgExecute) (*v1.Msg } func (m msgServer) ExecuteBundle(ctx context.Context, req *v1.MsgExecuteBundle) (*v1.MsgExecuteBundleResponse, error) { - _, err := m.k.addressCodec.StringToBytes(req.Bundler) - if err != nil { - return nil, err - } - - resp := &v1.MsgExecuteBundleResponse{Responses: make([]*v1.UserOperationResponse, len(req.Operations))} - for i, op := range req.Operations { - resp.Responses[i] = m.k.ExecuteUserOperation(ctx, req.Bundler, op) - } - - return resp, nil + panic("impl") } diff --git a/x/accounts/query_server.go b/x/accounts/query_server.go index a5b2578201..00f48549d4 100644 --- a/x/accounts/query_server.go +++ b/x/accounts/query_server.go @@ -90,21 +90,3 @@ const ( SimulateBundlerPaymentGasLimit = SimulateAuthenticateGasLimit ExecuteGasLimit = SimulateAuthenticateGasLimit ) - -func (q queryServer) SimulateUserOperation(ctx context.Context, request *v1.SimulateUserOperationRequest) (*v1.SimulateUserOperationResponse, error) { - _, err := q.k.addressCodec.StringToBytes(request.Bundler) - if err != nil { - return nil, err - } - - if request.UserOperation == nil { - return nil, fmt.Errorf("nil user operation") - } - - request.UserOperation.AuthenticationGasLimit = SimulateAuthenticateGasLimit - request.UserOperation.BundlerPaymentGasLimit = SimulateBundlerPaymentGasLimit - request.UserOperation.ExecutionGasLimit = ExecuteGasLimit - - resp := q.k.ExecuteUserOperation(ctx, request.Bundler, request.UserOperation) - return &v1.SimulateUserOperationResponse{UserOperationResponse: resp}, nil -} diff --git a/x/accounts/testing/account_abstraction/full.go b/x/accounts/testing/account_abstraction/full.go deleted file mode 100644 index e4f08fbc5d..0000000000 --- a/x/accounts/testing/account_abstraction/full.go +++ /dev/null @@ -1,77 +0,0 @@ -package account_abstraction - -import ( - "context" - "fmt" - - "cosmossdk.io/x/accounts/accountstd" - account_abstractionv1 "cosmossdk.io/x/accounts/interfaces/account_abstraction/v1" -) - -// FullAbstractedAccount is an account abstraction that implements -// the account abstraction interface fully. It is used for testing. -type FullAbstractedAccount struct { - m *MinimalAbstractedAccount -} - -func NewFullAbstractedAccount(d accountstd.Dependencies) (FullAbstractedAccount, error) { - m, err := NewMinimalAbstractedAccount(d) - if err != nil { - return FullAbstractedAccount{}, err - } - return FullAbstractedAccount{m: &m}, nil -} - -func (a FullAbstractedAccount) ExecuteMessages(ctx context.Context, msg *account_abstractionv1.MsgExecute) (*account_abstractionv1.MsgExecuteResponse, error) { - // we always want to ensure that this is called by the x/accounts module, it's the only trusted entrypoint. - // if we do not do this check then someone could call this method directly and bypass the authentication. - if !accountstd.SenderIsAccountsModule(ctx) { - return nil, fmt.Errorf("sender is not the x/accounts module") - } - // we simulate this account does not allow delegation messages to be executed. - for _, m := range msg.ExecutionMessages { - if m.TypeUrl == "/cosmos.staking.v1beta1.MsgDelegate" { // NOTE: this is not a safe way to check the typeUrl, it's just for testing. - return nil, fmt.Errorf("this account does not allow delegation messages") - } - } - // execute messages - responses, err := accountstd.ExecModuleAnys(ctx, msg.ExecutionMessages) - if err != nil { - return nil, err - } - return &account_abstractionv1.MsgExecuteResponse{ExecutionMessagesResponse: responses}, nil -} - -func (a FullAbstractedAccount) PayBundler(ctx context.Context, msg *account_abstractionv1.MsgPayBundler) (*account_abstractionv1.MsgPayBundlerResponse, error) { - // we always want to ensure that this is called by the x/accounts module, it's the only trusted entrypoint. - // if we do not do this check then someone could call this method directly and bypass the authentication. - if !accountstd.SenderIsAccountsModule(ctx) { - return nil, fmt.Errorf("sender is not the x/accounts module") - } - // we check if it's a bank send, if it is we reject it. - for _, m := range msg.BundlerPaymentMessages { - if m.TypeUrl == "/cosmos.bank.v1beta1.MsgSend" { // NOTE: this is not a safe way to check the typeUrl, it's just for testing. - return nil, fmt.Errorf("this account does not allow bank send messages") - } - } - // execute messages - responses, err := accountstd.ExecModuleAnys(ctx, msg.BundlerPaymentMessages) - if err != nil { - return nil, err - } - return &account_abstractionv1.MsgPayBundlerResponse{BundlerPaymentMessagesResponse: responses}, nil -} - -func (a FullAbstractedAccount) RegisterInitHandler(builder *accountstd.InitBuilder) { - a.m.RegisterInitHandler(builder) // registers same init message as MinimalAbstractedAccount -} - -func (a FullAbstractedAccount) RegisterExecuteHandlers(builder *accountstd.ExecuteBuilder) { - accountstd.RegisterExecuteHandler(builder, a.ExecuteMessages) // implements accounts_abstraction - accountstd.RegisterExecuteHandler(builder, a.PayBundler) // implements account_abstraction - a.m.RegisterExecuteHandlers(builder) // note: MinimalAbstractedAccount implements account_abstraction, and we're calling its RegisterExecuteHandlers -} - -func (a FullAbstractedAccount) RegisterQueryHandlers(builder *accountstd.QueryBuilder) { - a.m.RegisterQueryHandlers(builder) -} diff --git a/x/accounts/testing/account_abstraction/minimal.go b/x/accounts/testing/account_abstraction/minimal.go index 3a194370d1..9c11043cb8 100644 --- a/x/accounts/testing/account_abstraction/minimal.go +++ b/x/accounts/testing/account_abstraction/minimal.go @@ -44,9 +44,6 @@ func (a MinimalAbstractedAccount) RotatePubKey(ctx context.Context, msg *rotatio // Authenticate authenticates the account, auth always passess. func (a MinimalAbstractedAccount) Authenticate(ctx context.Context, msg *account_abstractionv1.MsgAuthenticate) (*account_abstractionv1.MsgAuthenticateResponse, error) { - if msg.UserOperation.AuthenticationMethod != "secp256k1" { - return nil, fmt.Errorf("authentication method not supported") - } _, err := a.Sequence.Next(ctx) return &account_abstractionv1.MsgAuthenticateResponse{}, err } diff --git a/x/accounts/v1/account_abstraction.pb.go b/x/accounts/v1/account_abstraction.pb.go deleted file mode 100644 index f51cf1cc07..0000000000 --- a/x/accounts/v1/account_abstraction.pb.go +++ /dev/null @@ -1,1417 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/accounts/v1/account_abstraction.proto - -package v1 - -import ( - fmt "fmt" - types "github.com/cosmos/cosmos-sdk/codec/types" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// UserOperation defines the type used to define a state transition that -// an account wants to make. -type UserOperation struct { - // sender defines the account that is sending the UserOperation. - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - // authentication_method defines the authentication strategy the account wants to use. - // since accounts can have multiple authentication methods, this field is used to - // instruct the account on what auth method to use. - AuthenticationMethod string `protobuf:"bytes,2,opt,name=authentication_method,json=authenticationMethod,proto3" json:"authentication_method,omitempty"` - // authentication_data defines the authentication data associated with the authentication method. - // It is the account implementer duty to assess that the UserOperation is properly signed. - AuthenticationData *types.Any `protobuf:"bytes,3,opt,name=authentication_data,json=authenticationData,proto3" json:"authentication_data,omitempty"` - // authentication_gas_limit expresses the gas limit to be used for the authentication part of the - // UserOperation. - AuthenticationGasLimit uint64 `protobuf:"varint,4,opt,name=authentication_gas_limit,json=authenticationGasLimit,proto3" json:"authentication_gas_limit,omitempty"` - // bundler_payment_messages expresses a list of messages that the account - // executes to pay the bundler for submitting the UserOperation. - // It can be empty if the bundler does not need any form of payment, - // the handshake for submitting the UserOperation might have happened off-chain. - // Bundlers and accounts are free to use any form of payment, in fact the payment can - // either be empty or be expressed as: - // - NFT payment - // - IBC Token payment. - // - Payment through delegations. - BundlerPaymentMessages []*types.Any `protobuf:"bytes,5,rep,name=bundler_payment_messages,json=bundlerPaymentMessages,proto3" json:"bundler_payment_messages,omitempty"` - // bundler_payment_gas_limit defines the gas limit to be used for the bundler payment. - // This ensures that, since the bundler executes a list of UserOperations and there needs to - // be minimal trust between bundler and UserOperation sender, the sender cannot consume - // the whole bundle gas. - BundlerPaymentGasLimit uint64 `protobuf:"varint,6,opt,name=bundler_payment_gas_limit,json=bundlerPaymentGasLimit,proto3" json:"bundler_payment_gas_limit,omitempty"` - // execution_messages expresses a list of messages that the account wants to execute. - // This concretely is the intent of the transaction expressed as a UserOperation. - ExecutionMessages []*types.Any `protobuf:"bytes,7,rep,name=execution_messages,json=executionMessages,proto3" json:"execution_messages,omitempty"` - // execution_gas_limit defines the gas limit to be used for the execution of the UserOperation's - // execution messages. - ExecutionGasLimit uint64 `protobuf:"varint,8,opt,name=execution_gas_limit,json=executionGasLimit,proto3" json:"execution_gas_limit,omitempty"` - // tx_compat is populated only when the operation is composed from a raw tx. - // In fact if a TX comes and the sender of the TX is an abstracted account, - // we convert the TX into a user operation, and try to authenticate using the - // x/accounts authenticate method. If a bundler tries to send a UserOperation - // with a populated tx_compat, the operation will immediately yield a failure. - TxCompat *TxCompat `protobuf:"bytes,9,opt,name=tx_compat,json=txCompat,proto3" json:"tx_compat,omitempty"` -} - -func (m *UserOperation) Reset() { *m = UserOperation{} } -func (m *UserOperation) String() string { return proto.CompactTextString(m) } -func (*UserOperation) ProtoMessage() {} -func (*UserOperation) Descriptor() ([]byte, []int) { - return fileDescriptor_9f9bcc910ad46d4b, []int{0} -} -func (m *UserOperation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UserOperation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UserOperation.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 *UserOperation) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserOperation.Merge(m, src) -} -func (m *UserOperation) XXX_Size() int { - return m.Size() -} -func (m *UserOperation) XXX_DiscardUnknown() { - xxx_messageInfo_UserOperation.DiscardUnknown(m) -} - -var xxx_messageInfo_UserOperation proto.InternalMessageInfo - -func (m *UserOperation) GetSender() string { - if m != nil { - return m.Sender - } - return "" -} - -func (m *UserOperation) GetAuthenticationMethod() string { - if m != nil { - return m.AuthenticationMethod - } - return "" -} - -func (m *UserOperation) GetAuthenticationData() *types.Any { - if m != nil { - return m.AuthenticationData - } - return nil -} - -func (m *UserOperation) GetAuthenticationGasLimit() uint64 { - if m != nil { - return m.AuthenticationGasLimit - } - return 0 -} - -func (m *UserOperation) GetBundlerPaymentMessages() []*types.Any { - if m != nil { - return m.BundlerPaymentMessages - } - return nil -} - -func (m *UserOperation) GetBundlerPaymentGasLimit() uint64 { - if m != nil { - return m.BundlerPaymentGasLimit - } - return 0 -} - -func (m *UserOperation) GetExecutionMessages() []*types.Any { - if m != nil { - return m.ExecutionMessages - } - return nil -} - -func (m *UserOperation) GetExecutionGasLimit() uint64 { - if m != nil { - return m.ExecutionGasLimit - } - return 0 -} - -func (m *UserOperation) GetTxCompat() *TxCompat { - if m != nil { - return m.TxCompat - } - return nil -} - -// TxCompat provides compatibility for x/accounts abstracted account with the cosmos-sdk's Txs. -// In fact TxCompat contains fields coming from the Tx in raw and decoded format. The Raw format -// is mainly needed for proper sig verification. -type TxCompat struct { - // auth_info_bytes contains the auth info bytes of the tx. - // Must not be modified. - AuthInfoBytes []byte `protobuf:"bytes,1,opt,name=auth_info_bytes,json=authInfoBytes,proto3" json:"auth_info_bytes,omitempty"` - // body_bytes contains the body bytes of the tx. - // must not be modified. - BodyBytes []byte `protobuf:"bytes,2,opt,name=body_bytes,json=bodyBytes,proto3" json:"body_bytes,omitempty"` -} - -func (m *TxCompat) Reset() { *m = TxCompat{} } -func (m *TxCompat) String() string { return proto.CompactTextString(m) } -func (*TxCompat) ProtoMessage() {} -func (*TxCompat) Descriptor() ([]byte, []int) { - return fileDescriptor_9f9bcc910ad46d4b, []int{1} -} -func (m *TxCompat) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TxCompat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TxCompat.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 *TxCompat) XXX_Merge(src proto.Message) { - xxx_messageInfo_TxCompat.Merge(m, src) -} -func (m *TxCompat) XXX_Size() int { - return m.Size() -} -func (m *TxCompat) XXX_DiscardUnknown() { - xxx_messageInfo_TxCompat.DiscardUnknown(m) -} - -var xxx_messageInfo_TxCompat proto.InternalMessageInfo - -func (m *TxCompat) GetAuthInfoBytes() []byte { - if m != nil { - return m.AuthInfoBytes - } - return nil -} - -func (m *TxCompat) GetBodyBytes() []byte { - if m != nil { - return m.BodyBytes - } - return nil -} - -// UserOperationResponse defines the response of a UserOperation. -// If the operation fails the error field will be populated. -type UserOperationResponse struct { - // authentication_gas_used defines the gas used for the authentication part of the UserOperation. - AuthenticationGasUsed uint64 `protobuf:"varint,1,opt,name=authentication_gas_used,json=authenticationGasUsed,proto3" json:"authentication_gas_used,omitempty"` - // bundler_payment_gas_used defines the gas used for the bundler payment part of the UserOperation. - BundlerPaymentGasUsed uint64 `protobuf:"varint,2,opt,name=bundler_payment_gas_used,json=bundlerPaymentGasUsed,proto3" json:"bundler_payment_gas_used,omitempty"` - // bundler_payment_responses defines the responses of the bundler payment messages. - // It can be empty if the bundler does not need any form of payment. - BundlerPaymentResponses []*types.Any `protobuf:"bytes,3,rep,name=bundler_payment_responses,json=bundlerPaymentResponses,proto3" json:"bundler_payment_responses,omitempty"` - // execution_gas_used defines the gas used for the execution part of the UserOperation. - ExecutionGasUsed uint64 `protobuf:"varint,4,opt,name=execution_gas_used,json=executionGasUsed,proto3" json:"execution_gas_used,omitempty"` - // execution_responses defines the responses of the execution messages. - ExecutionResponses []*types.Any `protobuf:"bytes,5,rep,name=execution_responses,json=executionResponses,proto3" json:"execution_responses,omitempty"` - // error defines the error that occurred during the execution of the UserOperation. - // If the error is not empty, the UserOperation failed. - // Other fields might be populated even if the error is not empty, for example - // if the operation fails after the authentication step, the authentication_gas_used - // field will be populated. - Error string `protobuf:"bytes,6,opt,name=error,proto3" json:"error,omitempty"` -} - -func (m *UserOperationResponse) Reset() { *m = UserOperationResponse{} } -func (m *UserOperationResponse) String() string { return proto.CompactTextString(m) } -func (*UserOperationResponse) ProtoMessage() {} -func (*UserOperationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9f9bcc910ad46d4b, []int{2} -} -func (m *UserOperationResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UserOperationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UserOperationResponse.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 *UserOperationResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserOperationResponse.Merge(m, src) -} -func (m *UserOperationResponse) XXX_Size() int { - return m.Size() -} -func (m *UserOperationResponse) XXX_DiscardUnknown() { - xxx_messageInfo_UserOperationResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_UserOperationResponse proto.InternalMessageInfo - -func (m *UserOperationResponse) GetAuthenticationGasUsed() uint64 { - if m != nil { - return m.AuthenticationGasUsed - } - return 0 -} - -func (m *UserOperationResponse) GetBundlerPaymentGasUsed() uint64 { - if m != nil { - return m.BundlerPaymentGasUsed - } - return 0 -} - -func (m *UserOperationResponse) GetBundlerPaymentResponses() []*types.Any { - if m != nil { - return m.BundlerPaymentResponses - } - return nil -} - -func (m *UserOperationResponse) GetExecutionGasUsed() uint64 { - if m != nil { - return m.ExecutionGasUsed - } - return 0 -} - -func (m *UserOperationResponse) GetExecutionResponses() []*types.Any { - if m != nil { - return m.ExecutionResponses - } - return nil -} - -func (m *UserOperationResponse) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -func init() { - proto.RegisterType((*UserOperation)(nil), "cosmos.accounts.v1.UserOperation") - proto.RegisterType((*TxCompat)(nil), "cosmos.accounts.v1.TxCompat") - proto.RegisterType((*UserOperationResponse)(nil), "cosmos.accounts.v1.UserOperationResponse") -} - -func init() { - proto.RegisterFile("cosmos/accounts/v1/account_abstraction.proto", fileDescriptor_9f9bcc910ad46d4b) -} - -var fileDescriptor_9f9bcc910ad46d4b = []byte{ - // 536 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x54, 0xcf, 0x6f, 0xd3, 0x30, - 0x18, 0x6d, 0xda, 0xae, 0xb4, 0x86, 0x09, 0xf0, 0xda, 0x2e, 0x9b, 0x20, 0xaa, 0x7a, 0x40, 0x3d, - 0x4c, 0x8e, 0xc6, 0x10, 0xb0, 0x23, 0x1b, 0x13, 0x42, 0x62, 0x30, 0x22, 0x76, 0xe1, 0x12, 0x39, - 0x89, 0xdb, 0x45, 0x34, 0x76, 0x64, 0x3b, 0x53, 0xf3, 0x5f, 0x70, 0xe4, 0x4f, 0xe2, 0xb8, 0x23, - 0x47, 0xd4, 0x8a, 0xff, 0x03, 0xc5, 0xf9, 0xd5, 0x34, 0xd0, 0x9b, 0xfd, 0x7d, 0xef, 0x7d, 0xef, - 0xc5, 0xef, 0x53, 0xc0, 0x91, 0xcb, 0x44, 0xc0, 0x84, 0x89, 0x5d, 0x97, 0x45, 0x54, 0x0a, 0xf3, - 0xf6, 0x38, 0x3f, 0xdb, 0xd8, 0x11, 0x92, 0x63, 0x57, 0xfa, 0x8c, 0xa2, 0x90, 0x33, 0xc9, 0x20, - 0x4c, 0xd1, 0x28, 0x47, 0xa3, 0xdb, 0xe3, 0xc3, 0x83, 0x19, 0x63, 0xb3, 0x39, 0x31, 0x15, 0xc2, - 0x89, 0xa6, 0x26, 0xa6, 0x71, 0x0a, 0x1f, 0xff, 0x68, 0x83, 0xdd, 0x6b, 0x41, 0xf8, 0xa7, 0x90, - 0x70, 0x9c, 0x8c, 0x81, 0x43, 0xd0, 0x11, 0x84, 0x7a, 0x84, 0xeb, 0xda, 0x48, 0x9b, 0xf4, 0xac, - 0xec, 0x06, 0x4f, 0xc0, 0x00, 0x47, 0xf2, 0x86, 0x50, 0xe9, 0xbb, 0x0a, 0x69, 0x07, 0x44, 0xde, - 0x30, 0x4f, 0x6f, 0x2a, 0x58, 0xbf, 0xda, 0xbc, 0x54, 0x3d, 0x78, 0x01, 0xf6, 0x36, 0x48, 0x1e, - 0x96, 0x58, 0x6f, 0x8d, 0xb4, 0xc9, 0xfd, 0xe7, 0x7d, 0x94, 0xfa, 0x42, 0xb9, 0x2f, 0xf4, 0x86, - 0xc6, 0x16, 0xac, 0x12, 0xde, 0x62, 0x89, 0xe1, 0x6b, 0xa0, 0x6f, 0x8c, 0x99, 0x61, 0x61, 0xcf, - 0xfd, 0xc0, 0x97, 0x7a, 0x7b, 0xa4, 0x4d, 0xda, 0xd6, 0xb0, 0xda, 0x7f, 0x87, 0xc5, 0x87, 0xa4, - 0x0b, 0x3f, 0x02, 0xdd, 0x89, 0xa8, 0x37, 0x27, 0xdc, 0x0e, 0x71, 0x1c, 0x10, 0x2a, 0xed, 0x80, - 0x08, 0x81, 0x67, 0x44, 0xe8, 0x3b, 0xa3, 0xd6, 0x7f, 0x5d, 0x0c, 0x33, 0xd6, 0x55, 0x4a, 0xba, - 0xcc, 0x38, 0xf0, 0x14, 0x1c, 0x6c, 0xce, 0x2b, 0xad, 0x74, 0x52, 0x2b, 0x55, 0x6a, 0x61, 0xe5, - 0x1c, 0x40, 0xb2, 0x20, 0x6e, 0x94, 0xbd, 0x5d, 0x66, 0xe2, 0xde, 0x16, 0x13, 0x8f, 0x0b, 0x7c, - 0xa1, 0x8f, 0xc0, 0x5e, 0x39, 0xa4, 0x54, 0xee, 0x2a, 0xe5, 0x12, 0x5f, 0x88, 0x9e, 0x82, 0x9e, - 0x5c, 0xd8, 0x2e, 0x0b, 0x42, 0x2c, 0xf5, 0x9e, 0x7a, 0xf6, 0x27, 0xa8, 0xbe, 0x22, 0xe8, 0xcb, - 0xe2, 0x5c, 0x61, 0xac, 0xae, 0xcc, 0x4e, 0xe3, 0xcf, 0xa0, 0x9b, 0x57, 0xe1, 0x33, 0xf0, 0x30, - 0x79, 0x60, 0xdb, 0xa7, 0x53, 0x66, 0x3b, 0xb1, 0x24, 0x42, 0x6d, 0xc7, 0x03, 0x6b, 0x37, 0x29, - 0xbf, 0xa7, 0x53, 0x76, 0x96, 0x14, 0xe1, 0x53, 0x00, 0x1c, 0xe6, 0xc5, 0x19, 0xa4, 0xa9, 0x20, - 0xbd, 0xa4, 0xa2, 0xda, 0xe3, 0x3f, 0x4d, 0x30, 0xa8, 0x6c, 0x9b, 0x45, 0x44, 0xc8, 0xa8, 0x20, - 0xf0, 0x25, 0xd8, 0xff, 0x47, 0xc2, 0x91, 0x20, 0x9e, 0x12, 0x6a, 0x5b, 0x83, 0x5a, 0xc0, 0xd7, - 0x82, 0x78, 0xf0, 0x55, 0x3d, 0xdf, 0x82, 0xd8, 0x4c, 0x89, 0xb5, 0x38, 0x14, 0xf1, 0xaa, 0x1e, - 0x24, 0xcf, 0xcc, 0x08, 0xbd, 0xb5, 0x25, 0x94, 0xfd, 0xea, 0xbc, 0xfc, 0x0b, 0x04, 0x3c, 0x5a, - 0xcf, 0xb7, 0x30, 0x91, 0xae, 0xe7, 0xa3, 0xf5, 0x64, 0x94, 0xfe, 0xc5, 0x7a, 0x90, 0xa5, 0xf2, - 0xb6, 0x9d, 0x2c, 0xc7, 0x97, 0xa2, 0x7d, 0xb0, 0x43, 0x38, 0x67, 0x5c, 0xed, 0x5e, 0xcf, 0x4a, - 0x2f, 0x67, 0x2f, 0x7e, 0x2e, 0x0d, 0xed, 0x6e, 0x69, 0x68, 0xbf, 0x97, 0x86, 0xf6, 0x7d, 0x65, - 0x34, 0xee, 0x56, 0x46, 0xe3, 0xd7, 0xca, 0x68, 0x7c, 0x3d, 0x4c, 0xb3, 0x17, 0xde, 0x37, 0xe4, - 0x33, 0x73, 0xb1, 0xfe, 0x53, 0x71, 0x3a, 0x4a, 0xed, 0xe4, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xb2, 0x84, 0x4a, 0x05, 0x71, 0x04, 0x00, 0x00, -} - -func (m *UserOperation) 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 *UserOperation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UserOperation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.TxCompat != nil { - { - size, err := m.TxCompat.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAccountAbstraction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - if m.ExecutionGasLimit != 0 { - i = encodeVarintAccountAbstraction(dAtA, i, uint64(m.ExecutionGasLimit)) - i-- - dAtA[i] = 0x40 - } - if len(m.ExecutionMessages) > 0 { - for iNdEx := len(m.ExecutionMessages) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ExecutionMessages[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAccountAbstraction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if m.BundlerPaymentGasLimit != 0 { - i = encodeVarintAccountAbstraction(dAtA, i, uint64(m.BundlerPaymentGasLimit)) - i-- - dAtA[i] = 0x30 - } - if len(m.BundlerPaymentMessages) > 0 { - for iNdEx := len(m.BundlerPaymentMessages) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.BundlerPaymentMessages[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAccountAbstraction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if m.AuthenticationGasLimit != 0 { - i = encodeVarintAccountAbstraction(dAtA, i, uint64(m.AuthenticationGasLimit)) - i-- - dAtA[i] = 0x20 - } - if m.AuthenticationData != nil { - { - size, err := m.AuthenticationData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAccountAbstraction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.AuthenticationMethod) > 0 { - i -= len(m.AuthenticationMethod) - copy(dAtA[i:], m.AuthenticationMethod) - i = encodeVarintAccountAbstraction(dAtA, i, uint64(len(m.AuthenticationMethod))) - i-- - dAtA[i] = 0x12 - } - if len(m.Sender) > 0 { - i -= len(m.Sender) - copy(dAtA[i:], m.Sender) - i = encodeVarintAccountAbstraction(dAtA, i, uint64(len(m.Sender))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TxCompat) 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 *TxCompat) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TxCompat) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.BodyBytes) > 0 { - i -= len(m.BodyBytes) - copy(dAtA[i:], m.BodyBytes) - i = encodeVarintAccountAbstraction(dAtA, i, uint64(len(m.BodyBytes))) - i-- - dAtA[i] = 0x12 - } - if len(m.AuthInfoBytes) > 0 { - i -= len(m.AuthInfoBytes) - copy(dAtA[i:], m.AuthInfoBytes) - i = encodeVarintAccountAbstraction(dAtA, i, uint64(len(m.AuthInfoBytes))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *UserOperationResponse) 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 *UserOperationResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UserOperationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Error) > 0 { - i -= len(m.Error) - copy(dAtA[i:], m.Error) - i = encodeVarintAccountAbstraction(dAtA, i, uint64(len(m.Error))) - i-- - dAtA[i] = 0x32 - } - if len(m.ExecutionResponses) > 0 { - for iNdEx := len(m.ExecutionResponses) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ExecutionResponses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAccountAbstraction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if m.ExecutionGasUsed != 0 { - i = encodeVarintAccountAbstraction(dAtA, i, uint64(m.ExecutionGasUsed)) - i-- - dAtA[i] = 0x20 - } - if len(m.BundlerPaymentResponses) > 0 { - for iNdEx := len(m.BundlerPaymentResponses) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.BundlerPaymentResponses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAccountAbstraction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.BundlerPaymentGasUsed != 0 { - i = encodeVarintAccountAbstraction(dAtA, i, uint64(m.BundlerPaymentGasUsed)) - i-- - dAtA[i] = 0x10 - } - if m.AuthenticationGasUsed != 0 { - i = encodeVarintAccountAbstraction(dAtA, i, uint64(m.AuthenticationGasUsed)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintAccountAbstraction(dAtA []byte, offset int, v uint64) int { - offset -= sovAccountAbstraction(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *UserOperation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovAccountAbstraction(uint64(l)) - } - l = len(m.AuthenticationMethod) - if l > 0 { - n += 1 + l + sovAccountAbstraction(uint64(l)) - } - if m.AuthenticationData != nil { - l = m.AuthenticationData.Size() - n += 1 + l + sovAccountAbstraction(uint64(l)) - } - if m.AuthenticationGasLimit != 0 { - n += 1 + sovAccountAbstraction(uint64(m.AuthenticationGasLimit)) - } - if len(m.BundlerPaymentMessages) > 0 { - for _, e := range m.BundlerPaymentMessages { - l = e.Size() - n += 1 + l + sovAccountAbstraction(uint64(l)) - } - } - if m.BundlerPaymentGasLimit != 0 { - n += 1 + sovAccountAbstraction(uint64(m.BundlerPaymentGasLimit)) - } - if len(m.ExecutionMessages) > 0 { - for _, e := range m.ExecutionMessages { - l = e.Size() - n += 1 + l + sovAccountAbstraction(uint64(l)) - } - } - if m.ExecutionGasLimit != 0 { - n += 1 + sovAccountAbstraction(uint64(m.ExecutionGasLimit)) - } - if m.TxCompat != nil { - l = m.TxCompat.Size() - n += 1 + l + sovAccountAbstraction(uint64(l)) - } - return n -} - -func (m *TxCompat) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.AuthInfoBytes) - if l > 0 { - n += 1 + l + sovAccountAbstraction(uint64(l)) - } - l = len(m.BodyBytes) - if l > 0 { - n += 1 + l + sovAccountAbstraction(uint64(l)) - } - return n -} - -func (m *UserOperationResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AuthenticationGasUsed != 0 { - n += 1 + sovAccountAbstraction(uint64(m.AuthenticationGasUsed)) - } - if m.BundlerPaymentGasUsed != 0 { - n += 1 + sovAccountAbstraction(uint64(m.BundlerPaymentGasUsed)) - } - if len(m.BundlerPaymentResponses) > 0 { - for _, e := range m.BundlerPaymentResponses { - l = e.Size() - n += 1 + l + sovAccountAbstraction(uint64(l)) - } - } - if m.ExecutionGasUsed != 0 { - n += 1 + sovAccountAbstraction(uint64(m.ExecutionGasUsed)) - } - if len(m.ExecutionResponses) > 0 { - for _, e := range m.ExecutionResponses { - l = e.Size() - n += 1 + l + sovAccountAbstraction(uint64(l)) - } - } - l = len(m.Error) - if l > 0 { - n += 1 + l + sovAccountAbstraction(uint64(l)) - } - return n -} - -func sovAccountAbstraction(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozAccountAbstraction(x uint64) (n int) { - return sovAccountAbstraction(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *UserOperation) 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 ErrIntOverflowAccountAbstraction - } - 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: UserOperation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UserOperation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccountAbstraction - } - 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 ErrInvalidLengthAccountAbstraction - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccountAbstraction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthenticationMethod", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccountAbstraction - } - 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 ErrInvalidLengthAccountAbstraction - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccountAbstraction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AuthenticationMethod = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthenticationData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccountAbstraction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccountAbstraction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccountAbstraction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuthenticationData == nil { - m.AuthenticationData = &types.Any{} - } - if err := m.AuthenticationData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthenticationGasLimit", wireType) - } - m.AuthenticationGasLimit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccountAbstraction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AuthenticationGasLimit |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BundlerPaymentMessages", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccountAbstraction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccountAbstraction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccountAbstraction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BundlerPaymentMessages = append(m.BundlerPaymentMessages, &types.Any{}) - if err := m.BundlerPaymentMessages[len(m.BundlerPaymentMessages)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BundlerPaymentGasLimit", wireType) - } - m.BundlerPaymentGasLimit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccountAbstraction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BundlerPaymentGasLimit |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutionMessages", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccountAbstraction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccountAbstraction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccountAbstraction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExecutionMessages = append(m.ExecutionMessages, &types.Any{}) - if err := m.ExecutionMessages[len(m.ExecutionMessages)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutionGasLimit", wireType) - } - m.ExecutionGasLimit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccountAbstraction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExecutionGasLimit |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TxCompat", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccountAbstraction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccountAbstraction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccountAbstraction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TxCompat == nil { - m.TxCompat = &TxCompat{} - } - if err := m.TxCompat.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccountAbstraction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAccountAbstraction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TxCompat) 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 ErrIntOverflowAccountAbstraction - } - 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: TxCompat: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TxCompat: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthInfoBytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccountAbstraction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAccountAbstraction - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAccountAbstraction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AuthInfoBytes = append(m.AuthInfoBytes[:0], dAtA[iNdEx:postIndex]...) - if m.AuthInfoBytes == nil { - m.AuthInfoBytes = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BodyBytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccountAbstraction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAccountAbstraction - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAccountAbstraction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BodyBytes = append(m.BodyBytes[:0], dAtA[iNdEx:postIndex]...) - if m.BodyBytes == nil { - m.BodyBytes = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccountAbstraction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAccountAbstraction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UserOperationResponse) 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 ErrIntOverflowAccountAbstraction - } - 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: UserOperationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UserOperationResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthenticationGasUsed", wireType) - } - m.AuthenticationGasUsed = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccountAbstraction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AuthenticationGasUsed |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BundlerPaymentGasUsed", wireType) - } - m.BundlerPaymentGasUsed = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccountAbstraction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BundlerPaymentGasUsed |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BundlerPaymentResponses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccountAbstraction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccountAbstraction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccountAbstraction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BundlerPaymentResponses = append(m.BundlerPaymentResponses, &types.Any{}) - if err := m.BundlerPaymentResponses[len(m.BundlerPaymentResponses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutionGasUsed", wireType) - } - m.ExecutionGasUsed = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccountAbstraction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExecutionGasUsed |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutionResponses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccountAbstraction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccountAbstraction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccountAbstraction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExecutionResponses = append(m.ExecutionResponses, &types.Any{}) - if err := m.ExecutionResponses[len(m.ExecutionResponses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccountAbstraction - } - 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 ErrInvalidLengthAccountAbstraction - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccountAbstraction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Error = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccountAbstraction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAccountAbstraction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipAccountAbstraction(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAccountAbstraction - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAccountAbstraction - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAccountAbstraction - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthAccountAbstraction - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupAccountAbstraction - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthAccountAbstraction - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthAccountAbstraction = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAccountAbstraction = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupAccountAbstraction = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/accounts/v1/query.pb.go b/x/accounts/v1/query.pb.go index 9e96f6e654..0beb657ff6 100644 --- a/x/accounts/v1/query.pb.go +++ b/x/accounts/v1/query.pb.go @@ -481,110 +481,6 @@ func (m *AccountNumberResponse) GetNumber() uint64 { return 0 } -// SimulateUserOperationRequest is the query request used to simulate a -// UserOperation. -type SimulateUserOperationRequest struct { - // bundler can be filled to simulate the address of the bundler. - Bundler string `protobuf:"bytes,1,opt,name=bundler,proto3" json:"bundler,omitempty"` - // user_operation defines the user operation that we want to simulate. - // Gas limit fields are ignored. - UserOperation *UserOperation `protobuf:"bytes,2,opt,name=user_operation,json=userOperation,proto3" json:"user_operation,omitempty"` -} - -func (m *SimulateUserOperationRequest) Reset() { *m = SimulateUserOperationRequest{} } -func (m *SimulateUserOperationRequest) String() string { return proto.CompactTextString(m) } -func (*SimulateUserOperationRequest) ProtoMessage() {} -func (*SimulateUserOperationRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_16ad14c22e3080d2, []int{8} -} -func (m *SimulateUserOperationRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SimulateUserOperationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SimulateUserOperationRequest.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 *SimulateUserOperationRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SimulateUserOperationRequest.Merge(m, src) -} -func (m *SimulateUserOperationRequest) XXX_Size() int { - return m.Size() -} -func (m *SimulateUserOperationRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SimulateUserOperationRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SimulateUserOperationRequest proto.InternalMessageInfo - -func (m *SimulateUserOperationRequest) GetBundler() string { - if m != nil { - return m.Bundler - } - return "" -} - -func (m *SimulateUserOperationRequest) GetUserOperation() *UserOperation { - if m != nil { - return m.UserOperation - } - return nil -} - -// SimulateUserOperationResponse is the query response returned by the simulation. -// It will populate the gas limits fields. -type SimulateUserOperationResponse struct { - // UserOperationResponse is the response of the simulation. - UserOperationResponse *UserOperationResponse `protobuf:"bytes,1,opt,name=user_operation_response,json=userOperationResponse,proto3" json:"user_operation_response,omitempty"` -} - -func (m *SimulateUserOperationResponse) Reset() { *m = SimulateUserOperationResponse{} } -func (m *SimulateUserOperationResponse) String() string { return proto.CompactTextString(m) } -func (*SimulateUserOperationResponse) ProtoMessage() {} -func (*SimulateUserOperationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_16ad14c22e3080d2, []int{9} -} -func (m *SimulateUserOperationResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SimulateUserOperationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SimulateUserOperationResponse.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 *SimulateUserOperationResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SimulateUserOperationResponse.Merge(m, src) -} -func (m *SimulateUserOperationResponse) XXX_Size() int { - return m.Size() -} -func (m *SimulateUserOperationResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SimulateUserOperationResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_SimulateUserOperationResponse proto.InternalMessageInfo - -func (m *SimulateUserOperationResponse) GetUserOperationResponse() *UserOperationResponse { - if m != nil { - return m.UserOperationResponse - } - return nil -} - func init() { proto.RegisterType((*AccountQueryRequest)(nil), "cosmos.accounts.v1.AccountQueryRequest") proto.RegisterType((*AccountQueryResponse)(nil), "cosmos.accounts.v1.AccountQueryResponse") @@ -595,52 +491,44 @@ func init() { proto.RegisterType((*AccountTypeResponse)(nil), "cosmos.accounts.v1.AccountTypeResponse") proto.RegisterType((*AccountNumberRequest)(nil), "cosmos.accounts.v1.AccountNumberRequest") proto.RegisterType((*AccountNumberResponse)(nil), "cosmos.accounts.v1.AccountNumberResponse") - proto.RegisterType((*SimulateUserOperationRequest)(nil), "cosmos.accounts.v1.SimulateUserOperationRequest") - proto.RegisterType((*SimulateUserOperationResponse)(nil), "cosmos.accounts.v1.SimulateUserOperationResponse") } func init() { proto.RegisterFile("cosmos/accounts/v1/query.proto", fileDescriptor_16ad14c22e3080d2) } var fileDescriptor_16ad14c22e3080d2 = []byte{ - // 608 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xcf, 0x6f, 0x12, 0x41, - 0x14, 0x66, 0x69, 0xa5, 0xfa, 0x28, 0xd5, 0x8c, 0xa5, 0xe2, 0x46, 0x37, 0xb0, 0x07, 0x4b, 0x8d, - 0x99, 0x05, 0xf4, 0xe0, 0xcd, 0xe0, 0x89, 0xc4, 0x44, 0xc3, 0xd6, 0x5e, 0x4c, 0x0c, 0x2e, 0xcb, - 0x94, 0x12, 0x61, 0x97, 0xce, 0xec, 0x34, 0xe5, 0xe2, 0xc1, 0x9b, 0x37, 0xff, 0xac, 0x1e, 0x7b, - 0xf4, 0x68, 0xe0, 0x1f, 0x31, 0xcc, 0x0f, 0xd8, 0xad, 0x5b, 0x28, 0xb7, 0x79, 0xf3, 0xde, 0xfb, - 0xbe, 0xb7, 0xef, 0x7d, 0x6f, 0x16, 0x2c, 0x3f, 0x64, 0xa3, 0x90, 0x39, 0x9e, 0xef, 0x87, 0x3c, - 0x88, 0x98, 0x73, 0x51, 0x77, 0xce, 0x39, 0xa1, 0x13, 0x3c, 0xa6, 0x61, 0x14, 0x22, 0x24, 0xfd, - 0x58, 0xfb, 0xf1, 0x45, 0xdd, 0x7c, 0xda, 0x0f, 0xc3, 0xfe, 0x90, 0x38, 0x22, 0xa2, 0xcb, 0x4f, - 0x1d, 0x2f, 0x50, 0xe1, 0xe6, 0xab, 0x14, 0x38, 0x75, 0xee, 0x78, 0x5d, 0x16, 0x51, 0xcf, 0x8f, - 0x06, 0x61, 0x20, 0xa3, 0xed, 0xaf, 0xf0, 0xb8, 0x29, 0x9d, 0xed, 0x39, 0xa5, 0x4b, 0xce, 0x39, - 0x61, 0x11, 0x3a, 0x80, 0x5c, 0xe4, 0xd1, 0x3e, 0x89, 0x4a, 0x46, 0xd9, 0xa8, 0x3e, 0x70, 0x95, - 0x85, 0x30, 0xec, 0x50, 0x19, 0x52, 0xca, 0x96, 0x8d, 0x6a, 0xbe, 0xb1, 0x8f, 0x65, 0x25, 0x58, - 0x57, 0x82, 0x9b, 0xc1, 0xc4, 0xd5, 0x41, 0x76, 0x0b, 0xf6, 0x93, 0xf0, 0x6c, 0x1c, 0x06, 0x8c, - 0xa0, 0x1a, 0xdc, 0xa7, 0xea, 0x2c, 0x18, 0x6e, 0x03, 0x5a, 0x44, 0xd9, 0x0d, 0x28, 0x1c, 0xfb, - 0x67, 0x64, 0xe4, 0xe9, 0x12, 0x2b, 0xb0, 0xab, 0x3f, 0x2b, 0x9a, 0x8c, 0x89, 0x2a, 0x34, 0xaf, - 0xee, 0x3e, 0x4f, 0xc6, 0xc4, 0xbe, 0xca, 0xc2, 0x9e, 0x4e, 0x52, 0xc4, 0x1f, 0x20, 0x3f, 0x08, - 0x06, 0x51, 0x87, 0x89, 0x6b, 0xc5, 0xfd, 0x12, 0xff, 0xdf, 0x62, 0x9c, 0x4c, 0xc4, 0x2d, 0x2f, - 0xe8, 0x0d, 0x09, 0x75, 0x61, 0x9e, 0x2e, 0x7d, 0xe8, 0x04, 0x1e, 0x91, 0x4b, 0xe2, 0xf3, 0x88, - 0x74, 0xce, 0xa4, 0x9b, 0x95, 0xb2, 0xe5, 0xad, 0x0d, 0x11, 0x1f, 0x2a, 0x0c, 0x65, 0x33, 0xd4, - 0x86, 0x3d, 0x31, 0xff, 0x25, 0xe8, 0xd6, 0xc6, 0xa0, 0x05, 0x81, 0xa0, 0x21, 0xcd, 0x77, 0xb0, - 0xa3, 0xce, 0xa8, 0xb4, 0x1c, 0xa1, 0x6c, 0x99, 0x36, 0x91, 0x19, 0x1b, 0x4a, 0x56, 0xb8, 0x96, - 0xed, 0xc7, 0x80, 0x9a, 0xcb, 0xce, 0xea, 0x19, 0x94, 0x60, 0xc7, 0xeb, 0xf5, 0x28, 0x61, 0x4c, - 0x63, 0x29, 0xd3, 0x7e, 0xbb, 0xd0, 0x95, 0x8c, 0x57, 0xed, 0xbf, 0xc3, 0xd0, 0x6a, 0x0b, 0xc9, - 0x7c, 0xe4, 0xa3, 0x2e, 0xa1, 0xeb, 0xb9, 0x1c, 0x28, 0xde, 0xc8, 0x50, 0x6c, 0x07, 0x90, 0x0b, - 0xc4, 0x8d, 0xc8, 0xd8, 0x76, 0x95, 0x65, 0xff, 0x34, 0xe0, 0xd9, 0xf1, 0x60, 0xc4, 0x87, 0x5e, - 0x44, 0x4e, 0x18, 0xa1, 0x9f, 0xc6, 0x84, 0x7a, 0xf3, 0xa5, 0x88, 0x71, 0x75, 0xb9, 0x68, 0x97, - 0xe6, 0x52, 0x26, 0x6a, 0xc1, 0x1e, 0x67, 0x84, 0x76, 0x42, 0x9d, 0xa2, 0xf6, 0xa0, 0x92, 0x36, - 0x9b, 0x24, 0x76, 0x81, 0xc7, 0xcd, 0x79, 0x11, 0xcf, 0x6f, 0x29, 0x42, 0x95, 0xef, 0xc1, 0x93, - 0x24, 0x57, 0xe7, 0xc6, 0xce, 0x1c, 0xad, 0x27, 0x55, 0x09, 0x6e, 0x91, 0xa7, 0x5d, 0x37, 0x7e, - 0x6d, 0xc3, 0x3d, 0xb1, 0x99, 0xc8, 0x87, 0xdd, 0xf8, 0xa6, 0xa2, 0xc3, 0x34, 0xec, 0x94, 0xa7, - 0xc2, 0xac, 0xae, 0x0f, 0x54, 0x1a, 0xca, 0xa0, 0x36, 0xe4, 0xd4, 0xea, 0x54, 0x56, 0x69, 0x59, - 0x02, 0xdb, 0xeb, 0xe5, 0x6e, 0x67, 0xd0, 0x37, 0xc8, 0xc7, 0x84, 0x86, 0x5e, 0xac, 0xa8, 0x26, - 0xa6, 0x5c, 0xf3, 0x70, 0x6d, 0xdc, 0x82, 0xe1, 0x14, 0x0a, 0x09, 0x79, 0xa1, 0x55, 0x5f, 0x9c, - 0xd0, 0xac, 0x79, 0x74, 0x87, 0xc8, 0x05, 0xcf, 0x0f, 0x28, 0xa6, 0xea, 0x01, 0xd5, 0x52, 0x1b, - 0xb1, 0x42, 0xbf, 0x66, 0x7d, 0x83, 0x0c, 0xcd, 0xff, 0xfe, 0xcd, 0xd5, 0xd4, 0x32, 0xae, 0xa7, - 0x96, 0xf1, 0x77, 0x6a, 0x19, 0xbf, 0x67, 0x56, 0xe6, 0x7a, 0x66, 0x65, 0xfe, 0xcc, 0xac, 0xcc, - 0x17, 0x53, 0xa2, 0xb1, 0xde, 0x77, 0x3c, 0x08, 0x9d, 0xcb, 0xf8, 0xaf, 0xa5, 0x9b, 0x13, 0xef, - 0xf5, 0xeb, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xcd, 0xc0, 0xe6, 0x63, 0xc6, 0x06, 0x00, 0x00, + // 497 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xc1, 0x6e, 0xd3, 0x40, + 0x10, 0xb5, 0x13, 0x48, 0x60, 0xd2, 0x14, 0x34, 0x94, 0xca, 0xf8, 0x60, 0xa5, 0x3e, 0xd0, 0xc0, + 0x61, 0xdd, 0x06, 0x0e, 0xdc, 0x50, 0x38, 0x55, 0x42, 0x42, 0x8a, 0x81, 0x0b, 0x12, 0x0a, 0x8e, + 0xb3, 0x4d, 0x23, 0x1a, 0x6f, 0xea, 0xb5, 0xab, 0xe6, 0x13, 0xb8, 0xf1, 0x59, 0x3d, 0xf6, 0xc8, + 0x11, 0x25, 0x3f, 0x82, 0xba, 0x3b, 0x9b, 0x38, 0x50, 0xe2, 0xf6, 0xe6, 0xd9, 0x79, 0xf3, 0xde, + 0xfa, 0xbd, 0xb1, 0xc1, 0x8b, 0x85, 0x9c, 0x08, 0x19, 0x44, 0x71, 0x2c, 0xf2, 0x24, 0x93, 0xc1, + 0xf9, 0x61, 0x70, 0x96, 0xf3, 0x74, 0xc6, 0xa6, 0xa9, 0xc8, 0x04, 0xa2, 0xee, 0x33, 0xd3, 0x67, + 0xe7, 0x87, 0xee, 0xb3, 0x91, 0x10, 0xa3, 0x53, 0x1e, 0x28, 0xc4, 0x20, 0x3f, 0x0e, 0xa2, 0x84, + 0xe0, 0xfe, 0x57, 0x78, 0xd2, 0xd5, 0xc8, 0xde, 0x35, 0x49, 0xc8, 0xcf, 0x72, 0x2e, 0x33, 0xdc, + 0x85, 0x5a, 0x16, 0xa5, 0x23, 0x9e, 0x39, 0x76, 0xcb, 0x6e, 0x3f, 0x0c, 0xa9, 0x42, 0x06, 0xf5, + 0x54, 0x43, 0x9c, 0x4a, 0xcb, 0x6e, 0x37, 0x3a, 0x3b, 0x4c, 0x73, 0x33, 0xc3, 0xcd, 0xba, 0xc9, + 0x2c, 0x34, 0x20, 0xff, 0x08, 0x76, 0xd6, 0xe9, 0xe5, 0x54, 0x24, 0x92, 0xe3, 0x01, 0x3c, 0x48, + 0xe9, 0x59, 0x29, 0xfc, 0x8f, 0x68, 0x89, 0xf2, 0x3b, 0xd0, 0xfc, 0x18, 0x9f, 0xf0, 0x49, 0x64, + 0xae, 0xb8, 0x07, 0x5b, 0xf4, 0x8e, 0xfd, 0x6c, 0x36, 0xe5, 0x74, 0xd1, 0x06, 0x9d, 0x7d, 0x9a, + 0x4d, 0xb9, 0x7f, 0x59, 0x81, 0x6d, 0x33, 0x44, 0xc2, 0xef, 0xa1, 0x31, 0x4e, 0xc6, 0x59, 0x5f, + 0xaa, 0x63, 0xd2, 0x7e, 0xc9, 0xfe, 0x35, 0x8d, 0xad, 0x0f, 0xb2, 0xa3, 0x28, 0x19, 0x9e, 0xf2, + 0x34, 0x84, 0xeb, 0x71, 0xdd, 0xc3, 0xcf, 0xf0, 0x98, 0x5f, 0xf0, 0x38, 0xcf, 0x78, 0xff, 0x44, + 0xb7, 0xa5, 0x53, 0x69, 0x55, 0xef, 0xc8, 0xf8, 0x88, 0x38, 0xa8, 0x96, 0xd8, 0x83, 0x6d, 0x95, + 0xe8, 0x8a, 0xb4, 0x7a, 0x67, 0xd2, 0xa6, 0x62, 0x30, 0x94, 0xee, 0x5b, 0xa8, 0xd3, 0x33, 0x3a, + 0xab, 0x08, 0xb5, 0x65, 0xa6, 0x44, 0xb7, 0x10, 0x4a, 0x45, 0xb5, 0x56, 0xf6, 0x33, 0xc0, 0xee, + 0xca, 0x59, 0x93, 0x81, 0x03, 0xf5, 0x68, 0x38, 0x4c, 0xb9, 0x94, 0x86, 0x8b, 0x4a, 0xff, 0xcd, + 0x72, 0xaf, 0x34, 0x9e, 0xec, 0xbf, 0x45, 0x68, 0x07, 0xcb, 0x95, 0xf9, 0x90, 0x4f, 0x06, 0x3c, + 0x2d, 0xd7, 0x0a, 0xe0, 0xe9, 0x5f, 0x13, 0xa4, 0xb6, 0x0b, 0xb5, 0x44, 0x9d, 0xa8, 0x89, 0x7b, + 0x21, 0x55, 0x9d, 0x1f, 0x55, 0xb8, 0xaf, 0xf6, 0x11, 0x63, 0xd8, 0x2a, 0xee, 0x27, 0xee, 0xdf, + 0x64, 0xf1, 0x0d, 0x1f, 0x88, 0xdb, 0x2e, 0x07, 0x92, 0x73, 0x16, 0xf6, 0xa0, 0x46, 0x0b, 0xb3, + 0xb7, 0x29, 0x41, 0x4d, 0xec, 0x97, 0x87, 0xec, 0x5b, 0xf8, 0x0d, 0x1a, 0x05, 0x7b, 0xf1, 0xf9, + 0x86, 0xdb, 0x14, 0xf2, 0x72, 0xf7, 0x4b, 0x71, 0x4b, 0x85, 0x63, 0x68, 0xae, 0x99, 0x8a, 0x9b, + 0xde, 0x78, 0x2d, 0x29, 0xf7, 0xc5, 0x2d, 0x90, 0x46, 0xe7, 0xdd, 0xeb, 0xcb, 0xb9, 0x67, 0x5f, + 0xcd, 0x3d, 0xfb, 0xf7, 0xdc, 0xb3, 0x7f, 0x2e, 0x3c, 0xeb, 0x6a, 0xe1, 0x59, 0xbf, 0x16, 0x9e, + 0xf5, 0xc5, 0xd5, 0x2c, 0x72, 0xf8, 0x9d, 0x8d, 0x45, 0x70, 0x51, 0xfc, 0xe3, 0x0d, 0x6a, 0xea, + 0x2f, 0xf1, 0xea, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xea, 0x75, 0x93, 0xfa, 0x0e, 0x05, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -663,8 +551,6 @@ type QueryClient interface { AccountType(ctx context.Context, in *AccountTypeRequest, opts ...grpc.CallOption) (*AccountTypeResponse, error) // AccountNumber returns the account number given the account address. AccountNumber(ctx context.Context, in *AccountNumberRequest, opts ...grpc.CallOption) (*AccountNumberResponse, error) - // SimulateUserOperation simulates a user operation. - SimulateUserOperation(ctx context.Context, in *SimulateUserOperationRequest, opts ...grpc.CallOption) (*SimulateUserOperationResponse, error) } type queryClient struct { @@ -711,15 +597,6 @@ func (c *queryClient) AccountNumber(ctx context.Context, in *AccountNumberReques return out, nil } -func (c *queryClient) SimulateUserOperation(ctx context.Context, in *SimulateUserOperationRequest, opts ...grpc.CallOption) (*SimulateUserOperationResponse, error) { - out := new(SimulateUserOperationResponse) - err := c.cc.Invoke(ctx, "/cosmos.accounts.v1.Query/SimulateUserOperation", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // QueryServer is the server API for Query service. type QueryServer interface { // AccountQuery runs an account query. @@ -730,8 +607,6 @@ type QueryServer interface { AccountType(context.Context, *AccountTypeRequest) (*AccountTypeResponse, error) // AccountNumber returns the account number given the account address. AccountNumber(context.Context, *AccountNumberRequest) (*AccountNumberResponse, error) - // SimulateUserOperation simulates a user operation. - SimulateUserOperation(context.Context, *SimulateUserOperationRequest) (*SimulateUserOperationResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -750,9 +625,6 @@ func (*UnimplementedQueryServer) AccountType(ctx context.Context, req *AccountTy func (*UnimplementedQueryServer) AccountNumber(ctx context.Context, req *AccountNumberRequest) (*AccountNumberResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AccountNumber not implemented") } -func (*UnimplementedQueryServer) SimulateUserOperation(ctx context.Context, req *SimulateUserOperationRequest) (*SimulateUserOperationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SimulateUserOperation not implemented") -} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -830,24 +702,6 @@ func _Query_AccountNumber_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } -func _Query_SimulateUserOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SimulateUserOperationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).SimulateUserOperation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.accounts.v1.Query/SimulateUserOperation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).SimulateUserOperation(ctx, req.(*SimulateUserOperationRequest)) - } - return interceptor(ctx, in, info, handler) -} - var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.accounts.v1.Query", HandlerType: (*QueryServer)(nil), @@ -868,10 +722,6 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "AccountNumber", Handler: _Query_AccountNumber_Handler, }, - { - MethodName: "SimulateUserOperation", - Handler: _Query_SimulateUserOperation_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/accounts/v1/query.proto", @@ -1202,83 +1052,6 @@ func (m *AccountNumberResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *SimulateUserOperationRequest) 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 *SimulateUserOperationRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SimulateUserOperationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.UserOperation != nil { - { - size, err := m.UserOperation.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Bundler) > 0 { - i -= len(m.Bundler) - copy(dAtA[i:], m.Bundler) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Bundler))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SimulateUserOperationResponse) 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 *SimulateUserOperationResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SimulateUserOperationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.UserOperationResponse != nil { - { - size, err := m.UserOperationResponse.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 @@ -1426,36 +1199,6 @@ func (m *AccountNumberResponse) Size() (n int) { return n } -func (m *SimulateUserOperationRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Bundler) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.UserOperation != nil { - l = m.UserOperation.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *SimulateUserOperationResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.UserOperationResponse != nil { - l = m.UserOperationResponse.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2331,210 +2074,6 @@ func (m *AccountNumberResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *SimulateUserOperationRequest) 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: SimulateUserOperationRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SimulateUserOperationRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bundler", 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.Bundler = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserOperation", 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.UserOperation == nil { - m.UserOperation = &UserOperation{} - } - if err := m.UserOperation.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 *SimulateUserOperationResponse) 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: SimulateUserOperationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SimulateUserOperationResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserOperationResponse", 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.UserOperationResponse == nil { - m.UserOperationResponse = &UserOperationResponse{} - } - if err := m.UserOperationResponse.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/accounts/v1/tx.pb.go b/x/accounts/v1/tx.pb.go index 6cb6be99f8..3a890f0356 100644 --- a/x/accounts/v1/tx.pb.go +++ b/x/accounts/v1/tx.pb.go @@ -10,6 +10,7 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types1 "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" + tx "github.com/cosmos/cosmos-sdk/types/tx" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -286,8 +287,8 @@ type MsgExecuteBundle struct { // bundler defines the entity going through the standard TX flow // to execute one or multiple UserOperations on behalf of others. Bundler string `protobuf:"bytes,1,opt,name=bundler,proto3" json:"bundler,omitempty"` - // operations is the list of operations to be executed. - Operations []*UserOperation `protobuf:"bytes,2,rep,name=operations,proto3" json:"operations,omitempty"` + // txs defines the txs to execute on behalf of other users. + Txs []*tx.TxRaw `protobuf:"bytes,2,rep,name=txs,proto3" json:"txs,omitempty"` } func (m *MsgExecuteBundle) Reset() { *m = MsgExecuteBundle{} } @@ -330,24 +331,77 @@ func (m *MsgExecuteBundle) GetBundler() string { return "" } -func (m *MsgExecuteBundle) GetOperations() []*UserOperation { +func (m *MsgExecuteBundle) GetTxs() []*tx.TxRaw { if m != nil { - return m.Operations + return m.Txs } return nil } +// BundledTxResponse defines the response of a bundled tx. +type BundledTxResponse struct { + ExecResponses *types.Any `protobuf:"bytes,1,opt,name=exec_responses,json=execResponses,proto3" json:"exec_responses,omitempty"` + Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` +} + +func (m *BundledTxResponse) Reset() { *m = BundledTxResponse{} } +func (m *BundledTxResponse) String() string { return proto.CompactTextString(m) } +func (*BundledTxResponse) ProtoMessage() {} +func (*BundledTxResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_29c2b6d8a13d4189, []int{5} +} +func (m *BundledTxResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BundledTxResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BundledTxResponse.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 *BundledTxResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_BundledTxResponse.Merge(m, src) +} +func (m *BundledTxResponse) XXX_Size() int { + return m.Size() +} +func (m *BundledTxResponse) XXX_DiscardUnknown() { + xxx_messageInfo_BundledTxResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_BundledTxResponse proto.InternalMessageInfo + +func (m *BundledTxResponse) GetExecResponses() *types.Any { + if m != nil { + return m.ExecResponses + } + return nil +} + +func (m *BundledTxResponse) GetError() string { + if m != nil { + return m.Error + } + return "" +} + // MsgExecuteBundleResponse defines the ExecuteBundle response type for the Msg/ExecuteBundle RPC method. type MsgExecuteBundleResponse struct { // responses is the list of responses returned by the account implementations. - Responses []*UserOperationResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` + Responses []*BundledTxResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` } func (m *MsgExecuteBundleResponse) Reset() { *m = MsgExecuteBundleResponse{} } func (m *MsgExecuteBundleResponse) String() string { return proto.CompactTextString(m) } func (*MsgExecuteBundleResponse) ProtoMessage() {} func (*MsgExecuteBundleResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_29c2b6d8a13d4189, []int{5} + return fileDescriptor_29c2b6d8a13d4189, []int{6} } func (m *MsgExecuteBundleResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -376,7 +430,7 @@ func (m *MsgExecuteBundleResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgExecuteBundleResponse proto.InternalMessageInfo -func (m *MsgExecuteBundleResponse) GetResponses() []*UserOperationResponse { +func (m *MsgExecuteBundleResponse) GetResponses() []*BundledTxResponse { if m != nil { return m.Responses } @@ -389,50 +443,53 @@ func init() { proto.RegisterType((*MsgExecute)(nil), "cosmos.accounts.v1.MsgExecute") proto.RegisterType((*MsgExecuteResponse)(nil), "cosmos.accounts.v1.MsgExecuteResponse") proto.RegisterType((*MsgExecuteBundle)(nil), "cosmos.accounts.v1.MsgExecuteBundle") + proto.RegisterType((*BundledTxResponse)(nil), "cosmos.accounts.v1.BundledTxResponse") proto.RegisterType((*MsgExecuteBundleResponse)(nil), "cosmos.accounts.v1.MsgExecuteBundleResponse") } func init() { proto.RegisterFile("cosmos/accounts/v1/tx.proto", fileDescriptor_29c2b6d8a13d4189) } var fileDescriptor_29c2b6d8a13d4189 = []byte{ - // 583 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x54, 0xcd, 0x6e, 0xd3, 0x40, - 0x10, 0x8e, 0x9b, 0x36, 0xa1, 0x9b, 0x42, 0xd1, 0xaa, 0x2a, 0xae, 0x2b, 0xb9, 0x69, 0x40, 0x10, - 0xaa, 0xb2, 0x6e, 0x02, 0xa7, 0xde, 0x12, 0xc4, 0xdf, 0x21, 0x42, 0x58, 0x70, 0xe1, 0x82, 0xfc, - 0xb3, 0x5d, 0xac, 0x26, 0xde, 0xc8, 0xb3, 0x8e, 0x92, 0x03, 0x12, 0xe2, 0x01, 0x10, 0xcf, 0xc1, - 0xa9, 0x8f, 0xd1, 0x63, 0x8f, 0x1c, 0x10, 0xa0, 0x04, 0xa9, 0xaf, 0x81, 0x6c, 0xef, 0x3a, 0x01, - 0x9a, 0xd0, 0x23, 0xa7, 0xec, 0xce, 0x7c, 0xf3, 0xcd, 0x7c, 0x5f, 0x66, 0x8d, 0xb6, 0x3d, 0x0e, - 0x3d, 0x0e, 0x96, 0xe3, 0x79, 0x3c, 0x0e, 0x05, 0x58, 0x83, 0x86, 0x25, 0x86, 0xa4, 0x1f, 0x71, - 0xc1, 0x31, 0xce, 0x92, 0x44, 0x25, 0xc9, 0xa0, 0x61, 0x6c, 0x31, 0xce, 0x59, 0x97, 0x5a, 0x29, - 0xc2, 0x8d, 0x8f, 0x2c, 0x27, 0x1c, 0x65, 0x70, 0xe3, 0x86, 0xe4, 0xea, 0x01, 0x4b, 0x68, 0x7a, - 0xc0, 0x64, 0x62, 0xff, 0x82, 0x26, 0xf2, 0xfc, 0xc6, 0x71, 0x41, 0x44, 0x8e, 0x27, 0x02, 0x1e, - 0x4a, 0xb4, 0x29, 0xd1, 0xae, 0x03, 0xd4, 0x1a, 0x34, 0x5c, 0x2a, 0x9c, 0x86, 0xe5, 0xf1, 0x40, - 0xe5, 0x37, 0x18, 0x67, 0x3c, 0x3d, 0x5a, 0xc9, 0x29, 0x8b, 0xd6, 0x7e, 0x6a, 0xa8, 0xdc, 0x01, - 0xf6, 0x2c, 0x0c, 0x04, 0xde, 0x44, 0x25, 0xa0, 0xa1, 0x4f, 0x23, 0x5d, 0xab, 0x6a, 0xf5, 0x55, - 0x5b, 0xde, 0xf0, 0x2e, 0x5a, 0x53, 0x6d, 0xc5, 0xa8, 0x4f, 0xf5, 0xa5, 0x34, 0x5b, 0x91, 0xb1, - 0x97, 0xa3, 0x3e, 0xc5, 0x04, 0x95, 0x7b, 0x14, 0xc0, 0x61, 0x54, 0x2f, 0x56, 0xb5, 0x7a, 0xa5, - 0xb9, 0x41, 0x32, 0xc1, 0x44, 0x09, 0x26, 0xad, 0x70, 0x64, 0x2b, 0x10, 0x76, 0xd0, 0xca, 0x51, - 0x1c, 0xfa, 0xa0, 0x2f, 0x57, 0x8b, 0xf5, 0x4a, 0x73, 0x8b, 0x48, 0xcb, 0x92, 0xe1, 0x89, 0x1c, - 0x9e, 0x3c, 0xe4, 0x41, 0xd8, 0x3e, 0x38, 0xfd, 0xb6, 0x53, 0xf8, 0xfc, 0x7d, 0xa7, 0xce, 0x02, - 0xf1, 0x36, 0x76, 0x89, 0xc7, 0x7b, 0x96, 0x54, 0x9a, 0xfd, 0xdc, 0x03, 0xff, 0xd8, 0x4a, 0xe6, - 0x82, 0xb4, 0x00, 0xec, 0x8c, 0xf9, 0xb0, 0xf2, 0xe1, 0xfc, 0x64, 0x4f, 0x4a, 0xa8, 0x75, 0xd1, - 0xba, 0x54, 0x69, 0x53, 0xe8, 0xf3, 0x10, 0x28, 0xbe, 0x83, 0xd6, 0x73, 0x33, 0x7d, 0x3f, 0xa2, - 0x00, 0x52, 0xf6, 0x35, 0x19, 0x6e, 0x65, 0x51, 0x7c, 0x80, 0xae, 0x44, 0xb2, 0x28, 0x95, 0x3e, - 0x4f, 0x5c, 0x8e, 0xaa, 0x7d, 0xd5, 0x10, 0xea, 0x00, 0x7b, 0x34, 0xa4, 0x5e, 0x2c, 0xe8, 0x5c, - 0x5f, 0x37, 0x51, 0x49, 0x38, 0x11, 0xa3, 0x42, 0x3a, 0x2a, 0x6f, 0xff, 0xbd, 0x99, 0x8f, 0x11, - 0x9e, 0xaa, 0xcb, 0xfd, 0x9c, 0xb5, 0x49, 0xbb, 0x94, 0x4d, 0xef, 0xd0, 0xf5, 0x29, 0x4f, 0x3b, - 0x0e, 0xfd, 0x2e, 0xc5, 0x3a, 0x2a, 0xbb, 0xe9, 0x49, 0x99, 0xa5, 0xae, 0xb8, 0x85, 0x10, 0xef, - 0xd3, 0xc8, 0x49, 0x56, 0x1e, 0xf4, 0xa5, 0x54, 0xea, 0x2e, 0xf9, 0xfb, 0xa9, 0x91, 0x57, 0x40, - 0xa3, 0xe7, 0x0a, 0x69, 0xcf, 0x14, 0x1d, 0xae, 0x25, 0x2a, 0x14, 0x61, 0xcd, 0x43, 0xfa, 0x9f, - 0xed, 0x73, 0x31, 0x4f, 0xd0, 0xaa, 0x1a, 0x33, 0x59, 0x8b, 0xa4, 0xd7, 0xdd, 0x7f, 0xf7, 0x92, - 0x15, 0xf6, 0xb4, 0xb6, 0xf9, 0x71, 0x09, 0x15, 0x3b, 0xc0, 0xf0, 0x53, 0xb4, 0x9c, 0xbe, 0xb1, - 0xed, 0x8b, 0x58, 0xe4, 0x6a, 0x1a, 0x37, 0x17, 0x24, 0xf3, 0xd1, 0x5e, 0xa0, 0xb2, 0x5a, 0x2c, - 0x73, 0x0e, 0x5e, 0xe6, 0x8d, 0xdb, 0x8b, 0xf3, 0x39, 0xa5, 0x87, 0xae, 0xfe, 0xfe, 0x2f, 0xdc, - 0x5a, 0x5c, 0x98, 0xa1, 0x8c, 0xfd, 0xcb, 0xa0, 0x54, 0x13, 0x63, 0xe5, 0xfd, 0xf9, 0xc9, 0x9e, - 0xd6, 0x7e, 0x70, 0x3a, 0x36, 0xb5, 0xb3, 0xb1, 0xa9, 0xfd, 0x18, 0x9b, 0xda, 0xa7, 0x89, 0x59, - 0x38, 0x9b, 0x98, 0x85, 0x2f, 0x13, 0xb3, 0xf0, 0xda, 0xc8, 0xd8, 0xc0, 0x3f, 0x26, 0x01, 0xb7, - 0x86, 0xb3, 0x9f, 0x3d, 0xb7, 0x94, 0xae, 0xd0, 0xfd, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x16, - 0x7f, 0x4c, 0xfa, 0x78, 0x05, 0x00, 0x00, + // 609 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x54, 0xcd, 0x6e, 0xd3, 0x4c, + 0x14, 0x8d, 0x9b, 0xb6, 0xf9, 0x7a, 0xd3, 0x9f, 0x8f, 0x51, 0x55, 0x5c, 0x57, 0x72, 0x4b, 0xf8, + 0x8b, 0x2a, 0x18, 0x37, 0x85, 0x55, 0x59, 0xb5, 0x15, 0x08, 0x16, 0x5d, 0x60, 0x75, 0xc5, 0xa6, + 0xf2, 0xcf, 0x64, 0x88, 0xda, 0x78, 0x22, 0xdf, 0x71, 0x71, 0x76, 0x88, 0x07, 0x40, 0x3c, 0x07, + 0xab, 0x3e, 0x46, 0x97, 0x5d, 0xb2, 0x40, 0x80, 0x1a, 0xa4, 0xbe, 0x06, 0xb2, 0x3d, 0xe3, 0x04, + 0x4a, 0xa2, 0x2e, 0x59, 0x65, 0xe6, 0x9e, 0x73, 0xef, 0x9c, 0x73, 0xc6, 0x19, 0x58, 0x0b, 0x04, + 0x76, 0x05, 0x3a, 0x5e, 0x10, 0x88, 0x24, 0x92, 0xe8, 0x9c, 0xb6, 0x1c, 0x99, 0xd2, 0x5e, 0x2c, + 0xa4, 0x20, 0xa4, 0x00, 0xa9, 0x06, 0xe9, 0x69, 0xcb, 0x5a, 0xe5, 0x42, 0xf0, 0x13, 0xe6, 0xe4, + 0x0c, 0x3f, 0x69, 0x3b, 0x5e, 0xd4, 0x2f, 0xe8, 0xd6, 0x6d, 0x35, 0xab, 0x8b, 0x3c, 0x1b, 0xd3, + 0x45, 0xae, 0x00, 0x5b, 0x01, 0xbe, 0x87, 0xcc, 0x39, 0x6d, 0xf9, 0x4c, 0x7a, 0x2d, 0x27, 0x10, + 0x9d, 0x48, 0xe1, 0x96, 0xc2, 0x65, 0x5a, 0xa2, 0x5a, 0x83, 0xb5, 0xcc, 0x05, 0x17, 0xf9, 0xd2, + 0xc9, 0x56, 0x45, 0xb5, 0xf1, 0xd3, 0x80, 0xda, 0x01, 0xf2, 0x57, 0x51, 0x47, 0x92, 0x15, 0x98, + 0x45, 0x16, 0x85, 0x2c, 0x36, 0x8d, 0x0d, 0xa3, 0x39, 0xe7, 0xaa, 0x1d, 0xb9, 0x03, 0xf3, 0x4a, + 0xf8, 0x91, 0xec, 0xf7, 0x98, 0x39, 0x95, 0xa3, 0x75, 0x55, 0x3b, 0xec, 0xf7, 0x18, 0xa1, 0x50, + 0xeb, 0x32, 0x44, 0x8f, 0x33, 0xb3, 0xba, 0x61, 0x34, 0xeb, 0xdb, 0xcb, 0xb4, 0xb0, 0x47, 0xb5, + 0x3d, 0xba, 0x1b, 0xf5, 0x5d, 0x4d, 0x22, 0x1e, 0xcc, 0xb4, 0x93, 0x28, 0x44, 0x73, 0x7a, 0xa3, + 0xda, 0xac, 0x6f, 0xaf, 0x52, 0x15, 0x50, 0x66, 0x8c, 0x2a, 0xe9, 0x74, 0x5f, 0x74, 0xa2, 0xbd, + 0xad, 0xf3, 0x6f, 0xeb, 0x95, 0xcf, 0xdf, 0xd7, 0x9b, 0xbc, 0x23, 0xdf, 0x26, 0x3e, 0x0d, 0x44, + 0xd7, 0x51, 0x2e, 0x8b, 0x9f, 0xc7, 0x18, 0x1e, 0x3b, 0x99, 0x2e, 0xcc, 0x1b, 0xd0, 0x2d, 0x26, + 0xef, 0xd4, 0x3f, 0x5c, 0x9d, 0x6d, 0x2a, 0x0b, 0x8d, 0x13, 0x58, 0x52, 0x2e, 0x5d, 0x86, 0x3d, + 0x11, 0x21, 0x23, 0x0f, 0x61, 0x49, 0xbb, 0xf2, 0xc2, 0x30, 0x66, 0x88, 0xca, 0xf6, 0xa2, 0x2a, + 0xef, 0x16, 0x55, 0xb2, 0x05, 0xff, 0xc5, 0xaa, 0x29, 0xb7, 0x3e, 0xce, 0x5c, 0xc9, 0x6a, 0x7c, + 0x35, 0x00, 0x0e, 0x90, 0x3f, 0x4f, 0x59, 0x90, 0x48, 0x36, 0x36, 0xd7, 0x15, 0x98, 0x95, 0x5e, + 0xcc, 0x99, 0x54, 0x89, 0xaa, 0xdd, 0x3f, 0x1f, 0xe6, 0x0b, 0x20, 0x43, 0x77, 0x65, 0x9e, 0xa3, + 0x31, 0x19, 0x37, 0x8a, 0xa9, 0x0d, 0xff, 0x0f, 0xe7, 0xec, 0x25, 0x51, 0x78, 0xc2, 0x88, 0x09, + 0x35, 0x3f, 0x5f, 0xe9, 0xb0, 0xf4, 0x96, 0x6c, 0x42, 0x55, 0xa6, 0x68, 0x4e, 0xe5, 0x1e, 0x4d, + 0xed, 0x51, 0xa6, 0xa5, 0xc3, 0xc3, 0xd4, 0xf5, 0xde, 0xb9, 0x19, 0x69, 0x67, 0x3e, 0x93, 0xab, + 0x3b, 0x1b, 0x6d, 0xb8, 0x55, 0x4c, 0x0f, 0x0f, 0xd3, 0x52, 0xee, 0x33, 0x58, 0x64, 0x29, 0x0b, + 0x8e, 0xb4, 0x1a, 0x9c, 0x28, 0x7a, 0x21, 0xe3, 0xea, 0x5e, 0x24, 0xcb, 0x30, 0xc3, 0xe2, 0x58, + 0xc4, 0xea, 0xe2, 0x8a, 0x4d, 0xe3, 0x08, 0xcc, 0x3f, 0xfd, 0x94, 0xc7, 0xed, 0xc3, 0xdc, 0xe8, + 0x49, 0x99, 0x87, 0xfb, 0xf4, 0xfa, 0xab, 0x40, 0xaf, 0x09, 0x75, 0x87, 0x7d, 0xdb, 0x1f, 0xa7, + 0xa0, 0x7a, 0x80, 0x9c, 0xbc, 0x84, 0xe9, 0xfc, 0x0f, 0xbb, 0xf6, 0xb7, 0x09, 0xea, 0x3b, 0xb7, + 0xee, 0x4e, 0x00, 0x4b, 0x59, 0xaf, 0xa1, 0xa6, 0xbf, 0x52, 0x7b, 0x0c, 0x5f, 0xe1, 0xd6, 0x83, + 0xc9, 0x78, 0x39, 0x32, 0x80, 0x85, 0xdf, 0xaf, 0xf4, 0xde, 0xe4, 0xc6, 0x82, 0x65, 0x3d, 0xba, + 0x09, 0x4b, 0x1f, 0x62, 0xcd, 0xbc, 0xbf, 0x3a, 0xdb, 0x34, 0xf6, 0x9e, 0x9e, 0x5f, 0xda, 0xc6, + 0xc5, 0xa5, 0x6d, 0xfc, 0xb8, 0xb4, 0x8d, 0x4f, 0x03, 0xbb, 0x72, 0x31, 0xb0, 0x2b, 0x5f, 0x06, + 0x76, 0xe5, 0x8d, 0x7a, 0x09, 0x31, 0x3c, 0xa6, 0x1d, 0xe1, 0xa4, 0xa3, 0xcf, 0xb2, 0x3f, 0x9b, + 0x5f, 0xed, 0x93, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc4, 0x6a, 0x98, 0xb0, 0xb3, 0x05, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -818,10 +875,10 @@ func (m *MsgExecuteBundle) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Operations) > 0 { - for iNdEx := len(m.Operations) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Txs) > 0 { + for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Operations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Txs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -842,6 +899,48 @@ func (m *MsgExecuteBundle) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *BundledTxResponse) 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 *BundledTxResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BundledTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Error) > 0 { + i -= len(m.Error) + copy(dAtA[i:], m.Error) + i = encodeVarintTx(dAtA, i, uint64(len(m.Error))) + i-- + dAtA[i] = 0x12 + } + if m.ExecResponses != nil { + { + size, err := m.ExecResponses.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *MsgExecuteBundleResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -984,8 +1083,8 @@ func (m *MsgExecuteBundle) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if len(m.Operations) > 0 { - for _, e := range m.Operations { + if len(m.Txs) > 0 { + for _, e := range m.Txs { l = e.Size() n += 1 + l + sovTx(uint64(l)) } @@ -993,6 +1092,23 @@ func (m *MsgExecuteBundle) Size() (n int) { return n } +func (m *BundledTxResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ExecResponses != nil { + l = m.ExecResponses.Size() + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Error) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + func (m *MsgExecuteBundleResponse) Size() (n int) { if m == nil { return 0 @@ -1649,7 +1765,7 @@ func (m *MsgExecuteBundle) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Operations", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1676,8 +1792,8 @@ func (m *MsgExecuteBundle) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Operations = append(m.Operations, &UserOperation{}) - if err := m.Operations[len(m.Operations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Txs = append(m.Txs, &tx.TxRaw{}) + if err := m.Txs[len(m.Txs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1702,6 +1818,124 @@ func (m *MsgExecuteBundle) Unmarshal(dAtA []byte) error { } return nil } +func (m *BundledTxResponse) 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 ErrIntOverflowTx + } + 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: BundledTxResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BundledTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecResponses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ExecResponses == nil { + m.ExecResponses = &types.Any{} + } + if err := m.ExecResponses.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Error = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *MsgExecuteBundleResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1760,7 +1994,7 @@ func (m *MsgExecuteBundleResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Responses = append(m.Responses, &UserOperationResponse{}) + m.Responses = append(m.Responses, &BundledTxResponse{}) if err := m.Responses[len(m.Responses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/auth/ante/ante.go b/x/auth/ante/ante.go index a2e824dc44..657489a0c5 100644 --- a/x/auth/ante/ante.go +++ b/x/auth/ante/ante.go @@ -13,13 +13,14 @@ import ( // HandlerOptions are the options required for constructing a default SDK AnteHandler. type HandlerOptions struct { - AccountKeeper AccountKeeper - BankKeeper types.BankKeeper - ExtensionOptionChecker ExtensionOptionChecker - FeegrantKeeper FeegrantKeeper - SignModeHandler *txsigning.HandlerMap - SigGasConsumer func(meter storetypes.GasMeter, sig signing.SignatureV2, params types.Params) error - TxFeeChecker TxFeeChecker + AccountKeeper AccountKeeper + AccountAbstractionKeeper AccountAbstractionKeeper + BankKeeper types.BankKeeper + ExtensionOptionChecker ExtensionOptionChecker + FeegrantKeeper FeegrantKeeper + SignModeHandler *txsigning.HandlerMap + SigGasConsumer func(meter storetypes.GasMeter, sig signing.SignatureV2, params types.Params) error + TxFeeChecker TxFeeChecker } // NewAnteHandler returns an AnteHandler that checks and increments sequence @@ -47,7 +48,7 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { NewConsumeGasForTxSizeDecorator(options.AccountKeeper), NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, options.TxFeeChecker), NewValidateSigCountDecorator(options.AccountKeeper), - NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler, options.SigGasConsumer), + NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler, options.SigGasConsumer, options.AccountAbstractionKeeper), } return sdk.ChainAnteDecorators(anteDecorators...), nil diff --git a/x/auth/ante/sigverify.go b/x/auth/ante/sigverify.go index 988d25c5d8..e54a5964a6 100644 --- a/x/auth/ante/sigverify.go +++ b/x/auth/ante/sigverify.go @@ -1,6 +1,7 @@ package ante import ( + "context" "encoding/base64" "encoding/hex" "errors" @@ -11,6 +12,7 @@ import ( errorsmod "cosmossdk.io/errors" storetypes "cosmossdk.io/store/types" + aa_interface_v1 "cosmossdk.io/x/accounts/interfaces/account_abstraction/v1" authsigning "cosmossdk.io/x/auth/signing" "cosmossdk.io/x/auth/types" txsigning "cosmossdk.io/x/tx/signing" @@ -24,6 +26,7 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/types/multisig" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" ) @@ -46,6 +49,11 @@ func init() { // This is where apps can define their own PubKey type SignatureVerificationGasConsumer = func(meter storetypes.GasMeter, sig signing.SignatureV2, params types.Params) error +type AccountAbstractionKeeper interface { + IsAbstractedAccount(ctx context.Context, addr []byte) (bool, error) + AuthenticateAccount(ctx context.Context, addr []byte, msg *aa_interface_v1.MsgAuthenticate) error +} + // SigVerificationDecorator verifies all signatures for a tx and returns an // error if any are invalid. // It will populate an account's public key if that is not present only if @@ -61,12 +69,14 @@ type SignatureVerificationGasConsumer = func(meter storetypes.GasMeter, sig sign // CONTRACT: Tx must implement SigVerifiableTx interface type SigVerificationDecorator struct { ak AccountKeeper + aaKeeper AccountAbstractionKeeper signModeHandler *txsigning.HandlerMap sigGasConsumer SignatureVerificationGasConsumer } -func NewSigVerificationDecorator(ak AccountKeeper, signModeHandler *txsigning.HandlerMap, sigGasConsumer SignatureVerificationGasConsumer) SigVerificationDecorator { +func NewSigVerificationDecorator(ak AccountKeeper, signModeHandler *txsigning.HandlerMap, sigGasConsumer SignatureVerificationGasConsumer, aaKeeper AccountAbstractionKeeper) SigVerificationDecorator { return SigVerificationDecorator{ + aaKeeper: aaKeeper, ak: ak, signModeHandler: signModeHandler, sigGasConsumer: sigGasConsumer, @@ -176,7 +186,7 @@ func (svd SigVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simul } for i := range signers { - err = svd.authenticate(ctx, sigTx, signers[i], signatures[i], pubKeys[i]) + err = svd.authenticate(ctx, sigTx, signers[i], signatures[i], pubKeys[i], i) if err != nil { return ctx, err } @@ -209,7 +219,20 @@ func (svd SigVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simul } // authenticate the authentication of the TX for a specific tx signer. -func (svd SigVerificationDecorator) authenticate(ctx sdk.Context, tx authsigning.Tx, signer []byte, sig signing.SignatureV2, txPubKey cryptotypes.PubKey) error { +func (svd SigVerificationDecorator) authenticate(ctx sdk.Context, tx authsigning.Tx, signer []byte, sig signing.SignatureV2, txPubKey cryptotypes.PubKey, signerIndex int) error { + // first we check if it's an AA + if svd.aaKeeper != nil { + isAa, err := svd.aaKeeper.IsAbstractedAccount(ctx, signer) + if err != nil { + return err + } + if isAa { + return svd.authenticateAbstractedAccount(ctx, tx, signer, signerIndex) + } + } + + // not an AA, proceed with standard auth flow. + // newlyCreated is a flag that indicates if the account was newly created. // This is only the case when the user is sending their first tx. newlyCreated := false @@ -401,6 +424,27 @@ func (svd SigVerificationDecorator) increaseSequence(tx authsigning.Tx, acc sdk. return acc.SetSequence(acc.GetSequence() + 1) } +// authenticateAbstractedAccount computes an AA authentication instruction and invokes the auth flow on the AA. +func (svd SigVerificationDecorator) authenticateAbstractedAccount(ctx sdk.Context, authTx authsigning.Tx, signer []byte, index int) error { + // the bundler is the AA itself. + selfBundler, err := svd.ak.AddressCodec().BytesToString(signer) + if err != nil { + return err + } + + infoTx := authTx.(interface { + GetRawTx() *tx.TxRaw + GetProtoTx() *tx.Tx + }) + + return svd.aaKeeper.AuthenticateAccount(ctx, signer, &aa_interface_v1.MsgAuthenticate{ + Bundler: selfBundler, + RawTx: infoTx.GetRawTx(), + Tx: infoTx.GetProtoTx(), + SignerIndex: uint32(index), + }) +} + // ValidateSigCountDecorator takes in Params and returns errors if there are too many signatures in the tx for the given params // otherwise it calls next AnteHandler // Use this decorator to set parameterized limit on number of signatures in tx diff --git a/x/auth/ante/sigverify_test.go b/x/auth/ante/sigverify_test.go index 5b2fe89cae..d157866e0d 100644 --- a/x/auth/ante/sigverify_test.go +++ b/x/auth/ante/sigverify_test.go @@ -145,7 +145,7 @@ func TestSigVerification(t *testing.T) { ) require.NoError(t, err) noOpGasConsume := func(_ storetypes.GasMeter, _ signing.SignatureV2, _ types.Params) error { return nil } - svd := ante.NewSigVerificationDecorator(suite.accountKeeper, anteTxConfig.SignModeHandler(), noOpGasConsume) + svd := ante.NewSigVerificationDecorator(suite.accountKeeper, anteTxConfig.SignModeHandler(), noOpGasConsume, nil) antehandler := sdk.ChainAnteDecorators(svd) defaultSignMode, err := authsign.APISignModeToInternal(anteTxConfig.SignModeHandler().DefaultMode()) require.NoError(t, err) @@ -279,7 +279,7 @@ func runSigDecorators(t *testing.T, params types.Params, _ bool, privs ...crypto tx, err := suite.CreateTestTx(suite.ctx, privs, accNums, accSeqs, suite.ctx.ChainID(), signing.SignMode_SIGN_MODE_DIRECT) require.NoError(t, err) - svd := ante.NewSigVerificationDecorator(suite.accountKeeper, suite.clientCtx.TxConfig.SignModeHandler(), ante.DefaultSigVerificationGasConsumer) + svd := ante.NewSigVerificationDecorator(suite.accountKeeper, suite.clientCtx.TxConfig.SignModeHandler(), ante.DefaultSigVerificationGasConsumer, nil) antehandler := sdk.ChainAnteDecorators(svd) txBytes, err := suite.clientCtx.TxConfig.TxEncoder()(tx) @@ -335,7 +335,7 @@ func TestAnteHandlerChecks(t *testing.T) { accs[i] = acc } - sigVerificationDecorator := ante.NewSigVerificationDecorator(suite.accountKeeper, anteTxConfig.SignModeHandler(), ante.DefaultSigVerificationGasConsumer) + sigVerificationDecorator := ante.NewSigVerificationDecorator(suite.accountKeeper, anteTxConfig.SignModeHandler(), ante.DefaultSigVerificationGasConsumer, nil) anteHandler := sdk.ChainAnteDecorators(sigVerificationDecorator) diff --git a/x/auth/go.mod b/x/auth/go.mod index f3a285ebba..7f7d26a277 100644 --- a/x/auth/go.mod +++ b/x/auth/go.mod @@ -11,6 +11,7 @@ require ( cosmossdk.io/log v1.3.1 cosmossdk.io/math v1.2.0 cosmossdk.io/store v1.0.2 + cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 cosmossdk.io/x/tx v0.13.0 @@ -168,6 +169,7 @@ replace github.com/cosmos/cosmos-sdk => ../../. replace ( cosmossdk.io/core => ../../core cosmossdk.io/depinject => ../../depinject + cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/bank => ../bank cosmossdk.io/x/staking => ../staking cosmossdk.io/x/tx => ../tx diff --git a/x/auth/tx/builder.go b/x/auth/tx/builder.go index fd03334f7b..3d7234cc50 100644 --- a/x/auth/tx/builder.go +++ b/x/auth/tx/builder.go @@ -423,6 +423,14 @@ func (w *wrapper) GetProtoTx() *tx.Tx { return w.tx } +func (w *wrapper) GetRawTx() *tx.TxRaw { + return &tx.TxRaw{ + BodyBytes: w.bodyBz, + AuthInfoBytes: w.authInfoBz, + Signatures: w.tx.Signatures, + } +} + // Deprecated: AsAny extracts proto Tx and wraps it into Any. // NOTE: You should probably use `GetProtoTx` if you want to serialize the transaction. func (w *wrapper) AsAny() *codectypes.Any { diff --git a/x/authz/go.mod b/x/authz/go.mod index 68c351859c..ff4d44dd0b 100644 --- a/x/authz/go.mod +++ b/x/authz/go.mod @@ -27,6 +27,8 @@ require ( google.golang.org/protobuf v1.32.0 ) +require cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 // indirect + require github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect require ( @@ -170,6 +172,7 @@ replace ( cosmossdk.io/api => ../../api cosmossdk.io/core => ../../core cosmossdk.io/depinject => ../../depinject + cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank cosmossdk.io/x/staking => ../staking diff --git a/x/bank/go.mod b/x/bank/go.mod index 7c9ca77dc1..c8281d2806 100644 --- a/x/bank/go.mod +++ b/x/bank/go.mod @@ -26,6 +26,8 @@ require ( gotest.tools/v3 v3.5.1 ) +require cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 // indirect + require github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect require ( @@ -168,6 +170,7 @@ replace github.com/cosmos/cosmos-sdk => ../../. replace ( cosmossdk.io/core => ../../core cosmossdk.io/depinject => ../../depinject + cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/staking => ../staking cosmossdk.io/x/tx => ../tx diff --git a/x/circuit/go.mod b/x/circuit/go.mod index ae5bc4da2a..8dedc289b3 100644 --- a/x/circuit/go.mod +++ b/x/circuit/go.mod @@ -23,6 +23,7 @@ require ( require ( cosmossdk.io/math v1.2.0 // indirect + cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/tx v0.13.0 // indirect @@ -167,6 +168,7 @@ replace github.com/cosmos/cosmos-sdk => ../../. replace ( cosmossdk.io/core => ../../core cosmossdk.io/depinject => ../../depinject + cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank cosmossdk.io/x/staking => ../staking diff --git a/x/distribution/go.mod b/x/distribution/go.mod index 05cae61285..8c4486e390 100644 --- a/x/distribution/go.mod +++ b/x/distribution/go.mod @@ -31,6 +31,7 @@ require ( ) require ( + cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/cometbft/cometbft v0.38.5 // indirect ) @@ -171,6 +172,7 @@ replace github.com/cosmos/cosmos-sdk => ../../. replace ( cosmossdk.io/core => ../../core cosmossdk.io/depinject => ../../depinject + cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank cosmossdk.io/x/staking => ../staking diff --git a/x/evidence/go.mod b/x/evidence/go.mod index ece575168f..de0be6f85b 100644 --- a/x/evidence/go.mod +++ b/x/evidence/go.mod @@ -26,6 +26,7 @@ require ( ) require ( + cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect @@ -167,6 +168,7 @@ replace github.com/cosmos/cosmos-sdk => ../../. replace ( cosmossdk.io/core => ../../core cosmossdk.io/depinject => ../../depinject + cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank cosmossdk.io/x/staking => ../staking diff --git a/x/feegrant/go.mod b/x/feegrant/go.mod index 1fba31c8a9..85c66c8071 100644 --- a/x/feegrant/go.mod +++ b/x/feegrant/go.mod @@ -28,6 +28,8 @@ require ( gotest.tools/v3 v3.5.1 ) +require cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 // indirect + require github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect require ( @@ -171,6 +173,7 @@ replace github.com/cosmos/cosmos-sdk => ../../. replace ( cosmossdk.io/core => ../../core cosmossdk.io/depinject => ../../depinject + cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank cosmossdk.io/x/gov => ../gov diff --git a/x/gov/go.mod b/x/gov/go.mod index 7a248767ed..3960c31b5c 100644 --- a/x/gov/go.mod +++ b/x/gov/go.mod @@ -33,6 +33,8 @@ require ( gotest.tools/v3 v3.5.1 ) +require cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 // indirect + require github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect require ( @@ -172,6 +174,7 @@ replace ( cosmossdk.io/api => ../../api cosmossdk.io/core => ../../core cosmossdk.io/depinject => ../../depinject + cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank cosmossdk.io/x/staking => ../staking diff --git a/x/group/go.mod b/x/group/go.mod index 8f8b2002b4..185675db88 100644 --- a/x/group/go.mod +++ b/x/group/go.mod @@ -37,6 +37,7 @@ require ( require ( cosmossdk.io/collections v0.4.0 // indirect + cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/tx v0.13.0 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect @@ -174,6 +175,7 @@ replace ( cosmossdk.io/api => ../../api cosmossdk.io/core => ../../core cosmossdk.io/depinject => ../../depinject + cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/authz => ../authz cosmossdk.io/x/bank => ../bank diff --git a/x/mint/go.mod b/x/mint/go.mod index 22637caaa5..73a89fcdc2 100644 --- a/x/mint/go.mod +++ b/x/mint/go.mod @@ -23,6 +23,8 @@ require ( gotest.tools/v3 v3.5.1 ) +require cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 // indirect + require github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect require ( @@ -169,6 +171,7 @@ replace github.com/cosmos/cosmos-sdk => ../../. replace ( cosmossdk.io/core => ../../core cosmossdk.io/depinject => ../../depinject + cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank cosmossdk.io/x/staking => ../staking diff --git a/x/nft/go.mod b/x/nft/go.mod index 293a20dc3b..8f47b9b2ca 100644 --- a/x/nft/go.mod +++ b/x/nft/go.mod @@ -23,6 +23,7 @@ require ( require ( cosmossdk.io/collections v0.4.0 // indirect + cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect @@ -167,6 +168,7 @@ replace github.com/cosmos/cosmos-sdk => ../../. replace ( cosmossdk.io/core => ../../core cosmossdk.io/depinject => ../../depinject + cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank cosmossdk.io/x/staking => ../staking diff --git a/x/params/go.mod b/x/params/go.mod index 99026e4af0..4205c353bf 100644 --- a/x/params/go.mod +++ b/x/params/go.mod @@ -27,6 +27,7 @@ require ( require ( cosmossdk.io/collections v0.4.0 // indirect + cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect @@ -168,6 +169,7 @@ replace github.com/cosmos/cosmos-sdk => ../.. replace ( cosmossdk.io/core => ../../core cosmossdk.io/depinject => ../../depinject + cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank cosmossdk.io/x/distribution => ../distribution diff --git a/x/protocolpool/go.mod b/x/protocolpool/go.mod index 10f3355cbc..cd5edaff08 100644 --- a/x/protocolpool/go.mod +++ b/x/protocolpool/go.mod @@ -26,6 +26,7 @@ require ( ) require ( + cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/tx v0.13.0 // indirect @@ -167,6 +168,7 @@ replace github.com/cosmos/cosmos-sdk => ../../. replace ( cosmossdk.io/core => ../../core cosmossdk.io/depinject => ../../depinject + cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank cosmossdk.io/x/staking => ../staking diff --git a/x/slashing/go.mod b/x/slashing/go.mod index 46485b2e27..87403c4744 100644 --- a/x/slashing/go.mod +++ b/x/slashing/go.mod @@ -30,6 +30,7 @@ require ( ) require ( + cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/tx v0.13.0 // indirect filippo.io/edwards25519 v1.1.0 // indirect @@ -169,6 +170,7 @@ replace github.com/cosmos/cosmos-sdk => ../../. replace ( cosmossdk.io/core => ../../core cosmossdk.io/depinject => ../../depinject + cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank cosmossdk.io/x/staking => ../staking diff --git a/x/staking/go.mod b/x/staking/go.mod index 5415f657de..0abefca64a 100644 --- a/x/staking/go.mod +++ b/x/staking/go.mod @@ -29,6 +29,8 @@ require ( gotest.tools/v3 v3.5.1 ) +require cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 // indirect + require github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect require ( @@ -168,6 +170,7 @@ replace github.com/cosmos/cosmos-sdk => ../../. replace ( cosmossdk.io/core => ../../core cosmossdk.io/depinject => ../../depinject + cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank cosmossdk.io/x/tx => ../tx diff --git a/x/upgrade/go.mod b/x/upgrade/go.mod index cf9e11bbae..f81ad8f456 100644 --- a/x/upgrade/go.mod +++ b/x/upgrade/go.mod @@ -38,6 +38,7 @@ require ( cloud.google.com/go/storage v1.36.0 // indirect cosmossdk.io/collections v0.4.0 // indirect cosmossdk.io/math v1.2.0 // indirect + cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/tx v0.13.0 // indirect @@ -202,6 +203,7 @@ replace github.com/cosmos/cosmos-sdk => ../../. replace ( cosmossdk.io/core => ../../core cosmossdk.io/depinject => ../../depinject + cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank cosmossdk.io/x/gov => ../gov