diff --git a/CHANGELOG.md b/CHANGELOG.md index 703911130021..3c4be6e24e32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,10 +58,13 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Improvements +* [13882] (https://github.com/cosmos/cosmos-sdk/pull/13882) Add tx `encode` and `decode` endpoints to amino tx service. + > Note: These endpoints encodes and decodes only amino txs. * (config) [#13894](https://github.com/cosmos/cosmos-sdk/pull/13894) Support state streaming configuration in `app.toml` template and default configuration. * (x/nft) [#13836](https://github.com/cosmos/cosmos-sdk/pull/13836) Remove the validation for `classID` and `nftID` from the NFT module. * [#13789](https://github.com/cosmos/cosmos-sdk/pull/13789) Add tx `encode` and `decode` endpoints to tx service. - > Note: This endpoint will only encode proto messages, Amino encoding is not supported. + > Note: These endpoints will only encode and decode proto messages, Amino encoding and decoding is not supported. +* [#13826](https://github.com/cosmos/cosmos-sdk/pull/13826) Support custom `GasConfig` configuration for applications. * [#13619](https://github.com/cosmos/cosmos-sdk/pull/13619) Add new function called LogDeferred to report errors in defers. Use the function in x/bank files. * (tools) [#13603](https://github.com/cosmos/cosmos-sdk/pull/13603) Rename cosmovisor package name to `cosmossdk.io/tools/cosmovisor`. The new tool directory contains Cosmos SDK tools. * (deps) [#13397](https://github.com/cosmos/cosmos-sdk/pull/13397) Bump Go version minimum requirement to `1.19`. diff --git a/api/cosmos/tx/v1beta1/service.pulsar.go b/api/cosmos/tx/v1beta1/service.pulsar.go index 172dd0f880a8..5722e70aaa73 100644 --- a/api/cosmos/tx/v1beta1/service.pulsar.go +++ b/api/cosmos/tx/v1beta1/service.pulsar.go @@ -7260,6 +7260,1690 @@ func (x *fastReflection_TxEncodeResponse) ProtoMethods() *protoiface.Methods { } } +var ( + md_TxEncodeAminoRequest protoreflect.MessageDescriptor + fd_TxEncodeAminoRequest_amino_json protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_tx_v1beta1_service_proto_init() + md_TxEncodeAminoRequest = File_cosmos_tx_v1beta1_service_proto.Messages().ByName("TxEncodeAminoRequest") + fd_TxEncodeAminoRequest_amino_json = md_TxEncodeAminoRequest.Fields().ByName("amino_json") +} + +var _ protoreflect.Message = (*fastReflection_TxEncodeAminoRequest)(nil) + +type fastReflection_TxEncodeAminoRequest TxEncodeAminoRequest + +func (x *TxEncodeAminoRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_TxEncodeAminoRequest)(x) +} + +func (x *TxEncodeAminoRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_tx_v1beta1_service_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_TxEncodeAminoRequest_messageType fastReflection_TxEncodeAminoRequest_messageType +var _ protoreflect.MessageType = fastReflection_TxEncodeAminoRequest_messageType{} + +type fastReflection_TxEncodeAminoRequest_messageType struct{} + +func (x fastReflection_TxEncodeAminoRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_TxEncodeAminoRequest)(nil) +} +func (x fastReflection_TxEncodeAminoRequest_messageType) New() protoreflect.Message { + return new(fastReflection_TxEncodeAminoRequest) +} +func (x fastReflection_TxEncodeAminoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_TxEncodeAminoRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_TxEncodeAminoRequest) Descriptor() protoreflect.MessageDescriptor { + return md_TxEncodeAminoRequest +} + +// 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_TxEncodeAminoRequest) Type() protoreflect.MessageType { + return _fastReflection_TxEncodeAminoRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_TxEncodeAminoRequest) New() protoreflect.Message { + return new(fastReflection_TxEncodeAminoRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_TxEncodeAminoRequest) Interface() protoreflect.ProtoMessage { + return (*TxEncodeAminoRequest)(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_TxEncodeAminoRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.AminoJson != "" { + value := protoreflect.ValueOfString(x.AminoJson) + if !f(fd_TxEncodeAminoRequest_amino_json, 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_TxEncodeAminoRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.tx.v1beta1.TxEncodeAminoRequest.amino_json": + return x.AminoJson != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxEncodeAminoRequest")) + } + panic(fmt.Errorf("message cosmos.tx.v1beta1.TxEncodeAminoRequest 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_TxEncodeAminoRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.tx.v1beta1.TxEncodeAminoRequest.amino_json": + x.AminoJson = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxEncodeAminoRequest")) + } + panic(fmt.Errorf("message cosmos.tx.v1beta1.TxEncodeAminoRequest 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_TxEncodeAminoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.tx.v1beta1.TxEncodeAminoRequest.amino_json": + value := x.AminoJson + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxEncodeAminoRequest")) + } + panic(fmt.Errorf("message cosmos.tx.v1beta1.TxEncodeAminoRequest 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_TxEncodeAminoRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.tx.v1beta1.TxEncodeAminoRequest.amino_json": + x.AminoJson = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxEncodeAminoRequest")) + } + panic(fmt.Errorf("message cosmos.tx.v1beta1.TxEncodeAminoRequest 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_TxEncodeAminoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.tx.v1beta1.TxEncodeAminoRequest.amino_json": + panic(fmt.Errorf("field amino_json of message cosmos.tx.v1beta1.TxEncodeAminoRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxEncodeAminoRequest")) + } + panic(fmt.Errorf("message cosmos.tx.v1beta1.TxEncodeAminoRequest 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_TxEncodeAminoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.tx.v1beta1.TxEncodeAminoRequest.amino_json": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxEncodeAminoRequest")) + } + panic(fmt.Errorf("message cosmos.tx.v1beta1.TxEncodeAminoRequest 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_TxEncodeAminoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.v1beta1.TxEncodeAminoRequest", 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_TxEncodeAminoRequest) 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_TxEncodeAminoRequest) 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_TxEncodeAminoRequest) 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_TxEncodeAminoRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*TxEncodeAminoRequest) + 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.AminoJson) + 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().(*TxEncodeAminoRequest) + 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.AminoJson) > 0 { + i -= len(x.AminoJson) + copy(dAtA[i:], x.AminoJson) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AminoJson))) + 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().(*TxEncodeAminoRequest) + 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: TxEncodeAminoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TxEncodeAminoRequest: 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 AminoJson", 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.AminoJson = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_TxEncodeAminoResponse protoreflect.MessageDescriptor + fd_TxEncodeAminoResponse_amino_binary protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_tx_v1beta1_service_proto_init() + md_TxEncodeAminoResponse = File_cosmos_tx_v1beta1_service_proto.Messages().ByName("TxEncodeAminoResponse") + fd_TxEncodeAminoResponse_amino_binary = md_TxEncodeAminoResponse.Fields().ByName("amino_binary") +} + +var _ protoreflect.Message = (*fastReflection_TxEncodeAminoResponse)(nil) + +type fastReflection_TxEncodeAminoResponse TxEncodeAminoResponse + +func (x *TxEncodeAminoResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_TxEncodeAminoResponse)(x) +} + +func (x *TxEncodeAminoResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_tx_v1beta1_service_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_TxEncodeAminoResponse_messageType fastReflection_TxEncodeAminoResponse_messageType +var _ protoreflect.MessageType = fastReflection_TxEncodeAminoResponse_messageType{} + +type fastReflection_TxEncodeAminoResponse_messageType struct{} + +func (x fastReflection_TxEncodeAminoResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_TxEncodeAminoResponse)(nil) +} +func (x fastReflection_TxEncodeAminoResponse_messageType) New() protoreflect.Message { + return new(fastReflection_TxEncodeAminoResponse) +} +func (x fastReflection_TxEncodeAminoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_TxEncodeAminoResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_TxEncodeAminoResponse) Descriptor() protoreflect.MessageDescriptor { + return md_TxEncodeAminoResponse +} + +// 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_TxEncodeAminoResponse) Type() protoreflect.MessageType { + return _fastReflection_TxEncodeAminoResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_TxEncodeAminoResponse) New() protoreflect.Message { + return new(fastReflection_TxEncodeAminoResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_TxEncodeAminoResponse) Interface() protoreflect.ProtoMessage { + return (*TxEncodeAminoResponse)(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_TxEncodeAminoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.AminoBinary) != 0 { + value := protoreflect.ValueOfBytes(x.AminoBinary) + if !f(fd_TxEncodeAminoResponse_amino_binary, 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_TxEncodeAminoResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.tx.v1beta1.TxEncodeAminoResponse.amino_binary": + return len(x.AminoBinary) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxEncodeAminoResponse")) + } + panic(fmt.Errorf("message cosmos.tx.v1beta1.TxEncodeAminoResponse 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_TxEncodeAminoResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.tx.v1beta1.TxEncodeAminoResponse.amino_binary": + x.AminoBinary = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxEncodeAminoResponse")) + } + panic(fmt.Errorf("message cosmos.tx.v1beta1.TxEncodeAminoResponse 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_TxEncodeAminoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.tx.v1beta1.TxEncodeAminoResponse.amino_binary": + value := x.AminoBinary + return protoreflect.ValueOfBytes(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxEncodeAminoResponse")) + } + panic(fmt.Errorf("message cosmos.tx.v1beta1.TxEncodeAminoResponse 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_TxEncodeAminoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.tx.v1beta1.TxEncodeAminoResponse.amino_binary": + x.AminoBinary = value.Bytes() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxEncodeAminoResponse")) + } + panic(fmt.Errorf("message cosmos.tx.v1beta1.TxEncodeAminoResponse 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_TxEncodeAminoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.tx.v1beta1.TxEncodeAminoResponse.amino_binary": + panic(fmt.Errorf("field amino_binary of message cosmos.tx.v1beta1.TxEncodeAminoResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxEncodeAminoResponse")) + } + panic(fmt.Errorf("message cosmos.tx.v1beta1.TxEncodeAminoResponse 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_TxEncodeAminoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.tx.v1beta1.TxEncodeAminoResponse.amino_binary": + return protoreflect.ValueOfBytes(nil) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxEncodeAminoResponse")) + } + panic(fmt.Errorf("message cosmos.tx.v1beta1.TxEncodeAminoResponse 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_TxEncodeAminoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.v1beta1.TxEncodeAminoResponse", 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_TxEncodeAminoResponse) 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_TxEncodeAminoResponse) 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_TxEncodeAminoResponse) 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_TxEncodeAminoResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*TxEncodeAminoResponse) + 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.AminoBinary) + 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().(*TxEncodeAminoResponse) + 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.AminoBinary) > 0 { + i -= len(x.AminoBinary) + copy(dAtA[i:], x.AminoBinary) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AminoBinary))) + 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().(*TxEncodeAminoResponse) + 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: TxEncodeAminoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TxEncodeAminoResponse: 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 AminoBinary", 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.AminoBinary = append(x.AminoBinary[:0], dAtA[iNdEx:postIndex]...) + if x.AminoBinary == nil { + x.AminoBinary = []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_TxDecodeAminoRequest protoreflect.MessageDescriptor + fd_TxDecodeAminoRequest_amino_binary protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_tx_v1beta1_service_proto_init() + md_TxDecodeAminoRequest = File_cosmos_tx_v1beta1_service_proto.Messages().ByName("TxDecodeAminoRequest") + fd_TxDecodeAminoRequest_amino_binary = md_TxDecodeAminoRequest.Fields().ByName("amino_binary") +} + +var _ protoreflect.Message = (*fastReflection_TxDecodeAminoRequest)(nil) + +type fastReflection_TxDecodeAminoRequest TxDecodeAminoRequest + +func (x *TxDecodeAminoRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_TxDecodeAminoRequest)(x) +} + +func (x *TxDecodeAminoRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_tx_v1beta1_service_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_TxDecodeAminoRequest_messageType fastReflection_TxDecodeAminoRequest_messageType +var _ protoreflect.MessageType = fastReflection_TxDecodeAminoRequest_messageType{} + +type fastReflection_TxDecodeAminoRequest_messageType struct{} + +func (x fastReflection_TxDecodeAminoRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_TxDecodeAminoRequest)(nil) +} +func (x fastReflection_TxDecodeAminoRequest_messageType) New() protoreflect.Message { + return new(fastReflection_TxDecodeAminoRequest) +} +func (x fastReflection_TxDecodeAminoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_TxDecodeAminoRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_TxDecodeAminoRequest) Descriptor() protoreflect.MessageDescriptor { + return md_TxDecodeAminoRequest +} + +// 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_TxDecodeAminoRequest) Type() protoreflect.MessageType { + return _fastReflection_TxDecodeAminoRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_TxDecodeAminoRequest) New() protoreflect.Message { + return new(fastReflection_TxDecodeAminoRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_TxDecodeAminoRequest) Interface() protoreflect.ProtoMessage { + return (*TxDecodeAminoRequest)(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_TxDecodeAminoRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.AminoBinary) != 0 { + value := protoreflect.ValueOfBytes(x.AminoBinary) + if !f(fd_TxDecodeAminoRequest_amino_binary, 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_TxDecodeAminoRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.tx.v1beta1.TxDecodeAminoRequest.amino_binary": + return len(x.AminoBinary) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxDecodeAminoRequest")) + } + panic(fmt.Errorf("message cosmos.tx.v1beta1.TxDecodeAminoRequest 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_TxDecodeAminoRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.tx.v1beta1.TxDecodeAminoRequest.amino_binary": + x.AminoBinary = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxDecodeAminoRequest")) + } + panic(fmt.Errorf("message cosmos.tx.v1beta1.TxDecodeAminoRequest 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_TxDecodeAminoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.tx.v1beta1.TxDecodeAminoRequest.amino_binary": + value := x.AminoBinary + return protoreflect.ValueOfBytes(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxDecodeAminoRequest")) + } + panic(fmt.Errorf("message cosmos.tx.v1beta1.TxDecodeAminoRequest 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_TxDecodeAminoRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.tx.v1beta1.TxDecodeAminoRequest.amino_binary": + x.AminoBinary = value.Bytes() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxDecodeAminoRequest")) + } + panic(fmt.Errorf("message cosmos.tx.v1beta1.TxDecodeAminoRequest 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_TxDecodeAminoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.tx.v1beta1.TxDecodeAminoRequest.amino_binary": + panic(fmt.Errorf("field amino_binary of message cosmos.tx.v1beta1.TxDecodeAminoRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxDecodeAminoRequest")) + } + panic(fmt.Errorf("message cosmos.tx.v1beta1.TxDecodeAminoRequest 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_TxDecodeAminoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.tx.v1beta1.TxDecodeAminoRequest.amino_binary": + return protoreflect.ValueOfBytes(nil) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxDecodeAminoRequest")) + } + panic(fmt.Errorf("message cosmos.tx.v1beta1.TxDecodeAminoRequest 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_TxDecodeAminoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.v1beta1.TxDecodeAminoRequest", 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_TxDecodeAminoRequest) 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_TxDecodeAminoRequest) 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_TxDecodeAminoRequest) 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_TxDecodeAminoRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*TxDecodeAminoRequest) + 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.AminoBinary) + 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().(*TxDecodeAminoRequest) + 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.AminoBinary) > 0 { + i -= len(x.AminoBinary) + copy(dAtA[i:], x.AminoBinary) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AminoBinary))) + 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().(*TxDecodeAminoRequest) + 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: TxDecodeAminoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TxDecodeAminoRequest: 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 AminoBinary", 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.AminoBinary = append(x.AminoBinary[:0], dAtA[iNdEx:postIndex]...) + if x.AminoBinary == nil { + x.AminoBinary = []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_TxDecodeAminoResponse protoreflect.MessageDescriptor + fd_TxDecodeAminoResponse_amino_json protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_tx_v1beta1_service_proto_init() + md_TxDecodeAminoResponse = File_cosmos_tx_v1beta1_service_proto.Messages().ByName("TxDecodeAminoResponse") + fd_TxDecodeAminoResponse_amino_json = md_TxDecodeAminoResponse.Fields().ByName("amino_json") +} + +var _ protoreflect.Message = (*fastReflection_TxDecodeAminoResponse)(nil) + +type fastReflection_TxDecodeAminoResponse TxDecodeAminoResponse + +func (x *TxDecodeAminoResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_TxDecodeAminoResponse)(x) +} + +func (x *TxDecodeAminoResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_tx_v1beta1_service_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_TxDecodeAminoResponse_messageType fastReflection_TxDecodeAminoResponse_messageType +var _ protoreflect.MessageType = fastReflection_TxDecodeAminoResponse_messageType{} + +type fastReflection_TxDecodeAminoResponse_messageType struct{} + +func (x fastReflection_TxDecodeAminoResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_TxDecodeAminoResponse)(nil) +} +func (x fastReflection_TxDecodeAminoResponse_messageType) New() protoreflect.Message { + return new(fastReflection_TxDecodeAminoResponse) +} +func (x fastReflection_TxDecodeAminoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_TxDecodeAminoResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_TxDecodeAminoResponse) Descriptor() protoreflect.MessageDescriptor { + return md_TxDecodeAminoResponse +} + +// 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_TxDecodeAminoResponse) Type() protoreflect.MessageType { + return _fastReflection_TxDecodeAminoResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_TxDecodeAminoResponse) New() protoreflect.Message { + return new(fastReflection_TxDecodeAminoResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_TxDecodeAminoResponse) Interface() protoreflect.ProtoMessage { + return (*TxDecodeAminoResponse)(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_TxDecodeAminoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.AminoJson != "" { + value := protoreflect.ValueOfString(x.AminoJson) + if !f(fd_TxDecodeAminoResponse_amino_json, 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_TxDecodeAminoResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.tx.v1beta1.TxDecodeAminoResponse.amino_json": + return x.AminoJson != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxDecodeAminoResponse")) + } + panic(fmt.Errorf("message cosmos.tx.v1beta1.TxDecodeAminoResponse 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_TxDecodeAminoResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.tx.v1beta1.TxDecodeAminoResponse.amino_json": + x.AminoJson = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxDecodeAminoResponse")) + } + panic(fmt.Errorf("message cosmos.tx.v1beta1.TxDecodeAminoResponse 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_TxDecodeAminoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.tx.v1beta1.TxDecodeAminoResponse.amino_json": + value := x.AminoJson + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxDecodeAminoResponse")) + } + panic(fmt.Errorf("message cosmos.tx.v1beta1.TxDecodeAminoResponse 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_TxDecodeAminoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.tx.v1beta1.TxDecodeAminoResponse.amino_json": + x.AminoJson = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxDecodeAminoResponse")) + } + panic(fmt.Errorf("message cosmos.tx.v1beta1.TxDecodeAminoResponse 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_TxDecodeAminoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.tx.v1beta1.TxDecodeAminoResponse.amino_json": + panic(fmt.Errorf("field amino_json of message cosmos.tx.v1beta1.TxDecodeAminoResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxDecodeAminoResponse")) + } + panic(fmt.Errorf("message cosmos.tx.v1beta1.TxDecodeAminoResponse 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_TxDecodeAminoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.tx.v1beta1.TxDecodeAminoResponse.amino_json": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.TxDecodeAminoResponse")) + } + panic(fmt.Errorf("message cosmos.tx.v1beta1.TxDecodeAminoResponse 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_TxDecodeAminoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.tx.v1beta1.TxDecodeAminoResponse", 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_TxDecodeAminoResponse) 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_TxDecodeAminoResponse) 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_TxDecodeAminoResponse) 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_TxDecodeAminoResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*TxDecodeAminoResponse) + 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.AminoJson) + 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().(*TxDecodeAminoResponse) + 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.AminoJson) > 0 { + i -= len(x.AminoJson) + copy(dAtA[i:], x.AminoJson) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AminoJson))) + 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().(*TxDecodeAminoResponse) + 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: TxDecodeAminoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TxDecodeAminoResponse: 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 AminoJson", 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.AminoJson = 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 @@ -7996,7 +9680,7 @@ func (x *TxDecodeResponse) GetTx() *Tx { return nil } -// TxEncodeResponse is the request type for the Service.TxEncode +// TxEncodeRequest is the request type for the Service.TxEncode // RPC method. // // Since: cosmos-sdk 0.47 @@ -8076,6 +9760,162 @@ func (x *TxEncodeResponse) GetTxBytes() []byte { return nil } +// TxEncodeAminoRequest is the request type for the Service.TxEncodeAmino +// RPC method. +// +// Since: cosmos-sdk 0.47 +type TxEncodeAminoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AminoJson string `protobuf:"bytes,1,opt,name=amino_json,json=aminoJson,proto3" json:"amino_json,omitempty"` +} + +func (x *TxEncodeAminoRequest) Reset() { + *x = TxEncodeAminoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_tx_v1beta1_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TxEncodeAminoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TxEncodeAminoRequest) ProtoMessage() {} + +// Deprecated: Use TxEncodeAminoRequest.ProtoReflect.Descriptor instead. +func (*TxEncodeAminoRequest) Descriptor() ([]byte, []int) { + return file_cosmos_tx_v1beta1_service_proto_rawDescGZIP(), []int{14} +} + +func (x *TxEncodeAminoRequest) GetAminoJson() string { + if x != nil { + return x.AminoJson + } + return "" +} + +// TxEncodeAminoResponse is the response type for the Service.TxEncodeAmino +// RPC method. +// +// Since: cosmos-sdk 0.47 +type TxEncodeAminoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AminoBinary []byte `protobuf:"bytes,1,opt,name=amino_binary,json=aminoBinary,proto3" json:"amino_binary,omitempty"` +} + +func (x *TxEncodeAminoResponse) Reset() { + *x = TxEncodeAminoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_tx_v1beta1_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TxEncodeAminoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TxEncodeAminoResponse) ProtoMessage() {} + +// Deprecated: Use TxEncodeAminoResponse.ProtoReflect.Descriptor instead. +func (*TxEncodeAminoResponse) Descriptor() ([]byte, []int) { + return file_cosmos_tx_v1beta1_service_proto_rawDescGZIP(), []int{15} +} + +func (x *TxEncodeAminoResponse) GetAminoBinary() []byte { + if x != nil { + return x.AminoBinary + } + return nil +} + +// TxDecodeAminoRequest is the request type for the Service.TxDecodeAmino +// RPC method. +// +// Since: cosmos-sdk 0.47 +type TxDecodeAminoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AminoBinary []byte `protobuf:"bytes,1,opt,name=amino_binary,json=aminoBinary,proto3" json:"amino_binary,omitempty"` +} + +func (x *TxDecodeAminoRequest) Reset() { + *x = TxDecodeAminoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_tx_v1beta1_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TxDecodeAminoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TxDecodeAminoRequest) ProtoMessage() {} + +// Deprecated: Use TxDecodeAminoRequest.ProtoReflect.Descriptor instead. +func (*TxDecodeAminoRequest) Descriptor() ([]byte, []int) { + return file_cosmos_tx_v1beta1_service_proto_rawDescGZIP(), []int{16} +} + +func (x *TxDecodeAminoRequest) GetAminoBinary() []byte { + if x != nil { + return x.AminoBinary + } + return nil +} + +// TxDecodeAminoResponse is the response type for the Service.TxDecodeAmino +// RPC method. +// +// Since: cosmos-sdk 0.47 +type TxDecodeAminoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AminoJson string `protobuf:"bytes,1,opt,name=amino_json,json=aminoJson,proto3" json:"amino_json,omitempty"` +} + +func (x *TxDecodeAminoResponse) Reset() { + *x = TxDecodeAminoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_tx_v1beta1_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TxDecodeAminoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TxDecodeAminoResponse) ProtoMessage() {} + +// Deprecated: Use TxDecodeAminoResponse.ProtoReflect.Descriptor instead. +func (*TxDecodeAminoResponse) Descriptor() ([]byte, []int) { + return file_cosmos_tx_v1beta1_service_proto_rawDescGZIP(), []int{17} +} + +func (x *TxDecodeAminoResponse) GetAminoJson() string { + if x != nil { + return x.AminoJson + } + return "" +} + var File_cosmos_tx_v1beta1_service_proto protoreflect.FileDescriptor var file_cosmos_tx_v1beta1_service_proto_rawDesc = []byte{ @@ -8196,88 +10036,121 @@ var file_cosmos_tx_v1beta1_service_proto_rawDesc = []byte{ 0x74, 0x78, 0x22, 0x2d, 0x0a, 0x10, 0x54, 0x78, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x78, 0x42, 0x79, 0x74, 0x65, - 0x73, 0x2a, 0x48, 0x0a, 0x07, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x12, 0x18, 0x0a, 0x14, - 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x42, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, - 0x42, 0x59, 0x5f, 0x41, 0x53, 0x43, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x4f, 0x52, 0x44, 0x45, - 0x52, 0x5f, 0x42, 0x59, 0x5f, 0x44, 0x45, 0x53, 0x43, 0x10, 0x02, 0x2a, 0x80, 0x01, 0x0a, 0x0d, - 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, - 0x1a, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, - 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, - 0x14, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, - 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x42, - 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x59, - 0x4e, 0x43, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, - 0x54, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x41, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x03, 0x32, 0x88, - 0x07, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7b, 0x0a, 0x08, 0x53, 0x69, - 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x6d, 0x75, 0x6c, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, - 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, - 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x71, 0x0a, 0x05, 0x47, 0x65, 0x74, 0x54, 0x78, - 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x74, 0x78, 0x73, 0x2f, 0x7b, 0x68, 0x61, 0x73, 0x68, 0x7d, 0x12, 0x7f, 0x0a, 0x0b, 0x42, 0x72, - 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x78, 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x72, - 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x78, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, - 0x3a, 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x73, 0x12, 0x7c, 0x0a, 0x0b, 0x47, - 0x65, 0x74, 0x54, 0x78, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x54, 0x78, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, 0x73, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x18, 0x12, 0x16, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x73, 0x12, 0x97, 0x01, 0x0a, 0x0f, 0x47, 0x65, - 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x54, 0x78, 0x73, 0x12, 0x29, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x54, 0x78, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x54, 0x78, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x74, 0x78, 0x73, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x7b, 0x68, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x7d, 0x12, 0x79, 0x0a, 0x08, 0x54, 0x78, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x12, - 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, - 0x3a, 0x01, 0x2a, 0x22, 0x19, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x79, - 0x0a, 0x08, 0x54, 0x78, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, - 0x78, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, + 0x73, 0x22, 0x35, 0x0a, 0x14, 0x54, 0x78, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x41, 0x6d, 0x69, + 0x6e, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6d, 0x69, + 0x6e, 0x6f, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, + 0x6d, 0x69, 0x6e, 0x6f, 0x4a, 0x73, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x15, 0x54, 0x78, 0x45, 0x6e, + 0x63, 0x6f, 0x64, 0x65, 0x41, 0x6d, 0x69, 0x6e, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x5f, 0x62, 0x69, 0x6e, 0x61, 0x72, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x42, 0x69, + 0x6e, 0x61, 0x72, 0x79, 0x22, 0x39, 0x0a, 0x14, 0x54, 0x78, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, + 0x41, 0x6d, 0x69, 0x6e, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, + 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x5f, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x0b, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x22, + 0x36, 0x0a, 0x15, 0x54, 0x78, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x41, 0x6d, 0x69, 0x6e, 0x6f, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6d, 0x69, 0x6e, + 0x6f, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x6d, + 0x69, 0x6e, 0x6f, 0x4a, 0x73, 0x6f, 0x6e, 0x2a, 0x48, 0x0a, 0x07, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x42, 0x79, 0x12, 0x18, 0x0a, 0x14, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x42, 0x59, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, + 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x42, 0x59, 0x5f, 0x41, 0x53, 0x43, 0x10, 0x01, 0x12, 0x11, + 0x0a, 0x0d, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x42, 0x59, 0x5f, 0x44, 0x45, 0x53, 0x43, 0x10, + 0x02, 0x2a, 0x80, 0x01, 0x0a, 0x0d, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x4d, + 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, + 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x14, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, + 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x01, 0x1a, 0x02, 0x08, + 0x01, 0x12, 0x17, 0x0a, 0x13, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x5f, 0x4d, + 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x52, + 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x41, 0x53, 0x59, + 0x4e, 0x43, 0x10, 0x03, 0x32, 0xaa, 0x09, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x7b, 0x0a, 0x08, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, + 0x22, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x71, 0x0a, + 0x05, 0x47, 0x65, 0x74, 0x54, 0x78, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, + 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1f, 0x12, 0x1d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x73, 0x2f, 0x7b, 0x68, 0x61, 0x73, 0x68, 0x7d, + 0x12, 0x7f, 0x0a, 0x0b, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x78, 0x12, + 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x78, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, + 0x63, 0x61, 0x73, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, + 0x73, 0x12, 0x7c, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x54, 0x78, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, + 0x78, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x73, 0x12, + 0x97, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, + 0x54, 0x78, 0x73, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x57, 0x69, 0x74, 0x68, 0x54, 0x78, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x54, 0x78, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x22, 0x19, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x42, 0xb9, 0x01, 0x0a, 0x15, 0x63, 0x6f, - 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x2c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, - 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x78, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xa2, 0x02, 0x03, 0x43, 0x54, 0x58, 0xaa, 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x54, 0x78, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x11, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x54, 0x78, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, - 0x02, 0x1d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x54, 0x78, 0x5c, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x54, 0x78, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x54, + 0x78, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x27, 0x12, 0x25, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x73, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x2f, 0x7b, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x7d, 0x12, 0x79, 0x0a, 0x08, 0x54, 0x78, 0x44, + 0x65, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, + 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x44, 0x65, 0x63, 0x6f, + 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x78, + 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x22, 0x19, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, + 0x63, 0x6f, 0x64, 0x65, 0x12, 0x79, 0x0a, 0x08, 0x54, 0x78, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, + 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x45, 0x6e, 0x63, 0x6f, 0x64, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1e, 0x3a, 0x01, 0x2a, 0x22, 0x19, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x12, + 0x8e, 0x01, 0x0a, 0x0d, 0x54, 0x78, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x41, 0x6d, 0x69, 0x6e, + 0x6f, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x41, 0x6d, + 0x69, 0x6e, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, + 0x78, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x41, 0x6d, 0x69, 0x6e, 0x6f, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x01, 0x2a, 0x22, + 0x1f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, + 0x12, 0x8e, 0x01, 0x0a, 0x0d, 0x54, 0x78, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x41, 0x6d, 0x69, + 0x6e, 0x6f, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x41, + 0x6d, 0x69, 0x6e, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x54, 0x78, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x41, 0x6d, 0x69, 0x6e, 0x6f, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x01, 0x2a, + 0x22, 0x1f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x6d, 0x69, 0x6e, + 0x6f, 0x42, 0xb9, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2c, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, + 0x74, 0x78, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x54, 0x58, 0xaa, + 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x54, 0x78, 0x2e, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xca, 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x54, 0x78, 0x5c, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x5c, 0x54, 0x78, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x3a, 0x3a, 0x54, 0x78, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -8293,7 +10166,7 @@ func file_cosmos_tx_v1beta1_service_proto_rawDescGZIP() []byte { } var file_cosmos_tx_v1beta1_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_cosmos_tx_v1beta1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_cosmos_tx_v1beta1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 18) var file_cosmos_tx_v1beta1_service_proto_goTypes = []interface{}{ (OrderBy)(0), // 0: cosmos.tx.v1beta1.OrderBy (BroadcastMode)(0), // 1: cosmos.tx.v1beta1.BroadcastMode @@ -8311,35 +10184,39 @@ var file_cosmos_tx_v1beta1_service_proto_goTypes = []interface{}{ (*TxDecodeResponse)(nil), // 13: cosmos.tx.v1beta1.TxDecodeResponse (*TxEncodeRequest)(nil), // 14: cosmos.tx.v1beta1.TxEncodeRequest (*TxEncodeResponse)(nil), // 15: cosmos.tx.v1beta1.TxEncodeResponse - (*v1beta1.PageRequest)(nil), // 16: cosmos.base.query.v1beta1.PageRequest - (*Tx)(nil), // 17: cosmos.tx.v1beta1.Tx - (*v1beta11.TxResponse)(nil), // 18: cosmos.base.abci.v1beta1.TxResponse - (*v1beta1.PageResponse)(nil), // 19: cosmos.base.query.v1beta1.PageResponse - (*v1beta11.GasInfo)(nil), // 20: cosmos.base.abci.v1beta1.GasInfo - (*v1beta11.Result)(nil), // 21: cosmos.base.abci.v1beta1.Result - (*types.BlockID)(nil), // 22: tendermint.types.BlockID - (*types.Block)(nil), // 23: tendermint.types.Block + (*TxEncodeAminoRequest)(nil), // 16: cosmos.tx.v1beta1.TxEncodeAminoRequest + (*TxEncodeAminoResponse)(nil), // 17: cosmos.tx.v1beta1.TxEncodeAminoResponse + (*TxDecodeAminoRequest)(nil), // 18: cosmos.tx.v1beta1.TxDecodeAminoRequest + (*TxDecodeAminoResponse)(nil), // 19: cosmos.tx.v1beta1.TxDecodeAminoResponse + (*v1beta1.PageRequest)(nil), // 20: cosmos.base.query.v1beta1.PageRequest + (*Tx)(nil), // 21: cosmos.tx.v1beta1.Tx + (*v1beta11.TxResponse)(nil), // 22: cosmos.base.abci.v1beta1.TxResponse + (*v1beta1.PageResponse)(nil), // 23: cosmos.base.query.v1beta1.PageResponse + (*v1beta11.GasInfo)(nil), // 24: cosmos.base.abci.v1beta1.GasInfo + (*v1beta11.Result)(nil), // 25: cosmos.base.abci.v1beta1.Result + (*types.BlockID)(nil), // 26: tendermint.types.BlockID + (*types.Block)(nil), // 27: tendermint.types.Block } var file_cosmos_tx_v1beta1_service_proto_depIdxs = []int32{ - 16, // 0: cosmos.tx.v1beta1.GetTxsEventRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 20, // 0: cosmos.tx.v1beta1.GetTxsEventRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest 0, // 1: cosmos.tx.v1beta1.GetTxsEventRequest.order_by:type_name -> cosmos.tx.v1beta1.OrderBy - 17, // 2: cosmos.tx.v1beta1.GetTxsEventResponse.txs:type_name -> cosmos.tx.v1beta1.Tx - 18, // 3: cosmos.tx.v1beta1.GetTxsEventResponse.tx_responses:type_name -> cosmos.base.abci.v1beta1.TxResponse - 19, // 4: cosmos.tx.v1beta1.GetTxsEventResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 21, // 2: cosmos.tx.v1beta1.GetTxsEventResponse.txs:type_name -> cosmos.tx.v1beta1.Tx + 22, // 3: cosmos.tx.v1beta1.GetTxsEventResponse.tx_responses:type_name -> cosmos.base.abci.v1beta1.TxResponse + 23, // 4: cosmos.tx.v1beta1.GetTxsEventResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse 1, // 5: cosmos.tx.v1beta1.BroadcastTxRequest.mode:type_name -> cosmos.tx.v1beta1.BroadcastMode - 18, // 6: cosmos.tx.v1beta1.BroadcastTxResponse.tx_response:type_name -> cosmos.base.abci.v1beta1.TxResponse - 17, // 7: cosmos.tx.v1beta1.SimulateRequest.tx:type_name -> cosmos.tx.v1beta1.Tx - 20, // 8: cosmos.tx.v1beta1.SimulateResponse.gas_info:type_name -> cosmos.base.abci.v1beta1.GasInfo - 21, // 9: cosmos.tx.v1beta1.SimulateResponse.result:type_name -> cosmos.base.abci.v1beta1.Result - 17, // 10: cosmos.tx.v1beta1.GetTxResponse.tx:type_name -> cosmos.tx.v1beta1.Tx - 18, // 11: cosmos.tx.v1beta1.GetTxResponse.tx_response:type_name -> cosmos.base.abci.v1beta1.TxResponse - 16, // 12: cosmos.tx.v1beta1.GetBlockWithTxsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 17, // 13: cosmos.tx.v1beta1.GetBlockWithTxsResponse.txs:type_name -> cosmos.tx.v1beta1.Tx - 22, // 14: cosmos.tx.v1beta1.GetBlockWithTxsResponse.block_id:type_name -> tendermint.types.BlockID - 23, // 15: cosmos.tx.v1beta1.GetBlockWithTxsResponse.block:type_name -> tendermint.types.Block - 19, // 16: cosmos.tx.v1beta1.GetBlockWithTxsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 17, // 17: cosmos.tx.v1beta1.TxDecodeResponse.tx:type_name -> cosmos.tx.v1beta1.Tx - 17, // 18: cosmos.tx.v1beta1.TxEncodeRequest.tx:type_name -> cosmos.tx.v1beta1.Tx + 22, // 6: cosmos.tx.v1beta1.BroadcastTxResponse.tx_response:type_name -> cosmos.base.abci.v1beta1.TxResponse + 21, // 7: cosmos.tx.v1beta1.SimulateRequest.tx:type_name -> cosmos.tx.v1beta1.Tx + 24, // 8: cosmos.tx.v1beta1.SimulateResponse.gas_info:type_name -> cosmos.base.abci.v1beta1.GasInfo + 25, // 9: cosmos.tx.v1beta1.SimulateResponse.result:type_name -> cosmos.base.abci.v1beta1.Result + 21, // 10: cosmos.tx.v1beta1.GetTxResponse.tx:type_name -> cosmos.tx.v1beta1.Tx + 22, // 11: cosmos.tx.v1beta1.GetTxResponse.tx_response:type_name -> cosmos.base.abci.v1beta1.TxResponse + 20, // 12: cosmos.tx.v1beta1.GetBlockWithTxsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 21, // 13: cosmos.tx.v1beta1.GetBlockWithTxsResponse.txs:type_name -> cosmos.tx.v1beta1.Tx + 26, // 14: cosmos.tx.v1beta1.GetBlockWithTxsResponse.block_id:type_name -> tendermint.types.BlockID + 27, // 15: cosmos.tx.v1beta1.GetBlockWithTxsResponse.block:type_name -> tendermint.types.Block + 23, // 16: cosmos.tx.v1beta1.GetBlockWithTxsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 21, // 17: cosmos.tx.v1beta1.TxDecodeResponse.tx:type_name -> cosmos.tx.v1beta1.Tx + 21, // 18: cosmos.tx.v1beta1.TxEncodeRequest.tx:type_name -> cosmos.tx.v1beta1.Tx 6, // 19: cosmos.tx.v1beta1.Service.Simulate:input_type -> cosmos.tx.v1beta1.SimulateRequest 8, // 20: cosmos.tx.v1beta1.Service.GetTx:input_type -> cosmos.tx.v1beta1.GetTxRequest 4, // 21: cosmos.tx.v1beta1.Service.BroadcastTx:input_type -> cosmos.tx.v1beta1.BroadcastTxRequest @@ -8347,15 +10224,19 @@ var file_cosmos_tx_v1beta1_service_proto_depIdxs = []int32{ 10, // 23: cosmos.tx.v1beta1.Service.GetBlockWithTxs:input_type -> cosmos.tx.v1beta1.GetBlockWithTxsRequest 12, // 24: cosmos.tx.v1beta1.Service.TxDecode:input_type -> cosmos.tx.v1beta1.TxDecodeRequest 14, // 25: cosmos.tx.v1beta1.Service.TxEncode:input_type -> cosmos.tx.v1beta1.TxEncodeRequest - 7, // 26: cosmos.tx.v1beta1.Service.Simulate:output_type -> cosmos.tx.v1beta1.SimulateResponse - 9, // 27: cosmos.tx.v1beta1.Service.GetTx:output_type -> cosmos.tx.v1beta1.GetTxResponse - 5, // 28: cosmos.tx.v1beta1.Service.BroadcastTx:output_type -> cosmos.tx.v1beta1.BroadcastTxResponse - 3, // 29: cosmos.tx.v1beta1.Service.GetTxsEvent:output_type -> cosmos.tx.v1beta1.GetTxsEventResponse - 11, // 30: cosmos.tx.v1beta1.Service.GetBlockWithTxs:output_type -> cosmos.tx.v1beta1.GetBlockWithTxsResponse - 13, // 31: cosmos.tx.v1beta1.Service.TxDecode:output_type -> cosmos.tx.v1beta1.TxDecodeResponse - 15, // 32: cosmos.tx.v1beta1.Service.TxEncode:output_type -> cosmos.tx.v1beta1.TxEncodeResponse - 26, // [26:33] is the sub-list for method output_type - 19, // [19:26] is the sub-list for method input_type + 16, // 26: cosmos.tx.v1beta1.Service.TxEncodeAmino:input_type -> cosmos.tx.v1beta1.TxEncodeAminoRequest + 18, // 27: cosmos.tx.v1beta1.Service.TxDecodeAmino:input_type -> cosmos.tx.v1beta1.TxDecodeAminoRequest + 7, // 28: cosmos.tx.v1beta1.Service.Simulate:output_type -> cosmos.tx.v1beta1.SimulateResponse + 9, // 29: cosmos.tx.v1beta1.Service.GetTx:output_type -> cosmos.tx.v1beta1.GetTxResponse + 5, // 30: cosmos.tx.v1beta1.Service.BroadcastTx:output_type -> cosmos.tx.v1beta1.BroadcastTxResponse + 3, // 31: cosmos.tx.v1beta1.Service.GetTxsEvent:output_type -> cosmos.tx.v1beta1.GetTxsEventResponse + 11, // 32: cosmos.tx.v1beta1.Service.GetBlockWithTxs:output_type -> cosmos.tx.v1beta1.GetBlockWithTxsResponse + 13, // 33: cosmos.tx.v1beta1.Service.TxDecode:output_type -> cosmos.tx.v1beta1.TxDecodeResponse + 15, // 34: cosmos.tx.v1beta1.Service.TxEncode:output_type -> cosmos.tx.v1beta1.TxEncodeResponse + 17, // 35: cosmos.tx.v1beta1.Service.TxEncodeAmino:output_type -> cosmos.tx.v1beta1.TxEncodeAminoResponse + 19, // 36: cosmos.tx.v1beta1.Service.TxDecodeAmino:output_type -> cosmos.tx.v1beta1.TxDecodeAminoResponse + 28, // [28:37] is the sub-list for method output_type + 19, // [19:28] is the sub-list for method input_type 19, // [19:19] is the sub-list for extension type_name 19, // [19:19] is the sub-list for extension extendee 0, // [0:19] is the sub-list for field type_name @@ -8536,6 +10417,54 @@ func file_cosmos_tx_v1beta1_service_proto_init() { return nil } } + file_cosmos_tx_v1beta1_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TxEncodeAminoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_tx_v1beta1_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TxEncodeAminoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_tx_v1beta1_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TxDecodeAminoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_tx_v1beta1_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TxDecodeAminoResponse); 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{ @@ -8543,7 +10472,7 @@ func file_cosmos_tx_v1beta1_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_tx_v1beta1_service_proto_rawDesc, NumEnums: 2, - NumMessages: 14, + NumMessages: 18, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/tx/v1beta1/service_grpc.pb.go b/api/cosmos/tx/v1beta1/service_grpc.pb.go index 565f79c98438..4eb5d79d1bec 100644 --- a/api/cosmos/tx/v1beta1/service_grpc.pb.go +++ b/api/cosmos/tx/v1beta1/service_grpc.pb.go @@ -42,6 +42,14 @@ type ServiceClient interface { // // Since: cosmos-sdk 0.47 TxEncode(ctx context.Context, in *TxEncodeRequest, opts ...grpc.CallOption) (*TxEncodeResponse, error) + // TxEncodeAmino encodes an amino transaction. + // + // Since: cosmos-sdk 0.47 + TxEncodeAmino(ctx context.Context, in *TxEncodeAminoRequest, opts ...grpc.CallOption) (*TxEncodeAminoResponse, error) + // TxDecodeAmino decodes an amino transaction. + // + // Since: cosmos-sdk 0.47 + TxDecodeAmino(ctx context.Context, in *TxDecodeAminoRequest, opts ...grpc.CallOption) (*TxDecodeAminoResponse, error) } type serviceClient struct { @@ -115,6 +123,24 @@ func (c *serviceClient) TxEncode(ctx context.Context, in *TxEncodeRequest, opts return out, nil } +func (c *serviceClient) TxEncodeAmino(ctx context.Context, in *TxEncodeAminoRequest, opts ...grpc.CallOption) (*TxEncodeAminoResponse, error) { + out := new(TxEncodeAminoResponse) + err := c.cc.Invoke(ctx, "/cosmos.tx.v1beta1.Service/TxEncodeAmino", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) TxDecodeAmino(ctx context.Context, in *TxDecodeAminoRequest, opts ...grpc.CallOption) (*TxDecodeAminoResponse, error) { + out := new(TxDecodeAminoResponse) + err := c.cc.Invoke(ctx, "/cosmos.tx.v1beta1.Service/TxDecodeAmino", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ServiceServer is the server API for Service service. // All implementations must embed UnimplementedServiceServer // for forward compatibility @@ -139,6 +165,14 @@ type ServiceServer interface { // // Since: cosmos-sdk 0.47 TxEncode(context.Context, *TxEncodeRequest) (*TxEncodeResponse, error) + // TxEncodeAmino encodes an amino transaction. + // + // Since: cosmos-sdk 0.47 + TxEncodeAmino(context.Context, *TxEncodeAminoRequest) (*TxEncodeAminoResponse, error) + // TxDecodeAmino decodes an amino transaction. + // + // Since: cosmos-sdk 0.47 + TxDecodeAmino(context.Context, *TxDecodeAminoRequest) (*TxDecodeAminoResponse, error) mustEmbedUnimplementedServiceServer() } @@ -167,6 +201,12 @@ func (UnimplementedServiceServer) TxDecode(context.Context, *TxDecodeRequest) (* func (UnimplementedServiceServer) TxEncode(context.Context, *TxEncodeRequest) (*TxEncodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TxEncode not implemented") } +func (UnimplementedServiceServer) TxEncodeAmino(context.Context, *TxEncodeAminoRequest) (*TxEncodeAminoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TxEncodeAmino not implemented") +} +func (UnimplementedServiceServer) TxDecodeAmino(context.Context, *TxDecodeAminoRequest) (*TxDecodeAminoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TxDecodeAmino not implemented") +} func (UnimplementedServiceServer) mustEmbedUnimplementedServiceServer() {} // UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. @@ -306,6 +346,42 @@ func _Service_TxEncode_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Service_TxEncodeAmino_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TxEncodeAminoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceServer).TxEncodeAmino(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.tx.v1beta1.Service/TxEncodeAmino", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceServer).TxEncodeAmino(ctx, req.(*TxEncodeAminoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Service_TxDecodeAmino_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TxDecodeAminoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceServer).TxDecodeAmino(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.tx.v1beta1.Service/TxDecodeAmino", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceServer).TxDecodeAmino(ctx, req.(*TxDecodeAminoRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Service_ServiceDesc is the grpc.ServiceDesc for Service service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -341,6 +417,14 @@ var Service_ServiceDesc = grpc.ServiceDesc{ MethodName: "TxEncode", Handler: _Service_TxEncode_Handler, }, + { + MethodName: "TxEncodeAmino", + Handler: _Service_TxEncodeAmino_Handler, + }, + { + MethodName: "TxDecodeAmino", + Handler: _Service_TxDecodeAmino_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/tx/v1beta1/service.proto", diff --git a/proto/cosmos/tx/v1beta1/service.proto b/proto/cosmos/tx/v1beta1/service.proto index 15504b85c380..16b3de0ddafc 100644 --- a/proto/cosmos/tx/v1beta1/service.proto +++ b/proto/cosmos/tx/v1beta1/service.proto @@ -58,6 +58,24 @@ service Service { body: "*" }; } + // TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes. + // + // Since: cosmos-sdk 0.47 + rpc TxEncodeAmino(TxEncodeAminoRequest) returns (TxEncodeAminoResponse) { + option (google.api.http) = { + post: "/cosmos/tx/v1beta1/encode/amino" + body: "*" + }; + } + // TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON. + // + // Since: cosmos-sdk 0.47 + rpc TxDecodeAmino(TxDecodeAminoRequest) returns (TxDecodeAminoResponse) { + option (google.api.http) = { + post: "/cosmos/tx/v1beta1/decode/amino" + body: "*" + }; + } } // GetTxsEventRequest is the request type for the Service.TxsByEvents @@ -208,7 +226,7 @@ message TxDecodeResponse { cosmos.tx.v1beta1.Tx tx = 1; } -// TxEncodeResponse is the request type for the Service.TxEncode +// TxEncodeRequest is the request type for the Service.TxEncode // RPC method. // // Since: cosmos-sdk 0.47 @@ -225,3 +243,35 @@ message TxEncodeResponse { // tx_bytes is the encoded transaction bytes. bytes tx_bytes = 1; } + +// TxEncodeAminoRequest is the request type for the Service.TxEncodeAmino +// RPC method. +// +// Since: cosmos-sdk 0.47 +message TxEncodeAminoRequest { + string amino_json = 1; +} + +// TxEncodeAminoResponse is the response type for the Service.TxEncodeAmino +// RPC method. +// +// Since: cosmos-sdk 0.47 +message TxEncodeAminoResponse { + bytes amino_binary = 1; +} + +// TxDecodeAminoRequest is the request type for the Service.TxDecodeAmino +// RPC method. +// +// Since: cosmos-sdk 0.47 +message TxDecodeAminoRequest { + bytes amino_binary = 1; +} + +// TxDecodeAminoResponse is the response type for the Service.TxDecodeAmino +// RPC method. +// +// Since: cosmos-sdk 0.47 +message TxDecodeAminoResponse { + string amino_json = 1; +} diff --git a/tests/e2e/tx/service_test.go b/tests/e2e/tx/service_test.go index 6eef802cdd49..636d285d4ee6 100644 --- a/tests/e2e/tx/service_test.go +++ b/tests/e2e/tx/service_test.go @@ -30,6 +30,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/tx/signing" authclient "github.com/cosmos/cosmos-sdk/x/auth/client" authtest "github.com/cosmos/cosmos-sdk/x/auth/client/testutil" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" ) @@ -772,6 +773,7 @@ func (s IntegrationTestSuite) TestGetBlockWithTxs_GRPCGateway() { } func (s IntegrationTestSuite) TestTxEncode_GRPC() { + val := s.network.Validators[0] txBuilder := s.mkTxBuilder() protoTx, err := txBuilderToProtoTx(txBuilder) s.Require().NoError(err) @@ -784,7 +786,7 @@ func (s IntegrationTestSuite) TestTxEncode_GRPC() { }{ {"nil request", nil, true, "request cannot be nil"}, {"empty request", &tx.TxEncodeRequest{}, true, "invalid empty tx"}, - {"valid request with tx bytes", &tx.TxEncodeRequest{Tx: protoTx}, false, ""}, + {"valid tx request", &tx.TxEncodeRequest{Tx: protoTx}, false, ""}, } for _, tc := range testCases { @@ -798,6 +800,10 @@ func (s IntegrationTestSuite) TestTxEncode_GRPC() { } else { s.Require().NoError(err) s.Require().NotEmpty(res.GetTxBytes()) + + tx, err := val.ClientCtx.TxConfig.TxDecoder()(res.TxBytes) + s.Require().NoError(err) + s.Require().Equal(protoTx.GetMsgs(), tx.GetMsgs()) } }) } @@ -816,7 +822,7 @@ func (s *IntegrationTestSuite) TestTxEncode_GRPCGateway() { expErrMsg string }{ {"empty request", &tx.TxEncodeRequest{}, true, "invalid empty tx"}, - {"valid request with tx bytes", &tx.TxEncodeRequest{Tx: protoTx}, false, ""}, + {"valid tx request", &tx.TxEncodeRequest{Tx: protoTx}, false, ""}, } for _, tc := range testCases { @@ -829,7 +835,13 @@ func (s *IntegrationTestSuite) TestTxEncode_GRPCGateway() { if tc.expErr { s.Require().Contains(string(res), tc.expErrMsg) } else { + var result tx.TxEncodeResponse + err := val.ClientCtx.Codec.UnmarshalJSON(res, &result) + s.Require().NoError(err) + + tx, err := val.ClientCtx.TxConfig.TxDecoder()(result.TxBytes) s.Require().NoError(err) + s.Require().Equal(protoTx.GetMsgs(), tx.GetMsgs()) } }) } @@ -867,6 +879,11 @@ func (s IntegrationTestSuite) TestTxDecode_GRPC() { } else { s.Require().NoError(err) s.Require().NotEmpty(res.GetTx()) + + txb := authtx.WrapTx(res.Tx) + tx, err := val.ClientCtx.TxConfig.TxEncoder()(txb.GetTx()) + s.Require().NoError(err) + s.Require().Equal(encodedTx, tx) } }) } @@ -876,10 +893,10 @@ func (s IntegrationTestSuite) TestTxDecode_GRPCGateway() { val := s.network.Validators[0] txBuilder := s.mkTxBuilder() - txBytes, err := val.ClientCtx.TxConfig.TxEncoder()(txBuilder.GetTx()) + encodedTxBytes, err := val.ClientCtx.TxConfig.TxEncoder()(txBuilder.GetTx()) s.Require().NoError(err) - invalidTxBytes := append(txBytes, byte(0o00)) + invalidTxBytes := append(encodedTxBytes, byte(0o00)) testCases := []struct { name string @@ -889,7 +906,7 @@ func (s IntegrationTestSuite) TestTxDecode_GRPCGateway() { }{ {"empty request", &tx.TxDecodeRequest{}, true, "invalid empty tx bytes"}, {"invalid tx bytes", &tx.TxDecodeRequest{TxBytes: invalidTxBytes}, true, "tx parse error"}, - {"valid request with tx_bytes", &tx.TxDecodeRequest{TxBytes: txBytes}, false, ""}, + {"valid request with tx_bytes", &tx.TxDecodeRequest{TxBytes: encodedTxBytes}, false, ""}, } for _, tc := range testCases { @@ -902,7 +919,187 @@ func (s IntegrationTestSuite) TestTxDecode_GRPCGateway() { if tc.expErr { s.Require().Contains(string(res), tc.expErrMsg) } else { + var result tx.TxDecodeResponse + err := val.ClientCtx.Codec.UnmarshalJSON(res, &result) + s.Require().NoError(err) + + txb := authtx.WrapTx(result.Tx) + tx, err := val.ClientCtx.TxConfig.TxEncoder()(txb.GetTx()) + s.Require().NoError(err) + s.Require().Equal(encodedTxBytes, tx) + } + }) + } +} + +func (s IntegrationTestSuite) TestTxEncodeAmino_GRPC() { + val := s.network.Validators[0] + txBuilder := s.mkTxBuilder() + stdTx, err := clienttx.ConvertTxToStdTx(val.ClientCtx.LegacyAmino, txBuilder.GetTx()) + s.Require().NoError(err) + txJSONBytes, err := val.ClientCtx.LegacyAmino.MarshalJSON(stdTx) + s.Require().NoError(err) + + testCases := []struct { + name string + req *tx.TxEncodeAminoRequest + expErr bool + expErrMsg string + }{ + {"nil request", nil, true, "request cannot be nil"}, + {"empty request", &tx.TxEncodeAminoRequest{}, true, "invalid empty tx json"}, + {"invalid request", &tx.TxEncodeAminoRequest{AminoJson: "invalid tx json"}, true, "invalid request"}, + {"valid request with amino-json", &tx.TxEncodeAminoRequest{AminoJson: string(txJSONBytes)}, false, ""}, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + res, err := s.queryClient.TxEncodeAmino(context.Background(), tc.req) + if tc.expErr { + s.Require().Error(err) + s.Require().Contains(err.Error(), tc.expErrMsg) + s.Require().Empty(res) + } else { + s.Require().NoError(err) + s.Require().NotEmpty(res.GetAminoBinary()) + + var tx legacytx.StdTx + stdTxConfig := legacytx.StdTxConfig{Cdc: val.ClientCtx.LegacyAmino} + stdTxConfig.Cdc.Unmarshal(res.AminoBinary, &tx) + s.Require().Equal(tx.GetMsgs(), stdTx.GetMsgs()) + } + }) + } +} + +func (s *IntegrationTestSuite) TestTxEncodeAmino_GRPCGateway() { + val := s.network.Validators[0] + txBuilder := s.mkTxBuilder() + stdTx, err := clienttx.ConvertTxToStdTx(val.ClientCtx.LegacyAmino, txBuilder.GetTx()) + s.Require().NoError(err) + txJSONBytes, err := val.ClientCtx.LegacyAmino.MarshalJSON(stdTx) + s.Require().NoError(err) + + testCases := []struct { + name string + req *tx.TxEncodeAminoRequest + expErr bool + expErrMsg string + }{ + {"empty request", &tx.TxEncodeAminoRequest{}, true, "invalid empty tx json"}, + {"invalid request", &tx.TxEncodeAminoRequest{AminoJson: "invalid tx json"}, true, "invalid request"}, + {"valid request with amino-json", &tx.TxEncodeAminoRequest{AminoJson: string(txJSONBytes)}, false, ""}, + } + + for _, tc := range testCases { + s.Run(tc.name, func() { + req, err := val.ClientCtx.Codec.MarshalJSON(tc.req) + s.Require().NoError(err) + + res, err := testutil.PostRequest(fmt.Sprintf("%s/cosmos/tx/v1beta1/encode/amino", val.APIAddress), "application/json", req) + s.Require().NoError(err) + if tc.expErr { + s.Require().Contains(string(res), tc.expErrMsg) + } else { + var result tx.TxEncodeAminoResponse + err := val.ClientCtx.Codec.UnmarshalJSON(res, &result) s.Require().NoError(err) + + var newStdTx legacytx.StdTx + stdTxConfig := legacytx.StdTxConfig{Cdc: val.ClientCtx.LegacyAmino} + stdTxConfig.Cdc.Unmarshal(result.AminoBinary, &newStdTx) + s.Require().Equal(newStdTx.GetMsgs(), stdTx.GetMsgs()) + } + }) + } +} + +func (s IntegrationTestSuite) TestTxDecodeAmino_GRPC() { + val := s.network.Validators[0] + txBuilder := s.mkTxBuilder() + + stdTx, err := clienttx.ConvertTxToStdTx(val.ClientCtx.LegacyAmino, txBuilder.GetTx()) + s.Require().NoError(err) + stdTxConfig := legacytx.StdTxConfig{Cdc: val.ClientCtx.LegacyAmino} + encodedTx, err := stdTxConfig.Cdc.Marshal(stdTx) + s.Require().NoError(err) + + invalidTxBytes := append(encodedTx, byte(0o00)) + + testCases := []struct { + name string + req *tx.TxDecodeAminoRequest + expErr bool + expErrMsg string + }{ + {"nil request", nil, true, "request cannot be nil"}, + {"empty request", &tx.TxDecodeAminoRequest{}, true, "invalid empty tx bytes"}, + {"invalid tx bytes", &tx.TxDecodeAminoRequest{AminoBinary: invalidTxBytes}, true, "invalid request"}, + {"valid request with tx bytes", &tx.TxDecodeAminoRequest{AminoBinary: encodedTx}, false, ""}, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + res, err := s.queryClient.TxDecodeAmino(context.Background(), tc.req) + if tc.expErr { + s.Require().Error(err) + s.Require().Contains(err.Error(), tc.expErrMsg) + s.Require().Empty(res) + } else { + s.Require().NoError(err) + s.Require().NotEmpty(res.GetAminoJson()) + + var tx legacytx.StdTx + err := stdTxConfig.Cdc.UnmarshalJSON([]byte(res.GetAminoJson()), &tx) + s.Require().NoError(err) + s.Require().Equal(stdTx.GetMsgs(), tx.GetMsgs()) + } + }) + } +} + +func (s IntegrationTestSuite) TestTxDecodeAmino_GRPCGateway() { + val := s.network.Validators[0] + txBuilder := s.mkTxBuilder() + + stdTx, err := clienttx.ConvertTxToStdTx(val.ClientCtx.LegacyAmino, txBuilder.GetTx()) + s.Require().NoError(err) + stdTxConfig := legacytx.StdTxConfig{Cdc: val.ClientCtx.LegacyAmino} + encodedTx, err := stdTxConfig.Cdc.Marshal(stdTx) + s.Require().NoError(err) + + invalidTxBytes := append(encodedTx, byte(0o00)) + + testCases := []struct { + name string + req *tx.TxDecodeAminoRequest + expErr bool + expErrMsg string + }{ + {"empty request", &tx.TxDecodeAminoRequest{}, true, "invalid empty tx bytes"}, + {"invalid tx bytes", &tx.TxDecodeAminoRequest{AminoBinary: invalidTxBytes}, true, "invalid request"}, + {"valid request with tx bytes", &tx.TxDecodeAminoRequest{AminoBinary: encodedTx}, false, ""}, + } + + for _, tc := range testCases { + s.Run(tc.name, func() { + req, err := val.ClientCtx.Codec.MarshalJSON(tc.req) + s.Require().NoError(err) + + res, err := testutil.PostRequest(fmt.Sprintf("%s/cosmos/tx/v1beta1/decode/amino", val.APIAddress), "application/json", req) + s.Require().NoError(err) + if tc.expErr { + s.Require().Contains(string(res), tc.expErrMsg) + } else { + var result tx.TxDecodeAminoResponse + err := val.ClientCtx.Codec.UnmarshalJSON(res, &result) + s.Require().NoError(err) + + var newStdTx legacytx.StdTx + stdTxConfig.Cdc.UnmarshalJSON([]byte(result.AminoJson), &newStdTx) + s.Require().Equal(newStdTx.GetMsgs(), stdTx.GetMsgs()) } }) } @@ -930,6 +1127,7 @@ func (s IntegrationTestSuite) mkTxBuilder() client.TxBuilder { txBuilder.SetFeeAmount(feeAmount) txBuilder.SetGasLimit(gasLimit) txBuilder.SetMemo("foobar") + s.Require().Equal([]sdk.AccAddress{val.Address}, txBuilder.GetTx().GetSigners()) // setup txFactory txFactory := clienttx.Factory{}. diff --git a/types/tx/service.pb.go b/types/tx/service.pb.go index bfd20e436e59..608dd2772ad8 100644 --- a/types/tx/service.pb.go +++ b/types/tx/service.pb.go @@ -812,7 +812,7 @@ func (m *TxDecodeResponse) GetTx() *Tx { return nil } -// TxEncodeResponse is the request type for the Service.TxEncode +// TxEncodeRequest is the request type for the Service.TxEncode // RPC method. // // Since: cosmos-sdk 0.47 @@ -910,6 +910,198 @@ func (m *TxEncodeResponse) GetTxBytes() []byte { return nil } +// TxEncodeAminoRequest is the request type for the Service.TxEncodeAmino +// RPC method. +// +// Since: cosmos-sdk 0.47 +type TxEncodeAminoRequest struct { + AminoJson string `protobuf:"bytes,1,opt,name=amino_json,json=aminoJson,proto3" json:"amino_json,omitempty"` +} + +func (m *TxEncodeAminoRequest) Reset() { *m = TxEncodeAminoRequest{} } +func (m *TxEncodeAminoRequest) String() string { return proto.CompactTextString(m) } +func (*TxEncodeAminoRequest) ProtoMessage() {} +func (*TxEncodeAminoRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e0b00a618705eca7, []int{14} +} +func (m *TxEncodeAminoRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TxEncodeAminoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TxEncodeAminoRequest.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 *TxEncodeAminoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_TxEncodeAminoRequest.Merge(m, src) +} +func (m *TxEncodeAminoRequest) XXX_Size() int { + return m.Size() +} +func (m *TxEncodeAminoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_TxEncodeAminoRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_TxEncodeAminoRequest proto.InternalMessageInfo + +func (m *TxEncodeAminoRequest) GetAminoJson() string { + if m != nil { + return m.AminoJson + } + return "" +} + +// TxEncodeAminoResponse is the response type for the Service.TxEncodeAmino +// RPC method. +// +// Since: cosmos-sdk 0.47 +type TxEncodeAminoResponse struct { + AminoBinary []byte `protobuf:"bytes,1,opt,name=amino_binary,json=aminoBinary,proto3" json:"amino_binary,omitempty"` +} + +func (m *TxEncodeAminoResponse) Reset() { *m = TxEncodeAminoResponse{} } +func (m *TxEncodeAminoResponse) String() string { return proto.CompactTextString(m) } +func (*TxEncodeAminoResponse) ProtoMessage() {} +func (*TxEncodeAminoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e0b00a618705eca7, []int{15} +} +func (m *TxEncodeAminoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TxEncodeAminoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TxEncodeAminoResponse.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 *TxEncodeAminoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_TxEncodeAminoResponse.Merge(m, src) +} +func (m *TxEncodeAminoResponse) XXX_Size() int { + return m.Size() +} +func (m *TxEncodeAminoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_TxEncodeAminoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_TxEncodeAminoResponse proto.InternalMessageInfo + +func (m *TxEncodeAminoResponse) GetAminoBinary() []byte { + if m != nil { + return m.AminoBinary + } + return nil +} + +// TxDecodeAminoRequest is the request type for the Service.TxDecodeAmino +// RPC method. +// +// Since: cosmos-sdk 0.47 +type TxDecodeAminoRequest struct { + AminoBinary []byte `protobuf:"bytes,1,opt,name=amino_binary,json=aminoBinary,proto3" json:"amino_binary,omitempty"` +} + +func (m *TxDecodeAminoRequest) Reset() { *m = TxDecodeAminoRequest{} } +func (m *TxDecodeAminoRequest) String() string { return proto.CompactTextString(m) } +func (*TxDecodeAminoRequest) ProtoMessage() {} +func (*TxDecodeAminoRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e0b00a618705eca7, []int{16} +} +func (m *TxDecodeAminoRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TxDecodeAminoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TxDecodeAminoRequest.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 *TxDecodeAminoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_TxDecodeAminoRequest.Merge(m, src) +} +func (m *TxDecodeAminoRequest) XXX_Size() int { + return m.Size() +} +func (m *TxDecodeAminoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_TxDecodeAminoRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_TxDecodeAminoRequest proto.InternalMessageInfo + +func (m *TxDecodeAminoRequest) GetAminoBinary() []byte { + if m != nil { + return m.AminoBinary + } + return nil +} + +// TxDecodeAminoResponse is the response type for the Service.TxDecodeAmino +// RPC method. +// +// Since: cosmos-sdk 0.47 +type TxDecodeAminoResponse struct { + AminoJson string `protobuf:"bytes,1,opt,name=amino_json,json=aminoJson,proto3" json:"amino_json,omitempty"` +} + +func (m *TxDecodeAminoResponse) Reset() { *m = TxDecodeAminoResponse{} } +func (m *TxDecodeAminoResponse) String() string { return proto.CompactTextString(m) } +func (*TxDecodeAminoResponse) ProtoMessage() {} +func (*TxDecodeAminoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e0b00a618705eca7, []int{17} +} +func (m *TxDecodeAminoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TxDecodeAminoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TxDecodeAminoResponse.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 *TxDecodeAminoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_TxDecodeAminoResponse.Merge(m, src) +} +func (m *TxDecodeAminoResponse) XXX_Size() int { + return m.Size() +} +func (m *TxDecodeAminoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_TxDecodeAminoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_TxDecodeAminoResponse proto.InternalMessageInfo + +func (m *TxDecodeAminoResponse) GetAminoJson() string { + if m != nil { + return m.AminoJson + } + return "" +} + func init() { proto.RegisterEnum("cosmos.tx.v1beta1.OrderBy", OrderBy_name, OrderBy_value) proto.RegisterEnum("cosmos.tx.v1beta1.BroadcastMode", BroadcastMode_name, BroadcastMode_value) @@ -927,81 +1119,93 @@ func init() { proto.RegisterType((*TxDecodeResponse)(nil), "cosmos.tx.v1beta1.TxDecodeResponse") proto.RegisterType((*TxEncodeRequest)(nil), "cosmos.tx.v1beta1.TxEncodeRequest") proto.RegisterType((*TxEncodeResponse)(nil), "cosmos.tx.v1beta1.TxEncodeResponse") + proto.RegisterType((*TxEncodeAminoRequest)(nil), "cosmos.tx.v1beta1.TxEncodeAminoRequest") + proto.RegisterType((*TxEncodeAminoResponse)(nil), "cosmos.tx.v1beta1.TxEncodeAminoResponse") + proto.RegisterType((*TxDecodeAminoRequest)(nil), "cosmos.tx.v1beta1.TxDecodeAminoRequest") + proto.RegisterType((*TxDecodeAminoResponse)(nil), "cosmos.tx.v1beta1.TxDecodeAminoResponse") } func init() { proto.RegisterFile("cosmos/tx/v1beta1/service.proto", fileDescriptor_e0b00a618705eca7) } var fileDescriptor_e0b00a618705eca7 = []byte{ - // 1098 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcf, 0x6f, 0x1a, 0x47, - 0x14, 0xf6, 0x2e, 0xd8, 0x90, 0x87, 0x1d, 0x93, 0xb1, 0x6b, 0x63, 0xe2, 0x62, 0xb2, 0x89, 0x7f, - 0xc4, 0xaa, 0x77, 0x15, 0x9a, 0x4a, 0x69, 0x55, 0xa9, 0x32, 0x3f, 0x42, 0x69, 0x9a, 0x10, 0x2d, - 0x54, 0x51, 0xaa, 0x4a, 0x68, 0x81, 0x09, 0xac, 0x02, 0xbb, 0x98, 0x19, 0xac, 0x45, 0xae, 0xd5, - 0xaa, 0xa7, 0xaa, 0xa7, 0x4a, 0x3d, 0xf4, 0x5f, 0xea, 0x31, 0x52, 0x2f, 0xed, 0xad, 0xb2, 0x7b, - 0xea, 0xa9, 0x7f, 0x42, 0xb4, 0xb3, 0x03, 0xec, 0xc2, 0x6e, 0xb0, 0x73, 0xb1, 0x67, 0x98, 0xef, - 0xbd, 0xef, 0x7b, 0x6f, 0x66, 0xbe, 0x1d, 0xd8, 0x69, 0x98, 0xa4, 0x6b, 0x12, 0x85, 0x5a, 0xca, - 0xe9, 0x83, 0x3a, 0xa6, 0xda, 0x03, 0x85, 0xe0, 0xfe, 0xa9, 0xde, 0xc0, 0x72, 0xaf, 0x6f, 0x52, - 0x13, 0xdd, 0x72, 0x00, 0x32, 0xb5, 0x64, 0x0e, 0x48, 0x6e, 0xb7, 0x4c, 0xb3, 0xd5, 0xc1, 0x8a, - 0xd6, 0xd3, 0x15, 0xcd, 0x30, 0x4c, 0xaa, 0x51, 0xdd, 0x34, 0x88, 0x13, 0x90, 0xbc, 0xcb, 0x33, - 0xd6, 0x35, 0x82, 0x15, 0xad, 0xde, 0xd0, 0xc7, 0x89, 0xed, 0x09, 0x07, 0x25, 0x67, 0x69, 0xa9, - 0xc5, 0xd7, 0x0e, 0xdd, 0x09, 0x4e, 0x06, 0xb8, 0x3f, 0x1c, 0x63, 0x7a, 0x5a, 0x4b, 0x37, 0x18, - 0x1b, 0xc7, 0x6e, 0x53, 0x6c, 0x34, 0x71, 0xbf, 0xab, 0x1b, 0x54, 0xa1, 0xc3, 0x1e, 0x26, 0x4a, - 0xbd, 0x63, 0x36, 0x5e, 0x07, 0xae, 0xb2, 0xbf, 0xce, 0xaa, 0xf4, 0xb7, 0x00, 0xa8, 0x88, 0x69, - 0xd5, 0x22, 0x85, 0x53, 0x6c, 0x50, 0x15, 0x9f, 0x0c, 0x30, 0xa1, 0x68, 0x03, 0x96, 0xb0, 0x3d, - 0x27, 0x09, 0x21, 0x1d, 0x3a, 0xb8, 0xa1, 0xf2, 0x19, 0xfa, 0x0a, 0x60, 0x42, 0x9f, 0x10, 0xd3, - 0xc2, 0x41, 0x2c, 0xb3, 0x27, 0xf3, 0xee, 0xd8, 0x5a, 0x65, 0xa6, 0x75, 0xd4, 0x25, 0xf9, 0xb9, - 0xd6, 0xc2, 0x3c, 0x67, 0x56, 0x4c, 0x08, 0xaa, 0x2b, 0x1a, 0x7d, 0x02, 0x51, 0xb3, 0xdf, 0xc4, - 0xfd, 0x5a, 0x7d, 0x98, 0x08, 0xa5, 0x85, 0x83, 0x9b, 0x99, 0xa4, 0x3c, 0xd3, 0x67, 0xb9, 0x6c, - 0x43, 0xb2, 0x43, 0x35, 0x62, 0x3a, 0x03, 0x84, 0x20, 0xdc, 0xd3, 0x5a, 0x38, 0x11, 0x4e, 0x0b, - 0x07, 0x61, 0x95, 0x8d, 0xd1, 0x3a, 0x2c, 0x76, 0xf4, 0xae, 0x4e, 0x13, 0x8b, 0xec, 0x47, 0x67, - 0x22, 0xfd, 0x27, 0xc0, 0x9a, 0xa7, 0x36, 0xd2, 0x33, 0x0d, 0x82, 0xd1, 0x3e, 0x84, 0xa8, 0xe5, - 0x54, 0x16, 0xcb, 0x7c, 0xe0, 0xc3, 0x59, 0xb5, 0x54, 0x1b, 0x81, 0x8a, 0xb0, 0x4c, 0xad, 0x5a, - 0x9f, 0xc7, 0x91, 0x84, 0xc8, 0x22, 0xee, 0x79, 0xea, 0x65, 0xfb, 0xe9, 0x0a, 0xe4, 0x60, 0x35, - 0x46, 0xc7, 0x63, 0x82, 0x9e, 0x78, 0xda, 0x16, 0x62, 0x6d, 0xdb, 0x9f, 0xdb, 0x36, 0x27, 0x7a, - 0xa6, 0x6f, 0xeb, 0xb0, 0x48, 0x4d, 0xaa, 0x75, 0x78, 0x07, 0x9c, 0x89, 0x84, 0x01, 0x65, 0xfb, - 0xa6, 0xd6, 0x6c, 0x68, 0x84, 0xda, 0x32, 0x9c, 0x7d, 0xdc, 0x82, 0x28, 0xb5, 0x6a, 0xf5, 0x21, - 0xc5, 0x76, 0xbd, 0xc2, 0xc1, 0xb2, 0x1a, 0xa1, 0x56, 0xd6, 0x9e, 0xa2, 0x87, 0x10, 0xee, 0x9a, - 0x4d, 0xcc, 0x36, 0xf1, 0x66, 0x26, 0xed, 0xd3, 0x86, 0x71, 0xbe, 0xa7, 0x66, 0x13, 0xab, 0x0c, - 0x2d, 0x7d, 0x07, 0x6b, 0x1e, 0x1a, 0xde, 0xd2, 0x02, 0xc4, 0x5c, 0x9d, 0x62, 0x54, 0x57, 0x6d, - 0x14, 0x4c, 0x1a, 0x25, 0xbd, 0x80, 0xd5, 0x8a, 0xde, 0x1d, 0x74, 0x34, 0x3a, 0x3a, 0x35, 0xe8, - 0x3e, 0x88, 0xd4, 0xe2, 0x09, 0xfd, 0xf7, 0x8a, 0x35, 0x48, 0xa4, 0x96, 0xa7, 0x58, 0xd1, 0x53, - 0xac, 0xf4, 0x8b, 0x00, 0xf1, 0x49, 0x66, 0x2e, 0xfa, 0x73, 0x88, 0xb6, 0x34, 0x52, 0xd3, 0x8d, - 0x57, 0x26, 0x27, 0xb8, 0x13, 0xac, 0xb8, 0xa8, 0x91, 0x92, 0xf1, 0xca, 0x54, 0x23, 0x2d, 0x67, - 0x80, 0x1e, 0xc1, 0x52, 0x1f, 0x93, 0x41, 0x87, 0xf2, 0x6b, 0x90, 0x0e, 0x8e, 0x55, 0x19, 0x4e, - 0xe5, 0x78, 0x49, 0x82, 0x65, 0x76, 0x2c, 0x47, 0x25, 0x22, 0x08, 0xb7, 0x35, 0xd2, 0x66, 0x1a, - 0x6e, 0xa8, 0x6c, 0x2c, 0x9d, 0xc3, 0x0a, 0xc7, 0x70, 0xb1, 0xbb, 0x73, 0xfb, 0xc0, 0x7a, 0x30, - 0xb5, 0x11, 0xe2, 0x7b, 0x6e, 0x84, 0x05, 0x1b, 0x45, 0x4c, 0xb3, 0xb6, 0x8d, 0xbc, 0xd0, 0x69, - 0xbb, 0x6a, 0x11, 0x97, 0x33, 0xb4, 0xb1, 0xde, 0x6a, 0x53, 0xa6, 0x25, 0xa4, 0xf2, 0x19, 0x7a, - 0xfc, 0xfe, 0xce, 0xe0, 0x3e, 0xdd, 0xd2, 0xff, 0x02, 0x6c, 0xce, 0x50, 0x5f, 0xf7, 0xe2, 0x3e, - 0x84, 0x28, 0xb3, 0xc0, 0x9a, 0xde, 0xe4, 0x52, 0xb6, 0xe4, 0x89, 0x0d, 0xca, 0x8e, 0x01, 0x32, - 0x8a, 0x52, 0x5e, 0x8d, 0x30, 0x68, 0xa9, 0x89, 0x8e, 0x60, 0x91, 0x0d, 0xf9, 0x05, 0xdd, 0x0c, - 0x08, 0x51, 0x1d, 0x14, 0x2a, 0x7a, 0x2a, 0x0e, 0x5f, 0xeb, 0x52, 0x7b, 0x4a, 0xfe, 0x08, 0x56, - 0xab, 0x56, 0x1e, 0x37, 0xec, 0x5b, 0x36, 0xf7, 0xde, 0x4a, 0x9f, 0x42, 0x7c, 0x82, 0xbe, 0xd6, - 0xe1, 0x90, 0x1e, 0xd9, 0x44, 0x05, 0xc3, 0x4d, 0x74, 0xc5, 0xc8, 0x23, 0x9b, 0x74, 0x14, 0xc9, - 0x49, 0x83, 0x35, 0x1e, 0x7e, 0x09, 0x11, 0xee, 0xdb, 0x28, 0x01, 0xeb, 0x65, 0x35, 0x5f, 0x50, - 0x6b, 0xd9, 0x97, 0xb5, 0x6f, 0x9e, 0x55, 0x9e, 0x17, 0x72, 0xa5, 0xc7, 0xa5, 0x42, 0x3e, 0xbe, - 0x80, 0xe2, 0xb0, 0x3c, 0x5e, 0x39, 0xae, 0xe4, 0xe2, 0x02, 0xba, 0x05, 0x2b, 0xe3, 0x5f, 0xf2, - 0x85, 0x4a, 0x2e, 0x2e, 0x1e, 0xfe, 0x28, 0xc0, 0x8a, 0xc7, 0x87, 0x50, 0x0a, 0x92, 0x59, 0xb5, - 0x7c, 0x9c, 0xcf, 0x1d, 0x57, 0xaa, 0xb5, 0xa7, 0xe5, 0x7c, 0x61, 0x2a, 0xed, 0x36, 0xac, 0x4f, - 0xad, 0x67, 0xbf, 0x2e, 0xe7, 0x9e, 0xc4, 0x85, 0xa4, 0x18, 0x15, 0xd0, 0x26, 0xac, 0x4d, 0xad, - 0x56, 0x5e, 0x3e, 0xcb, 0xc5, 0x45, 0x5b, 0xe7, 0xd4, 0xc2, 0x31, 0x5b, 0x09, 0x65, 0x7e, 0x8e, - 0x40, 0xa4, 0xe2, 0x3c, 0x07, 0xd0, 0x19, 0x44, 0x47, 0x36, 0x82, 0x24, 0x9f, 0x76, 0x4d, 0xb9, - 0x57, 0xf2, 0xee, 0x3b, 0x31, 0xfc, 0xb2, 0xed, 0xfd, 0xf4, 0xe7, 0xbf, 0xbf, 0x89, 0xe9, 0xcf, - 0x84, 0x43, 0xe9, 0xb6, 0xe2, 0xf3, 0x14, 0x19, 0x11, 0x9e, 0xc0, 0x22, 0xf3, 0x04, 0xb4, 0xe3, - 0x93, 0xd5, 0xed, 0x28, 0xc9, 0x74, 0x30, 0x80, 0x73, 0xee, 0x32, 0xce, 0x1d, 0xf4, 0xa1, 0xe2, - 0xf7, 0x08, 0x21, 0xca, 0x99, 0xed, 0x42, 0xe7, 0xe8, 0x07, 0x88, 0xb9, 0xec, 0x1e, 0xed, 0xbe, - 0xeb, 0x2b, 0x31, 0xa1, 0xdf, 0x9b, 0x07, 0xe3, 0x22, 0xee, 0x30, 0x11, 0xb7, 0xed, 0xc2, 0x37, - 0xfc, 0x75, 0xa0, 0xef, 0x21, 0xe6, 0xfa, 0x84, 0xfb, 0x0a, 0x98, 0x7d, 0xbe, 0xf8, 0x0a, 0xf0, - 0x79, 0x09, 0x48, 0x29, 0x26, 0x20, 0x81, 0x82, 0xd8, 0x7f, 0x17, 0x60, 0x75, 0xca, 0x8c, 0xd0, - 0x7d, 0xff, 0xdc, 0x3e, 0x5e, 0x99, 0x3c, 0xbc, 0x0a, 0x94, 0x4b, 0x39, 0x62, 0x52, 0xf6, 0xd1, - 0x6e, 0xc0, 0x86, 0x30, 0xcf, 0x51, 0xce, 0x1c, 0xb7, 0x3d, 0x47, 0x43, 0x88, 0x8e, 0x5c, 0xc0, - 0xf7, 0x20, 0x4e, 0x19, 0x8a, 0xef, 0x41, 0x9c, 0xb6, 0x11, 0xe9, 0x1e, 0xd3, 0x90, 0xb2, 0xf7, - 0x63, 0xcb, 0x47, 0x46, 0xd3, 0xa1, 0x63, 0xd4, 0x8e, 0x17, 0x04, 0x50, 0x7b, 0x2c, 0x26, 0x80, - 0xda, 0x6b, 0x26, 0xf3, 0xa8, 0x31, 0x43, 0x67, 0xbf, 0xf8, 0xe3, 0x22, 0x25, 0xbc, 0xb9, 0x48, - 0x09, 0xff, 0x5c, 0xa4, 0x84, 0x5f, 0x2f, 0x53, 0x0b, 0x6f, 0x2e, 0x53, 0x0b, 0x7f, 0x5d, 0xa6, - 0x16, 0xbe, 0xdd, 0x6d, 0xe9, 0xb4, 0x3d, 0xa8, 0xcb, 0x0d, 0xb3, 0x3b, 0x0a, 0x77, 0xfe, 0x1d, - 0x91, 0xe6, 0xeb, 0xd1, 0xbb, 0xd7, 0xaa, 0x2f, 0xb1, 0x57, 0xef, 0xc7, 0x6f, 0x03, 0x00, 0x00, - 0xff, 0xff, 0x5a, 0x05, 0x27, 0x51, 0xf2, 0x0b, 0x00, 0x00, + // 1223 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0x4d, 0x4f, 0x1b, 0x47, + 0x18, 0x66, 0x6d, 0x83, 0xcd, 0x6b, 0x08, 0xce, 0x40, 0xc0, 0x38, 0xc4, 0x98, 0x0d, 0x1f, 0x8e, + 0x55, 0xbc, 0x0a, 0x4d, 0xaa, 0x24, 0xaa, 0x54, 0xe1, 0x8f, 0x50, 0x92, 0x26, 0x44, 0x6b, 0xaa, + 0x28, 0x55, 0x25, 0x6b, 0x6d, 0x4f, 0xec, 0x6d, 0xec, 0x5d, 0xe3, 0x19, 0xd0, 0x5a, 0x14, 0xb5, + 0xea, 0xb1, 0x87, 0xaa, 0x52, 0x0f, 0xfd, 0x0f, 0xfd, 0x25, 0x3d, 0x46, 0xea, 0xa5, 0xbd, 0x55, + 0xd0, 0x53, 0x4f, 0xfd, 0x09, 0xd5, 0xce, 0x8c, 0xed, 0x5d, 0x7b, 0x17, 0x43, 0x2e, 0x30, 0xb3, + 0xf3, 0xbc, 0xef, 0xf3, 0xcc, 0x3b, 0x33, 0xcf, 0x8c, 0x61, 0xb5, 0x6a, 0x92, 0x96, 0x49, 0x14, + 0x6a, 0x29, 0x27, 0xf7, 0x2b, 0x98, 0x6a, 0xf7, 0x15, 0x82, 0x3b, 0x27, 0x7a, 0x15, 0x67, 0xdb, + 0x1d, 0x93, 0x9a, 0xe8, 0x26, 0x07, 0x64, 0xa9, 0x95, 0x15, 0x80, 0xc4, 0x4a, 0xdd, 0x34, 0xeb, + 0x4d, 0xac, 0x68, 0x6d, 0x5d, 0xd1, 0x0c, 0xc3, 0xa4, 0x1a, 0xd5, 0x4d, 0x83, 0xf0, 0x80, 0xc4, + 0x5d, 0x91, 0xb1, 0xa2, 0x11, 0xac, 0x68, 0x95, 0xaa, 0xde, 0x4f, 0x6c, 0x77, 0x04, 0x28, 0x31, + 0x4a, 0x4b, 0x2d, 0x31, 0x96, 0x71, 0x26, 0x38, 0x3a, 0xc6, 0x9d, 0x6e, 0x1f, 0xd3, 0xd6, 0xea, + 0xba, 0xc1, 0xd8, 0x04, 0x76, 0x85, 0x62, 0xa3, 0x86, 0x3b, 0x2d, 0xdd, 0xa0, 0x0a, 0xed, 0xb6, + 0x31, 0x51, 0x2a, 0x4d, 0xb3, 0xfa, 0xce, 0x77, 0x94, 0xfd, 0xe5, 0xa3, 0xf2, 0x5f, 0x12, 0xa0, + 0x3d, 0x4c, 0x0f, 0x2d, 0x52, 0x3c, 0xc1, 0x06, 0x55, 0xf1, 0xd1, 0x31, 0x26, 0x14, 0x2d, 0xc2, + 0x14, 0xb6, 0xfb, 0x24, 0x2e, 0xa5, 0x82, 0xe9, 0x69, 0x55, 0xf4, 0xd0, 0x33, 0x80, 0x01, 0x7d, + 0x3c, 0x90, 0x92, 0xd2, 0xd1, 0x9d, 0xcd, 0xac, 0xa8, 0x8e, 0xad, 0x35, 0xcb, 0xb4, 0xf6, 0xaa, + 0x94, 0x7d, 0xa5, 0xd5, 0xb1, 0xc8, 0x99, 0x0b, 0xc4, 0x25, 0xd5, 0x11, 0x8d, 0x1e, 0x42, 0xc4, + 0xec, 0xd4, 0x70, 0xa7, 0x5c, 0xe9, 0xc6, 0x83, 0x29, 0x29, 0x7d, 0x63, 0x27, 0x91, 0x1d, 0xa9, + 0x73, 0xf6, 0xc0, 0x86, 0xe4, 0xba, 0x6a, 0xd8, 0xe4, 0x0d, 0x84, 0x20, 0xd4, 0xd6, 0xea, 0x38, + 0x1e, 0x4a, 0x49, 0xe9, 0x90, 0xca, 0xda, 0x68, 0x01, 0x26, 0x9b, 0x7a, 0x4b, 0xa7, 0xf1, 0x49, + 0xf6, 0x91, 0x77, 0xe4, 0x7f, 0x25, 0x98, 0x77, 0xcd, 0x8d, 0xb4, 0x4d, 0x83, 0x60, 0xb4, 0x05, + 0x41, 0x6a, 0xf1, 0x99, 0x45, 0x77, 0x6e, 0x79, 0x70, 0x1e, 0x5a, 0xaa, 0x8d, 0x40, 0x7b, 0x30, + 0x43, 0xad, 0x72, 0x47, 0xc4, 0x91, 0x78, 0x80, 0x45, 0xac, 0xbb, 0xe6, 0xcb, 0xd6, 0xd3, 0x11, + 0x28, 0xc0, 0x6a, 0x94, 0xf6, 0xdb, 0x04, 0x3d, 0x77, 0x95, 0x2d, 0xc8, 0xca, 0xb6, 0x35, 0xb6, + 0x6c, 0x3c, 0x7a, 0xa4, 0x6e, 0x0b, 0x30, 0x49, 0x4d, 0xaa, 0x35, 0x45, 0x05, 0x78, 0x47, 0xc6, + 0x80, 0x72, 0x1d, 0x53, 0xab, 0x55, 0x35, 0x42, 0x6d, 0x19, 0x7c, 0x1d, 0x97, 0x21, 0x42, 0xad, + 0x72, 0xa5, 0x4b, 0xb1, 0x3d, 0x5f, 0x29, 0x3d, 0xa3, 0x86, 0xa9, 0x95, 0xb3, 0xbb, 0xe8, 0x01, + 0x84, 0x5a, 0x66, 0x0d, 0xb3, 0x45, 0xbc, 0xb1, 0x93, 0xf2, 0x28, 0x43, 0x3f, 0xdf, 0x0b, 0xb3, + 0x86, 0x55, 0x86, 0x96, 0xbf, 0x86, 0x79, 0x17, 0x8d, 0x28, 0x69, 0x11, 0xa2, 0x8e, 0x4a, 0x31, + 0xaa, 0xab, 0x16, 0x0a, 0x06, 0x85, 0x92, 0x5f, 0xc3, 0x5c, 0x49, 0x6f, 0x1d, 0x37, 0x35, 0xda, + 0xdb, 0x35, 0xe8, 0x1e, 0x04, 0xa8, 0x25, 0x12, 0x7a, 0xaf, 0x15, 0x2b, 0x50, 0x80, 0x5a, 0xae, + 0xc9, 0x06, 0x5c, 0x93, 0x95, 0x7f, 0x94, 0x20, 0x36, 0xc8, 0x2c, 0x44, 0x7f, 0x0a, 0x91, 0xba, + 0x46, 0xca, 0xba, 0xf1, 0xd6, 0x14, 0x04, 0x6b, 0xfe, 0x8a, 0xf7, 0x34, 0xb2, 0x6f, 0xbc, 0x35, + 0xd5, 0x70, 0x9d, 0x37, 0xd0, 0x23, 0x98, 0xea, 0x60, 0x72, 0xdc, 0xa4, 0xe2, 0x18, 0xa4, 0xfc, + 0x63, 0x55, 0x86, 0x53, 0x05, 0x5e, 0x96, 0x61, 0x86, 0x6d, 0xcb, 0xde, 0x14, 0x11, 0x84, 0x1a, + 0x1a, 0x69, 0x30, 0x0d, 0xd3, 0x2a, 0x6b, 0xcb, 0x67, 0x30, 0x2b, 0x30, 0x42, 0xec, 0xc6, 0xd8, + 0x3a, 0xb0, 0x1a, 0x0c, 0x2d, 0x44, 0xe0, 0x03, 0x17, 0xc2, 0x82, 0xc5, 0x3d, 0x4c, 0x73, 0xb6, + 0x8d, 0xbc, 0xd6, 0x69, 0xe3, 0xd0, 0x22, 0x0e, 0x67, 0x68, 0x60, 0xbd, 0xde, 0xa0, 0x4c, 0x4b, + 0x50, 0x15, 0x3d, 0xf4, 0xf4, 0xc3, 0x9d, 0xc1, 0xb9, 0xbb, 0xe5, 0xff, 0x24, 0x58, 0x1a, 0xa1, + 0xbe, 0xee, 0xc1, 0x7d, 0x00, 0x11, 0x66, 0x81, 0x65, 0xbd, 0x26, 0xa4, 0x2c, 0x67, 0x07, 0x36, + 0x98, 0xe5, 0x06, 0xc8, 0x28, 0xf6, 0x0b, 0x6a, 0x98, 0x41, 0xf7, 0x6b, 0x68, 0x1b, 0x26, 0x59, + 0x53, 0x1c, 0xd0, 0x25, 0x9f, 0x10, 0x95, 0xa3, 0xd0, 0x9e, 0x6b, 0xc6, 0xa1, 0x6b, 0x1d, 0x6a, + 0xd7, 0x94, 0x3f, 0x82, 0xb9, 0x43, 0xab, 0x80, 0xab, 0xf6, 0x29, 0x1b, 0x7b, 0x6e, 0xe5, 0xc7, + 0x10, 0x1b, 0xa0, 0xaf, 0xb5, 0x39, 0xe4, 0x47, 0x36, 0x51, 0xd1, 0x70, 0x12, 0x5d, 0x31, 0x72, + 0xdb, 0x26, 0xed, 0x45, 0x0a, 0xd2, 0x4b, 0x34, 0x3e, 0x84, 0x85, 0x1e, 0x7c, 0xb7, 0xa5, 0x1b, + 0x66, 0x8f, 0xed, 0x0e, 0x80, 0x66, 0xf7, 0xcb, 0xdf, 0x10, 0xd3, 0x10, 0xfb, 0x7d, 0x9a, 0x7d, + 0x79, 0x46, 0x4c, 0x43, 0x7e, 0x02, 0xb7, 0x86, 0xc2, 0x04, 0xd5, 0x1a, 0xcc, 0xf0, 0xb8, 0x8a, + 0x6e, 0x68, 0x9d, 0xae, 0xa0, 0x8b, 0xb2, 0x6f, 0x39, 0xf6, 0x49, 0x7e, 0x6c, 0x53, 0xf2, 0xb2, + 0xb8, 0x28, 0xaf, 0x10, 0xfa, 0x89, 0x4d, 0xeb, 0x0a, 0x15, 0xb4, 0x97, 0xcb, 0xcd, 0x7c, 0x0e, + 0x61, 0x71, 0x3b, 0xa1, 0x38, 0x2c, 0x1c, 0xa8, 0x85, 0xa2, 0x5a, 0xce, 0xbd, 0x29, 0x7f, 0xf9, + 0xb2, 0xf4, 0xaa, 0x98, 0xdf, 0x7f, 0xba, 0x5f, 0x2c, 0xc4, 0x26, 0x50, 0x0c, 0x66, 0xfa, 0x23, + 0xbb, 0xa5, 0x7c, 0x4c, 0x42, 0x37, 0x61, 0xb6, 0xff, 0xa5, 0x50, 0x2c, 0xe5, 0x63, 0x81, 0xcc, + 0xf7, 0x12, 0xcc, 0xba, 0xdc, 0x16, 0x25, 0x21, 0x91, 0x53, 0x0f, 0x76, 0x0b, 0xf9, 0xdd, 0xd2, + 0x61, 0xf9, 0xc5, 0x41, 0xa1, 0x38, 0x94, 0x76, 0x05, 0x16, 0x86, 0xc6, 0x73, 0x5f, 0x1c, 0xe4, + 0x9f, 0xc7, 0xa4, 0x44, 0x20, 0x22, 0xa1, 0x25, 0x98, 0x1f, 0x1a, 0x2d, 0xbd, 0x79, 0x99, 0x8f, + 0x05, 0x6c, 0x9d, 0x43, 0x03, 0xbb, 0x6c, 0x24, 0xb8, 0xf3, 0xdb, 0x34, 0x84, 0x4b, 0xfc, 0xd1, + 0x83, 0x4e, 0x21, 0xd2, 0x33, 0x4b, 0x24, 0x7b, 0x6c, 0x8a, 0x21, 0x8f, 0x4e, 0xdc, 0xbd, 0x14, + 0x23, 0x2c, 0x65, 0xf3, 0x87, 0x3f, 0xfe, 0xf9, 0x25, 0x90, 0x7a, 0x22, 0x65, 0xe4, 0xdb, 0x8a, + 0xc7, 0x83, 0xab, 0x47, 0x78, 0x04, 0x93, 0xcc, 0xf9, 0xd0, 0xaa, 0x47, 0x56, 0xa7, 0x6f, 0x26, + 0x52, 0xfe, 0x00, 0xc1, 0xb9, 0xc1, 0x38, 0x57, 0xd1, 0x1d, 0xc5, 0xeb, 0xa9, 0x45, 0x94, 0x53, + 0xdb, 0x6b, 0xcf, 0xd0, 0x77, 0x10, 0x75, 0x5c, 0x6a, 0x68, 0xe3, 0xb2, 0xbb, 0x70, 0x40, 0xbf, + 0x39, 0x0e, 0x26, 0x44, 0xac, 0x31, 0x11, 0xb7, 0xed, 0x89, 0x2f, 0x7a, 0xeb, 0x40, 0xdf, 0x42, + 0xd4, 0xf1, 0x50, 0xf1, 0x14, 0x30, 0xfa, 0x48, 0xf3, 0x14, 0xe0, 0xf1, 0xde, 0x91, 0x93, 0x4c, + 0x40, 0x1c, 0xf9, 0xb1, 0xff, 0x2a, 0xc1, 0xdc, 0x90, 0xe5, 0xa2, 0x7b, 0xde, 0xb9, 0x3d, 0x6e, + 0x84, 0x44, 0xe6, 0x2a, 0x50, 0x21, 0x65, 0x9b, 0x49, 0xd9, 0x42, 0x1b, 0x3e, 0x0b, 0xc2, 0x9c, + 0x55, 0x39, 0xe5, 0x77, 0xca, 0x19, 0xea, 0x42, 0xa4, 0x77, 0x32, 0x3d, 0x37, 0xe2, 0x90, 0x6d, + 0x7a, 0x6e, 0xc4, 0x61, 0xb3, 0x94, 0xd7, 0x99, 0x86, 0xa4, 0xbd, 0x1e, 0xcb, 0x1e, 0x32, 0x6a, + 0x9c, 0x8e, 0x51, 0x73, 0x2f, 0xf2, 0xa1, 0x76, 0x19, 0xa9, 0x0f, 0xb5, 0xdb, 0x32, 0xc7, 0x51, + 0x63, 0x4e, 0xf7, 0x93, 0x04, 0xb3, 0x2e, 0x1f, 0x44, 0x5b, 0x97, 0x24, 0x77, 0xba, 0x5d, 0x22, + 0x3d, 0x1e, 0x28, 0xa4, 0x64, 0x98, 0x94, 0x75, 0x5b, 0xca, 0xaa, 0xaf, 0x14, 0x85, 0x99, 0x9d, + 0x10, 0xe4, 0x70, 0x48, 0x1f, 0x41, 0xa3, 0xf6, 0xeb, 0x23, 0xc8, 0xc3, 0x6c, 0xc7, 0x09, 0xe2, + 0xcb, 0xc2, 0x05, 0xe5, 0x3e, 0xfb, 0xfd, 0x3c, 0x29, 0xbd, 0x3f, 0x4f, 0x4a, 0x7f, 0x9f, 0x27, + 0xa5, 0x9f, 0x2f, 0x92, 0x13, 0xef, 0x2f, 0x92, 0x13, 0x7f, 0x5e, 0x24, 0x27, 0xbe, 0xda, 0xa8, + 0xeb, 0xb4, 0x71, 0x5c, 0xc9, 0x56, 0xcd, 0x56, 0x2f, 0x09, 0xff, 0xb7, 0x4d, 0x6a, 0xef, 0x7a, + 0xbf, 0x7f, 0xac, 0xca, 0x14, 0xfb, 0xf5, 0xf3, 0xf1, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0xfe, + 0xb7, 0x29, 0x3a, 0xfa, 0x0d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1036,6 +1240,14 @@ type ServiceClient interface { // // Since: cosmos-sdk 0.47 TxEncode(ctx context.Context, in *TxEncodeRequest, opts ...grpc.CallOption) (*TxEncodeResponse, error) + // TxEncodeAmino encodes an amino transaction. + // + // Since: cosmos-sdk 0.47 + TxEncodeAmino(ctx context.Context, in *TxEncodeAminoRequest, opts ...grpc.CallOption) (*TxEncodeAminoResponse, error) + // TxDecodeAmino decodes an amino transaction. + // + // Since: cosmos-sdk 0.47 + TxDecodeAmino(ctx context.Context, in *TxDecodeAminoRequest, opts ...grpc.CallOption) (*TxDecodeAminoResponse, error) } type serviceClient struct { @@ -1109,6 +1321,24 @@ func (c *serviceClient) TxEncode(ctx context.Context, in *TxEncodeRequest, opts return out, nil } +func (c *serviceClient) TxEncodeAmino(ctx context.Context, in *TxEncodeAminoRequest, opts ...grpc.CallOption) (*TxEncodeAminoResponse, error) { + out := new(TxEncodeAminoResponse) + err := c.cc.Invoke(ctx, "/cosmos.tx.v1beta1.Service/TxEncodeAmino", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) TxDecodeAmino(ctx context.Context, in *TxDecodeAminoRequest, opts ...grpc.CallOption) (*TxDecodeAminoResponse, error) { + out := new(TxDecodeAminoResponse) + err := c.cc.Invoke(ctx, "/cosmos.tx.v1beta1.Service/TxDecodeAmino", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ServiceServer is the server API for Service service. type ServiceServer interface { // Simulate simulates executing a transaction for estimating gas usage. @@ -1131,6 +1361,14 @@ type ServiceServer interface { // // Since: cosmos-sdk 0.47 TxEncode(context.Context, *TxEncodeRequest) (*TxEncodeResponse, error) + // TxEncodeAmino encodes an amino transaction. + // + // Since: cosmos-sdk 0.47 + TxEncodeAmino(context.Context, *TxEncodeAminoRequest) (*TxEncodeAminoResponse, error) + // TxDecodeAmino decodes an amino transaction. + // + // Since: cosmos-sdk 0.47 + TxDecodeAmino(context.Context, *TxDecodeAminoRequest) (*TxDecodeAminoResponse, error) } // UnimplementedServiceServer can be embedded to have forward compatible implementations. @@ -1158,6 +1396,12 @@ func (*UnimplementedServiceServer) TxDecode(ctx context.Context, req *TxDecodeRe func (*UnimplementedServiceServer) TxEncode(ctx context.Context, req *TxEncodeRequest) (*TxEncodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TxEncode not implemented") } +func (*UnimplementedServiceServer) TxEncodeAmino(ctx context.Context, req *TxEncodeAminoRequest) (*TxEncodeAminoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TxEncodeAmino not implemented") +} +func (*UnimplementedServiceServer) TxDecodeAmino(ctx context.Context, req *TxDecodeAminoRequest) (*TxDecodeAminoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TxDecodeAmino not implemented") +} func RegisterServiceServer(s grpc1.Server, srv ServiceServer) { s.RegisterService(&_Service_serviceDesc, srv) @@ -1289,6 +1533,42 @@ func _Service_TxEncode_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Service_TxEncodeAmino_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TxEncodeAminoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceServer).TxEncodeAmino(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.tx.v1beta1.Service/TxEncodeAmino", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceServer).TxEncodeAmino(ctx, req.(*TxEncodeAminoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Service_TxDecodeAmino_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TxDecodeAminoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceServer).TxDecodeAmino(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.tx.v1beta1.Service/TxDecodeAmino", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceServer).TxDecodeAmino(ctx, req.(*TxDecodeAminoRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Service_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.tx.v1beta1.Service", HandlerType: (*ServiceServer)(nil), @@ -1321,6 +1601,14 @@ var _Service_serviceDesc = grpc.ServiceDesc{ MethodName: "TxEncode", Handler: _Service_TxEncode_Handler, }, + { + MethodName: "TxEncodeAmino", + Handler: _Service_TxEncodeAmino_Handler, + }, + { + MethodName: "TxDecodeAmino", + Handler: _Service_TxDecodeAmino_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/tx/v1beta1/service.proto", @@ -1932,74 +2220,194 @@ func (m *TxEncodeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func encodeVarintService(dAtA []byte, offset int, v uint64) int { - offset -= sovService(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *TxEncodeAminoRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *GetTxsEventRequest) Size() (n int) { - if m == nil { - return 0 - } + +func (m *TxEncodeAminoRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TxEncodeAminoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.Events) > 0 { - for _, s := range m.Events { - l = len(s) - n += 1 + l + sovService(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovService(uint64(l)) - } - if m.OrderBy != 0 { - n += 1 + sovService(uint64(m.OrderBy)) - } - if m.Page != 0 { - n += 1 + sovService(uint64(m.Page)) - } - if m.Limit != 0 { - n += 1 + sovService(uint64(m.Limit)) + if len(m.AminoJson) > 0 { + i -= len(m.AminoJson) + copy(dAtA[i:], m.AminoJson) + i = encodeVarintService(dAtA, i, uint64(len(m.AminoJson))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *GetTxsEventResponse) Size() (n int) { - if m == nil { - return 0 +func (m *TxEncodeAminoResponse) 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 *TxEncodeAminoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TxEncodeAminoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.Txs) > 0 { - for _, e := range m.Txs { - l = e.Size() - n += 1 + l + sovService(uint64(l)) - } - } - if len(m.TxResponses) > 0 { - for _, e := range m.TxResponses { - l = e.Size() - n += 1 + l + sovService(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovService(uint64(l)) - } - if m.Total != 0 { - n += 1 + sovService(uint64(m.Total)) + if len(m.AminoBinary) > 0 { + i -= len(m.AminoBinary) + copy(dAtA[i:], m.AminoBinary) + i = encodeVarintService(dAtA, i, uint64(len(m.AminoBinary))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *BroadcastTxRequest) Size() (n int) { +func (m *TxDecodeAminoRequest) 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 *TxDecodeAminoRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TxDecodeAminoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AminoBinary) > 0 { + i -= len(m.AminoBinary) + copy(dAtA[i:], m.AminoBinary) + i = encodeVarintService(dAtA, i, uint64(len(m.AminoBinary))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TxDecodeAminoResponse) 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 *TxDecodeAminoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TxDecodeAminoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AminoJson) > 0 { + i -= len(m.AminoJson) + copy(dAtA[i:], m.AminoJson) + i = encodeVarintService(dAtA, i, uint64(len(m.AminoJson))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintService(dAtA []byte, offset int, v uint64) int { + offset -= sovService(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GetTxsEventRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Events) > 0 { + for _, s := range m.Events { + l = len(s) + n += 1 + l + sovService(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.OrderBy != 0 { + n += 1 + sovService(uint64(m.OrderBy)) + } + if m.Page != 0 { + n += 1 + sovService(uint64(m.Page)) + } + if m.Limit != 0 { + n += 1 + sovService(uint64(m.Limit)) + } + return n +} + +func (m *GetTxsEventResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Txs) > 0 { + for _, e := range m.Txs { + l = e.Size() + n += 1 + l + sovService(uint64(l)) + } + } + if len(m.TxResponses) > 0 { + for _, e := range m.TxResponses { + l = e.Size() + n += 1 + l + sovService(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.Total != 0 { + n += 1 + sovService(uint64(m.Total)) + } + return n +} + +func (m *BroadcastTxRequest) Size() (n int) { if m == nil { return 0 } @@ -2187,6 +2595,58 @@ func (m *TxEncodeResponse) Size() (n int) { return n } +func (m *TxEncodeAminoRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AminoJson) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + return n +} + +func (m *TxEncodeAminoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AminoBinary) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + return n +} + +func (m *TxDecodeAminoRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AminoBinary) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + return n +} + +func (m *TxDecodeAminoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AminoJson) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + return n +} + func sovService(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -3813,6 +4273,338 @@ func (m *TxEncodeResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *TxEncodeAminoRequest) 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 ErrIntOverflowService + } + 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: TxEncodeAminoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TxEncodeAminoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AminoJson", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + 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 ErrInvalidLengthService + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AminoJson = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TxEncodeAminoResponse) 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 ErrIntOverflowService + } + 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: TxEncodeAminoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TxEncodeAminoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AminoBinary", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AminoBinary = append(m.AminoBinary[:0], dAtA[iNdEx:postIndex]...) + if m.AminoBinary == nil { + m.AminoBinary = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TxDecodeAminoRequest) 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 ErrIntOverflowService + } + 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: TxDecodeAminoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TxDecodeAminoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AminoBinary", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AminoBinary = append(m.AminoBinary[:0], dAtA[iNdEx:postIndex]...) + if m.AminoBinary == nil { + m.AminoBinary = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TxDecodeAminoResponse) 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 ErrIntOverflowService + } + 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: TxDecodeAminoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TxDecodeAminoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AminoJson", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + 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 ErrInvalidLengthService + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AminoJson = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipService(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/types/tx/service.pb.gw.go b/types/tx/service.pb.gw.go index 04789ddc09ad..44b8a5584502 100644 --- a/types/tx/service.pb.gw.go +++ b/types/tx/service.pb.gw.go @@ -331,6 +331,74 @@ func local_request_Service_TxEncode_0(ctx context.Context, marshaler runtime.Mar } +func request_Service_TxEncodeAmino_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq TxEncodeAminoRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.TxEncodeAmino(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Service_TxEncodeAmino_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq TxEncodeAminoRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.TxEncodeAmino(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Service_TxDecodeAmino_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq TxDecodeAminoRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.TxDecodeAmino(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Service_TxDecodeAmino_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq TxDecodeAminoRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.TxDecodeAmino(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterServiceHandlerServer registers the http handlers for service Service to "mux". // UnaryRPC :call ServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -498,6 +566,52 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se }) + mux.Handle("POST", pattern_Service_TxEncodeAmino_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Service_TxEncodeAmino_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Service_TxEncodeAmino_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Service_TxDecodeAmino_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Service_TxDecodeAmino_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Service_TxDecodeAmino_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -679,6 +793,46 @@ func RegisterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl }) + mux.Handle("POST", pattern_Service_TxEncodeAmino_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Service_TxEncodeAmino_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Service_TxEncodeAmino_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Service_TxDecodeAmino_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Service_TxDecodeAmino_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Service_TxDecodeAmino_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -696,6 +850,10 @@ var ( pattern_Service_TxDecode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "tx", "v1beta1", "decode"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Service_TxEncode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "tx", "v1beta1", "encode"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Service_TxEncodeAmino_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"cosmos", "tx", "v1beta1", "encode", "amino"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Service_TxDecodeAmino_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"cosmos", "tx", "v1beta1", "decode", "amino"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -712,4 +870,8 @@ var ( forward_Service_TxDecode_0 = runtime.ForwardResponseMessage forward_Service_TxEncode_0 = runtime.ForwardResponseMessage + + forward_Service_TxEncodeAmino_0 = runtime.ForwardResponseMessage + + forward_Service_TxDecodeAmino_0 = runtime.ForwardResponseMessage ) diff --git a/x/auth/tx/service.go b/x/auth/tx/service.go index ce45dfc32dfb..e06aab1d4676 100644 --- a/x/auth/tx/service.go +++ b/x/auth/tx/service.go @@ -19,6 +19,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/query" txtypes "github.com/cosmos/cosmos-sdk/types/tx" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" ) // baseAppSimulateFn is the signature of the Baseapp#Simulate function. @@ -271,6 +272,28 @@ func (s txServer) TxEncode(ctx context.Context, req *txtypes.TxEncodeRequest) (* }, nil } +// TxEncodeAmino implements the ServiceServer.TxEncodeAmino RPC method. +func (s txServer) TxEncodeAmino(ctx context.Context, req *txtypes.TxEncodeAminoRequest) (*txtypes.TxEncodeAminoResponse, error) { + if req.AminoJson == "" { + return nil, status.Error(codes.InvalidArgument, "invalid empty tx json") + } + + var stdTx legacytx.StdTx + err := s.clientCtx.LegacyAmino.UnmarshalJSON([]byte(req.AminoJson), &stdTx) + if err != nil { + return nil, err + } + + encodedBytes, err := s.clientCtx.LegacyAmino.Marshal(stdTx) + if err != nil { + return nil, err + } + + return &txtypes.TxEncodeAminoResponse{ + AminoBinary: encodedBytes, + }, nil +} + // TxDecode implements the ServiceServer.TxDecode RPC method. func (s txServer) TxDecode(ctx context.Context, req *txtypes.TxDecodeRequest) (*txtypes.TxDecodeResponse, error) { if req.TxBytes == nil { @@ -292,6 +315,28 @@ func (s txServer) TxDecode(ctx context.Context, req *txtypes.TxDecodeRequest) (* return nil, fmt.Errorf("expected %T, got %T", &wrapper{}, txb) } +// TxDecodeAmino implements the ServiceServer.TxDecodeAmino RPC method. +func (s txServer) TxDecodeAmino(ctx context.Context, req *txtypes.TxDecodeAminoRequest) (*txtypes.TxDecodeAminoResponse, error) { + if req.AminoBinary == nil { + return nil, status.Error(codes.InvalidArgument, "invalid empty tx bytes") + } + + var stdTx legacytx.StdTx + err := s.clientCtx.LegacyAmino.Unmarshal(req.AminoBinary, &stdTx) + if err != nil { + return nil, err + } + + res, err := s.clientCtx.LegacyAmino.MarshalJSON(stdTx) + if err != nil { + return nil, err + } + + return &txtypes.TxDecodeAminoResponse{ + AminoJson: string(res), + }, nil +} + // RegisterTxService registers the tx service on the gRPC router. func RegisterTxService( qrt gogogrpc.Server,